OLD | NEW |
1 =pod | 1 =pod |
2 | 2 |
3 =head1 NAME | 3 =head1 NAME |
4 | 4 |
5 SSL_clear - reset SSL object to allow another connection | 5 SSL_clear - reset SSL object to allow another connection |
6 | 6 |
7 =head1 SYNOPSIS | 7 =head1 SYNOPSIS |
8 | 8 |
9 #include <openssl/ssl.h> | 9 #include <openssl/ssl.h> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 method for the next handshake and a SSL server object will use a TLSv1 | 32 method for the next handshake and a SSL server object will use a TLSv1 |
33 server method, even if SSLv23_*_methods were chosen on startup. This | 33 server method, even if SSLv23_*_methods were chosen on startup. This |
34 will might lead to connection failures (see L<SSL_new(3)|SSL_new(3)>) | 34 will might lead to connection failures (see L<SSL_new(3)|SSL_new(3)>) |
35 for a description of the method's properties. | 35 for a description of the method's properties. |
36 | 36 |
37 =head1 WARNINGS | 37 =head1 WARNINGS |
38 | 38 |
39 SSL_clear() resets the SSL object to allow for another connection. The | 39 SSL_clear() resets the SSL object to allow for another connection. The |
40 reset operation however keeps several settings of the last sessions | 40 reset operation however keeps several settings of the last sessions |
41 (some of these settings were made automatically during the last | 41 (some of these settings were made automatically during the last |
42 handshake). It only makes sense when opening a new session (or reusing | 42 handshake). It only makes sense for a new connection with the exact |
43 an old one) with the same peer that shares these settings. | 43 same peer that shares these settings, and may fail if that peer |
44 SSL_clear() is not a short form for the sequence | 44 changes its settings between connections. Use the sequence |
45 L<SSL_free(3)|SSL_free(3)>; L<SSL_new(3)|SSL_new(3)>; . | 45 L<SSL_get_session(3)|SSL_get_session(3)>; |
| 46 L<SSL_new(3)|SSL_new(3)>; |
| 47 L<SSL_set_session(3)|SSL_set_session(3)>; |
| 48 L<SSL_free(3)|SSL_free(3)> |
| 49 instead to avoid such failures |
| 50 (or simply L<SSL_free(3)|SSL_free(3)>; L<SSL_new(3)|SSL_new(3)> |
| 51 if session reuse is not desired). |
46 | 52 |
47 =head1 RETURN VALUES | 53 =head1 RETURN VALUES |
48 | 54 |
49 The following return values can occur: | 55 The following return values can occur: |
50 | 56 |
51 =over 4 | 57 =over 4 |
52 | 58 |
53 =item 0 | 59 =item 0 |
54 | 60 |
55 The SSL_clear() operation could not be performed. Check the error stack to | 61 The SSL_clear() operation could not be performed. Check the error stack to |
56 find out the reason. | 62 find out the reason. |
57 | 63 |
58 =item 1 | 64 =item 1 |
59 | 65 |
60 The SSL_clear() operation was successful. | 66 The SSL_clear() operation was successful. |
61 | 67 |
62 =back | 68 =back |
63 | 69 |
64 L<SSL_new(3)|SSL_new(3)>, L<SSL_free(3)|SSL_free(3)>, | 70 L<SSL_new(3)|SSL_new(3)>, L<SSL_free(3)|SSL_free(3)>, |
65 L<SSL_shutdown(3)|SSL_shutdown(3)>, L<SSL_set_shutdown(3)|SSL_set_shutdown(3)>, | 71 L<SSL_shutdown(3)|SSL_shutdown(3)>, L<SSL_set_shutdown(3)|SSL_set_shutdown(3)>, |
66 L<SSL_CTX_set_options(3)|SSL_CTX_set_options(3)>, L<ssl(3)|ssl(3)>, | 72 L<SSL_CTX_set_options(3)|SSL_CTX_set_options(3)>, L<ssl(3)|ssl(3)>, |
67 L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)> | 73 L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)> |
68 | 74 |
69 =cut | 75 =cut |
OLD | NEW |