add support for displaying TLSv1.3

This commit is contained in:
sehraf 2018-09-14 16:27:50 +02:00
parent 7784660d67
commit 7ce2bef37b
No known key found for this signature in database
GPG Key ID: DF09F6EAE356B2C6
2 changed files with 7 additions and 2 deletions

View File

@ -313,7 +313,12 @@ void pqissl::getCryptoParams(RsPeerCryptoParams& params)
params.cipher_bits_2 = al2 ; params.cipher_bits_2 = al2 ;
char *desc = SSL_CIPHER_description(SSL_get_current_cipher(ssl_connection), NULL, 0); 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"); params.cipher_version =
std::string(desc).find("TLSv1.3") != std::string::npos ?
std::string("TLSv1.3") :
std::string(desc).find("TLSv1.2") != std::string::npos ?
std::string("TLSv1.2") :
std::string("TLSv1");
OPENSSL_free(desc); OPENSSL_free(desc);
} }
else else

View File

@ -170,7 +170,7 @@ void ConfCertDialog::load()
ct += QString::fromStdString(cdet.cipher_version) + ": "; ct += QString::fromStdString(cdet.cipher_version) + ": ";
ct += QString::fromStdString(cdet.cipher_name); ct += QString::fromStdString(cdet.cipher_name);
if(cdet.cipher_version != "TLSv1.2") if(cdet.cipher_version != "TLSv1.2" && cdet.cipher_version != "TLSv1.3")
ct += QString::number(cdet.cipher_bits_1); ct += QString::number(cdet.cipher_bits_1);
ui.crypto_info->setText(ct) ; ui.crypto_info->setText(ct) ;