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:
@@ -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()
|
||||
{
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user