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