From 1904c05bf9ea56b787e8a3d8fbad40a31fb36417 Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 1 Mar 2010 20:42:17 +0000 Subject: [PATCH] added initialisation of gpgmeKeySelected. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2467 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/authgpg.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/libretroshare/src/pqi/authgpg.cc b/libretroshare/src/pqi/authgpg.cc index a7f39eb1e..ec7cd8725 100644 --- a/libretroshare/src/pqi/authgpg.cc +++ b/libretroshare/src/pqi/authgpg.cc @@ -124,7 +124,7 @@ static char *PgpPassword = NULL; AuthGPG::AuthGPG() - :gpgmeInit(false) , p3Config(CONFIG_TYPE_AUTHGPG) + :gpgmeInit(false),gpgmeKeySelected(false),p3Config(CONFIG_TYPE_AUTHGPG) { RsStackMutex stack(pgpMtx); /******* LOCKED ******/ @@ -746,14 +746,17 @@ bool AuthGPG::VerifySignature_locked(const void *data, int datalen, const void * gpgme_data_t gpgmeData; #ifdef GPG_DEBUG - std::cerr << "VerifySignature: datalen: " << datalen << " siglen: " << siglen << std::endl; + std::cerr << "VerifySignature: datalen: " << datalen << " siglen: " << siglen << std::endl; #endif - if(siglen==73) - { - //std::cerr << "Reducing to 72 to overcome an old bug." << std::endl ; - siglen=72 ; - } + if(!(gpgmeInit || gpgmeKeySelected)) + return false ; + +// if(siglen==73) +// { +// //std::cerr << "Reducing to 72 to overcome an old bug." << std::endl ; +// siglen=72 ; +// } if (GPG_ERR_NO_ERROR != gpgme_data_new_from_mem(&gpgmeData, (const char *) data, datalen, 1)) {