fixed crash due to writing an unsupported key type

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5218 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-06-13 20:54:39 +00:00
parent 043c7a8139
commit 36bec260b9
2 changed files with 14 additions and 2 deletions

View file

@ -357,7 +357,9 @@ std::string PGPHandler::makeRadixEncodedPGPKey(const ops_keydata_t *key)
ops_memory_t *buf = NULL ;
ops_setup_memory_write(&cinfo, &buf, 0);
ops_write_transferable_public_key(key,armoured,cinfo);
if(ops_write_transferable_public_key(key,armoured,cinfo) != ops_true)
return "ERROR: This key cannot be processed by RetroShare because\nDSA certificates are not yet handled." ;
ops_writer_close(cinfo) ;
std::string akey((char *)ops_memory_get_data(buf),ops_memory_get_length(buf)) ;