[openssl-users] Lost in STACK_OF again (porting M2Crypto to OpenSSL 1.1.* API)

Matěj Cepl mcepl at cepl.eu
Thu Sep 14 12:16:29 UTC 2017

On 2017-09-12, 19:33 GMT, Dr. Stephen Henson wrote:
> Yes *_seq_unpack() is no longer in 1.1. What happens is that 
> code above it generates a function d2i_SEQ_CERT() which does 
> the same as ASN1_seq_unpack() for a certificate.
> So something like this should work:
> const unsigned char *tmp = (unsigned char *)encoded_string;
> ...
> certs = d2i_SEQ_CERT(NULL, &tmp, encoded_string_len);

Thank you very much for the help. It really helped!

Also, for those who will get to this later, the documentation 
can be found in d2i_x509(3) and i2d_x509(3) (both are quite 
different in 1.1.0).


http://matej.ceplovi.cz/blog/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
The law, in its majestic equality, forbids the rich as well as
the poor to sleep under bridges, to beg in the streets, and to
steal bread.
    -- Anatole France

More information about the openssl-users mailing list