Hi folks,

What I want to do is to get the name of the cipher suite server is trying to use when I receive a server hello.

From server hello's header (SSL version 3.0), I can read out the cipher
suite number, which is, for example 0x0004, and my Ethereal (Version 0.10.13) shows it is TLS_RSA_WITH_RC4_128_MD5 (0x0004). In ..../openssl/ssl/s3_lib.c, I found out that /* Cipher 04 */ is SSL3_TXT_RSA_RC4_128_MD5. Is this a correct mapping? If it is, which API I can use to get this name?

I tried ssl3_get_cipher(unsigned int u), it returns a different name. For 0x0004, it returns /* Cipher 36 */ TLS1_TXT_DH_DSS_WITH_AES_256_SHA ( "DH-DSS-AES256-SHA"). The function is like this:

SSL_CIPHER *ssl3_get_cipher(unsigned int u)
        {
        if (u < SSL3_NUM_CIPHERS)
                return(&(ssl3_ciphers[SSL3_NUM_CIPHERS-1-u]));
        else
                return(NULL);
        }

What does the line "return(&(ssl3_ciphers[SSL3_NUM_CIPHERS-1-u]))" mean? Why not just "return(&(ssl3_ciphers[u]))" ?

Which one is a correct mapping? Ethereal's Cipher 04 or ssl3_get_cipher()'s Cipher 36?

Thanks,

Rick

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to