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