exposed un-verified PGP signatures on GXS ids in GUI. Added auto-ban of GXS ids signed by a PGP ids that has already signed a large enough set of GXS ids. Still needs some GUI to change the threshold.

This commit is contained in:
csoler 2016-04-02 14:04:08 -04:00
parent 9a6bcf81d7
commit 9d9b790a3e
13 changed files with 336 additions and 74 deletions

View file

@ -1692,6 +1692,24 @@ bool PGPHandler::mergeKeySignatures(ops_keydata_t *dst,const ops_keydata_t *src)
return to_add.size() > 0 ;
}
bool PGPHandler::parseSignature(unsigned char *sign, unsigned int signlen,RsPgpId& issuer_id)
{
uint64_t issuer ;
if(!PGPKeyManagement::parseSignature(sign,signlen,issuer))
return false ;
unsigned char bytes[8] ;
for(int i=0;i<8;++i)
{
bytes[7-i] = issuer & 0xff ;
issuer >>= 8 ;
}
issuer_id = RsPgpId(bytes) ;
return true ;
}
bool PGPHandler::privateTrustCertificate(const RsPgpId& id,int trustlvl)
{
if(trustlvl < 0 || trustlvl >= 6 || trustlvl == 1)