From bf4863b3f5729f3679c4270dc8125f2bded67caf 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. --- 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 efd491cb53..5e07f7eef6 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -2210,6 +2210,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 2f2358b249..87943c8315 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -535,6 +535,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