summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2016-04-07 00:20:11 +0200
committerRich Salz <rsalz@openssl.org>2016-07-20 01:35:38 -0400
commit1c72f70df43a0ceb118a990b9554913e26a83696 (patch)
tree6f7e4ed58214f50f32417ee89fcacd68bcb8ca96 /test
parent415e7c488e09119a42be24129e38ddd43524ee06 (diff)
Use more X509_REQ_get0_pubkey & X509_get0_pubkey
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1284)
Diffstat (limited to 'test')
-rw-r--r--test/ssltest_old.c8
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);
}