mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-07 22:02:32 -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
1 changed files with 5 additions and 1 deletions
|
@ -191,16 +191,20 @@ bool DistributedChatService::checkSignature(RsChatLobbyBouncingObject *obj,const
|
||||||
|
|
||||||
if(!mGixs->validateData(memory,obj->signed_serial_size(),obj->signature,false,error_status))
|
if(!mGixs->validateData(memory,obj->signed_serial_size(),obj->signature,false,error_status))
|
||||||
{
|
{
|
||||||
|
bool res = false ;
|
||||||
|
|
||||||
switch(error_status)
|
switch(error_status)
|
||||||
{
|
{
|
||||||
case RsGixs::RS_GIXS_ERROR_KEY_NOT_AVAILABLE: std::cerr << "(EE) Key is not available. Cannot verify." << std::endl;
|
case RsGixs::RS_GIXS_ERROR_KEY_NOT_AVAILABLE: std::cerr << "(EE) Key is not available. Cannot verify." << std::endl;
|
||||||
|
res =true ;
|
||||||
break ;
|
break ;
|
||||||
case RsGixs::RS_GIXS_ERROR_SIGNATURE_MISMATCH: std::cerr << "(EE) Signature mismatch. Spoofing/MITM?." << std::endl;
|
case RsGixs::RS_GIXS_ERROR_SIGNATURE_MISMATCH: std::cerr << "(EE) Signature mismatch. Spoofing/MITM?." << std::endl;
|
||||||
|
res =false ;
|
||||||
break ;
|
break ;
|
||||||
default: break ;
|
default: break ;
|
||||||
}
|
}
|
||||||
free(memory) ;
|
free(memory) ;
|
||||||
return false;
|
return res;
|
||||||
}
|
}
|
||||||
free(memory) ;
|
free(memory) ;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue