i2d_ASN1_SET_OF_X509 alternative in OpenSSL1.1.1

31 views
Skip to first unread message

Dino

unread,
Dec 12, 2019, 5:23:20 AM12/12/19
to
Hi,

I am trying to perform migration from OpenSSL version 1.0.2 to 1.1.1 and I am facing problem with removed functions i2d_ASN1_SET_OF_X509 and d2i_ASN1_SET_OF_X509:

1. How can I geather the length of STACK_OF(X509) encoded certificate chain?
Example how this was done in openSSL1.0.2:
chain_len = i2d_ASN1_SET_OF_X509(certChain, NULL, i2d_X509, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, 0);

2. How to copy STACK_OF(X509) encoded certificate chain into char* buffer?
Example how this was done in openSSL1.0.2:
i2d_ASN1_SET_OF_X509(certChain, (unsigned char **) &bufPtr, i2d_X509, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, 0);

3. How to form STACK_OF(X509) encoded cetrificates from char *p?
Example how this was done in openSSL1.0.2:
stack = d2i_ASN1_SET_OF_X509(NULL,(const unsigned char**)&p, cert->l, d2i_X509, X509_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL);

ediga venki

unread,
Dec 1, 2020, 5:39:40 AM12/1/20
to
Did you resolved these issues, even I am facing same issues .please let us know your approach.
Reply all
Reply to author
Forward
0 new messages