summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/s_client.c
diff options
context:
space:
mode:
authortb <>2022-02-03 17:44:04 +0000
committertb <>2022-02-03 17:44:04 +0000
commit99e959b3452e5b44dc52e0e6e87b7e4ec42147af (patch)
treed64d65e1fd6a83904267a56b4660fb0e0411b465 /src/usr.bin/openssl/s_client.c
parent355870caa2e034326f5b6b4df6b18cf93e907bc7 (diff)
downloadopenbsd-99e959b3452e5b44dc52e0e6e87b7e4ec42147af.tar.gz
openbsd-99e959b3452e5b44dc52e0e6e87b7e4ec42147af.tar.bz2
openbsd-99e959b3452e5b44dc52e0e6e87b7e4ec42147af.zip
Use X509_*get0_pubkey() wherever possible to simplify and clean up
the code. Also add error checking where possible. ok jsing
Diffstat (limited to 'src/usr.bin/openssl/s_client.c')
-rw-r--r--src/usr.bin/openssl/s_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/usr.bin/openssl/s_client.c b/src/usr.bin/openssl/s_client.c
index da6ef088b8..15ebb0c0a7 100644
--- a/src/usr.bin/openssl/s_client.c
+++ b/src/usr.bin/openssl/s_client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s_client.c,v 1.57 2021/12/26 14:46:06 jsing Exp $ */ 1/* $OpenBSD: s_client.c,v 1.58 2022/02/03 17:44:04 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1772,10 +1772,10 @@ print_stuff(BIO *bio, SSL *s, int full)
1772 SSL_CIPHER_get_name(c)); 1772 SSL_CIPHER_get_name(c));
1773 if (peer != NULL) { 1773 if (peer != NULL) {
1774 EVP_PKEY *pktmp; 1774 EVP_PKEY *pktmp;
1775 pktmp = X509_get_pubkey(peer); 1775
1776 pktmp = X509_get0_pubkey(peer);
1776 BIO_printf(bio, "Server public key is %d bit\n", 1777 BIO_printf(bio, "Server public key is %d bit\n",
1777 EVP_PKEY_bits(pktmp)); 1778 EVP_PKEY_bits(pktmp));
1778 EVP_PKEY_free(pktmp);
1779 } 1779 }
1780 BIO_printf(bio, "Secure Renegotiation IS%s supported\n", 1780 BIO_printf(bio, "Secure Renegotiation IS%s supported\n",
1781 SSL_get_secure_renegotiation_support(s) ? "" : " NOT"); 1781 SSL_get_secure_renegotiation_support(s) ? "" : " NOT");