Richard Levitte | 615513b | 2000-09-18 16:42:30 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
Rich Salz | 1a62777 | 2016-07-28 17:00:05 -0400 | [diff] [blame] | 5 | SSL_get_current_cipher, SSL_get_cipher_name, SSL_get_cipher, |
Richard Levitte | 615513b | 2000-09-18 16:42:30 +0000 | [diff] [blame] | 6 | SSL_get_cipher_bits, SSL_get_cipher_version - get SSL_CIPHER of a connection |
| 7 | |
| 8 | =head1 SYNOPSIS |
| 9 | |
| 10 | #include <openssl/ssl.h> |
| 11 | |
Nils Larsch | c3e6402 | 2005-03-30 11:50:14 +0000 | [diff] [blame] | 12 | SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl); |
Rich Salz | 91da5e7 | 2016-07-08 12:55:45 -0400 | [diff] [blame] | 13 | |
| 14 | const char *SSL_get_cipher_name(const SSL *s); |
| 15 | const char *SSL_get_cipher(const SSL *s); |
| 16 | int SSL_get_cipher_bits(const SSL *s, int *np) \ |
| 17 | const char *SSL_get_cipher_version(const SSL *s); |
Richard Levitte | 615513b | 2000-09-18 16:42:30 +0000 | [diff] [blame] | 18 | |
| 19 | =head1 DESCRIPTION |
| 20 | |
| 21 | SSL_get_current_cipher() returns a pointer to an SSL_CIPHER object containing |
| 22 | the description of the actually used cipher of a connection established with |
| 23 | the B<ssl> object. |
Rich Salz | 91da5e7 | 2016-07-08 12:55:45 -0400 | [diff] [blame] | 24 | See L<SSL_CIPHER_get_name(3)> for more details. |
Richard Levitte | 615513b | 2000-09-18 16:42:30 +0000 | [diff] [blame] | 25 | |
Rich Salz | 91da5e7 | 2016-07-08 12:55:45 -0400 | [diff] [blame] | 26 | SSL_get_cipher_name() obtains the |
| 27 | name of the currently used cipher. |
| 28 | SSL_get_cipher() is identical to SSL_get_cipher_name(). |
| 29 | SSL_get_cipher_bits() is a |
Rich Salz | 1bc7451 | 2016-05-20 08:11:46 -0400 | [diff] [blame] | 30 | macro to obtain the number of secret/algorithm bits used and |
Richard Levitte | 615513b | 2000-09-18 16:42:30 +0000 | [diff] [blame] | 31 | SSL_get_cipher_version() returns the protocol name. |
Richard Levitte | 615513b | 2000-09-18 16:42:30 +0000 | [diff] [blame] | 32 | |
| 33 | =head1 RETURN VALUES |
| 34 | |
Rich Salz | 91da5e7 | 2016-07-08 12:55:45 -0400 | [diff] [blame] | 35 | SSL_get_current_cipher() returns the cipher actually used, or NULL if |
Richard Levitte | 615513b | 2000-09-18 16:42:30 +0000 | [diff] [blame] | 36 | no session has been established. |
| 37 | |
Rich Salz | 91da5e7 | 2016-07-08 12:55:45 -0400 | [diff] [blame] | 38 | =head1 NOTES |
| 39 | |
| 40 | These are implemented as macros. |
| 41 | |
Richard Levitte | 615513b | 2000-09-18 16:42:30 +0000 | [diff] [blame] | 42 | =head1 SEE ALSO |
| 43 | |
Richard Levitte | b97fdb5 | 2016-11-11 09:33:09 +0100 | [diff] [blame] | 44 | L<ssl(7)>, L<SSL_CIPHER_get_name(3)> |
Richard Levitte | 615513b | 2000-09-18 16:42:30 +0000 | [diff] [blame] | 45 | |
Rich Salz | e2f9261 | 2016-05-18 11:44:05 -0400 | [diff] [blame] | 46 | =head1 COPYRIGHT |
| 47 | |
| 48 | Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. |
| 49 | |
| 50 | Licensed under the OpenSSL license (the "License"). You may not use |
| 51 | this file except in compliance with the License. You can obtain a copy |
| 52 | in the file LICENSE in the source distribution or at |
| 53 | L<https://www.openssl.org/source/license.html>. |
| 54 | |
| 55 | =cut |