From 1c72f70df43a0ceb118a990b9554913e26a83696 Mon Sep 17 00:00:00 2001 From: FdaSilvaYY Date: Thu, 7 Apr 2016 00:20:11 +0200 Subject: Use more X509_REQ_get0_pubkey & X509_get0_pubkey Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1284) --- test/ssltest_old.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/ssltest_old.c b/test/ssltest_old.c index 74908b0087..8863465f99 100644 --- a/test/ssltest_old.c +++ b/test/ssltest_old.c @@ -852,11 +852,11 @@ static void print_details(SSL *c_ssl, const char *prefix) SSL_CIPHER_get_version(ciph), SSL_CIPHER_get_name(ciph)); cert = SSL_get_peer_certificate(c_ssl); if (cert != NULL) { - pkey = X509_get_pubkey(cert); - if (pkey != NULL) { + EVP_PKEY* pubkey = X509_get0_pubkey(cert); + + if (pubkey != NULL) { BIO_puts(bio_stdout, ", "); - print_key_details(bio_stdout, pkey); - EVP_PKEY_free(pkey); + print_key_details(bio_stdout, pubkey); } X509_free(cert); } -- cgit v1.2.3