函数SSL_CTX_use_certificate
是否复制证书字节?
我可以在函数调用后通过调用X509_free(cert);
释放证书内存吗?
BIO *cbio = BIO_new_mem_buf((void*)cert_iter, first_cert_length);
X509 *cert = PEM_read_bio_X509(cbio, NULL, 0, NULL);
BIO_free(cbio);
assert(cert != NULL);
SSL_CTX_use_certificate(mSslServerRoleCtx.native_handle(), cert);