mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
70969af108
commit
29d3c8bcdd
@ -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) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user