improved display of ciphers giving TLS version

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8104 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-04-01 18:29:59 +00:00
parent 73a6ca8af6
commit 69c44ef9ef
2 changed files with 9 additions and 4 deletions

View File

@ -353,7 +353,9 @@ void pqissl::getCryptoParams(RsPeerCryptoParams& params)
params.cipher_bits_1 = alg ;
params.cipher_bits_2 = al2 ;
params.cipher_version = SSL_get_cipher_version(ssl_connection) ;
char *desc = SSL_CIPHER_description(SSL_get_current_cipher(ssl_connection), NULL, 0);
params.cipher_version = std::string(desc).find("TLSv1.2") != std::string::npos ? std::string("TLSv1.2") : std::string("TLSv1");
OPENSSL_free(desc);
}
else
{

View File

@ -204,9 +204,12 @@ void ConfCertDialog::load()
if(RsControl::instance()->getPeerCryptoDetails(detail.id,cdet) && cdet.connexion_state!=0)
{
QString ct ;
ct += QString::fromStdString(cdet.cipher_name) ;
ct += QString::number(cdet.cipher_bits_1) ;
ct += "-"+QString::fromStdString(cdet.cipher_version) ;
ct += QString::fromStdString(cdet.cipher_version) + ": ";
ct += QString::fromStdString(cdet.cipher_name);
if(cdet.cipher_version != "TLSv1.2")
ct += QString::number(cdet.cipher_bits_1);
ui.crypto_info->setText(ct) ;
}
else