Allow to add and revoke user identities.

Using a popup with required parameters.
This commit is contained in:
SET
2020-11-19 19:16:17 +01:00
parent 43e1eff221
commit bb174075df
15 changed files with 430 additions and 11 deletions

View File

@@ -38,6 +38,7 @@ mutex gs_fileWriteMutex;
"canEditUidValidity" : true,
"canEditExpiryTime" : true,
"canCreateKeys" : true,
"canAddRevokeUids" : true,
"privKeyIds" : [
"fullKeyId1",
"fullKeyId2"
@@ -172,6 +173,17 @@ bool AppConfig::CanCreateKeys() const
return cnObject.get("canCreateKeys");
}
bool AppConfig::CanAddRevokeUid() const
{
const WString commonName = GetSubjectDnAttribute(WSslCertificate::DnAttributeName::CommonName);
if (!m_SubjectCNObject.contains(commonName.toUTF8()))
return false;
Json::Object cnObject = m_SubjectCNObject.get(commonName.toUTF8());
if (!cnObject.contains("canAddRevokeUids"))
return false;
return cnObject.get("canAddRevokeUids");
}
bool AppConfig::UpdateSecretKeyOwnership(const WString& fpr, bool own)
{
const WString commonName = GetSubjectDnAttribute(WSslCertificate::DnAttributeName::CommonName);