> I'm trying to determine what encryption is being used when I make an SSL
> connection, but I can't seem to get any information.
>
> I looked in the online docs and found SSL_get_cipher, and
> SSL_get_cipher_bits. When I call them, however, I get "(NONE)" and 0
> respectively. When I call SSL_get_current_cipher, I get NULL.
> It appears
> that I am sending encrypted data across the network.
>
> Any tips would be appreciated.
Perhaps you're checking before negotiation is complete? I use the following
code, and it works:
void DumpCipher(SSL *ssl)
{
if(SSL_is_init_finished(ssl))
{
SSL_CIPHER *s=SSL_get_current_cipher(ssl);
if(s==NULL) printf("No current cipher?\n");
else
{
int bits=SSL_CIPHER_get_bits(s, &bits2);
printf("Version=%s Cipher=%s Bits=%d\n", SSL_get_version(ssl),
SSL_CIPHER_get_name(s), bits);
}
}
else printf("Initialization not complete\n");
}
DS
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]