diff options
author | Werner Koch <[email protected]> | 2023-11-14 08:47:13 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-11-14 08:48:04 +0000 |
commit | 697d54cecaa5d216f8329d5d24d903aafedb2d5b (patch) | |
tree | efc2db416f2dffe1f4fd9c14379796cd4c3ad430 | |
parent | Update NEWS. (diff) | |
download | gnupg-697d54cecaa5d216f8329d5d24d903aafedb2d5b.tar.gz gnupg-697d54cecaa5d216f8329d5d24d903aafedb2d5b.zip |
gpgsm: Re-introduce the bad passphrase hint for pkcs#12.
* sm/minip12.c (parse_bag_encrypted_data): Set the badpass flag.
(parse_shrouded_key_bag): Ditto.
--
-rw-r--r-- | sm/minip12.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sm/minip12.c b/sm/minip12.c index 1b5986f7e..84f5dbecb 100644 --- a/sm/minip12.c +++ b/sm/minip12.c @@ -1662,6 +1662,7 @@ parse_bag_encrypted_data (struct p12_parse_ctx_s *ctx, struct tlv_ctx_s *tlv) if (!datalen) { err = gpg_error (GPG_ERR_DECRYPT_FAILED); + ctx->badpass = 1; /* This is the most likley reason. */ goto bailout; } @@ -2187,6 +2188,7 @@ parse_shrouded_key_bag (struct p12_parse_ctx_s *ctx, struct tlv_ctx_s *tlv) if (!datalen) { err = gpg_error (GPG_ERR_DECRYPT_FAILED); + ctx->badpass = 1; goto bailout; } |