mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-18 12:24:22 -05:00
Revert "changing X509 ctx->current_cert to ctx->cert because of null pointer"
This reverts commit 7dbe821174ad65db5b22ecebec1e8ae5f356239b. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1528 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
129842f0a9
commit
ab07042510
@ -1742,16 +1742,16 @@ int GPGAuthMgr::VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||||||
if ((err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT) ||
|
if ((err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT) ||
|
||||||
(err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY))
|
(err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY))
|
||||||
{
|
{
|
||||||
X509_NAME_oneline(X509_get_issuer_name(ctx->cert), buf, 256);
|
X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256);
|
||||||
printf("issuer= %s\n", buf);
|
printf("issuer= %s\n", buf);
|
||||||
|
|
||||||
fprintf(stderr, "Doing REAL PGP Certificates\n");
|
fprintf(stderr, "Doing REAL PGP Certificates\n");
|
||||||
/* do the REAL Authentication */
|
/* do the REAL Authentication */
|
||||||
if (!AuthX509(ctx->cert))
|
if (!AuthX509(ctx->current_cert))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string pgpid = getX509CNString(ctx->cert->cert_info->issuer);
|
std::string pgpid = getX509CNString(ctx->current_cert->cert_info->issuer);
|
||||||
if (!isPGPAuthenticated(pgpid))
|
if (!isPGPAuthenticated(pgpid))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -1761,7 +1761,7 @@ int GPGAuthMgr::VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||||||
else if ((err == X509_V_ERR_CERT_UNTRUSTED) ||
|
else if ((err == X509_V_ERR_CERT_UNTRUSTED) ||
|
||||||
(err == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE))
|
(err == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE))
|
||||||
{
|
{
|
||||||
std::string pgpid = getX509CNString(ctx->cert->cert_info->issuer);
|
std::string pgpid = getX509CNString(ctx->current_cert->cert_info->issuer);
|
||||||
if (!isPGPAuthenticated(pgpid))
|
if (!isPGPAuthenticated(pgpid))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user