1=pod
2
3=head1 NAME
4
5SSL_get_current_cipher, SSL_get_cipher, SSL_get_cipher_name,
6SSL_get_cipher_bits, SSL_get_cipher_version - get SSL_CIPHER of a connection
7
8=head1 SYNOPSIS
9
10 #include <openssl/ssl.h>
11
12 SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl);
13 #define SSL_get_cipher(s) \
14                SSL_CIPHER_get_name(SSL_get_current_cipher(s))
15 #define SSL_get_cipher_name(s) \
16                SSL_CIPHER_get_name(SSL_get_current_cipher(s))
17 #define SSL_get_cipher_bits(s,np) \
18                SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)
19 #define SSL_get_cipher_version(s) \
20                SSL_CIPHER_get_version(SSL_get_current_cipher(s))
21
22=head1 DESCRIPTION
23
24SSL_get_current_cipher() returns a pointer to an SSL_CIPHER object containing
25the description of the actually used cipher of a connection established with
26the B<ssl> object.
27
28SSL_get_cipher() and SSL_get_cipher_name() are identical macros to obtain the
29name of the currently used cipher. SSL_get_cipher_bits() is a
30macro to obtain the number of secret/algorithm bits used and
31SSL_get_cipher_version() returns the protocol name.
32See L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)> for more details.
33
34=head1 RETURN VALUES
35
36SSL_get_current_cipher() returns the cipher actually used or NULL, when
37no session has been established.
38
39=head1 SEE ALSO
40
41L<ssl(3)|ssl(3)>, L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)>
42
43=cut
44