mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
fix(NetSSL): SecureSocketImpl::peerCertificate() should just return certificate, not verify it
This commit is contained in:
@@ -521,14 +521,9 @@ X509* SecureSocketImpl::peerCertificate() const
|
|||||||
X509* pCert = nullptr;
|
X509* pCert = nullptr;
|
||||||
|
|
||||||
if (_pSSL)
|
if (_pSSL)
|
||||||
{
|
return ::SSL_get_peer_certificate(_pSSL);
|
||||||
pCert = ::SSL_get_peer_certificate(_pSSL);
|
else
|
||||||
if (X509_V_OK != SSL_get_verify_result(_pSSL))
|
return nullptr;
|
||||||
throw CertificateValidationException("SecureSocketImpl::peerCertificate(): "
|
|
||||||
"Certificate verification error " + Utility::getLastError());
|
|
||||||
}
|
|
||||||
|
|
||||||
return pCert;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user