mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-29 00:27:27 -04:00
fixed exchange of PGP keys in binary format and update of PGP signature flags on short invites when the key is received
This commit is contained in:
parent
b0c7f8f0ca
commit
a20ec1a885
13 changed files with 274 additions and 96 deletions
|
@ -1526,12 +1526,25 @@ bool p3Peers::loadCertificateFromString(
|
|||
}
|
||||
|
||||
RsPgpId gpgid;
|
||||
bool res = AuthGPG::getAuthGPG()->LoadCertificateFromString(
|
||||
crt->armouredPGPKey(), gpgid, error_string );
|
||||
bool res = AuthGPG::getAuthGPG()->LoadCertificateFromString( crt->armouredPGPKey(), gpgid, error_string );
|
||||
|
||||
gpg_id = gpgid;
|
||||
ssl_id = crt->sslid();
|
||||
|
||||
// now get all friends who declare this key ID to be the one needed to check connections, and clear their "skip_pgp_signature_validation" flag
|
||||
|
||||
if(res)
|
||||
mPeerMgr->notifyPgpKeyReceived(gpgid);
|
||||
|
||||
return res;
|
||||
}
|
||||
bool p3Peers::loadPgpKeyFromBinaryData( const unsigned char *bin_key_data,uint32_t bin_key_len, RsPgpId& gpg_id, std::string& error_string )
|
||||
{
|
||||
bool res = AuthGPG::getAuthGPG()->LoadPGPKeyFromBinaryData( bin_key_data,bin_key_len, gpg_id, error_string );
|
||||
|
||||
if(res)
|
||||
mPeerMgr->notifyPgpKeyReceived(gpg_id);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,6 +157,7 @@ public:
|
|||
virtual bool hasExportMinimal();
|
||||
|
||||
virtual bool loadCertificateFromString(const std::string& cert, RsPeerId& ssl_id,RsPgpId& pgp_id, std::string& error_string);
|
||||
virtual bool loadPgpKeyFromBinaryData( const unsigned char *bin_key_data,uint32_t bin_key_len, RsPgpId& gpg_id, std::string& error_string );
|
||||
virtual bool loadDetailsFromStringCert(const std::string &cert, RsPeerDetails &pd, uint32_t& error_code);
|
||||
|
||||
virtual bool cleanCertificate(const std::string &certstr, std::string &cleanCert, bool &is_short_format, uint32_t& error_code) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue