mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -04:00
solve a bug with gpg private key validity unknown
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2202 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
faa1e15db2
commit
6f9b8bb013
1 changed files with 18 additions and 9 deletions
|
@ -257,6 +257,7 @@ bool AuthGPG::availableGPGCertificatesWithPrivateKeys(std::list<std::string> &id
|
||||||
*/
|
*/
|
||||||
int AuthGPG::GPGInit(std::string ownId)
|
int AuthGPG::GPGInit(std::string ownId)
|
||||||
{
|
{
|
||||||
|
{
|
||||||
RsStackMutex stack(pgpMtx); /******* LOCKED ******/
|
RsStackMutex stack(pgpMtx); /******* LOCKED ******/
|
||||||
std::cerr << "AuthGPG::GPGInit() called with own gpg id : " << ownId << std::endl;
|
std::cerr << "AuthGPG::GPGInit() called with own gpg id : " << ownId << std::endl;
|
||||||
|
|
||||||
|
@ -271,6 +272,14 @@ int AuthGPG::GPGInit(std::string ownId)
|
||||||
std::cerr << "AuthGPG::GPGInit() failed to find your id." << std::endl;
|
std::cerr << "AuthGPG::GPGInit() failed to find your id." << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//check the validity of the private key. When set to unknown, it caused signature and text encryptions bugs
|
||||||
|
if (mOwnGpgCert.validLvl < 2) {
|
||||||
|
std::cerr << "AuthGPG::GPGInit() abnormal validity set to private key. Switch it to none by default." << std::endl;
|
||||||
|
privateTrustCertificate(mOwnGpgId, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
gpgmeKeySelected = true;
|
gpgmeKeySelected = true;
|
||||||
//printAllKeys_locked();
|
//printAllKeys_locked();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue