[openssl-users] Does STACK_OF(X509_NAME) need to be free'd when using SSL_load_client_CA_file?

Jeffrey Walton noloader at gmail.com
Sat May 9 09:16:22 UTC 2015


Does STACK_OF(X509_NAME) need to be free'd when using SSL_load_client_CA_file?

s_server.c uses it like so, but I'm not sure if its correct:

    if (caFile != NULL) {
        SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file(caFile));

Or does SSL_CTX_set_client_CA_list take ownership or assign ownership
to the context?

The man pages do not discuss the memory management requirements
(http://www.openssl.org/docs/ssl/SSL_load_client_CA_file.html and
https://www.openssl.org/docs/ssl/SSL_CTX_set_client_CA_list.html).


More information about the openssl-users mailing list