5 SSL_get_current_cipher, SSL_get_cipher_name, SSL_get_cipher,
6 SSL_get_cipher_bits, SSL_get_cipher_version,
7 SSL_get_pending_cipher - get SSL_CIPHER of a connection
11 #include <openssl/ssl.h>
13 SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl);
14 SSL_CIPHER *SSL_get_pending_cipher(const SSL *ssl);
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);
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
26 See L<SSL_CIPHER_get_name(3)> for more details.
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
32 macro to obtain the number of secret/algorithm bits used and
33 SSL_get_cipher_version() returns the protocol name.
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.
47 SSL_get_current_cipher() returns the cipher actually used, or NULL if
48 no session has been established.
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.
55 SSL_get_cipher, SSL_get_cipher_bits, SSL_get_cipher_version, and
56 SSL_get_cipher_name are implemented as macros.
60 L<ssl(7)>, L<SSL_CIPHER_get_name(3)>
64 Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
66 Licensed under the Apache License 2.0 (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>.