mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
get rid of cipher_version variable. use plain output from openssl
This commit is contained in:
parent
7ce2bef37b
commit
1e85b05f09
5 changed files with 3 additions and 29 deletions
|
@ -606,7 +606,6 @@ bool pqiperson::getCryptoParams(RsPeerCryptoParams & params)
|
|||
params.cipher_name.clear();
|
||||
params.cipher_bits_1 = 0;
|
||||
params.cipher_bits_2 = 0;
|
||||
params.cipher_version.clear();
|
||||
|
||||
return false ;
|
||||
}
|
||||
|
@ -627,7 +626,6 @@ bool pqiconnect::getCryptoParams(RsPeerCryptoParams & params)
|
|||
params.cipher_name.clear() ;
|
||||
params.cipher_bits_1 = 0 ;
|
||||
params.cipher_bits_2 = 0 ;
|
||||
params.cipher_version.clear() ;
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -304,7 +304,6 @@ void pqissl::getCryptoParams(RsPeerCryptoParams& params)
|
|||
if(active)
|
||||
{
|
||||
params.connexion_state = 1 ;
|
||||
params.cipher_name = std::string( SSL_get_cipher(ssl_connection));
|
||||
|
||||
int alg ;
|
||||
int al2 = SSL_get_cipher_bits(ssl_connection,&alg);
|
||||
|
@ -313,12 +312,7 @@ void pqissl::getCryptoParams(RsPeerCryptoParams& params)
|
|||
params.cipher_bits_2 = al2 ;
|
||||
|
||||
char *desc = SSL_CIPHER_description(SSL_get_current_cipher(ssl_connection), NULL, 0);
|
||||
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");
|
||||
params.cipher_name = std::string(desc);
|
||||
OPENSSL_free(desc);
|
||||
}
|
||||
else
|
||||
|
@ -327,7 +321,6 @@ void pqissl::getCryptoParams(RsPeerCryptoParams& params)
|
|||
params.cipher_name.clear() ;
|
||||
params.cipher_bits_1 = 0 ;
|
||||
params.cipher_bits_2 = 0 ;
|
||||
params.cipher_version.clear() ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -335,7 +335,6 @@ struct RsPeerCryptoParams
|
|||
std::string cipher_name;
|
||||
int cipher_bits_1;
|
||||
int cipher_bits_2;
|
||||
std::string cipher_version;
|
||||
};
|
||||
|
||||
struct RsGroupInfo : RsSerializable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue