New functions to retrieve certificate from SSL_CTX