refactor: free SecureSocket cert after use
This commit is contained in:
parent
024436d82f
commit
dbc7aebfbc
1 changed files with 3 additions and 0 deletions
|
|
@ -639,6 +639,9 @@ bool SecureSocket::verifyCertFingerprint(const QString &FingerprintDatabasePath)
|
||||||
const auto cert = SSL_get_peer_certificate(m_ssl->m_ssl);
|
const auto cert = SSL_get_peer_certificate(m_ssl->m_ssl);
|
||||||
const auto sha256 = deskflow::sslCertFingerprint(cert, Fingerprint::Type::SHA256);
|
const auto sha256 = deskflow::sslCertFingerprint(cert, Fingerprint::Type::SHA256);
|
||||||
|
|
||||||
|
if (cert)
|
||||||
|
X509_free(cert);
|
||||||
|
|
||||||
if (!sha256.isValid())
|
if (!sha256.isValid())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue