Assume the following code snippet: const unsigned char a_cert = {....... }; (A DER certificate we
wish to load into the context's chain storage) const unsigned char *cp; X509 *cc_cert; X509_STORE *cc = SSL_CTX_get_cert_store(a_context); /* X509_free(cc_cert); */ The question is the last line and whether it should be there (uncommented) -- does the X509_STORE_add_cert call load the *reference* or does it load the *data* (allocating whatever it needs internally to do so)? In other words do I need to keep that X509 structure around that got allocated by the d2i_X509 call or do I free it after I've pushed it into the store? The docs are silent on this as far as I can tell but some example
code I've seen floating around doesn't free it. |
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
-- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users