mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 10:54:22 -05:00
fix a bug to connect to own gpg key
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2082 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d5b11f00d4
commit
e4b7ee7766
@ -2156,9 +2156,14 @@ int AuthSSL::VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string pgpid = getX509CNString(X509_STORE_CTX_get_current_cert(ctx)->cert_info->issuer);
|
std::string pgpid = getX509CNString(X509_STORE_CTX_get_current_cert(ctx)->cert_info->issuer);
|
||||||
if (!AuthGPG::getAuthGPG()->isGPGAccepted(pgpid))
|
if (!AuthGPG::getAuthGPG()->isGPGAccepted(pgpid) && pgpid != AuthGPG::getAuthGPG()->getGPGOwnId())
|
||||||
{
|
{
|
||||||
fprintf(stderr, "AuthSSL::VerifyX509Callback() pgp key not signed by ourself.\n");
|
fprintf(stderr, "AuthSSL::VerifyX509Callback() pgp key not signed by ourself : \n");
|
||||||
|
fprintf(stderr, "issuer pgpid : ");
|
||||||
|
fprintf(stderr, pgpid.c_str());
|
||||||
|
fprintf(stderr, "\n AuthGPG::getAuthGPG()->getGPGOwnId() : ");
|
||||||
|
fprintf(stderr, AuthGPG::getAuthGPG()->getGPGOwnId().c_str());
|
||||||
|
fprintf(stderr, "\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
preverify_ok = true;
|
preverify_ok = true;
|
||||||
@ -2169,7 +2174,12 @@ int AuthSSL::VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||||||
std::string pgpid = getX509CNString(X509_STORE_CTX_get_current_cert(ctx)->cert_info->issuer);
|
std::string pgpid = getX509CNString(X509_STORE_CTX_get_current_cert(ctx)->cert_info->issuer);
|
||||||
if (!AuthGPG::getAuthGPG()->isGPGAccepted(pgpid) && pgpid != AuthGPG::getAuthGPG()->getGPGOwnId())
|
if (!AuthGPG::getAuthGPG()->isGPGAccepted(pgpid) && pgpid != AuthGPG::getAuthGPG()->getGPGOwnId())
|
||||||
{
|
{
|
||||||
fprintf(stderr, "AuthSSL::VerifyX509Callback() pgp key not signed by ourself.\n");
|
fprintf(stderr, "AuthSSL::VerifyX509Callback() pgp key not signed by ourself : \n");
|
||||||
|
fprintf(stderr, "issuer pgpid : ");
|
||||||
|
fprintf(stderr, pgpid.c_str());
|
||||||
|
fprintf(stderr, "\n AuthGPG::getAuthGPG()->getGPGOwnId() : ");
|
||||||
|
fprintf(stderr, AuthGPG::getAuthGPG()->getGPGOwnId().c_str());
|
||||||
|
fprintf(stderr, "\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
preverify_ok = true;
|
preverify_ok = true;
|
||||||
@ -2245,7 +2255,7 @@ int LoadCheckX509andGetLocation(const char *cert_file, std::string &location, st
|
|||||||
* and checks the certificate
|
* and checks the certificate
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FILE *tmpfp = fopen(cert_file, "r");
|
FILE *tmpfp = fopen(cert_file, "r");
|
||||||
if (tmpfp == NULL)
|
if (tmpfp == NULL)
|
||||||
{
|
{
|
||||||
#ifdef AUTHSSL_DEBUG
|
#ifdef AUTHSSL_DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user