From 7af31968dd867a15cca4789a754009a74fbcb2b7 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 13 Dec 2013 13:59:53 +0000 Subject: [PATCH] Verify parameter retrieval functions. New functions to retrieve internal pointers to X509_VERIFY_PARAM for SSL_CTX and SSL structures. (cherry picked from commit be0c9270690ed9c1799900643cab91de146de857) --- ssl/ssl.h | 3 +++ ssl/ssl_lib.c | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/ssl/ssl.h b/ssl/ssl.h index 95c96b90aa..2eccca29e0 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -2261,6 +2261,9 @@ int SSL_set_trust(SSL *s, int trust); int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm); int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm); +X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx); +X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl); + #ifndef OPENSSL_NO_SRP int SSL_CTX_set_srp_username(SSL_CTX *ctx,char *name); int SSL_CTX_set_srp_password(SSL_CTX *ctx,char *password); diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 1bedb54d47..fe795a1a55 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -536,6 +536,16 @@ int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm) return X509_VERIFY_PARAM_set1(ssl->param, vpm); } +X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx) + { + return ctx->param; + } + +X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl) + { + return ssl->param; + } + void SSL_certs_clear(SSL *s) { ssl_cert_clear_certs(s->cert); -- 2.25.1