added setFlags method in Id combo box. Removed possibility to send anonymous distant messages (too risky). Improved the logic in message composer GUI. Fixed bug when key not available in message encryption/signing routine.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7705 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-11-24 21:02:18 +00:00
parent 2f547e4014
commit 30d9671ca6
6 changed files with 53 additions and 67 deletions

View file

@ -1728,7 +1728,7 @@ bool p3MsgService::createDistantMessage(const RsGxsId& destination_gxs_id,const
// 2 - now sign the data, if necessary, and put the signature up front
if(item->msgFlags & RS_MSG_FLAGS_SIGNED)
if(item->msgFlags & RS_MSG_FLAGS_SIGNED && !source_gxs_id.isNull())
{
#ifdef DEBUG_DISTANT_MSG
std::cerr << " Signing the message with key id " << source_gxs_id << std::endl;
@ -1739,7 +1739,7 @@ bool p3MsgService::createDistantMessage(const RsGxsId& destination_gxs_id,const
#ifdef DEBUG_DISTANT_MSG
std::cerr << " Getting key material..." << std::endl;
#endif
if(!mIdService->getPrivateKey(source_gxs_id,signature_key))
if(mIdService->getPrivateKey(source_gxs_id,signature_key) < 0)
throw std::runtime_error("Cannot get signature key for id " + source_gxs_id.toStdString()) ;
#ifdef DEBUG_DISTANT_MSG