mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-29 01:08:50 -04:00
Fixed sign validation. request not reachable in previous logic
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6129 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
21dd979ba8
commit
d6c34f1b74
1 changed files with 2 additions and 5 deletions
|
@ -175,8 +175,6 @@ void RsGenExchange::generateGroupKeys(RsTlvSecurityKeySet& privatekeySet,
|
||||||
GxsSecurity::setRSAPublicKey(adminKey, rsa_admin_pub);
|
GxsSecurity::setRSAPublicKey(adminKey, rsa_admin_pub);
|
||||||
GxsSecurity::setRSAPrivateKey(privAdminKey, rsa_admin);
|
GxsSecurity::setRSAPrivateKey(privAdminKey, rsa_admin);
|
||||||
|
|
||||||
adminKey.keyId = adminKey.keyId + "_public";
|
|
||||||
|
|
||||||
adminKey.startTS = time(NULL);
|
adminKey.startTS = time(NULL);
|
||||||
adminKey.endTS = adminKey.startTS + 60 * 60 * 24 * 365 * 5; /* approx 5 years */
|
adminKey.endTS = adminKey.startTS + 60 * 60 * 24 * 365 * 5; /* approx 5 years */
|
||||||
|
|
||||||
|
@ -207,7 +205,6 @@ void RsGenExchange::generateGroupKeys(RsTlvSecurityKeySet& privatekeySet,
|
||||||
GxsSecurity::setRSAPrivateKey(privPubKey, rsa_publish);
|
GxsSecurity::setRSAPrivateKey(privPubKey, rsa_publish);
|
||||||
|
|
||||||
pubKey.startTS = adminKey.startTS;
|
pubKey.startTS = adminKey.startTS;
|
||||||
pubKey.keyId = pubKey.keyId + "_public";
|
|
||||||
pubKey.endTS = pubKey.startTS + 60 * 60 * 24 * 365 * 5; /* approx 5 years */
|
pubKey.endTS = pubKey.startTS + 60 * 60 * 24 * 365 * 5; /* approx 5 years */
|
||||||
|
|
||||||
privPubKey.startTS = adminKey.startTS;
|
privPubKey.startTS = adminKey.startTS;
|
||||||
|
@ -639,8 +636,6 @@ bool RsGenExchange::validateMsg(RsNxsMsg *msg, const uint32_t& grpFlag, RsTlvSec
|
||||||
|
|
||||||
if(haveKey)
|
if(haveKey)
|
||||||
{
|
{
|
||||||
std::list<std::string> peers;
|
|
||||||
mGixs->requestKey(metaData.mAuthorId, peers);
|
|
||||||
|
|
||||||
RsTlvSecurityKey authorKey;
|
RsTlvSecurityKey authorKey;
|
||||||
|
|
||||||
|
@ -662,6 +657,8 @@ bool RsGenExchange::validateMsg(RsNxsMsg *msg, const uint32_t& grpFlag, RsTlvSec
|
||||||
valid &= GxsSecurity::validateNxsMsg(*msg, sign, authorKey);
|
valid &= GxsSecurity::validateNxsMsg(*msg, sign, authorKey);
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
std::list<std::string> peers;
|
||||||
|
mGixs->requestKey(metaData.mAuthorId, peers);
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue