-.\" $OpenBSD: SSL_CTX_set_ssl_version.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $
+.\" $OpenBSD: SSL_CTX_set_ssl_version.3,v 1.5 2021/05/11 19:48:56 tb Exp $
.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: March 27 2018 $
+.Dd $Mdocdate: May 11 2021 $
.Dt SSL_CTX_SET_SSL_VERSION 3
.Os
.Sh NAME
.Nm SSL_CTX_set_ssl_version ,
.Nm SSL_set_ssl_method ,
+.Nm SSL_CTX_get_ssl_method ,
.Nm SSL_get_ssl_method
.Nd choose a new TLS/SSL method
.Sh SYNOPSIS
.Ft int
.Fn SSL_set_ssl_method "SSL *s" "const SSL_METHOD *method"
.Ft const SSL_METHOD *
+.Fn SSL_CTX_get_ssl_method "SSL_CTX *ctx"
+.Ft const SSL_METHOD *
.Fn SSL_get_ssl_method "SSL *ssl"
.Sh DESCRIPTION
.Fn SSL_CTX_set_ssl_version
.Xr SSL_clear 3
is called.
.Pp
+.Fn SSL_CTX_get_ssl_method
+and
.Fn SSL_get_ssl_method
-returns a function pointer to the TLS/SSL method set in
-.Fa ssl .
+return a function pointer to the TLS/SSL method set in
+.Fa ctx
+and
+.Fa ssl ,
+respectively.
.Pp
The available
.Fa method
.Fn SSL_get_ssl_method
first appeared in SSLeay 0.8.0 and have been available since
.Ox 2.4 .
+.Fn SSL_CTX_get_ssl_method
+first appeared in OpenSSL 1.1.0 and has been available since
+.Ox 7.0 .