Re: Building a DER sequence

2019-07-10 Thread Ken Goldman
On 7/3/2019 4:30 PM, Viktor Dukhovni wrote: On Jul 3, 2019, at 2:41 PM, Ken Goldman wrote: That link points to the X509_dup page. It doesn't explain how to build a DER sequence, does it? The documentation is incomplete, and much RTFS is required, but it and code pointers should get you star

Re: Building a DER sequence

2019-07-03 Thread Viktor Dukhovni
On Jul 3, 2019, at 2:41 PM, Ken Goldman wrote: > That link points to the X509_dup page. It doesn't explain how to > build a DER sequence, does it? The documentation is incomplete, and much RTFS is required, but it and code pointers should get you started. -- Viktor.

Re: Building a DER sequence

2019-07-03 Thread Ken Goldman
On 7/1/2019 6:03 PM, Viktor Dukhovni wrote: On Mon, Jul 01, 2019 at 09:40:25PM +, Salz, Rich via openssl-users wrote: I see those macros, but ... is there any documentation? No. There's a high-level overview at: https://www.openssl.org/docs/manmaster/man3/X509_dup.html That

Re: Building a DER sequence

2019-07-03 Thread Ken Goldman
On 7/1/2019 5:19 PM, Viktor Dukhovni wrote: On Jun 25, 2019, at 10:59 AM, Ken Goldman wrote: I have to build a DER byte stream for a sequence containing: algorithm ID issuer validity subject name extensions What is the general approach? See for exam

Re: Building a DER sequence

2019-07-01 Thread Viktor Dukhovni
On Mon, Jul 01, 2019 at 09:40:25PM +, Salz, Rich via openssl-users wrote: > >I see those macros, but ... is there any documentation? > > No. There's a high-level overview at: https://www.openssl.org/docs/manmaster/man3/X509_dup.html -- Viktor.

Re: Building a DER sequence

2019-07-01 Thread Salz, Rich via openssl-users
>I see those macros, but ... is there any documentation? No.

Re: Building a DER sequence

2019-07-01 Thread Viktor Dukhovni
> On Jun 25, 2019, at 10:59 AM, Ken Goldman wrote: > > I have to build a DER byte stream for a sequence containing: > > algorithm ID > issuer > validity > subject name > extensions > > What is the general approach? See for example: https://github.com/openssl/op

Re: Building a DER sequence

2019-07-01 Thread Ken Goldman
On 6/26/2019 11:34 AM, Salz, Rich via openssl-users wrote: Do I construct a sequence and add items to it - top down? No, because then you have to go back and patch the sequence length and perhaps slide everything up or down a copule of bytes. I would look at an existing simple sequence an

Re: Building a DER sequence

2019-07-01 Thread Ken Goldman
On 6/26/2019 11:34 AM, Salz, Rich via openssl-users wrote: Do I construct a sequence and add items to it - top down? No, because then you have to go back and patch the sequence length and perhaps slide everything up or down a copule of bytes. I would look at an existing simple sequence an

Re: Building a DER sequence

2019-06-26 Thread Salz, Rich via openssl-users
Do I construct a sequence and add items to it - top down? No, because then you have to go back and patch the sequence length and perhaps slide everything up or down a copule of bytes. I would look at an existing simple sequence and start writing your own based on that; look for ASN1_SEQUENC