Commit 7c2acfd3 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Rolf Eike Beer

make PINENTRY_LAUNCHED a hint that can be triggered on

parent 89ef50cc
......@@ -128,6 +128,7 @@ KGpgTransaction::hintLine(const ts_hintType hint, const QString &args)
{
switch (hint) {
case HT_KEYEXPIRED:
case HT_PINENTRY_LAUNCHED:
return !args.isEmpty();
default:
return true;
......
......@@ -79,10 +79,11 @@ public:
* @brief the known hints sent by GnuPG
*/
enum ts_hintType {
HT_KEYEXPIRED = 0, ///< key is expired
HT_SIGEXPIRED = 1, ///< deprecated by GnuPG
HT_NOSECKEY = 2, ///< secret key not available
HT_ENCTO = 3 ///< message is encrypted for this key
HT_KEYEXPIRED, ///< key is expired
HT_SIGEXPIRED, ///< deprecated by GnuPG
HT_NOSECKEY, ///< secret key not available
HT_ENCTO, ///< message is encrypted for this key
HT_PINENTRY_LAUNCHED ///< pinentry was launched
};
/**
......
......@@ -163,8 +163,6 @@ KGpgTransactionPrivate::slotReadReady()
m_success = KGpgTransaction::TS_USER_ABORTED;
} else if (line.startsWith(QLatin1String("[GNUPG:] CARDCTRL "))) {
// just ignore them, pinentry should handle that
} else if (line.startsWith(QLatin1String("[GNUPG:] PINENTRY_LAUNCHED "))) {
// just ignore them, just means pinentry is asked for password input
} else {
// all known hints
int i = 0;
......@@ -295,10 +293,16 @@ KGpgTransactionPrivate::hintNames (void)
static QStringList hints;
if (hints.isEmpty()) {
hints.insert(KGpgTransaction::HT_KEYEXPIRED, QLatin1String("[GNUPG:] KEYEXPIRED"));
hints.insert(KGpgTransaction::HT_SIGEXPIRED, QLatin1String("[GNUPG:] SIGEXPIRED"));
hints.insert(KGpgTransaction::HT_NOSECKEY, QLatin1String("[GNUPG:] NO_SECKEY"));
hints.insert(KGpgTransaction::HT_ENCTO, QLatin1String("[GNUPG:] ENC_TO"));
hints.insert(KGpgTransaction::HT_KEYEXPIRED,
QLatin1String("[GNUPG:] KEYEXPIRED"));
hints.insert(KGpgTransaction::HT_SIGEXPIRED,
QLatin1String("[GNUPG:] SIGEXPIRED"));
hints.insert(KGpgTransaction::HT_NOSECKEY,
QLatin1String("[GNUPG:] NO_SECKEY"));
hints.insert(KGpgTransaction::HT_ENCTO,
QLatin1String("[GNUPG:] ENC_TO"));
hints.insert(KGpgTransaction::HT_PINENTRY_LAUNCHED,
QLatin1String("[GNUPG:] PINENTRY_LAUNCHED"));
}
return hints;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment