On 8/17/2021 9:47 PM, Sands, Daniel via openssl-users wrote:
The dump you show below is:
Attributes (set, tagged with a 0, optional)
Version
privateKeyAlgorithm
privateKey
This is a PKCS#8 packet for a key. The encapsulated data is the RSA public key
in PKCS1 format. I know OpenSSL has built-
> My latest attempt to code the below DER is this. It compiles, but the d2i
> segfaults on apparently the second element.
>
> Anything obviously wrong?
>
> typedef struct {
> ASN1_INTEGER *version;
> ASN1_INTEGER *serialNumber;
> X509_ALGOR *signature;
> X509_PUBKEY *key;
>
My latest attempt to code the below DER is this. It compiles, but the d2i
segfaults on
apparently the second element.
Anything obviously wrong?
typedef struct {
ASN1_INTEGER *version;
ASN1_INTEGER *serialNumber;
X509_ALGOR *signature;
X509_PUBKEY *key;
} TPM_ADDTOCERT;
ASN1_S
On 8/17/2021 12:57 PM, Sands, Daniel via openssl-users wrote:
Now I would like to do the other end, where I have der and I want to
parse back to the structure, using d2i()
1 - Is there a tutorial on this?
Seems like you don't need one. If you got i2d working you should have d2i
already!
I
> >> Now I would like to do the other end, where I have der and I want to
> >> parse back to the structure, using d2i()
> >>
> >> 1 - Is there a tutorial on this?
> >
> > Seems like you don't need one. If you got i2d working you should have d2i
> already!
> >
>
> I wasn't clear. The input and out
On 8/17/2021 10:38 AM, Matt Caswell wrote:
On 16/08/2021 21:56, Ken Goldman wrote:
I am trying to parse some ASN.1 DER so I can add it to an X.509 certificate.
For the input side, a poster showed me
ASN1_SEQUENCE, ASN1_SEQUENCE_END, and then
DECLARE_ASN1_FUNCTIONS, IMPLEMENT_ASN1_FUNCTIONS
On 16/08/2021 21:56, Ken Goldman wrote:
I am trying to parse some ASN.1 DER so I can add it to an X.509
certificate.
For the input side, a poster showed me
ASN1_SEQUENCE, ASN1_SEQUENCE_END, and then
DECLARE_ASN1_FUNCTIONS, IMPLEMENT_ASN1_FUNCTIONS
which created the i2d() function.
It sho
I am trying to parse some ASN.1 DER so I can add it to an X.509 certificate.
For the input side, a poster showed me
ASN1_SEQUENCE, ASN1_SEQUENCE_END, and then
DECLARE_ASN1_FUNCTIONS, IMPLEMENT_ASN1_FUNCTIONS
which created the i2d() function.
Now I would like to do the other end, where I have d