Allow to change key expiry date.

Select new date in a popup. Controlled by a specific configuration flag.
This commit is contained in:
SET
2020-11-07 22:17:44 +01:00
parent fcd595d530
commit 2bddf29596
17 changed files with 328 additions and 7 deletions

View File

@@ -15,6 +15,7 @@
#include <gpgme++/key.h>
#include <gpgme++/gpgsetownertrusteditinteractor.h>
#include <gpgme++/gpgsignkeyeditinteractor.h>
#include <gpgme++/gpgsetexpirytimeeditinteractor.h>
#include <vector>
#include "LoopbackPassphraseProvider.h"
@@ -75,6 +76,14 @@ public:
const char * fprKeyToSign,
vector<uint>& userIDsToSign, int options,
const string& passphrase);
/**
* Set new expiry time of a secret key.
* @param timeString
* @return
*/
const Error SetExpiryTime(const char * keyFpr,
const string& passphrase,
const string& timeString = "0");
private:
Context * m_ctx;
@@ -121,5 +130,18 @@ public:
};
class SetExpiryTimeEditInteractor : public GpgSetExpiryTimeEditInteractor
{
public:
SetExpiryTimeEditInteractor(const std::string& timeString = "0")
: GpgSetExpiryTimeEditInteractor(timeString)
{
};
virtual ~SetExpiryTimeEditInteractor()
{
};
};
#endif /* GPGMEWORKER_H */