]>
Commit | Line | Data |
---|---|---|
615513ba RL |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
1a627771 | 5 | SSL_get_current_cipher, SSL_get_cipher_name, SSL_get_cipher, |
0aed6e44 BK |
6 | SSL_get_cipher_bits, SSL_get_cipher_version, |
7 | SSL_get_pending_cipher - get SSL_CIPHER of a connection | |
615513ba RL |
8 | |
9 | =head1 SYNOPSIS | |
10 | ||
11 | #include <openssl/ssl.h> | |
12 | ||
c3e64028 | 13 | SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl); |
0aed6e44 | 14 | SSL_CIPHER *SSL_get_pending_cipher(const SSL *ssl); |
91da5e77 RS |
15 | |
16 | const char *SSL_get_cipher_name(const SSL *s); | |
17 | const char *SSL_get_cipher(const SSL *s); | |
18 | int SSL_get_cipher_bits(const SSL *s, int *np) \ | |
19 | const char *SSL_get_cipher_version(const SSL *s); | |
615513ba RL |
20 | |
21 | =head1 DESCRIPTION | |
22 | ||
23 | SSL_get_current_cipher() returns a pointer to an SSL_CIPHER object containing | |
24 | the description of the actually used cipher of a connection established with | |
25 | the B<ssl> object. | |
91da5e77 | 26 | See L<SSL_CIPHER_get_name(3)> for more details. |
615513ba | 27 | |
91da5e77 RS |
28 | SSL_get_cipher_name() obtains the |
29 | name of the currently used cipher. | |
30 | SSL_get_cipher() is identical to SSL_get_cipher_name(). | |
31 | SSL_get_cipher_bits() is a | |
1bc74519 | 32 | macro to obtain the number of secret/algorithm bits used and |
615513ba | 33 | SSL_get_cipher_version() returns the protocol name. |
615513ba | 34 | |
0aed6e44 BK |
35 | SSL_get_pending_cipher() returns a pointer to an SSL_CIPHER object containing |
36 | the description of the cipher (if any) that has been negotiated for future use | |
37 | on the connection established with the B<ssl> object, but is not yet in use. | |
38 | This may be the case during handshake processing, when control flow can be | |
39 | returned to the application via any of several callback methods. The internal | |
40 | sequencing of handshake processing and callback invocation is not guaranteed | |
41 | to be stable from release to release, and at present only the callback set | |
42 | by SSL_CTX_set_alpn_select_cb() is guaranteed to have a non-NULL return value. | |
43 | Other callbacks may be added to this list over time. | |
44 | ||
615513ba RL |
45 | =head1 RETURN VALUES |
46 | ||
91da5e77 | 47 | SSL_get_current_cipher() returns the cipher actually used, or NULL if |
615513ba RL |
48 | no session has been established. |
49 | ||
0aed6e44 BK |
50 | SSL_get_pending_cipher() returns the cipher to be used at the next change |
51 | of cipher suite, or NULL if no such cipher is known. | |
52 | ||
91da5e77 RS |
53 | =head1 NOTES |
54 | ||
0aed6e44 BK |
55 | SSL_get_cipher, SSL_get_cipher_bits, SSL_get_cipher_version, and |
56 | SSL_get_cipher_name are implemented as macros. | |
91da5e77 | 57 | |
615513ba RL |
58 | =head1 SEE ALSO |
59 | ||
b97fdb57 | 60 | L<ssl(7)>, L<SSL_CIPHER_get_name(3)> |
615513ba | 61 | |
e2f92610 RS |
62 | =head1 COPYRIGHT |
63 | ||
64 | Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. | |
65 | ||
66 | Licensed under the OpenSSL license (the "License"). You may not use | |
67 | this file except in compliance with the License. You can obtain a copy | |
68 | in the file LICENSE in the source distribution or at | |
69 | L<https://www.openssl.org/source/license.html>. | |
70 | ||
71 | =cut |