mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 15:15:15 -04:00
fixed the status of signature vs. making friends, and fixed the deadlock when signing a certificate
This commit is contained in:
parent
d7fbe29a56
commit
453c656570
6 changed files with 84 additions and 74 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "pqi/authssl.h"
|
||||
#include "pqi/authgpg.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
#include "retroshare/rsnotify.h"
|
||||
#include "retroshare/rsfiles.h"
|
||||
#include "util/rsurl.h"
|
||||
#include "util/radix64.h"
|
||||
|
@ -1680,19 +1681,23 @@ std::string p3Peers::saveCertificateToString(const RsPeerId &id)
|
|||
}
|
||||
}
|
||||
|
||||
bool p3Peers::signGPGCertificate(const RsPgpId &id)
|
||||
bool p3Peers::signGPGCertificate(const RsPgpId &id, const std::string &gpg_passphrase)
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
std::cerr << "p3Peers::SignCertificate() " << id;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
rsNotify->cachePgpPassphrase(gpg_passphrase);
|
||||
rsNotify->setDisableAskPassword(true);
|
||||
|
||||
bool res = AuthGPG::getAuthGPG()->SignCertificateLevel0(id);
|
||||
|
||||
AuthGPG::getAuthGPG()->AllowConnection(id, true);
|
||||
return AuthGPG::getAuthGPG()->SignCertificateLevel0(id);
|
||||
rsNotify->clearPgpPassphrase();
|
||||
rsNotify->setDisableAskPassword(false);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
bool p3Peers::trustGPGCertificate(const RsPgpId &id, uint32_t trustlvl)
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
|
|
|
@ -165,7 +165,7 @@ public:
|
|||
virtual bool cleanCertificate(const std::string &certstr, std::string &cleanCert, bool &is_short_format, uint32_t& error_code) override;
|
||||
virtual std::string saveCertificateToString(const RsPeerId &id) override;
|
||||
|
||||
virtual bool signGPGCertificate(const RsPgpId &id) override;
|
||||
virtual bool signGPGCertificate(const RsPgpId &id,const std::string& gpg_passphrase) override;
|
||||
virtual bool trustGPGCertificate(const RsPgpId &id, uint32_t trustlvl) override;
|
||||
|
||||
/* Group Stuff */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue