mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
made sure we have the public keys for msg validation, as only the private key is available when we are admin/publisher of a group
This commit is contained in:
parent
a962330f25
commit
00613d433c
@ -2752,6 +2752,8 @@ void RsGenExchange::processRecvdMessages()
|
|||||||
if(mit != grpMetas.end())
|
if(mit != grpMetas.end())
|
||||||
{
|
{
|
||||||
grpMeta = mit->second;
|
grpMeta = mit->second;
|
||||||
|
GxsSecurity::createPublicKeysFromPrivateKeys(grpMeta->keys); // make sure we have the public keys that correspond to the private ones, as it happens. Most of the time this call does nothing.
|
||||||
|
|
||||||
validateReturn = validateMsg(msg, grpMeta->mGroupFlags, grpMeta->mSignFlags, grpMeta->keys);
|
validateReturn = validateMsg(msg, grpMeta->mGroupFlags, grpMeta->mSignFlags, grpMeta->keys);
|
||||||
|
|
||||||
#ifdef GEN_EXCH_DEBUG
|
#ifdef GEN_EXCH_DEBUG
|
||||||
@ -3125,6 +3127,8 @@ bool RsGenExchange::updateValid(RsGxsGrpMetaData& oldGrpMeta, RsNxsGrp& newGrp)
|
|||||||
|
|
||||||
RsTlvKeySignature adminSign = mit->second;
|
RsTlvKeySignature adminSign = mit->second;
|
||||||
|
|
||||||
|
GxsSecurity::createPublicKeysFromPrivateKeys(oldGrpMeta.keys); // make sure we have the public keys that correspond to the private ones, as it happens. Most of the time this call does nothing.
|
||||||
|
|
||||||
std::map<RsGxsId, RsTlvPublicRSAKey>& keys = oldGrpMeta.keys.public_keys;
|
std::map<RsGxsId, RsTlvPublicRSAKey>& keys = oldGrpMeta.keys.public_keys;
|
||||||
std::map<RsGxsId, RsTlvPublicRSAKey>::iterator keyMit = keys.find(RsGxsId(oldGrpMeta.mGroupId));
|
std::map<RsGxsId, RsTlvPublicRSAKey>::iterator keyMit = keys.find(RsGxsId(oldGrpMeta.mGroupId));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user