mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
auto-validate own signed identities
This commit is contained in:
parent
6cca74aec6
commit
d1baa3821a
@ -954,10 +954,7 @@ bool p3IdService::deserialiseIdentityFromMemory(const std::string& radix_string,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3IdService::createIdentity(
|
||||
RsGxsId& id,
|
||||
const std::string& name, const RsGxsImage& avatar,
|
||||
bool pseudonimous, const std::string& pgpPassword)
|
||||
bool p3IdService::createIdentity( RsGxsId& id, const std::string& name, const RsGxsImage& avatar, bool pseudonimous, const std::string& pgpPassword)
|
||||
{
|
||||
bool ret = true;
|
||||
RsIdentityParameters params;
|
||||
@ -1062,6 +1059,20 @@ bool p3IdService::createIdentity(uint32_t& token, RsIdentityParameters ¶ms)
|
||||
else
|
||||
id.mMeta.mGroupFlags |= GXS_SERV::FLAG_PRIVACY_PUBLIC;
|
||||
|
||||
// Anticipate signature validation, since we're creating the signature ourselves.
|
||||
|
||||
SSGxsIdGroup ssdata;
|
||||
ssdata.pgp.validatedSignature = params.isPgpLinked;
|
||||
|
||||
if(params.isPgpLinked)
|
||||
{
|
||||
ssdata.pgp.pgpId = AuthGPG::getAuthGPG()->getGPGOwnId();
|
||||
ssdata.pgp.lastCheckTs = time(nullptr);
|
||||
}
|
||||
|
||||
/* save string */
|
||||
id.mMeta.mServiceString = ssdata.save();
|
||||
|
||||
createGroup(token, id);
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user