mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 00:25:48 -04:00
Add some documentation and fix some compiler warnings
This commit is contained in:
parent
4e3ac4a9f4
commit
1e9adc1e23
2 changed files with 33 additions and 18 deletions
|
@ -1581,24 +1581,25 @@ void PGPHandler::locked_updateOwnSignatureFlag(PGPCertificateInfo& cert,const Rs
|
|||
cert._flags &= ~PGPCertificateInfo::PGP_CERTIFICATE_FLAG_HAS_SIGNED_ME ;
|
||||
}
|
||||
|
||||
RsPgpId PGPHandler::pgpIdFromFingerprint(const PGPFingerprintType& f)
|
||||
/*static*/ RsPgpId PGPHandler::pgpIdFromFingerprint(const RsPgpFingerprint& f)
|
||||
{
|
||||
return RsPgpId(f.toByteArray() + _RsIdSize::PGP_FINGERPRINT - _RsIdSize::PGP_ID);
|
||||
return RsPgpId::fromBufferUnsafe(
|
||||
f.toByteArray() +
|
||||
RsPgpFingerprint::SIZE_IN_BYTES - RsPgpId::SIZE_IN_BYTES );
|
||||
}
|
||||
|
||||
bool PGPHandler::getKeyFingerprint(const RsPgpId& id,PGPFingerprintType& fp) const
|
||||
bool PGPHandler::getKeyFingerprint(const RsPgpId& id, RsPgpFingerprint& fp) const
|
||||
{
|
||||
RsStackMutex mtx(pgphandlerMtx) ; // lock access to PGP memory structures.
|
||||
RS_STACK_MUTEX(pgphandlerMtx);
|
||||
|
||||
const ops_keydata_t *key = locked_getPublicKey(id,false) ;
|
||||
|
||||
if(key == NULL)
|
||||
return false ;
|
||||
if(!key) return false;
|
||||
|
||||
ops_fingerprint_t f ;
|
||||
ops_fingerprint(&f,&key->key.pkey) ;
|
||||
|
||||
fp = PGPFingerprintType(f.fingerprint) ;
|
||||
fp = RsPgpFingerprint::fromBufferUnsafe(f.fingerprint);
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue