[openssl-users] Help finding replacement for ASN1_seq_unpack_X509

Dr. Stephen Henson steve at openssl.org
Thu Jul 21 13:54:05 UTC 2016

On Thu, Jul 21, 2016, Salz, Rich wrote:

> > 	    STACK_OF(X509)* stack = sk_x509_new_null();
> > 	    sk_x509_push(stack, cert);
> > 	    sk_x509_push(stack, ca);
> > 
> > 	    return ASN1_seq_pack_X509(stack, i2d_X509, NULL, len_out);
> Okay, so your just pushing two DER-format blobs one after the other.
> Yes, what you thought to do is fine. :)

Actually that is including a SEQUENCE header and not just the DER blobs. So if
the result must be compatible with the original format the snippet I suggested
would be appropriate here.

Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org

More information about the openssl-users mailing list