From: tb Date: Mon, 10 May 2021 17:05:26 +0000 (+0000) Subject: Provide SSL_CTX_get_ssl_method(3) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=418e1009c12a48cf3a27ea903d96425a69a0fcf0;p=openbsd Provide SSL_CTX_get_ssl_method(3) ok jsing --- diff --git a/lib/libssl/Symbols.list b/lib/libssl/Symbols.list index 871af0ca92d..41ccd7fe9c0 100644 --- a/lib/libssl/Symbols.list +++ b/lib/libssl/Symbols.list @@ -86,6 +86,7 @@ SSL_CTX_get_info_callback SSL_CTX_get_max_proto_version SSL_CTX_get_min_proto_version SSL_CTX_get_quiet_shutdown +SSL_CTX_get_ssl_method SSL_CTX_get_timeout SSL_CTX_get_verify_callback SSL_CTX_get_verify_depth diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h index 02f37fb0d0b..2ac2bcbb54e 100644 --- a/lib/libssl/ssl.h +++ b/lib/libssl/ssl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl.h,v 1.187 2021/05/10 17:03:57 tb Exp $ */ +/* $OpenBSD: ssl.h,v 1.188 2021/05/10 17:05:26 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1218,6 +1218,8 @@ int SSL_get_max_proto_version(SSL *ssl); int SSL_set_min_proto_version(SSL *ssl, uint16_t version); int SSL_set_max_proto_version(SSL *ssl, uint16_t version); +const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx); + #ifndef LIBRESSL_INTERNAL #define SSL_CTRL_SET_CURVES SSL_CTRL_SET_GROUPS #define SSL_CTRL_SET_CURVES_LIST SSL_CTRL_SET_GROUPS_LIST diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 44cc1ed3237..2e3be8b13f3 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.255 2021/03/29 16:57:38 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.256 2021/05/10 17:05:26 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -3058,6 +3058,12 @@ SSL_set_max_proto_version(SSL *ssl, uint16_t version) &ssl->internal->max_proto_version); } +const SSL_METHOD * +SSL_CTX_get_ssl_method(const SSL_CTX *ctx) +{ + return ctx->method; +} + static int ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) {