168651Skris=pod 268651Skris 368651Skris=head1 NAME 468651Skris 568651SkrisSSL_CTX_set_ssl_version, SSL_set_ssl_method, SSL_get_ssl_method 668651Skris- choose a new TLS/SSL method 768651Skris 868651Skris=head1 SYNOPSIS 968651Skris 1068651Skris #include <openssl/ssl.h> 1168651Skris 12238405Sjkim int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *method); 13238405Sjkim int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method); 14238405Sjkim const SSL_METHOD *SSL_get_ssl_method(SSL *ssl); 1568651Skris 1668651Skris=head1 DESCRIPTION 1768651Skris 1868651SkrisSSL_CTX_set_ssl_version() sets a new default TLS/SSL B<method> for SSL objects 1968651Skrisnewly created from this B<ctx>. SSL objects already created with 2076866SkrisL<SSL_new(3)|SSL_new(3)> are not affected, except when 2176866SkrisL<SSL_clear(3)|SSL_clear(3)> is being called. 2268651Skris 2368651SkrisSSL_set_ssl_method() sets a new TLS/SSL B<method> for a particular B<ssl> 2468651Skrisobject. It may be reset, when SSL_clear() is called. 2568651Skris 2668651SkrisSSL_get_ssl_method() returns a function pointer to the TLS/SSL method 2768651Skrisset in B<ssl>. 2868651Skris 2968651Skris=head1 NOTES 3068651Skris 3168651SkrisThe available B<method> choices are described in 3268651SkrisL<SSL_CTX_new(3)|SSL_CTX_new(3)>. 3368651Skris 3476866SkrisWhen L<SSL_clear(3)|SSL_clear(3)> is called and no session is connected to 3576866Skrisan SSL object, the method of the SSL object is reset to the method currently 3676866Skrisset in the corresponding SSL_CTX object. 3768651Skris 3868651Skris=head1 RETURN VALUES 3968651Skris 4068651SkrisThe following return values can occur for SSL_CTX_set_ssl_version() 4168651Skrisand SSL_set_ssl_method(): 4268651Skris 4368651Skris=over 4 4468651Skris 45261037Sjkim=item Z<>0 4668651Skris 4768651SkrisThe new choice failed, check the error stack to find out the reason. 4868651Skris 49261037Sjkim=item Z<>1 5068651Skris 5168651SkrisThe operation succeeded. 5268651Skris 5368651Skris=back 5468651Skris 5568651Skris=head1 SEE ALSO 5668651Skris 5768651SkrisL<SSL_CTX_new(3)|SSL_CTX_new(3)>, L<SSL_new(3)|SSL_new(3)>, 5876866SkrisL<SSL_clear(3)|SSL_clear(3)>, L<ssl(3)|ssl(3)>, 5976866SkrisL<SSL_set_connect_state(3)|SSL_set_connect_state(3)> 6068651Skris 6168651Skris=cut 62