diff --git a/libretroshare/src/pqi/pqissl.cc b/libretroshare/src/pqi/pqissl.cc index da8546893..68ad4827b 100644 --- a/libretroshare/src/pqi/pqissl.cc +++ b/libretroshare/src/pqi/pqissl.cc @@ -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 { diff --git a/retroshare-gui/src/gui/connect/ConfCertDialog.cpp b/retroshare-gui/src/gui/connect/ConfCertDialog.cpp index f4d7385be..127d70899 100644 --- a/retroshare-gui/src/gui/connect/ConfCertDialog.cpp +++ b/retroshare-gui/src/gui/connect/ConfCertDialog.cpp @@ -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