]>
Commit | Line | Data |
---|---|---|
c19b6c92 RL |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | SSL_CTX_set_ssl_version, SSL_set_ssl_method, SSL_get_ssl_method | |
6 | - choose a new TLS/SSL method | |
7 | ||
8 | =head1 SYNOPSIS | |
9 | ||
10 | #include <openssl/ssl.h> | |
11 | ||
4ebb342f NL |
12 | int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *method); |
13 | int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method); | |
3499327b | 14 | const SSL_METHOD *SSL_get_ssl_method(const SSL *ssl); |
c19b6c92 RL |
15 | |
16 | =head1 DESCRIPTION | |
17 | ||
18 | SSL_CTX_set_ssl_version() sets a new default TLS/SSL B<method> for SSL objects | |
19 | newly created from this B<ctx>. SSL objects already created with | |
9b86974e RS |
20 | L<SSL_new(3)> are not affected, except when |
21 | L<SSL_clear(3)> is being called. | |
c19b6c92 RL |
22 | |
23 | SSL_set_ssl_method() sets a new TLS/SSL B<method> for a particular B<ssl> | |
24 | object. It may be reset, when SSL_clear() is called. | |
25 | ||
26 | SSL_get_ssl_method() returns a function pointer to the TLS/SSL method | |
27 | set in B<ssl>. | |
28 | ||
29 | =head1 NOTES | |
30 | ||
31 | The available B<method> choices are described in | |
9b86974e | 32 | L<SSL_CTX_new(3)>. |
c19b6c92 | 33 | |
9b86974e | 34 | When L<SSL_clear(3)> is called and no session is connected to |
b72ff470 LJ |
35 | an SSL object, the method of the SSL object is reset to the method currently |
36 | set in the corresponding SSL_CTX object. | |
c19b6c92 RL |
37 | |
38 | =head1 RETURN VALUES | |
39 | ||
40 | The following return values can occur for SSL_CTX_set_ssl_version() | |
41 | and SSL_set_ssl_method(): | |
42 | ||
43 | =over 4 | |
44 | ||
c8919dde | 45 | =item Z<>0 |
c19b6c92 RL |
46 | |
47 | The new choice failed, check the error stack to find out the reason. | |
48 | ||
c8919dde | 49 | =item Z<>1 |
c19b6c92 RL |
50 | |
51 | The operation succeeded. | |
52 | ||
53 | =back | |
54 | ||
55 | =head1 SEE ALSO | |
56 | ||
9b86974e | 57 | L<SSL_CTX_new(3)>, L<SSL_new(3)>, |
b97fdb57 | 58 | L<SSL_clear(3)>, L<ssl(7)>, |
9b86974e | 59 | L<SSL_set_connect_state(3)> |
c19b6c92 | 60 | |
e2f92610 RS |
61 | =head1 COPYRIGHT |
62 | ||
63 | Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. | |
64 | ||
4746f25a | 65 | Licensed under the Apache License 2.0 (the "License"). You may not use |
e2f92610 RS |
66 | this file except in compliance with the License. You can obtain a copy |
67 | in the file LICENSE in the source distribution or at | |
68 | L<https://www.openssl.org/source/license.html>. | |
69 | ||
70 | =cut |