mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Make SSL-only friend criteria stricter
This commit is contained in:
parent
5660c73175
commit
4e3ac4a9f4
@ -1667,6 +1667,9 @@ bool PGPHandler::getGPGFilteredList(std::list<RsPgpId>& list,bool (*filter)(cons
|
|||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PGPHandler::isPgpPubKeyAvailable(const RsPgpId &id)
|
||||||
|
{ return _public_keyring_map.find(id) != _public_keyring_map.end(); }
|
||||||
|
|
||||||
bool PGPHandler::isGPGId(const RsPgpId &id)
|
bool PGPHandler::isGPGId(const RsPgpId &id)
|
||||||
{
|
{
|
||||||
return _public_keyring_map.find(id) != _public_keyring_map.end() ;
|
return _public_keyring_map.find(id) != _public_keyring_map.end() ;
|
||||||
|
@ -148,6 +148,15 @@ class PGPHandler
|
|||||||
|
|
||||||
const PGPCertificateInfo *getCertificateInfo(const RsPgpId& id) const ;
|
const PGPCertificateInfo *getCertificateInfo(const RsPgpId& id) const ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check if a PGP publick key is available
|
||||||
|
* @param id id of the key to check
|
||||||
|
* @return true if the public key for the given id is available,
|
||||||
|
* false otherwise
|
||||||
|
*/
|
||||||
|
bool isPgpPubKeyAvailable(const RsPgpId& id);
|
||||||
|
|
||||||
|
RS_DEPRECATED_FOR(isPgpPubKeyAvailable)
|
||||||
bool isGPGId(const RsPgpId &id);
|
bool isGPGId(const RsPgpId &id);
|
||||||
bool isGPGSigned(const RsPgpId &id);
|
bool isGPGSigned(const RsPgpId &id);
|
||||||
bool isGPGAccepted(const RsPgpId &id);
|
bool isGPGAccepted(const RsPgpId &id);
|
||||||
|
@ -1138,7 +1138,7 @@ bool p3PeerMgrIMPL::addSslOnlyFriend(
|
|||||||
* Instead if pstate.skip_pgp_signature_validation would have been
|
* Instead if pstate.skip_pgp_signature_validation would have been
|
||||||
* superficially set to true the PGP signature verification would have been
|
* superficially set to true the PGP signature verification would have been
|
||||||
* skipped and the attacker connection would be accepted. */
|
* skipped and the attacker connection would be accepted. */
|
||||||
if(!AuthGPG::getAuthGPG()->isGPGAccepted(pgp_id))
|
if(!AuthGPG::getAuthGPG()->isPgpPubKeyAvailable(pgp_id))
|
||||||
pstate.skip_pgp_signature_validation = true;
|
pstate.skip_pgp_signature_validation = true;
|
||||||
|
|
||||||
pstate.gpg_id = pgp_id;
|
pstate.gpg_id = pgp_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user