mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-12 08:10:46 -04:00
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:
parent
9a6bcf81d7
commit
9d9b790a3e
13 changed files with 336 additions and 74 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue