blob: cb7e9994a7efc1a315dbde109a464f6b7bc4535f [file] [log] [blame]
Richard Levitte615513b2000-09-18 16:42:30 +00001=pod
2
3=head1 NAME
4
Rich Salz1a627772016-07-28 17:00:05 -04005SSL_get_current_cipher, SSL_get_cipher_name, SSL_get_cipher,
Richard Levitte615513b2000-09-18 16:42:30 +00006SSL_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 Larschc3e64022005-03-30 11:50:14 +000012 SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl);
Rich Salz91da5e72016-07-08 12:55:45 -040013
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 Levitte615513b2000-09-18 16:42:30 +000018
19=head1 DESCRIPTION
20
21SSL_get_current_cipher() returns a pointer to an SSL_CIPHER object containing
22the description of the actually used cipher of a connection established with
23the B<ssl> object.
Rich Salz91da5e72016-07-08 12:55:45 -040024See L<SSL_CIPHER_get_name(3)> for more details.
Richard Levitte615513b2000-09-18 16:42:30 +000025
Rich Salz91da5e72016-07-08 12:55:45 -040026SSL_get_cipher_name() obtains the
27name of the currently used cipher.
28SSL_get_cipher() is identical to SSL_get_cipher_name().
29SSL_get_cipher_bits() is a
Rich Salz1bc74512016-05-20 08:11:46 -040030macro to obtain the number of secret/algorithm bits used and
Richard Levitte615513b2000-09-18 16:42:30 +000031SSL_get_cipher_version() returns the protocol name.
Richard Levitte615513b2000-09-18 16:42:30 +000032
33=head1 RETURN VALUES
34
Rich Salz91da5e72016-07-08 12:55:45 -040035SSL_get_current_cipher() returns the cipher actually used, or NULL if
Richard Levitte615513b2000-09-18 16:42:30 +000036no session has been established.
37
Rich Salz91da5e72016-07-08 12:55:45 -040038=head1 NOTES
39
40These are implemented as macros.
41
Richard Levitte615513b2000-09-18 16:42:30 +000042=head1 SEE ALSO
43
Richard Levitteb97fdb52016-11-11 09:33:09 +010044L<ssl(7)>, L<SSL_CIPHER_get_name(3)>
Richard Levitte615513b2000-09-18 16:42:30 +000045
Rich Salze2f92612016-05-18 11:44:05 -040046=head1 COPYRIGHT
47
48Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
49
50Licensed under the OpenSSL license (the "License"). You may not use
51this file except in compliance with the License. You can obtain a copy
52in the file LICENSE in the source distribution or at
53L<https://www.openssl.org/source/license.html>.
54
55=cut