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:
@@ -30,6 +30,7 @@ using namespace std;
|
||||
"canImport" : true,
|
||||
"canDelete" : true,
|
||||
"canEditOwnerTrust" : true,
|
||||
"canEditUidValidity" : true,
|
||||
"privKeyIds" : [
|
||||
"fullKeyId1",
|
||||
"fullKeyId2"
|
||||
@@ -127,6 +128,19 @@ bool AppConfig::CanEditOwnerTrust() const
|
||||
return cnObject.get("canEditOwnerTrust");
|
||||
}
|
||||
|
||||
bool AppConfig::CanEditUidValidity() const
|
||||
{
|
||||
if (PrivateKeyIds().size() == 0)
|
||||
return false;
|
||||
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("canEditUidValidity"))
|
||||
return false;
|
||||
return cnObject.get("canEditUidValidity");
|
||||
}
|
||||
|
||||
vector<WString> AppConfig::PrivateKeyIds() const
|
||||
{
|
||||
// List private key identifiers.
|
||||
@@ -156,4 +170,4 @@ const WString AppConfig::GetSubjectDnAttribute(const WSslCertificate::DnAttribut
|
||||
return dnAttr->at(i).value();
|
||||
}
|
||||
return WString::Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,12 @@ public:
|
||||
* @return
|
||||
*/
|
||||
bool CanEditOwnerTrust() const;
|
||||
/**
|
||||
* Allows to edit validity of user identity.
|
||||
* Only users who manage private keys can do that.
|
||||
* @return
|
||||
*/
|
||||
bool CanEditUidValidity() const;
|
||||
/**
|
||||
* List of full private key identifiers. The user may delete these private keys.
|
||||
* Must be full keyid, short keyid or fingerprint.
|
||||
|
||||
@@ -17,10 +17,12 @@
|
||||
GpgMEWorker::GpgMEWorker()
|
||||
{
|
||||
m_ctx = Context::createForProtocol(Protocol::OpenPGP);
|
||||
m_ppp = NULL;
|
||||
}
|
||||
|
||||
GpgMEWorker::~GpgMEWorker()
|
||||
{
|
||||
delete m_ppp;
|
||||
delete m_ctx;
|
||||
}
|
||||
|
||||
@@ -89,3 +91,42 @@ const Error GpgMEWorker::EditOwnerTrust(const char* anyFullId, GpgME::Key::Owner
|
||||
GpgME::Data d; // Internal processing data
|
||||
return m_ctx->edit(k, std::unique_ptr<SetOwnerTrustEditInteractor> (interactor), d);
|
||||
}
|
||||
|
||||
const Error GpgMEWorker::CertifyKey(const char* fprSigningKey,
|
||||
const char * fprKeyToSign,
|
||||
vector<uint>& userIDsToSign, int options,
|
||||
const string& passphrase)
|
||||
{
|
||||
Error e;
|
||||
Key signingKey = FindKey(fprSigningKey, e, true);
|
||||
if (e.code() != 0)
|
||||
return e;
|
||||
e = m_ctx->addSigningKey(signingKey); // +++
|
||||
if (e.code() != 0)
|
||||
return e;
|
||||
Key keyToSign = FindKey(fprKeyToSign, e, false);
|
||||
if (e.code() != 0)
|
||||
return e;
|
||||
|
||||
// GPG engine will fetch for passphrase in the custom provider.
|
||||
m_ctx->setPinentryMode(Context::PinentryMode::PinentryLoopback);
|
||||
if (m_ppp == NULL)
|
||||
m_ppp = new LoopbackPassphraseProvider();
|
||||
m_ppp->SetPassphrase(passphrase);
|
||||
m_ctx->setPassphraseProvider(m_ppp);
|
||||
|
||||
SetSignKeyEditInteractor * interactor = new SetSignKeyEditInteractor();
|
||||
interactor->setKey(keyToSign);
|
||||
interactor->setUserIDsToSign(userIDsToSign);
|
||||
interactor->setSigningOptions(options);
|
||||
// What's that check level ?
|
||||
// interactor->setCheckLevel(2);
|
||||
GpgME::Data d;
|
||||
e = m_ctx->edit(keyToSign, std::unique_ptr<SetSignKeyEditInteractor> (interactor), d);
|
||||
m_ctx->clearSigningKeys();
|
||||
/*
|
||||
* On error, always : code = 1024 | asString = User defined error code 1
|
||||
* Can't distinguish between bad password or whatever cause.
|
||||
*/
|
||||
return e;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
#include <gpgme++/error.h>
|
||||
#include <gpgme++/key.h>
|
||||
#include <gpgme++/gpgsetownertrusteditinteractor.h>
|
||||
#include <gpgme++/gpgsignkeyeditinteractor.h>
|
||||
#include <vector>
|
||||
#include "LoopbackPassphraseProvider.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace GpgME;
|
||||
@@ -59,9 +61,25 @@ public:
|
||||
* @return
|
||||
*/
|
||||
const Error EditOwnerTrust(const char * anyFullId, GpgME::Key::OwnerTrust trustLevel);
|
||||
/**
|
||||
* Certify (sign) selected key.
|
||||
* @param fprSigningKey
|
||||
* @param fprKeyToSign
|
||||
* @param userIDsToSign : index of each user identity in a vector.
|
||||
* @param options : Exportable (1), Non revocable (2).
|
||||
* \nTrust(4) is not implemented.
|
||||
* @param passphrase
|
||||
* @return
|
||||
*/
|
||||
const Error CertifyKey(const char * fprSigningKey,
|
||||
const char * fprKeyToSign,
|
||||
vector<uint>& userIDsToSign, int options,
|
||||
const string& passphrase);
|
||||
|
||||
private:
|
||||
Context * m_ctx;
|
||||
// GPG will fetch a password here.
|
||||
LoopbackPassphraseProvider * m_ppp;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -70,14 +88,36 @@ private:
|
||||
class SetOwnerTrustEditInteractor : public GpgSetOwnerTrustEditInteractor
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ownerTrust : New trust level
|
||||
*/
|
||||
SetOwnerTrustEditInteractor(GpgME::Key::OwnerTrust ownerTrust)
|
||||
: GpgSetOwnerTrustEditInteractor(ownerTrust) {}
|
||||
: GpgSetOwnerTrustEditInteractor(ownerTrust)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~SetOwnerTrustEditInteractor() {}
|
||||
virtual ~SetOwnerTrustEditInteractor()
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Passed to GPG engine to certify (sign) a key.
|
||||
*/
|
||||
class SetSignKeyEditInteractor : public GpgSignKeyEditInteractor
|
||||
{
|
||||
public:
|
||||
|
||||
SetSignKeyEditInteractor() : GpgSignKeyEditInteractor()
|
||||
{
|
||||
};
|
||||
|
||||
virtual ~SetSignKeyEditInteractor()
|
||||
{
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
22
K7Main.cpp
22
K7Main.cpp
@@ -19,6 +19,7 @@
|
||||
#include <Wt/WLink.h>
|
||||
#include "GpgMEWorker.h"
|
||||
#include "GpgMECWorker.h"
|
||||
#include "Tools.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -189,7 +190,7 @@ void K7Main::Search()
|
||||
for (uint j = 0; j < lst.size(); j++)
|
||||
{
|
||||
const GpgME::Key k = lst.at(j);
|
||||
if (!ConfigKeyIdMatchesKey(k, configPrivKeys.at(i)))
|
||||
if (!Tools::ConfigKeyIdMatchesKey(k, configPrivKeys.at(i)))
|
||||
{
|
||||
m_tmwMessage->SetText(configPrivKeys.at(i) + TR("BadConfigKeyId"));
|
||||
privkList.clear();
|
||||
@@ -227,14 +228,6 @@ void K7Main::Search()
|
||||
DisplayKeys(privkList, TR("Secrets"), false);
|
||||
}
|
||||
|
||||
bool K7Main::ConfigKeyIdMatchesKey(const GpgME::Key& k, const WString& configKeyId) const
|
||||
{
|
||||
// We want key identifier in config file to be real and complete.
|
||||
return (configKeyId == WString(k.shortKeyID())
|
||||
|| configKeyId == WString(k.keyID())
|
||||
|| configKeyId == WString(k.primaryFingerprint()));
|
||||
}
|
||||
|
||||
WString K7Main::MakeDateTimeLabel(time_t ticks)
|
||||
{
|
||||
std::chrono::minutes offset = WApplication::instance()->environment().timeZoneOffset();
|
||||
@@ -311,12 +304,19 @@ void K7Main::DisplayUids(const WString& fullKeyID, bool secret)
|
||||
rootNode->setChildCountPolicy(ChildCountPolicy::Enabled);
|
||||
m_ttbUids->setTreeRoot(unique_ptr<WTreeTableNode> (rootNode), TR("UIDs"));
|
||||
rootNode->expand();
|
||||
vector<WString> privateKeys = m_config->PrivateKeyIds();
|
||||
for (uint i = 0; i < k.numUserIDs(); i++)
|
||||
{
|
||||
UserID uid = k.userID(i);
|
||||
WTreeTableNode * uidNode = new WTreeTableNode(uid.name());
|
||||
uidNode->setColumnWidget(1, cpp14::make_unique<WText> (uid.email()));
|
||||
uidNode->setColumnWidget(2, cpp14::make_unique<WText> (UidValidities[uid.validity()]));
|
||||
// Show key certify popup on double click
|
||||
WText * lblUidValidity = new WText(UidValidities[uid.validity()]);
|
||||
if (m_config->CanEditUidValidity()) {
|
||||
lblUidValidity->setToolTip(TR("TTTDoubleCLick"));
|
||||
lblUidValidity->doubleClicked().connect(std::bind(&KeyEdit::OnUidValidityClicked, m_keyEdit, uidNode, privateKeys, WString(k.primaryFingerprint())));
|
||||
}
|
||||
uidNode->setColumnWidget(2, unique_ptr<WText> (lblUidValidity));
|
||||
uidNode->setColumnWidget(3, cpp14::make_unique<WText> (uid.comment()));
|
||||
rootNode->addChildNode(unique_ptr<WTreeTableNode> (uidNode));
|
||||
// uid.numSignatures() is always 0, even for signed keys !
|
||||
@@ -445,7 +445,7 @@ bool K7Main::CanKeyBeDeleted(const WString& fullKeyID) {
|
||||
vector<WString> curUserPrivKeys = m_config->PrivateKeyIds();
|
||||
vector<WString>::iterator it;
|
||||
for (it = curUserPrivKeys.begin(); it != curUserPrivKeys.end(); it++) {
|
||||
if (ConfigKeyIdMatchesKey(k, *it)) {
|
||||
if (Tools::ConfigKeyIdMatchesKey(k, *it)) {
|
||||
m_btnDelete->setAttributeValue("keyid", k.keyID());
|
||||
m_btnDelete->setAttributeValue("hasSecret", "1");
|
||||
return true;
|
||||
|
||||
7
K7Main.h
7
K7Main.h
@@ -66,13 +66,6 @@ private:
|
||||
* \nShows the keys in tree table.
|
||||
*/
|
||||
void Search();
|
||||
/**
|
||||
* We want key identifier in config file to be real and complete.
|
||||
* @param k
|
||||
* @param configKeyId key identifier as entered in configuration file
|
||||
* @return
|
||||
*/
|
||||
bool ConfigKeyIdMatchesKey(const GpgME::Key& k, const WString& configKeyId) const;
|
||||
/**
|
||||
* Show keys in tree table
|
||||
*/
|
||||
|
||||
47
KeyEdit.cpp
47
KeyEdit.cpp
@@ -16,12 +16,16 @@
|
||||
using namespace std;
|
||||
|
||||
KeyEdit::KeyEdit(K7Main * owner)
|
||||
:WObject()
|
||||
{
|
||||
m_owner = owner;
|
||||
m_popupUid = NULL;
|
||||
m_targetKeyFpr = WString::Empty;
|
||||
}
|
||||
|
||||
KeyEdit::~KeyEdit()
|
||||
{
|
||||
delete m_popupUid;
|
||||
}
|
||||
|
||||
void KeyEdit::OnOwnerTrustDoubleClicked(WTreeTableNode * keyNode)
|
||||
@@ -100,3 +104,46 @@ bool KeyEdit::IsOurKey(const WString& fpr)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void KeyEdit::OnUidValidityClicked(WTreeTableNode* uidNode, vector<WString>& privateKeys, const WString& targetKeyFpr)
|
||||
{
|
||||
if (targetKeyFpr != m_targetKeyFpr) {
|
||||
bool passwordVisibility = true;
|
||||
if (m_popupUid)
|
||||
passwordVisibility = m_popupUid->IsPasswordVisible();
|
||||
delete m_popupUid;
|
||||
WText * lblUidValidity = static_cast<WText*> (uidNode->columnWidget(2));
|
||||
m_popupUid = new PopupCertifyUserId(lblUidValidity, m_owner->m_tmwMessage);
|
||||
m_popupUid->Create(privateKeys, targetKeyFpr);
|
||||
m_popupUid->ShowPassphrase(passwordVisibility);
|
||||
m_targetKeyFpr = targetKeyFpr;
|
||||
m_popupUid->GetCertifyButton()->clicked().connect(this, &KeyEdit::CertifyKey);
|
||||
}
|
||||
m_popupUid->show();
|
||||
}
|
||||
|
||||
void KeyEdit::CertifyKey()
|
||||
{
|
||||
vector<uint>& uidsToSign = m_popupUid->GetUidsToSign();
|
||||
if (uidsToSign.size() == 0) {
|
||||
m_owner->m_tmwMessage->SetText(TR("NoUidSelected"));
|
||||
return;
|
||||
}
|
||||
const WString signingKey = m_popupUid->GetSelectedKey();
|
||||
const WString keyToSign = m_popupUid->GetKeyToSign();
|
||||
int options = m_popupUid->GetCertifyOptions();
|
||||
GpgMEWorker gpgWorker;
|
||||
GpgME::Error e = gpgWorker.CertifyKey(signingKey.toUTF8().c_str(),
|
||||
keyToSign.toUTF8().c_str(),
|
||||
uidsToSign, options,
|
||||
m_popupUid->GetPassphrase());
|
||||
if (e.code() != 0)
|
||||
{
|
||||
m_owner->m_tmwMessage->SetText(TR("CertificationFailure"));
|
||||
m_popupUid->ShowPassphrase(true);
|
||||
return;
|
||||
}
|
||||
m_owner->m_tmwMessage->SetText(TR("CertificationSuccess"));
|
||||
m_popupUid->ShowPassphrase(false);
|
||||
m_owner->DisplayUids(keyToSign);
|
||||
}
|
||||
|
||||
17
KeyEdit.h
17
KeyEdit.h
@@ -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 */
|
||||
|
||||
59
LoopbackPassphraseProvider.cpp
Normal file
59
LoopbackPassphraseProvider.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* File: LoopbackPassphraseProvider.cpp
|
||||
* Author: SET - nmset@yandex.com
|
||||
* License : GPL v2
|
||||
* Copyright SET - © 2019
|
||||
*
|
||||
* Created on November 2, 2020, 2:57 PM
|
||||
*/
|
||||
|
||||
#include "LoopbackPassphraseProvider.h"
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
|
||||
LoopbackPassphraseProvider::LoopbackPassphraseProvider()
|
||||
: PassphraseProvider()
|
||||
{
|
||||
m_passphrase = strdup("");
|
||||
}
|
||||
|
||||
LoopbackPassphraseProvider::LoopbackPassphraseProvider(const string& passphrase)
|
||||
: PassphraseProvider()
|
||||
{
|
||||
m_passphrase = strdup(passphrase.c_str());
|
||||
}
|
||||
|
||||
LoopbackPassphraseProvider::~LoopbackPassphraseProvider()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Called by GPG engine.
|
||||
* Is not called if gpg-agent already has a valid password.
|
||||
*/
|
||||
char* LoopbackPassphraseProvider::getPassphrase(const char* useridHint,
|
||||
const char* description,
|
||||
bool previousWasBad,
|
||||
bool& canceled)
|
||||
{
|
||||
/*
|
||||
cout << useridHint << endl; // <Signing keyid> <key name> <email>
|
||||
cout << description << endl; // <Signing keyid> <Signing keyid> 1 0
|
||||
cout << previousWasBad << endl; // Always 0, even with bad password
|
||||
cout << canceled << endl; // Always 0
|
||||
*/
|
||||
return m_passphrase;
|
||||
}
|
||||
|
||||
void LoopbackPassphraseProvider::SetPassphrase(const string& passphrase)
|
||||
{
|
||||
/*
|
||||
* Memory leak here ?
|
||||
*/
|
||||
m_passphrase = strdup(passphrase.c_str());
|
||||
}
|
||||
|
||||
const string LoopbackPassphraseProvider::GetPassphrase()
|
||||
{
|
||||
return m_passphrase;
|
||||
}
|
||||
56
LoopbackPassphraseProvider.h
Normal file
56
LoopbackPassphraseProvider.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* File: LoopbackPassphraseProvider.h
|
||||
* Author: SET - nmset@yandex.com
|
||||
* License : GPL v2
|
||||
* Copyright SET - © 2019
|
||||
*
|
||||
* Created on November 2, 2020, 2:57 PM
|
||||
*/
|
||||
|
||||
#ifndef LOOPBACKPASSPHRASEPROVIDER_H
|
||||
#define LOOPBACKPASSPHRASEPROVIDER_H
|
||||
|
||||
#include <string>
|
||||
#include <gpgme++/interfaces/passphraseprovider.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* Replaces default pinentry on a web server.
|
||||
*/
|
||||
class LoopbackPassphraseProvider : public GpgME::PassphraseProvider
|
||||
{
|
||||
public:
|
||||
LoopbackPassphraseProvider();
|
||||
LoopbackPassphraseProvider(const string& passphrase);
|
||||
virtual ~LoopbackPassphraseProvider();
|
||||
/**
|
||||
* GPG engine gets its passphrase here.
|
||||
* \n The usefulness of the (out?) parameters needs to be better
|
||||
* understood (by me!).
|
||||
* @param useridHint : Signing keyid | key name | email
|
||||
* @param description : Signing keyid | Signing keyid | 1 | 0
|
||||
* @param previousWasBad : Always 0, even with bad password
|
||||
* @param canceled : Always 0
|
||||
* @return
|
||||
*/
|
||||
virtual char *getPassphrase(const char *useridHint, const char *description,
|
||||
bool previousWasBad, bool &canceled);
|
||||
/**
|
||||
* Application must do that.
|
||||
* @param passphrase
|
||||
*/
|
||||
void SetPassphrase(const string& passphrase);
|
||||
/**
|
||||
* Application may need it, though it knows what it stored here.
|
||||
* @return
|
||||
*/
|
||||
const string GetPassphrase();
|
||||
|
||||
private:
|
||||
char * m_passphrase;
|
||||
|
||||
};
|
||||
|
||||
#endif /* LOOPBACKPASSPHRASEPROVIDER_H */
|
||||
|
||||
239
PopupCertifyUserId.cpp
Normal file
239
PopupCertifyUserId.cpp
Normal file
@@ -0,0 +1,239 @@
|
||||
/*
|
||||
* File: PopupCertifyUserId.cpp
|
||||
* Author: SET - nmset@yandex.com
|
||||
* License : GPL v2
|
||||
* Copyright SET - © 2019
|
||||
*
|
||||
* Created on October 30, 2020, 7:50 PM
|
||||
*/
|
||||
|
||||
#include "PopupCertifyUserId.h"
|
||||
#include "global.h"
|
||||
#include "Tools.h"
|
||||
#include <Wt/WStandardItem.h>
|
||||
#include <Wt/WStandardItemModel.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
PopupCertifyUserId::PopupCertifyUserId(WWidget * anchorWidget, TransientMessageWidget * txtMessage,
|
||||
const WLength& width)
|
||||
: WPopupWidget(cpp14::make_unique<WContainerWidget>())
|
||||
{
|
||||
m_tmwMessage = txtMessage;
|
||||
m_cwMain = NULL;
|
||||
m_cmbPrivKeys = NULL;
|
||||
m_cbOptionExportable = NULL;
|
||||
m_cbOptionNonRevocable = NULL;
|
||||
// m_cbOptionTrust = NULL;
|
||||
m_lblPassphrase = NULL;
|
||||
m_lePassphrase = NULL;
|
||||
m_btnApply = NULL;
|
||||
m_certifyOptions = 0;
|
||||
setTransient(true);
|
||||
setAnchorWidget(anchorWidget);
|
||||
setWidth(width);
|
||||
}
|
||||
|
||||
PopupCertifyUserId::~PopupCertifyUserId()
|
||||
{
|
||||
}
|
||||
|
||||
void PopupCertifyUserId::Create(vector<WString>& privateKeys,
|
||||
const WString& fprKeyToSign)
|
||||
{
|
||||
m_fprKeyToSign = fprKeyToSign;
|
||||
m_cwMain = static_cast<WContainerWidget*> (implementation());
|
||||
|
||||
WVBoxLayout * vblMain = new WVBoxLayout();
|
||||
m_cwMain->setLayout(unique_ptr<WVBoxLayout> (vblMain));
|
||||
|
||||
m_cmbPrivKeys = new WComboBox();
|
||||
vblMain->addWidget(unique_ptr<WComboBox> (m_cmbPrivKeys));
|
||||
FillPrivateKeyComboBox(privateKeys);
|
||||
/*
|
||||
* Column 0 : user identities in checkboxes
|
||||
* Column 1 : signing options in checkboxes
|
||||
*/
|
||||
m_hblPreferences = new WHBoxLayout();
|
||||
vblMain->addLayout(unique_ptr<WHBoxLayout> (m_hblPreferences));
|
||||
// Column 0
|
||||
m_vblEmail = new WVBoxLayout();
|
||||
m_hblPreferences->addLayout(unique_ptr<WVBoxLayout> (m_vblEmail));
|
||||
PresentEmail();
|
||||
// Column 1
|
||||
WVBoxLayout * vblOptions = new WVBoxLayout();
|
||||
m_hblPreferences->addLayout(unique_ptr<WVBoxLayout> (vblOptions));
|
||||
WText * lblOptions = new WText(TR("Options"));
|
||||
vblOptions->addWidget(unique_ptr<WText> (lblOptions));
|
||||
m_cbOptionExportable = new WCheckBox(TR("ExportableCertification"));
|
||||
vblOptions->addWidget(unique_ptr<WCheckBox> (m_cbOptionExportable));
|
||||
m_cbOptionNonRevocable = new WCheckBox(TR("NonRevocableCertification"));
|
||||
vblOptions->addWidget(unique_ptr<WCheckBox> (m_cbOptionNonRevocable));
|
||||
/*m_cbOptionTrust = new WCheckBox(TR("TrustCertification"));
|
||||
vblOptions->addWidget(unique_ptr<WCheckBox> (m_cbOptionTrust));*/
|
||||
|
||||
WHBoxLayout * hblPassphrase = new WHBoxLayout();
|
||||
m_lblPassphrase = new WText(TR("Passphrase"));
|
||||
hblPassphrase->addWidget(unique_ptr<WText> (m_lblPassphrase), 0);
|
||||
m_lePassphrase = new WLineEdit();
|
||||
m_lePassphrase->setEchoMode(EchoMode::Password);
|
||||
hblPassphrase->addWidget(unique_ptr<WLineEdit> (m_lePassphrase), 1);
|
||||
vblMain->addLayout(unique_ptr<WHBoxLayout> (hblPassphrase));
|
||||
|
||||
m_btnApply = new WPushButton(TR("Apply"));
|
||||
vblMain->addWidget(unique_ptr<WPushButton> (m_btnApply));
|
||||
|
||||
m_cmbPrivKeys->changed().connect(std::bind(&PopupCertifyUserId::ShowPassphrase, this, true));
|
||||
m_cbOptionExportable->checked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionChecked, this, 1));
|
||||
m_cbOptionNonRevocable->checked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionChecked, this, 2));
|
||||
// m_cbOptionTrust->checked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionChecked, this, 4));
|
||||
m_cbOptionExportable->unChecked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionUnChecked, this, 1));
|
||||
m_cbOptionNonRevocable->unChecked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionUnChecked, this, 2));
|
||||
// m_cbOptionTrust->unChecked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionUnChecked, this, 4));
|
||||
|
||||
}
|
||||
|
||||
void PopupCertifyUserId::FillPrivateKeyComboBox(vector<WString>& privateKeys)
|
||||
{
|
||||
if (m_cmbPrivKeys == NULL)
|
||||
return;
|
||||
vector<WString>::iterator it;
|
||||
GpgMEWorker gpgw;
|
||||
GpgME::Error e;
|
||||
shared_ptr<WStandardItemModel> iModel =
|
||||
make_shared<WStandardItemModel> (0, 2);
|
||||
for (it = privateKeys.begin(); it != privateKeys.end(); it++)
|
||||
{
|
||||
vector<GpgME::Key> lst = gpgw.FindKeys((*it).toUTF8().c_str(), true, e);
|
||||
if (e.code() != 0)
|
||||
{
|
||||
m_tmwMessage->SetText(e.asString());
|
||||
return;
|
||||
}
|
||||
// We are expecting one single key from a full fpr
|
||||
const GpgME::Key k = lst.at(0);
|
||||
if (!Tools::ConfigKeyIdMatchesKey(k, (*it)))
|
||||
{
|
||||
m_tmwMessage->SetText((*it) + TR("BadConfigKeyId"));
|
||||
return;
|
||||
}
|
||||
/* Limit to first email. name should be the same
|
||||
* for all UIDs of the key.
|
||||
*/
|
||||
const WString displayed = WString(k.userID(0).name())
|
||||
+ _SPACE_
|
||||
+ _ANGLE_BRACKET_OPEN_ + k.userID(0).email()
|
||||
+ _ANGLE_BRACKET_CLOSE_
|
||||
+ _SPACE_
|
||||
+ _BRACKET_OPEN_ + k.shortKeyID() + _BRACKET_CLOSE_;
|
||||
iModel->appendRow(cpp14::make_unique<WStandardItem> (*it));
|
||||
iModel->setItem(iModel->rowCount() - 1, 1, cpp14::make_unique<WStandardItem> (displayed));
|
||||
}
|
||||
m_cmbPrivKeys->setModel(iModel);
|
||||
m_cmbPrivKeys->setModelColumn(1);
|
||||
}
|
||||
|
||||
void PopupCertifyUserId::PresentEmail()
|
||||
{
|
||||
WText * lblEmail = new WText(TR("Email"));
|
||||
m_vblEmail->addWidget(unique_ptr<WText> (lblEmail));
|
||||
|
||||
GpgMEWorker gpgw;
|
||||
GpgME::Error e;
|
||||
vector<GpgME::Key> lst = gpgw.FindKeys(m_fprKeyToSign.toUTF8().c_str(), false, e);
|
||||
if (e.code() != 0)
|
||||
{
|
||||
m_tmwMessage->SetText(e.asString());
|
||||
return;
|
||||
}
|
||||
if (lst.size() != 1)
|
||||
{
|
||||
m_tmwMessage->SetText(m_fprKeyToSign + TR("BadKeyCount"));
|
||||
return;
|
||||
}
|
||||
const GpgME::Key k = lst.at(0);
|
||||
|
||||
vector<GpgME::UserID> uids = k.userIDs();
|
||||
vector<GpgME::UserID>::iterator it;
|
||||
uint id = 0;
|
||||
for (it = uids.begin(); it != uids.end(); it++)
|
||||
{
|
||||
WCheckBox * cbEmail = new WCheckBox(it->email());
|
||||
m_vblEmail->addWidget(unique_ptr<WCheckBox> (cbEmail));
|
||||
cbEmail->setId(std::to_string(id));
|
||||
cbEmail->checked().connect(std::bind(&PopupCertifyUserId::OnEmailChecked, this, cbEmail));
|
||||
cbEmail->unChecked().connect(std::bind(&PopupCertifyUserId::OnEmailUnChecked, this, cbEmail));
|
||||
id++;
|
||||
}
|
||||
}
|
||||
|
||||
WString PopupCertifyUserId::GetSelectedKey() const
|
||||
{
|
||||
if (!m_cmbPrivKeys->count())
|
||||
return WString::Empty;
|
||||
shared_ptr<WAbstractItemModel> aiModel = m_cmbPrivKeys->model();
|
||||
WStandardItemModel * iModel = static_cast<WStandardItemModel*> (aiModel.get());
|
||||
if (!iModel) return WString::Empty;
|
||||
WStandardItem * item = iModel->item(m_cmbPrivKeys->currentIndex(), 0);
|
||||
if (!item) return WString::Empty;
|
||||
return item->text();
|
||||
}
|
||||
|
||||
void PopupCertifyUserId::ShowPassphrase(bool show)
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
m_lblPassphrase->show();
|
||||
m_lePassphrase->show();
|
||||
/*
|
||||
* We cannot know the reason of a certify failure.
|
||||
* Empty the passphrase widget in any case.
|
||||
*/
|
||||
m_lePassphrase->setText(WString::Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lblPassphrase->hide();
|
||||
m_lePassphrase->hide();
|
||||
/*
|
||||
* The passphrase widget is not cleared.
|
||||
* gpg-agent will not fetch it from the loopback passphrase provider
|
||||
* as long as its caching timeout is not reached.
|
||||
* To better mimic the behavior of the default pinentry mechanism,
|
||||
* we should probably clear m_lePassphrase AND the passphrase stored
|
||||
* in the loopback passphrase provider.
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
void PopupCertifyUserId::OnEmailChecked(WCheckBox* cb)
|
||||
{
|
||||
int id = Tools::ToInt(cb->id());
|
||||
m_uidsToSign.push_back(id);
|
||||
}
|
||||
|
||||
void PopupCertifyUserId::OnEmailUnChecked(WCheckBox* cb)
|
||||
{
|
||||
// Any tip to locate a known value in a vector without iterating over?
|
||||
const uint id = Tools::ToInt(cb->id());
|
||||
vector<uint>::iterator it;
|
||||
for (it = m_uidsToSign.begin(); it != m_uidsToSign.end(); it++)
|
||||
{
|
||||
if ((*it) == id)
|
||||
{
|
||||
m_uidsToSign.erase(it);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PopupCertifyUserId::OnCertifyOptionChecked(int id)
|
||||
{
|
||||
m_certifyOptions += id;
|
||||
}
|
||||
|
||||
void PopupCertifyUserId::OnCertifyOptionUnChecked(int id)
|
||||
{
|
||||
m_certifyOptions -= id;
|
||||
}
|
||||
172
PopupCertifyUserId.h
Normal file
172
PopupCertifyUserId.h
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* File: PopupCertifyUserId.h
|
||||
* Author: SET - nmset@yandex.com
|
||||
* License : GPL v2
|
||||
* Copyright SET - © 2019
|
||||
*
|
||||
* Created on October 30, 2020, 7:50 PM
|
||||
*/
|
||||
|
||||
#ifndef POPUPCERTIFYUSERID_H
|
||||
#define POPUPCERTIFYUSERID_H
|
||||
|
||||
#include <Wt/WPopupWidget.h>
|
||||
#include <Wt/WContainerWidget.h>
|
||||
#include <Wt/WCheckBox.h>
|
||||
#include <Wt/WComboBox.h>
|
||||
#include <Wt/WPushButton.h>
|
||||
#include <Wt/WText.h>
|
||||
#include <Wt/WLineEdit.h>
|
||||
#include <Wt/WVBoxLayout.h>
|
||||
#include <Wt/WHBoxLayout.h>
|
||||
#include <vector>
|
||||
#include "TransientMessageWidget.h"
|
||||
|
||||
using namespace Wt;
|
||||
|
||||
/**
|
||||
* A popup with required parameters to certify a key :
|
||||
* <ul>
|
||||
* <li>Signer's private keys</li>
|
||||
* <li>Target key user identities (email)</li>
|
||||
* <li>Signing options : Exportable and non-revocable</li>
|
||||
* <li>Passphrase for selected private key</li>
|
||||
* </ul>
|
||||
* The passphrase is cached by gpg-agent for default 10 mins.
|
||||
* \n The popup hides the passphrase widget until a certify op fails.
|
||||
* \n UserID::Validity:: lists many validity levels. How to selectively apply
|
||||
* an arbitrary level ? Before signing, it's 'Unknown'. After signing, it's
|
||||
* always 'Full'.
|
||||
*/
|
||||
class PopupCertifyUserId : public WPopupWidget
|
||||
{
|
||||
public:
|
||||
PopupCertifyUserId(WWidget * anchorWidget, TransientMessageWidget * txtMessage,
|
||||
const WLength& width = 500);
|
||||
virtual ~PopupCertifyUserId();
|
||||
/**
|
||||
* Must be called on its own.
|
||||
* @param privateKeys
|
||||
* @param fprKeyToSign
|
||||
*/
|
||||
void Create(vector<WString>& privateKeys, const WString& fprKeyToSign);
|
||||
/**
|
||||
*
|
||||
* @return : Fingerprint of selected signing key
|
||||
*/
|
||||
WString GetSelectedKey() const;
|
||||
/**
|
||||
* Controls visibility of passphrase widgets.
|
||||
* \n Need not be always visible as the passphrase is cached by gpg-agent.
|
||||
* \n During that caching period, a wrong input passphrase will not be looked
|
||||
* for by GPG engine, and may be confusing.
|
||||
* @param show
|
||||
*/
|
||||
void ShowPassphrase(bool show = true);
|
||||
/**
|
||||
* Used to restore the state of the widgets when target key changes.
|
||||
* @return
|
||||
*/
|
||||
bool IsPasswordVisible() const
|
||||
{
|
||||
return m_lePassphrase->isVisible();
|
||||
}
|
||||
/**
|
||||
* Used to forward the passphrase to the loopback passphrase provider.
|
||||
* @return
|
||||
*/
|
||||
const string GetPassphrase()
|
||||
{
|
||||
return m_lePassphrase->text().toUTF8();
|
||||
}
|
||||
/**
|
||||
* Obviously.
|
||||
* @return
|
||||
*/
|
||||
const WString GetKeyToSign()
|
||||
{
|
||||
return m_fprKeyToSign;
|
||||
}
|
||||
/**
|
||||
* We can select what identity (email) to certify. GPG expects it as a
|
||||
* vector of indices.
|
||||
* @return
|
||||
*/
|
||||
vector<uint>& GetUidsToSign()
|
||||
{
|
||||
return m_uidsToSign;
|
||||
}
|
||||
/**
|
||||
* Sum of option values
|
||||
* <ul>
|
||||
* <li>Exportable : 1</li>
|
||||
* <li>Non revocable : 2</li>
|
||||
* </ul>
|
||||
* Trust(4) is not implemented as it always fails.
|
||||
* @return
|
||||
*/
|
||||
int GetCertifyOptions()
|
||||
{
|
||||
return m_certifyOptions;
|
||||
}
|
||||
/**
|
||||
* Caller binds its certify function here.
|
||||
* @return
|
||||
*/
|
||||
WPushButton* GetCertifyButton()
|
||||
{
|
||||
return m_btnApply;
|
||||
}
|
||||
private:
|
||||
TransientMessageWidget * m_tmwMessage;
|
||||
WContainerWidget * m_cwMain;
|
||||
WString m_fprKeyToSign;
|
||||
|
||||
WComboBox * m_cmbPrivKeys;
|
||||
WHBoxLayout * m_hblPreferences;
|
||||
WVBoxLayout * m_vblEmail;
|
||||
vector<WCheckBox*> m_lstUids;
|
||||
WCheckBox * m_cbOptionExportable;
|
||||
WCheckBox * m_cbOptionNonRevocable;
|
||||
// WCheckBox * m_cbOptionTrust; // Always fails
|
||||
WText * m_lblPassphrase;
|
||||
WLineEdit * m_lePassphrase;
|
||||
WPushButton * m_btnApply;
|
||||
|
||||
vector<uint> m_uidsToSign;
|
||||
int m_certifyOptions;
|
||||
/**
|
||||
* Available private fingerprints in a combobox. The selected item is the
|
||||
* signing key.
|
||||
* @param privateKeys
|
||||
*/
|
||||
void FillPrivateKeyComboBox(vector<WString>& privateKeys);
|
||||
/**
|
||||
* Show user identities of key to sign. Can be independently selected
|
||||
* using checkboxes.
|
||||
*/
|
||||
void PresentEmail();
|
||||
/**
|
||||
* Add the identity index in a vector.
|
||||
* @param cb
|
||||
*/
|
||||
void OnEmailChecked(WCheckBox * cb);
|
||||
/**
|
||||
* Removes the identity index in a vector.
|
||||
* @param cb
|
||||
*/
|
||||
void OnEmailUnChecked(WCheckBox * cb);
|
||||
/**
|
||||
* Adds the option value in m_certifyOptions.
|
||||
* @param id
|
||||
*/
|
||||
void OnCertifyOptionChecked(int id);
|
||||
/**
|
||||
* Subtract the option value from m_certifyOptions.
|
||||
* @param id
|
||||
*/
|
||||
void OnCertifyOptionUnChecked(int id);
|
||||
};
|
||||
|
||||
#endif /* POPUPCERTIFYUSERID_H */
|
||||
|
||||
35
Tools.cpp
Normal file
35
Tools.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* File: Tools.cpp
|
||||
* Author: SET - nmset@yandex.com
|
||||
* License : GPL v2
|
||||
* Copyright SET - © 2019
|
||||
*
|
||||
* Created on November 1, 2020, 8:31 PM
|
||||
*/
|
||||
|
||||
#include "Tools.h"
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
Tools::Tools() {
|
||||
}
|
||||
|
||||
Tools::~Tools() {
|
||||
}
|
||||
|
||||
bool Tools::ConfigKeyIdMatchesKey(const GpgME::Key& k, const WString& configKeyId)
|
||||
{
|
||||
// We want key identifier in config file to be real and complete.
|
||||
return (configKeyId == WString(k.shortKeyID())
|
||||
|| configKeyId == WString(k.keyID())
|
||||
|| configKeyId == WString(k.primaryFingerprint()));
|
||||
}
|
||||
|
||||
int Tools::ToInt(const string& s) {
|
||||
istringstream buffer(s.c_str());
|
||||
int num;
|
||||
buffer >> num;
|
||||
return num;
|
||||
}
|
||||
46
Tools.h
Normal file
46
Tools.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* File: Tools.h
|
||||
* Author: SET - nmset@yandex.com
|
||||
* License : GPL v2
|
||||
* Copyright SET - © 2019
|
||||
*
|
||||
* Created on November 1, 2020, 8:31 PM
|
||||
*/
|
||||
|
||||
#ifndef TOOLS_H
|
||||
#define TOOLS_H
|
||||
|
||||
#include <Wt/WString.h>
|
||||
#include "GpgMEWorker.h"
|
||||
|
||||
using namespace Wt;
|
||||
|
||||
/**
|
||||
* A few general usage functions.
|
||||
*/
|
||||
class Tools {
|
||||
public:
|
||||
Tools();
|
||||
virtual ~Tools();
|
||||
|
||||
/**
|
||||
* We want key identifier in config file to be real and complete.
|
||||
* @param k
|
||||
* @param configKeyId key identifier as entered in configuration file
|
||||
* @return
|
||||
*/
|
||||
static bool ConfigKeyIdMatchesKey(const GpgME::Key& k,
|
||||
const WString& configKeyId);
|
||||
/**
|
||||
* Integer value of a string.
|
||||
* @param s
|
||||
* @return
|
||||
*/
|
||||
static int ToInt(const string& s);
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /* TOOLS_H */
|
||||
|
||||
@@ -68,4 +68,15 @@
|
||||
<message id='TTTYourKey'>This is your key</message>
|
||||
<message id='OwnerTrustSuccess'>Owner trust level succesfully changed</message>
|
||||
<message id='OwnerTrustFailure'>Owner trust level failed to be changed</message>
|
||||
|
||||
<message id='BadKeyCount'>Too many keys; a single key is expected</message>
|
||||
<message id='Options'>Options</message>
|
||||
<message id='ExportableCertification'>Certify for everyone to see</message>
|
||||
<message id='NonRevocableCertification'>Non revocable</message>
|
||||
<message id='TrustCertification'>Trust</message>
|
||||
<message id='Passphrase'>Passphrase</message>
|
||||
<message id='NoUidSelected'>No email address is selected</message>
|
||||
<message id='Apply'>Apply</message>
|
||||
<message id='CertificationSuccess'>Key succesfully certified</message>
|
||||
<message id='CertificationFailure'>Key certification failed</message>
|
||||
</messages>
|
||||
@@ -68,4 +68,15 @@
|
||||
<message id='TTTYourKey'>C'est votre clé</message>
|
||||
<message id='OwnerTrustSuccess'>Confiance dans la certification changée avec succès</message>
|
||||
<message id='OwnerTrustFailure'>Échec de changement de la confiance dans la certification</message>
|
||||
|
||||
<message id='BadKeyCount'>Trop de clés; une seule attendue</message>
|
||||
<message id='Options'>Options</message>
|
||||
<message id='ExportableCertification'>Certifier pour une visibilité par tous</message>
|
||||
<message id='NonRevocableCertification'>Non révocable</message>
|
||||
<message id='TrustCertification'>Confiance totale</message>
|
||||
<message id='Passphrase'>Phrase de passe</message>
|
||||
<message id='NoUidSelected'>Aucun courriel n'est sélectionné</message>
|
||||
<message id='Apply'>Appliquer</message>
|
||||
<message id='CertificationSuccess'>Succès de certification de la clé</message>
|
||||
<message id='CertificationFailure'>Échec de certification de la clé</message>
|
||||
</messages>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"canImport" : true,
|
||||
"canDelete" : true,
|
||||
"canEditOwnerTrust" : true,
|
||||
"canEditUidValidity" : true,
|
||||
"privKeyIds" : [
|
||||
"FullKeyId1",
|
||||
"FullKeyId2"
|
||||
|
||||
4
global.h
4
global.h
@@ -20,6 +20,10 @@ const WString _APPNAME_("K7");
|
||||
const WString _APPVERSION_("1");
|
||||
const WString _SPACE_(" ");
|
||||
const WString _COLON_(":");
|
||||
const WString _BRACKET_OPEN_("(");
|
||||
const WString _BRACKET_CLOSE_(")");
|
||||
const WString _ANGLE_BRACKET_OPEN_("<");
|
||||
const WString _ANGLE_BRACKET_CLOSE_(">");
|
||||
|
||||
typedef map<int, WString> UidValidityMap;
|
||||
typedef map<int, WString> OwnerTrustMap;
|
||||
|
||||
@@ -40,8 +40,11 @@ OBJECTFILES= \
|
||||
${OBJECTDIR}/GpgMEWorker.o \
|
||||
${OBJECTDIR}/K7Main.o \
|
||||
${OBJECTDIR}/KeyEdit.o \
|
||||
${OBJECTDIR}/LoopbackPassphraseProvider.o \
|
||||
${OBJECTDIR}/PopupCertifyUserId.o \
|
||||
${OBJECTDIR}/PopupDeleter.o \
|
||||
${OBJECTDIR}/PopupUploader.o \
|
||||
${OBJECTDIR}/Tools.o \
|
||||
${OBJECTDIR}/TransientMessageWidget.o \
|
||||
${OBJECTDIR}/main.o
|
||||
|
||||
@@ -95,6 +98,16 @@ ${OBJECTDIR}/KeyEdit.o: KeyEdit.cpp
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -DLARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/KeyEdit.o KeyEdit.cpp
|
||||
|
||||
${OBJECTDIR}/LoopbackPassphraseProvider.o: LoopbackPassphraseProvider.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -DLARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LoopbackPassphraseProvider.o LoopbackPassphraseProvider.cpp
|
||||
|
||||
${OBJECTDIR}/PopupCertifyUserId.o: PopupCertifyUserId.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -DLARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/PopupCertifyUserId.o PopupCertifyUserId.cpp
|
||||
|
||||
${OBJECTDIR}/PopupDeleter.o: PopupDeleter.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
@@ -105,6 +118,11 @@ ${OBJECTDIR}/PopupUploader.o: PopupUploader.cpp
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -DLARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/PopupUploader.o PopupUploader.cpp
|
||||
|
||||
${OBJECTDIR}/Tools.o: Tools.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -DLARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/Tools.o Tools.cpp
|
||||
|
||||
${OBJECTDIR}/TransientMessageWidget.o: TransientMessageWidget.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
|
||||
@@ -40,8 +40,11 @@ OBJECTFILES= \
|
||||
${OBJECTDIR}/GpgMEWorker.o \
|
||||
${OBJECTDIR}/K7Main.o \
|
||||
${OBJECTDIR}/KeyEdit.o \
|
||||
${OBJECTDIR}/LoopbackPassphraseProvider.o \
|
||||
${OBJECTDIR}/PopupCertifyUserId.o \
|
||||
${OBJECTDIR}/PopupDeleter.o \
|
||||
${OBJECTDIR}/PopupUploader.o \
|
||||
${OBJECTDIR}/Tools.o \
|
||||
${OBJECTDIR}/TransientMessageWidget.o \
|
||||
${OBJECTDIR}/main.o
|
||||
|
||||
@@ -95,6 +98,16 @@ ${OBJECTDIR}/KeyEdit.o: KeyEdit.cpp
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -g -DDEVTIME -I/usr/local/Wt-Debug/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/KeyEdit.o KeyEdit.cpp
|
||||
|
||||
${OBJECTDIR}/LoopbackPassphraseProvider.o: LoopbackPassphraseProvider.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -g -DDEVTIME -I/usr/local/Wt-Debug/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LoopbackPassphraseProvider.o LoopbackPassphraseProvider.cpp
|
||||
|
||||
${OBJECTDIR}/PopupCertifyUserId.o: PopupCertifyUserId.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -g -DDEVTIME -I/usr/local/Wt-Debug/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/PopupCertifyUserId.o PopupCertifyUserId.cpp
|
||||
|
||||
${OBJECTDIR}/PopupDeleter.o: PopupDeleter.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
@@ -105,6 +118,11 @@ ${OBJECTDIR}/PopupUploader.o: PopupUploader.cpp
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -g -DDEVTIME -I/usr/local/Wt-Debug/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/PopupUploader.o PopupUploader.cpp
|
||||
|
||||
${OBJECTDIR}/Tools.o: Tools.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -g -DDEVTIME -I/usr/local/Wt-Debug/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/Tools.o Tools.cpp
|
||||
|
||||
${OBJECTDIR}/TransientMessageWidget.o: TransientMessageWidget.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
|
||||
@@ -40,8 +40,11 @@ OBJECTFILES= \
|
||||
${OBJECTDIR}/GpgMEWorker.o \
|
||||
${OBJECTDIR}/K7Main.o \
|
||||
${OBJECTDIR}/KeyEdit.o \
|
||||
${OBJECTDIR}/LoopbackPassphraseProvider.o \
|
||||
${OBJECTDIR}/PopupCertifyUserId.o \
|
||||
${OBJECTDIR}/PopupDeleter.o \
|
||||
${OBJECTDIR}/PopupUploader.o \
|
||||
${OBJECTDIR}/Tools.o \
|
||||
${OBJECTDIR}/TransientMessageWidget.o \
|
||||
${OBJECTDIR}/main.o
|
||||
|
||||
@@ -95,6 +98,16 @@ ${OBJECTDIR}/KeyEdit.o: KeyEdit.cpp
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/KeyEdit.o KeyEdit.cpp
|
||||
|
||||
${OBJECTDIR}/LoopbackPassphraseProvider.o: LoopbackPassphraseProvider.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LoopbackPassphraseProvider.o LoopbackPassphraseProvider.cpp
|
||||
|
||||
${OBJECTDIR}/PopupCertifyUserId.o: PopupCertifyUserId.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/PopupCertifyUserId.o PopupCertifyUserId.cpp
|
||||
|
||||
${OBJECTDIR}/PopupDeleter.o: PopupDeleter.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
@@ -105,6 +118,11 @@ ${OBJECTDIR}/PopupUploader.o: PopupUploader.cpp
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/PopupUploader.o PopupUploader.cpp
|
||||
|
||||
${OBJECTDIR}/Tools.o: Tools.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
$(COMPILE.cc) -O2 -s -I/usr/local/Wt/include -I/usr/include/gpgme++ -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/Tools.o Tools.cpp
|
||||
|
||||
${OBJECTDIR}/TransientMessageWidget.o: TransientMessageWidget.cpp
|
||||
${MKDIR} -p ${OBJECTDIR}
|
||||
${RM} "$@.d"
|
||||
|
||||
@@ -9,16 +9,21 @@
|
||||
<itemPath>GpgMEWorker.h</itemPath>
|
||||
<itemPath>K7Main.h</itemPath>
|
||||
<itemPath>KeyEdit.h</itemPath>
|
||||
<itemPath>LoopbackPassphraseProvider.h</itemPath>
|
||||
<itemPath>PopupCertifyUserId.h</itemPath>
|
||||
<itemPath>PopupDeleter.h</itemPath>
|
||||
<itemPath>PopupUploader.h</itemPath>
|
||||
<itemPath>Tools.h</itemPath>
|
||||
<itemPath>TransientMessageWidget.h</itemPath>
|
||||
<itemPath>global.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="ResourceFiles"
|
||||
displayName="Resource Files"
|
||||
projectFiles="true">
|
||||
<itemPath>WTAPPROOT/K7/K7.css</itemPath>
|
||||
<itemPath>WTAPPROOT/K7/K7.xml</itemPath>
|
||||
<itemPath>WTAPPROOT/K7/K7_fr.xml</itemPath>
|
||||
<itemPath>WTAPPROOT/K7/k7config.json</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="SourceFiles"
|
||||
displayName="Source Files"
|
||||
@@ -28,8 +33,11 @@
|
||||
<itemPath>GpgMEWorker.cpp</itemPath>
|
||||
<itemPath>K7Main.cpp</itemPath>
|
||||
<itemPath>KeyEdit.cpp</itemPath>
|
||||
<itemPath>LoopbackPassphraseProvider.cpp</itemPath>
|
||||
<itemPath>PopupCertifyUserId.cpp</itemPath>
|
||||
<itemPath>PopupDeleter.cpp</itemPath>
|
||||
<itemPath>PopupUploader.cpp</itemPath>
|
||||
<itemPath>Tools.cpp</itemPath>
|
||||
<itemPath>TransientMessageWidget.cpp</itemPath>
|
||||
<itemPath>main.cpp</itemPath>
|
||||
</logicalFolder>
|
||||
@@ -96,6 +104,14 @@
|
||||
</item>
|
||||
<item path="KeyEdit.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="LoopbackPassphraseProvider.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="LoopbackPassphraseProvider.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupCertifyUserId.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupCertifyUserId.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupDeleter.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupDeleter.h" ex="false" tool="3" flavor2="0">
|
||||
@@ -104,14 +120,22 @@
|
||||
</item>
|
||||
<item path="PopupUploader.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="Tools.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="Tools.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="TransientMessageWidget.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="TransientMessageWidget.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/K7.css" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/K7.xml" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/K7_fr.xml" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/k7config.json" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="global.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="main.cpp" ex="false" tool="1" flavor2="0">
|
||||
@@ -176,6 +200,14 @@
|
||||
</item>
|
||||
<item path="KeyEdit.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="LoopbackPassphraseProvider.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="LoopbackPassphraseProvider.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupCertifyUserId.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupCertifyUserId.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupDeleter.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupDeleter.h" ex="false" tool="3" flavor2="0">
|
||||
@@ -184,14 +216,22 @@
|
||||
</item>
|
||||
<item path="PopupUploader.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="Tools.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="Tools.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="TransientMessageWidget.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="TransientMessageWidget.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/K7.css" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/K7.xml" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/K7_fr.xml" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/k7config.json" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="global.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="main.cpp" ex="false" tool="1" flavor2="0">
|
||||
@@ -260,6 +300,14 @@
|
||||
</item>
|
||||
<item path="KeyEdit.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="LoopbackPassphraseProvider.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="LoopbackPassphraseProvider.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupCertifyUserId.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupCertifyUserId.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupDeleter.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="PopupDeleter.h" ex="false" tool="3" flavor2="0">
|
||||
@@ -268,14 +316,22 @@
|
||||
</item>
|
||||
<item path="PopupUploader.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="Tools.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="Tools.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="TransientMessageWidget.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
<item path="TransientMessageWidget.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/K7.css" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/K7.xml" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/K7_fr.xml" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="WTAPPROOT/K7/k7config.json" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="global.h" ex="false" tool="3" flavor2="0">
|
||||
</item>
|
||||
<item path="main.cpp" ex="false" tool="1" flavor2="0">
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<gdb_interceptlist>
|
||||
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
|
||||
</gdb_interceptlist>
|
||||
<gdb_signals>
|
||||
</gdb_signals>
|
||||
<gdb_options>
|
||||
<DebugOptions>
|
||||
</DebugOptions>
|
||||
|
||||
Reference in New Issue
Block a user