diff options
| -rw-r--r-- | socket.c | 14 | 
1 files changed, 14 insertions, 0 deletions
| @@ -1022,6 +1022,20 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck  		return(-1);  	} +	if (outlevel >= O_VERBOSE) { +	    SSL_CIPHER const *sc; +	    int bitsmax, bitsused; + +	    sc = SSL_get_current_cipher(_ssl_context[sock]); +	    if (!sc) { +		report (stderr, GT_("Cannot obtain current SSL/TLS cipher - no session established?\n")); +	    } else { +		bitsused = SSL_CIPHER_get_bits(sc, &bitsmax); +		report(stdout, GT_("SSL/TLS: using cipher %s, %d/%d secret/processed bits\n"), +			SSL_CIPHER_get_name(sc), bitsused, bitsmax); +	    } +	} +  	/* Paranoia: was the callback not called as we expected? */  	if (!_depth0ck) {  		report(stderr, GT_("Certificate/fingerprint verification was somehow skipped!\n")); | 
