renamed skip_signature_validation into more appropriate skip_pgp_signature_validation

This commit is contained in:
csoler 2019-09-19 21:14:57 +02:00
parent 654d760d84
commit 4fabf3deb1
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
5 changed files with 11 additions and 10 deletions

View File

@ -396,7 +396,7 @@ void p3discovery2::recvOwnContactInfo(const RsPeerId &fromId, const RsDiscContac
// if the peer is not validated, we stop the exchange here
if(det.skip_signature_validation)
if(det.skip_pgp_signature_validation)
{
#ifdef P3DISC_DEBUG
std::cerr << "p3discovery2::recvOwnContactInfo() missing PGP key " << item->pgpId << " from short invite friend " << fromId << ". Requesting it." << std::endl;
@ -954,6 +954,7 @@ void p3discovery2::processContactInfo(const RsPeerId &fromId, const RsDiscContac
auto sit= it->second.mSslIds.find(item->sslId);
DiscSslInfo& sslInfo(it->second.mSslIds[item->sslId]); // This line inserts the entry while not removing already existing data
// do not remove it!
if (!mPeerMgr->isFriend(item->sslId))
{
@ -1098,7 +1099,7 @@ void p3discovery2::recvPGPCertificate(const RsPeerId& fromId, RsDiscPgpKeyItem*
// We treat own pgp keys right away when they are sent by a friend for which we dont have it. This way we can keep the skip_pgg_signature_validation consistent
if(det.skip_signature_validation)
if(det.skip_pgp_signature_validation)
{
#ifdef P3DISC_DEBUG
std::cerr << __PRETTY_FUNCTION__ << " Received own full certificate from short-invite friend " << fromId << std::endl;
@ -1124,7 +1125,7 @@ void p3discovery2::recvPGPCertificate(const RsPeerId& fromId, RsDiscPgpKeyItem*
// Make sure we allow connections after the key is added. This is not the case otherwise. We only do that if the peer is non validated peer, since
// otherwise the connection should already be accepted. This only happens when the short invite peer sends its own PGP key.
if(det.skip_signature_validation)
if(det.skip_pgp_signature_validation)
AuthGPG::getAuthGPG()->AllowConnection(det.gpg_id,true);
}

View File

@ -1205,7 +1205,7 @@ int AuthSSLimpl::VerifyX509Callback(int /*preverify_ok*/, X509_STORE_CTX* ctx)
return verificationFailed;
}
bool isSslOnlyFriend = det.skip_signature_validation;
bool isSslOnlyFriend = det.skip_pgp_signature_validation;
if(det.gpg_id != pgpId)
{

View File

@ -238,7 +238,7 @@ struct RsPeerDetails : RsSerializable
uint32_t trustLvl;
uint32_t validLvl;
bool skip_signature_validation;
bool skip_pgp_signature_validation;
bool ownsign; /* we have signed the remote peer GPG key */
bool hasSignedMe; /* the remote peer has signed my GPG key */

View File

@ -295,10 +295,10 @@ bool p3Peers::getPeerDetails(const RsPeerId& id, RsPeerDetails &d)
return false;
d.gpg_id = ps.gpg_id ;
d.skip_signature_validation = true;
d.skip_pgp_signature_validation = true;
}
else
d.skip_signature_validation = false;
d.skip_pgp_signature_validation = false;
d.isOnlyGPGdetail = false;
@ -1386,7 +1386,7 @@ bool p3Peers::parseShortInvite(const std::string& inviteStrUrl, RsPeerDetails& d
details.accept_connection = pgp_det.accept_connection;
}
else
details.skip_signature_validation = true;
details.skip_pgp_signature_validation = true;
if(details.gpg_id.isNull())
{
@ -1795,7 +1795,7 @@ RsPeerDetails::RsPeerDetails()
:isOnlyGPGdetail(false),
name(""),email(""),location(""),
org(""),authcode(""),
trustLvl(0), validLvl(0),skip_signature_validation(false),ownsign(false),
trustLvl(0), validLvl(0),skip_pgp_signature_validation(false),ownsign(false),
hasSignedMe(false),accept_connection(false),
state(0),actAsServer(false),
connectPort(0),

View File

@ -702,7 +702,7 @@ void ConnectFriendWizard::accept()
{
std::cerr << "ConclusionPage::validatePage() accepting GPG key for connection." << std::endl;
if(peerDetails.skip_signature_validation)
if(peerDetails.skip_pgp_signature_validation)
rsPeers->addSslOnlyFriend(peerDetails.id, peerDetails.gpg_id,peerDetails);
else
rsPeers->addFriend(peerDetails.id, peerDetails.gpg_id,serviceFlags()) ;