Certify key.

In-place editing with a popup if user is allowed in app config file.
User must of course manage at least a private key. User identities of
target key may be selectively chosen. Optionally, certification may be
exportable and non-revocable.
This commit is contained in:
SET
2020-11-03 11:06:25 +01:00
parent e434315940
commit 7f8af95d3a
23 changed files with 922 additions and 24 deletions

View File

@@ -13,6 +13,7 @@
#include <Wt/WTreeTableNode.h>
#include "K7Main.h"
#include <Wt/WComboBox.h>
#include "PopupCertifyUserId.h"
using namespace Wt;
@@ -20,9 +21,9 @@ class K7Main;
/**
* Some key editing functionalities are or will be implemented here. For now,
* only owner trust level is editable.
* only owner trust level and key certification are implemented.
*/
class KeyEdit
class KeyEdit : public WObject
{
public:
KeyEdit(K7Main * owner);
@@ -43,11 +44,21 @@ public:
* @return
*/
bool IsOurKey(const WString& fpr);
/**
* Shows a popup with parameters for key certification.
* @param uidNode
* @param privateKeys : A list of our private keys.
* @param targetKeyFpr : The key to sign.
*/
void OnUidValidityClicked(WTreeTableNode * uidNode, vector<WString>& privateKeys, const WString& targetKeyFpr);
private:
K7Main * m_owner;
PopupCertifyUserId * m_popupUid;
WString m_targetKeyFpr;
void FillOwnerTrustCombo(WComboBox * cmb);
void CertifyKey();
};
#endif /* KEYEDIT_H */