From 12136d19fe229fdd358ba79f0edded4096b327ef Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sat, 29 Jun 2013 19:53:16 -0400 Subject: [PATCH] Fix PASSWD inquiring a passphrase when PWMD_NO_PASSPHRASE was set. When a non-PKI data file has the PWMD_NO_PASSPHRASE flag set there is no need to prompt for an existing passphrase before changing it to the new one. --- src/crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crypto.c b/src/crypto.c index e9b0b345..6df05da1 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -1528,7 +1528,8 @@ decrypt_common (assuan_context_t ctx, int inquire, struct crypto_s *crypto, } } - if (!key && !IS_PKI (crypto) && inquire) + if (!key && !IS_PKI (crypto) && inquire + && !(crypto->hdr.flags & PWMD_FLAG_NO_PASSPHRASE)) { rc = inquire_passphrase (ctx, "PASSPHRASE", (unsigned char **)&key, &keylen); -- 2.11.4.GIT