.\" .\" $OpenBSD: SSL_CTX_set_ssl_version.3,v 1.2 2014/12/02 14:11:01 jmc Exp $ .\" .Dd $Mdocdate: December 2 2014 $ .Dt SSL_CTX_SET_SSL_VERSION 3 .Os .Sh NAME .Nm SSL_CTX_set_ssl_version , .Nm SSL_set_ssl_method , .Nm SSL_get_ssl_method .Nd choose a new TLS/SSL method .Sh SYNOPSIS .In openssl/ssl.h .Ft int .Fn SSL_CTX_set_ssl_version "SSL_CTX *ctx" "const SSL_METHOD *method" .Ft int .Fn SSL_set_ssl_method "SSL *s" "const SSL_METHOD *method" .Ft const SSL_METHOD * .Fn SSL_get_ssl_method "SSL *ssl" .Sh DESCRIPTION .Fn SSL_CTX_set_ssl_version sets a new default TLS/SSL .Fa method for .Vt SSL objects newly created from this .Fa ctx . .Vt SSL objects already created with .Xr SSL_new 3 are not affected, except when .Xr SSL_clear 3 is called. .Pp .Fn SSL_set_ssl_method sets a new TLS/SSL .Fa method for a particular .Vt SSL object .Fa s . It may be reset when .Xr SSL_clear 3 is called. .Pp .Fn SSL_get_ssl_method returns a function pointer to the TLS/SSL method set in .Fa ssl . .Sh NOTES The available .Fa method choices are described in .Xr SSL_CTX_new 3 . .Pp When .Xr SSL_clear 3 is called and no session is connected to an .Vt SSL object, the method of the .Vt SSL object is reset to the method currently set in the corresponding .Vt SSL_CTX object. .Sh RETURN VALUES The following return values can occur for .Fn SSL_CTX_set_ssl_version and .Fn SSL_set_ssl_method : .Bl -tag -width Ds .It 0 The new choice failed. Check the error stack to find out the reason. .It 1 The operation succeeded. .El .Sh SEE ALSO .Xr ssl 3 , .Xr SSL_clear 3 , .Xr SSL_CTX_new 3 , .Xr SSL_new 3 , .Xr SSL_set_connect_state 3