From: Dr. Stephen Henson Date: Thu, 16 Jan 2014 14:06:19 +0000 (+0000) Subject: Add new function SSL_CTX_get_ssl_method(). X-Git-Tag: OpenSSL_1_0_2-beta1~97 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c4f01c533ba875adbb021b668b3f53527cf32e6e;p=oweals%2Fopenssl.git Add new function SSL_CTX_get_ssl_method(). Partial fix for PR#3183. (cherry picked from commit ba168244a14bbd056e502d7daa04cae4aabe9d0d) --- diff --git a/ssl/ssl.h b/ssl/ssl.h index b84e549ed3..6ac4e92216 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -2305,6 +2305,7 @@ int SSL_renegotiate_abbreviated(SSL *s); int SSL_renegotiate_pending(SSL *s); int SSL_shutdown(SSL *s); +const SSL_METHOD *SSL_CTX_get_ssl_method(SSL_CTX *ctx); const SSL_METHOD *SSL_get_ssl_method(SSL *s); int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method); const char *SSL_alert_type_string_long(int value); diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 87943c8315..9862f63d2b 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -2715,6 +2715,11 @@ void ssl_update_cache(SSL *s,int mode) } } +const SSL_METHOD *SSL_CTX_get_ssl_method(SSL_CTX *ctx) + { + return ctx->method; + } + const SSL_METHOD *SSL_get_ssl_method(SSL *s) { return(s->method);