mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
added check for DSA/RSA key algorithm. Disabled make friend, login and cert creation, with unsupported keys
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5221 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
36bec260b9
commit
dba66cdd7a
9 changed files with 65 additions and 30 deletions
|
@ -718,6 +718,16 @@ bool AuthGPG::encryptText(gpgme_data_t PLAIN, gpgme_data_t CIPHER)
|
|||
}
|
||||
#endif
|
||||
|
||||
bool AuthGPG::isKeySupported(const std::string& id) const
|
||||
{
|
||||
const PGPCertificateInfo *pc = PGPHandler::getCertificateInfo(PGPIdType(id)) ;
|
||||
|
||||
if(pc == NULL)
|
||||
return false ;
|
||||
|
||||
return !(pc->_flags & PGPCertificateInfo::PGP_CERTIFICATE_FLAG_UNSUPPORTED_ALGORITHM) ;
|
||||
}
|
||||
|
||||
bool AuthGPG::getGPGDetails(const std::string& id, RsPeerDetails &d)
|
||||
{
|
||||
RsStackMutex stack(gpgMtxData); /******* LOCKED ******/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue