168651Skris=pod
268651Skris
368651Skris=head1 NAME
468651Skris
568651SkrisSSL_get_current_cipher, SSL_get_cipher, SSL_get_cipher_name,
668651SkrisSSL_get_cipher_bits, SSL_get_cipher_version - get SSL_CIPHER of a connection
768651Skris
868651Skris=head1 SYNOPSIS
968651Skris
1068651Skris #include <openssl/ssl.h>
1168651Skris
12160814Ssimon SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl);
1368651Skris #define SSL_get_cipher(s) \
1468651Skris                SSL_CIPHER_get_name(SSL_get_current_cipher(s))
1568651Skris #define SSL_get_cipher_name(s) \
1668651Skris                SSL_CIPHER_get_name(SSL_get_current_cipher(s))
1768651Skris #define SSL_get_cipher_bits(s,np) \
1868651Skris                SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)
1968651Skris #define SSL_get_cipher_version(s) \
2068651Skris                SSL_CIPHER_get_version(SSL_get_current_cipher(s))
2168651Skris
2268651Skris=head1 DESCRIPTION
2368651Skris
2468651SkrisSSL_get_current_cipher() returns a pointer to an SSL_CIPHER object containing
2568651Skristhe description of the actually used cipher of a connection established with
2668651Skristhe B<ssl> object.
2768651Skris
2868651SkrisSSL_get_cipher() and SSL_get_cipher_name() are identical macros to obtain the
2968651Skrisname of the currently used cipher. SSL_get_cipher_bits() is a
3068651Skrismacro to obtain the number of secret/algorithm bits used and 
3168651SkrisSSL_get_cipher_version() returns the protocol name.
3268651SkrisSee L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)> for more details.
3368651Skris
3468651Skris=head1 RETURN VALUES
3568651Skris
3668651SkrisSSL_get_current_cipher() returns the cipher actually used or NULL, when
3768651Skrisno session has been established.
3868651Skris
3968651Skris=head1 SEE ALSO
4068651Skris
4168651SkrisL<ssl(3)|ssl(3)>, L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)>
4268651Skris
4368651Skris=cut
44