diff options
author | 2018-02-17 15:13:12 +0000 | |
---|---|---|
committer | 2018-02-17 15:13:12 +0000 | |
commit | 99b961624f3283ec8a6bc21b38e658db553f95a8 (patch) | |
tree | c549e55f6cea385c4bb0889eda2536a07e20f6e4 /lib/libssl/ssl_lib.c | |
parent | Provide SSL_CTX_get_tlsext_status_cb() and SSL_CTX_get_tlsext_status_arg(). (diff) | |
download | wireguard-openbsd-99b961624f3283ec8a6bc21b38e658db553f95a8.tar.xz wireguard-openbsd-99b961624f3283ec8a6bc21b38e658db553f95a8.zip |
Provide SSL_CTX_get0_certificate()
Diffstat (limited to 'lib/libssl/ssl_lib.c')
-rw-r--r-- | lib/libssl/ssl_lib.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 16f2b546379..79021d7e0be 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.174 2018/02/14 17:08:44 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.175 2018/02/17 15:13:12 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -2877,6 +2877,15 @@ SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store) ctx->cert_store = store; } +X509 * +SSL_CTX_get0_certificate(const SSL_CTX *ctx) +{ + if (ctx->internal->cert == NULL) + return NULL; + + return ctx->internal->cert->key->x509; +} + int SSL_want(const SSL *s) { |