mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-03 03:36:58 -04:00
moved refused connect attempt event to RsAuthSslConnectionAuthentication
This commit is contained in:
parent
c48aff44b2
commit
bb10b82c8e
5 changed files with 31 additions and 16 deletions
|
@ -1298,7 +1298,15 @@ int AuthSSLimpl::VerifyX509Callback(int /*preverify_ok*/, X509_STORE_CTX* ctx)
|
|||
ev->mSslId = sslId;
|
||||
ev->mSslCn = sslCn;
|
||||
ev->mPgpId = pgpId;
|
||||
ev->mErrorCode = RsAuthSslConnectionAutenticationEvent::PGP_SIGNATURE_VALIDATION_FAILED;
|
||||
|
||||
switch(auth_diagnostic)
|
||||
{
|
||||
case RS_SSL_HANDSHAKE_DIAGNOSTIC_ISSUER_UNKNOWN: ev->mErrorCode = RsAuthSslConnectionAutenticationEvent::NOT_A_FRIEND; break;
|
||||
case RS_SSL_HANDSHAKE_DIAGNOSTIC_WRONG_SIGNATURE: ev->mErrorCode = RsAuthSslConnectionAutenticationEvent::PGP_SIGNATURE_VALIDATION_FAILED;break;
|
||||
default:
|
||||
ev->mErrorCode = RsAuthSslConnectionAutenticationEvent::MISSING_AUTHENTICATION_INFO;break;
|
||||
}
|
||||
|
||||
ev->mErrorMsg = errMsg;
|
||||
rsEvents->postEvent(std::move(ev));
|
||||
}
|
||||
|
|
|
@ -1108,6 +1108,16 @@ int pqissl::SSL_Connection_Complete()
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(rsEvents)
|
||||
{
|
||||
auto ev = std::make_shared<RsAuthSslConnectionAutenticationEvent>();
|
||||
|
||||
X509 *x509 = SSL_get_peer_certificate(ssl_connection) ;
|
||||
|
||||
ev->mSslId = RsX509Cert::getCertSslId(*x509);
|
||||
ev->mErrorCode = RsAuthSslConnectionAutenticationEvent::PEER_REFUSED_CONNECTION;
|
||||
rsEvents->postEvent(ev);
|
||||
}
|
||||
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqissl::SSL_Connection_Complete()\nIssues with SSL Connect(%d)!\n", err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue