X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=doc%2Fssl%2FSSL_CIPHER_get_name.pod;h=ec7011efe96b47266846ce53b7d27eec6bcf6198;hb=3ffbe008083dcaad282622e8e4be69bb29bc6315;hp=2fd5b6d4a9ceff129765024202c88b84df1cc51c;hpb=803e4e93d478594172bf67384b66873e52d5d0b6;p=oweals%2Fopenssl.git diff --git a/doc/ssl/SSL_CIPHER_get_name.pod b/doc/ssl/SSL_CIPHER_get_name.pod index 2fd5b6d4a9..ec7011efe9 100644 --- a/doc/ssl/SSL_CIPHER_get_name.pod +++ b/doc/ssl/SSL_CIPHER_get_name.pod @@ -8,10 +8,10 @@ SSL_CIPHER_get_name, SSL_CIPHER_get_bits, SSL_CIPHER_get_version, SSL_CIPHER_des #include - const char *SSL_CIPHER_get_name(SSL_CIPHER *cipher); - int SSL_CIPHER_get_bits(SSL_CIPHER *cipher, int *alg_bits); - char *SSL_CIPHER_get_version(SSL_CIPHER *cipher); - char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int size); + const char *SSL_CIPHER_get_name(const SSL_CIPHER *cipher); + int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits); + char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher); + char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int size); =head1 DESCRIPTION @@ -23,12 +23,16 @@ SSL_CIPHER_get_bits() returns the number of secret bits used for B. If B is not NULL, it contains the number of bits processed by the chosen algorithm. If B is NULL, 0 is returned. -SSL_CIPHER_get_version() returns the protocol version for B, currently -"SSLv2", "SSLv3", or "TLSv1". If B is NULL, "(NONE)" is returned. +SSL_CIPHER_get_version() returns string which indicates the SSL/TLS protocol +version that first defined the cipher. +This is currently B. +In some cases it should possibly return "TLSv1.2" but does not; +use SSL_CIPHER_description() instead. +If B is NULL, "(NONE)" is returned. SSL_CIPHER_description() returns a textual description of the cipher used into the buffer B of length B provided. B must be at least -128 bytes, otherwise a pointer to the the string "Buffer too small" is +128 bytes, otherwise a pointer to the string "Buffer too small" is returned. If B is NULL, a buffer of 128 bytes is allocated using OPENSSL_malloc(). If the allocation fails, a pointer to the string "OPENSSL_malloc Error" is returned. @@ -41,7 +45,7 @@ does use the full 128 bits (which would be returned for B), of which however 88bits are fixed. The search space is hence only 40 bits. The string returned by SSL_CIPHER_description() in case of success consists -of cleartext information seperated by one or more blanks in the following +of cleartext information separated by one or more blanks in the following sequence: =over 4 @@ -52,7 +56,8 @@ Textual representation of the cipher name. =item -Protocol version: B, B. The TLSv1 ciphers are flagged with SSLv3. +Protocol version: B, B. The TLSv1.0 ciphers are +flagged with SSLv3. No new ciphers were added by TLSv1.1. =item Kx= @@ -65,7 +70,7 @@ B, B, B. Authentication method: B, B, B, B. None is the representation of anonymous ciphers. -=item Enc= +=item Enc= Encryption method with number of secret bits: B, B, B<3DES(168)>, B, B, B, B, @@ -82,6 +87,19 @@ regulations, the word "B" is printed. =back +=head1 EXAMPLES + +Some examples for the output of SSL_CIPHER_description(): + + DHE-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1 + DHE-DSS-DES-CBC3-SHA SSLv3 Kx=DH Au=DSS Enc=3DES(168) Mac=SHA1 + RC4-MD5 SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=MD5 + EXP-RC4-MD5 SSLv3 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export + +A comp[lete list can be retrieved by invoking the following command: + + openssl ciphers -v ALL + =head1 BUGS If SSL_CIPHER_description() is called with B being NULL, the