SSL_CTX_set_ssl_version.pod revision 76867
198184Sgordon=pod
298184Sgordon
398184Sgordon=head1 NAME
498184Sgordon
598184SgordonSSL_CTX_set_ssl_version, SSL_set_ssl_method, SSL_get_ssl_method
698184Sgordon- choose a new TLS/SSL method
7144683Sobrien
8144683Sobrien=head1 SYNOPSIS
9136224Smtm
1098184Sgordon #include <openssl/ssl.h>
1198184Sgordon
1298184Sgordon int SSL_CTX_set_ssl_version(SSL_CTX *ctx, SSL_METHOD *method);
1398184Sgordon int SSL_set_ssl_method(SSL *s, SSL_METHOD *method);
1498184Sgordon SSL_METHOD *SSL_get_ssl_method(SSL *ssl);
15125341Spjd
1698184Sgordon=head1 DESCRIPTION
17147107Sdes
18147107SdesSSL_CTX_set_ssl_version() sets a new default TLS/SSL B<method> for SSL objects
19147107Sdesnewly created from this B<ctx>. SSL objects already created with
20147107SdesL<SSL_new(3)|SSL_new(3)> are not affected, except when
21147107SdesL<SSL_clear(3)|SSL_clear(3)> is being called.
22147107Sdes
23147107SdesSSL_set_ssl_method() sets a new TLS/SSL B<method> for a particular B<ssl>
24147107Sdesobject. It may be reset, when SSL_clear() is called.
25147107Sdes
26147107SdesSSL_get_ssl_method() returns a function pointer to the TLS/SSL method
2798184Sgordonset in B<ssl>.
2898184Sgordon
2998184Sgordon=head1 NOTES
3098184Sgordon
3198184SgordonThe available B<method> choices are described in
3298184SgordonL<SSL_CTX_new(3)|SSL_CTX_new(3)>.
3398184Sgordon
3498184SgordonWhen L<SSL_clear(3)|SSL_clear(3)> is called and no session is connected to
35135525Sdesan SSL object, the method of the SSL object is reset to the method currently
36150103Srwatsonset in the corresponding SSL_CTX object.
37147107Sdes
38147107Sdes=head1 RETURN VALUES
39147107Sdes
40147107SdesThe following return values can occur for SSL_CTX_set_ssl_version()
41135525Sdesand SSL_set_ssl_method():
42135525Sdes
43135525Sdes=over 4
44147107Sdes
45135525Sdes=item 0
46135525Sdes
47135525SdesThe new choice failed, check the error stack to find out the reason.
48135525Sdes
4998184Sgordon=item 1
50147107Sdes
5198184SgordonThe operation succeeded.
5298184Sgordon
5398184Sgordon=back
5498184Sgordon
55125341Spjd=head1 SEE ALSO
56125341Spjd
57125341SpjdL<SSL_CTX_new(3)|SSL_CTX_new(3)>, L<SSL_new(3)|SSL_new(3)>,
58125341SpjdL<SSL_clear(3)|SSL_clear(3)>, L<ssl(3)|ssl(3)>,
59125341SpjdL<SSL_set_connect_state(3)|SSL_set_connect_state(3)>
60125341Spjd
61136684Sthomas=cut
62125341Spjd