2025-01-29 16:42:37 +01:00
|
|
|
#ifndef UTPASSPHRASEPROVIDER_H
|
|
|
|
#define UTPASSPHRASEPROVIDER_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <gpg-error.h>
|
|
|
|
#include <gpgme++/interfaces/passphraseprovider.h>
|
|
|
|
|
|
|
|
class TesTPassphraseProvider : public QObject, public GpgME::PassphraseProvider
|
|
|
|
{
|
2025-01-30 16:25:29 +01:00
|
|
|
Q_OBJECT
|
2025-01-29 16:42:37 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
char *getPassphrase(const char *useridHint,
|
|
|
|
const char *description,
|
|
|
|
bool previousWasBad,
|
2025-01-30 16:25:29 +01:00
|
|
|
bool &canceled) override
|
|
|
|
{
|
2025-01-29 16:42:37 +01:00
|
|
|
|
|
|
|
char *ret;
|
|
|
|
gpgrt_asprintf(&ret, "%s", "utpasspassphrase");
|
|
|
|
return ret;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|