mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 03:49:29 -04:00
Add PGP verification info message
This commit is contained in:
parent
0eee4adaa8
commit
c8082fdcc2
1 changed files with 12 additions and 12 deletions
|
@ -974,9 +974,9 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509, uint32_t& diagnostic)
|
||||||
RsPeerDetails pd;
|
RsPeerDetails pd;
|
||||||
if (!AuthGPG::getAuthGPG()->getGPGDetails(issuer, pd))
|
if (!AuthGPG::getAuthGPG()->getGPGDetails(issuer, pd))
|
||||||
{
|
{
|
||||||
RsErr() << __PRETTY_FUNCTION__ << " X509 NOT authenticated : "
|
RsInfo() << __PRETTY_FUNCTION__ << " X509 NOT authenticated : "
|
||||||
<< "AuthGPG::getAuthGPG()->getGPGDetails(" << issuer
|
<< "AuthGPG::getAuthGPG()->getGPGDetails(" << issuer
|
||||||
<< ",...) returned false." << std::endl;
|
<< ",...) returned false." << std::endl;
|
||||||
diagnostic = RS_SSL_HANDSHAKE_DIAGNOSTIC_ISSUER_UNKNOWN;
|
diagnostic = RS_SSL_HANDSHAKE_DIAGNOSTIC_ISSUER_UNKNOWN;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1125,11 +1125,11 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509, uint32_t& diagnostic)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dbg1() << __PRETTY_FUNCTION__ << " Verified: " << sigtypestring
|
RsInfo() << __PRETTY_FUNCTION__ << " Verified: " << sigtypestring
|
||||||
<< " signature of certificate sslId: "
|
<< " signature of certificate sslId: "
|
||||||
<< RsX509Cert::getCertSslId(*x509)
|
<< RsX509Cert::getCertSslId(*x509)
|
||||||
<< ", Version " << std::hex << certificate_version << std::dec
|
<< ", Version " << std::hex << certificate_version << std::dec
|
||||||
<< " using PGP key " << pd.fpr << " " << pd.name << std::endl;
|
<< " using PGP key " << pd.fpr << " " << pd.name << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
EVP_MD_CTX_destroy(ctx);
|
EVP_MD_CTX_destroy(ctx);
|
||||||
|
@ -1140,9 +1140,9 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509, uint32_t& diagnostic)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
err:
|
err: // TODO: this label is very short and might collide every easly
|
||||||
RsErr() << __PRETTY_FUNCTION__ << " X509 PGP authentication failed with "
|
RsInfo() << __PRETTY_FUNCTION__ << " X509 PGP authentication failed with "
|
||||||
<< "diagnostic: " << diagnostic << std::endl;
|
<< "diagnostic: " << diagnostic << std::endl;
|
||||||
|
|
||||||
if(buf_in) OPENSSL_free(buf_in);
|
if(buf_in) OPENSSL_free(buf_in);
|
||||||
|
|
||||||
|
@ -1232,7 +1232,7 @@ int AuthSSLimpl::VerifyX509Callback(int /*preverify_ok*/, X509_STORE_CTX* ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t auth_diagnostic;
|
uint32_t auth_diagnostic;
|
||||||
if (!AuthX509WithGPG(x509Cert, auth_diagnostic))
|
if(!AuthX509WithGPG(x509Cert, auth_diagnostic))
|
||||||
{
|
{
|
||||||
std::string errMsg = "Certificate was rejected because PGP "
|
std::string errMsg = "Certificate was rejected because PGP "
|
||||||
"signature verification failed with diagnostic: "
|
"signature verification failed with diagnostic: "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue