summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r--src/lib/libssl/ssl_lib.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 430e9bdc12..0f86238d5e 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.267 2021/09/08 17:27:33 tb Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.268 2021/09/10 08:59: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 *
@@ -3058,6 +3058,15 @@ SSL_CTX_get0_certificate(const SSL_CTX *ctx)
3058 return ctx->internal->cert->key->x509; 3058 return ctx->internal->cert->key->x509;
3059} 3059}
3060 3060
3061EVP_PKEY *
3062SSL_CTX_get0_privatekey(const SSL_CTX *ctx)
3063{
3064 if (ctx->internal->cert == NULL)
3065 return NULL;
3066
3067 return ctx->internal->cert->key->privatekey;
3068}
3069
3061int 3070int
3062SSL_want(const SSL *s) 3071SSL_want(const SSL *s)
3063{ 3072{