mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-16 09:57:19 -05:00
renamed isGPGAccepted into isPGPAccepted
This commit is contained in:
parent
b328c3a493
commit
5e37bd42e4
@ -219,7 +219,7 @@ void p3discovery2::removeFriend(const RsPeerId &sslId)
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
/* pgp peer without any ssl entries -> check if they are still a real friend */
|
||||
if (!(AuthPGP::isGPGAccepted(pgpId)))
|
||||
if (!(AuthPGP::isPGPAccepted(pgpId)))
|
||||
{
|
||||
#ifdef P3DISC_DEBUG
|
||||
std::cerr << "p3discovery2::addFriend() pgpId is no longer a friend, removing";
|
||||
@ -1062,7 +1062,7 @@ void p3discovery2::recvPGPCertificateRequest( const RsPeerId& fromId, const RsDi
|
||||
for(const RsPgpId& pgpId : item->pgpIdSet.ids)
|
||||
if (pgpId == ownPgpId)
|
||||
sendPGPCertificate(pgpId, fromId);
|
||||
else if(ps.vs_disc != RS_VS_DISC_OFF && AuthPGP::isGPGAccepted(pgpId))
|
||||
else if(ps.vs_disc != RS_VS_DISC_OFF && AuthPGP::isPGPAccepted(pgpId))
|
||||
sendPGPCertificate(pgpId, fromId);
|
||||
else
|
||||
std::cerr << "(WW) not sending certificate " << pgpId << " asked by friend " << fromId << " because this either this cert is not a friend, or discovery is off" << std::endl;
|
||||
|
@ -405,10 +405,6 @@ bool AuthPGP::isPGPId(const RsPgpId& id)
|
||||
{
|
||||
return instance()->mPgpHandler->isGPGId(id);
|
||||
}
|
||||
bool AuthPGP::isPGPAccepted(const RsPgpId& id)
|
||||
{
|
||||
return instance()->mPgpHandler->isGPGAccepted(id);
|
||||
}
|
||||
/**** These Two are common */
|
||||
std::string AuthPGP::getGPGEmail(const RsPgpId& id,bool *success)
|
||||
{
|
||||
@ -714,7 +710,7 @@ int AuthPGP::privateTrustCertificate(const RsPgpId& id, int trustlvl)
|
||||
// The trust level is only a user-defined property that has nothing to
|
||||
// do with the fact that we allow connections or not.
|
||||
|
||||
if(!isGPGAccepted(id))
|
||||
if(!isPGPAccepted(id))
|
||||
return 0;
|
||||
|
||||
int res = instance()->mPgpHandler->privateTrustCertificate(id,trustlvl) ;
|
||||
@ -732,7 +728,7 @@ RsSerialiser *AuthPGP::setupSerialiser()
|
||||
rss->addSerialType(new RsGeneralConfigSerialiser());
|
||||
return rss ;
|
||||
}
|
||||
bool AuthPGP::isGPGAccepted(const RsPgpId& id)
|
||||
bool AuthPGP::isPGPAccepted(const RsPgpId& id)
|
||||
{
|
||||
return instance()->mPgpHandler->isGPGAccepted(id);
|
||||
}
|
||||
|
@ -155,8 +155,6 @@ public:
|
||||
static const RsPgpId& getGPGOwnId();
|
||||
static std::string getGPGOwnName();
|
||||
|
||||
static bool isGPGAccepted(const RsPgpId& id);
|
||||
|
||||
//virtual std::string getGPGOwnEmail();
|
||||
static bool getKeyFingerprint(const RsPgpId& id,PGPFingerprintType& fp) ;
|
||||
static bool isKeySupported(const RsPgpId &id) ;
|
||||
|
@ -1380,7 +1380,7 @@ int AuthSSLimpl::VerifyX509Callback(int /*preverify_ok*/, X509_STORE_CTX* ctx)
|
||||
std::cerr << "******* VerifyX509Callback cert: " << std::hex << ctx->cert <<std::dec << std::endl;
|
||||
#endif
|
||||
|
||||
if ( !isSslOnlyFriend && pgpId != AuthPGP::getGPGOwnId() && !AuthPGP::isGPGAccepted(pgpId) )
|
||||
if ( !isSslOnlyFriend && pgpId != AuthPGP::getGPGOwnId() && !AuthPGP::isPGPAccepted(pgpId) )
|
||||
{
|
||||
std::string errMsg = "Connection attempt signed by PGP key id: " +
|
||||
pgpId.toStdString() + " not accepted because it is not"
|
||||
|
@ -970,7 +970,7 @@ bool p3PeerMgrIMPL::addFriend(const RsPeerId& input_id, const RsPgpId& input_gpg
|
||||
|
||||
//Authentication is now tested at connection time, we don't store the ssl cert anymore
|
||||
//
|
||||
if (!AuthPGP::isGPGAccepted(gpg_id) && gpg_id != AuthPGP::getGPGOwnId())
|
||||
if (!AuthPGP::isPGPAccepted(gpg_id) && gpg_id != AuthPGP::getGPGOwnId())
|
||||
{
|
||||
#ifdef PEER_DEBUG
|
||||
std::cerr << "p3PeerMgrIMPL::addFriend() gpg is not accepted" << std::endl;
|
||||
@ -2642,7 +2642,7 @@ bool p3PeerMgrIMPL::loadList(std::list<RsItem *>& load)
|
||||
#endif
|
||||
|
||||
for(uint32_t i=0;i<sitem->pgp_ids.size();++i)
|
||||
if(AuthPGP::isGPGAccepted(sitem->pgp_ids[i]) || sitem->pgp_ids[i] == AuthPGP::getGPGOwnId())
|
||||
if(AuthPGP::isPGPAccepted(sitem->pgp_ids[i]) || sitem->pgp_ids[i] == AuthPGP::getGPGOwnId())
|
||||
{
|
||||
mFriendsPermissionFlags[sitem->pgp_ids[i]] = sitem->service_flags[i] ;
|
||||
#ifdef PEER_DEBUG
|
||||
@ -2684,7 +2684,7 @@ bool p3PeerMgrIMPL::loadList(std::list<RsItem *>& load)
|
||||
for(auto group_pair:groupList)
|
||||
{
|
||||
for(auto profileIdIt(group_pair.second.peerIds.begin());profileIdIt!=group_pair.second.peerIds.end();)
|
||||
if(AuthPGP::isGPGAccepted(*profileIdIt) || *profileIdIt == AuthPGP::getGPGOwnId())
|
||||
if(AuthPGP::isPGPAccepted(*profileIdIt) || *profileIdIt == AuthPGP::getGPGOwnId())
|
||||
++profileIdIt;
|
||||
else
|
||||
{
|
||||
|
@ -1213,7 +1213,7 @@ int pqissl::Authorise_SSL_Connection()
|
||||
}
|
||||
|
||||
RsPgpId pgpId = RsX509Cert::getCertIssuer(*peercert);
|
||||
if( !isSslOnlyFriend && pgpId != AuthPGP::getGPGOwnId() && !AuthPGP::isGPGAccepted(pgpId) )
|
||||
if( !isSslOnlyFriend && pgpId != AuthPGP::getGPGOwnId() && !AuthPGP::isPGPAccepted(pgpId) )
|
||||
{
|
||||
RsFatal() << __PRETTY_FUNCTION__ << " pgpId: " << pgpId
|
||||
<< " is not friend. It is very unlikely to happen at this "
|
||||
|
@ -797,7 +797,7 @@ int pqissllistener::completeConnection(int fd, IncomingSSLInfo& info)
|
||||
exit(failure);
|
||||
}
|
||||
|
||||
if( !isSslOnlyFriend && pgpId != AuthPGP::getGPGOwnId() && !AuthPGP::isGPGAccepted(pgpId) )
|
||||
if( !isSslOnlyFriend && pgpId != AuthPGP::getGPGOwnId() && !AuthPGP::isPGPAccepted(pgpId) )
|
||||
{
|
||||
RsFatal() << __PRETTY_FUNCTION__ << " pgpId: " << pgpId
|
||||
<< " is not friend. It is very unlikely to happen at this "
|
||||
|
@ -569,7 +569,7 @@ std::string p3Peers::getGPGName(const RsPgpId &gpg_id)
|
||||
}
|
||||
|
||||
bool p3Peers::isPgpFriend(const RsPgpId& pgpId)
|
||||
{ return AuthPGP::isGPGAccepted(pgpId); }
|
||||
{ return AuthPGP::isPGPAccepted(pgpId); }
|
||||
|
||||
bool p3Peers::isSslOnlyFriend(const RsPeerId& sslId)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user