summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authortb <>2020-09-19 10:17:56 +0000
committertb <>2020-09-19 10:17:56 +0000
commitecd45aad00b8302c0634f02c3fe281a9e68c54ed (patch)
tree9ead28bad57f20e29da93290281695e380d50735 /src/lib/libssl/ssl_lib.c
parentea977a7fe6f863754263a4149c1ea1c7a9a803fd (diff)
downloadopenbsd-ecd45aad00b8302c0634f02c3fe281a9e68c54ed.tar.gz
openbsd-ecd45aad00b8302c0634f02c3fe281a9e68c54ed.tar.bz2
openbsd-ecd45aad00b8302c0634f02c3fe281a9e68c54ed.zip
Prepare to provide SSL_get0_peername
This is a convenience reacharound to libcrypto that trivially wraps X509_VERIFY_PARAM_get0_peername(). It is used by unbound 1.11.0 for better logging. As it's part of the API that landed with OpenSSL's DANE, more recent postfix snapshots use it as well. ok beck inoguchi jsing
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r--src/lib/libssl/ssl_lib.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index b04b67df41..65d5614bfb 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.232 2020/09/19 10:12:06 tb Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.233 2020/09/19 10:17:56 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 *
@@ -470,6 +470,12 @@ SSL_set1_host(SSL *s, const char *hostname)
470 return X509_VERIFY_PARAM_set1_host(s->param, hostname, 0); 470 return X509_VERIFY_PARAM_set1_host(s->param, hostname, 0);
471} 471}
472 472
473const char *
474SSL_get0_peername(SSL *s)
475{
476 return X509_VERIFY_PARAM_get0_peername(s->param);
477}
478
473X509_VERIFY_PARAM * 479X509_VERIFY_PARAM *
474SSL_CTX_get0_param(SSL_CTX *ctx) 480SSL_CTX_get0_param(SSL_CTX *ctx)
475{ 481{