5 SSL_CIPHER_get_name, SSL_CIPHER_get_bits, SSL_CIPHER_get_version,
6 SSL_CIPHER_description - get SSL_CIPHER properties
10 #include <openssl/ssl.h>
12 const char *SSL_CIPHER_get_name(SSL_CIPHER *cipher);
13 int SSL_CIPHER_get_bits(SSL_CIPHER *cipher, int *alg_bits);
14 char *SSL_CIPHER_get_version(SSL_CIPHER *cipher);
15 char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int size);
19 SSL_CIPHER_get_name() returns a pointer to the name of B<cipher>. If the
20 argument is the NULL pointer, a pointer to the constant value "NONE" is
23 SSL_CIPHER_get_bits() returns the number of secret bits used for B<cipher>. If
24 B<alg_bits> is not NULL, it contains the number of bits processed by the
25 chosen algorithm. If B<cipher> is NULL, 0 is returned.
27 SSL_CIPHER_get_version() returns the protocol version for B<cipher>, currently
28 "SSLv2", "SSLv3", or "TLSv1". If B<cipher> is NULL, "(NONE)" is returned.
30 SSL_CIPHER_description() returns a textual description of the cipher used
31 into the buffer B<buf> of length B<len> provided. B<len> must be at least
32 128 bytes, otherwise the string "Buffer too small" is returned. If B<buf>
33 is NULL, a buffer of 128 bytes is allocated using OPENSSL_malloc(). If the
34 allocation fails, the string "OPENSSL_malloc Error" is returned.
38 The number of bits processed can be different from the secret bits. An
39 export cipher like e.g. EXP-RC4-MD5 has only 40 secret bits. The algorithm
40 does use the full 128 bits (which would be returned for B<alg_bits>), of
41 which however 88bits are fixed. The search space is hence only 40 bits.
45 If SSL_CIPHER_description() is called with B<cipher> being NULL, the
54 L<ssl(3)|ssl(3)>, L<SSL_get_current_cipher(3)|SSL_get_current_cipher(3)>,
55 L<SSL_get_ciphers(3)|SSL_get_ciphers(3)>