made signature verification passe when no key is present in the cache for lobby events

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8038 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-03-16 20:38:59 +00:00
parent 70969af108
commit 29d3c8bcdd

View File

@ -191,16 +191,20 @@ bool DistributedChatService::checkSignature(RsChatLobbyBouncingObject *obj,const
if(!mGixs->validateData(memory,obj->signed_serial_size(),obj->signature,false,error_status))
{
bool res = false ;
switch(error_status)
{
case RsGixs::RS_GIXS_ERROR_KEY_NOT_AVAILABLE: std::cerr << "(EE) Key is not available. Cannot verify." << std::endl;
res =true ;
break ;
case RsGixs::RS_GIXS_ERROR_SIGNATURE_MISMATCH: std::cerr << "(EE) Signature mismatch. Spoofing/MITM?." << std::endl;
res =false ;
break ;
default: break ;
}
free(memory) ;
return false;
return res;
}
free(memory) ;