diff options
Diffstat (limited to 'test/ssltest_old.c')
-rw-r--r-- | test/ssltest_old.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |