SSL_CIPHER_get_name.pod revision 68651
1118515Smtm=pod 2118515Smtm 3118515Smtm=head1 NAME 4118515Smtm 5118515SmtmSSL_CIPHER_get_name, SSL_CIPHER_get_bits, SSL_CIPHER_get_version, 6118515SmtmSSL_CIPHER_description - get SSL_CIPHER properties 7118515Smtm 8118515Smtm=head1 SYNOPSIS 9136224Smtm 10118515Smtm #include <openssl/ssl.h> 11118515Smtm 12118515Smtm const char *SSL_CIPHER_get_name(SSL_CIPHER *cipher); 13118515Smtm int SSL_CIPHER_get_bits(SSL_CIPHER *cipher, int *alg_bits); 14298514Slme char *SSL_CIPHER_get_version(SSL_CIPHER *cipher); 15132716Seik char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int size); 16132716Seik 17118515Smtm=head1 DESCRIPTION 18132716Seik 19132597SmtmSSL_CIPHER_get_name() returns a pointer to the name of B<cipher>. If the 20179927Smtmargument is the NULL pointer, a pointer to the constant value "NONE" is 21179927Smtmreturned. 22132716Seik 23132597SmtmSSL_CIPHER_get_bits() returns the number of secret bits used for B<cipher>. If 24118515SmtmB<alg_bits> is not NULL, it contains the number of bits processed by the 25118515Smtmchosen algorithm. If B<cipher> is NULL, 0 is returned. 26118515Smtm 27118515SmtmSSL_CIPHER_get_version() returns the protocol version for B<cipher>, currently 28179927Smtm"SSLv2", "SSLv3", or "TLSv1". If B<cipher> is NULL, "(NONE)" is returned. 29153027Sdougb 30153027SdougbSSL_CIPHER_description() returns a textual description of the cipher used 31179927Smtminto the buffer B<buf> of length B<len> provided. B<len> must be at least 32179927Smtm128 bytes, otherwise the string "Buffer too small" is returned. If B<buf> 33179927Smtmis NULL, a buffer of 128 bytes is allocated using OPENSSL_malloc(). If the 34179927Smtmallocation fails, the string "OPENSSL_malloc Error" is returned. 35118515Smtm 36118515Smtm=head1 NOTES 37118515Smtm 38118515SmtmThe number of bits processed can be different from the secret bits. An 39118515Smtmexport cipher like e.g. EXP-RC4-MD5 has only 40 secret bits. The algorithm 40153027Sdougbdoes use the full 128 bits (which would be returned for B<alg_bits>), of 41118515Smtmwhich however 88bits are fixed. The search space is hence only 40 bits. 42118515Smtm 43179927Smtm=head1 BUGS 44118515Smtm 45118515SmtmIf SSL_CIPHER_description() is called with B<cipher> being NULL, the 46118515Smtmlibrary crashes. 47118515Smtm 48118515Smtm=head1 RETURN VALUES 49118515Smtm 50179927SmtmSee DESCRIPTION 51179927Smtm 52118515Smtm=head1 SEE ALSO 53118515Smtm 54118515SmtmL<ssl(3)|ssl(3)>, L<SSL_get_current_cipher(3)|SSL_get_current_cipher(3)>, 55118515SmtmL<SSL_get_ciphers(3)|SSL_get_ciphers(3)> 56179927Smtm 57153027Sdougb=cut 58153027Sdougb