mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
fixed assert crash due to using non RSA key
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6424 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b427d5a4f2
commit
d5c645e383
@ -1027,6 +1027,11 @@ bool PGPHandler::encryptDataBin(const PGPIdType& key_id,const void *data, const
|
||||
std::cerr << "PGPHandler::encryptTextToFile(): ERROR: supplied id did not return a public key!" << std::endl;
|
||||
return false ;
|
||||
}
|
||||
if(public_key->key.pkey.algorithm != OPS_PKA_RSA)
|
||||
{
|
||||
std::cerr << "PGPHandler::encryptTextToFile(): ERROR: supplied key id " << key_id.toStdString() << " is not an RSA key (DSA for instance, is not supported)!" << std::endl;
|
||||
return false ;
|
||||
}
|
||||
ops_create_info_t *info;
|
||||
ops_memory_t *buf = NULL ;
|
||||
ops_setup_memory_write(&info, &buf, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user