summaryrefslogtreecommitdiffstats
path: root/sm/minip12.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2023-11-14 09:47:13 +0100
committerWerner Koch <wk@gnupg.org>2023-11-14 09:47:13 +0100
commite6cedba11900226caf781d39ab4193d98e2cc0d7 (patch)
treef0034ad02e938f81f955b5b4cf3745716c883f9d /sm/minip12.c
parentgpg,sm: Set confidential in assuan communication for password. (diff)
downloadgnupg2-e6cedba11900226caf781d39ab4193d98e2cc0d7.tar.xz
gnupg2-e6cedba11900226caf781d39ab4193d98e2cc0d7.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. --
Diffstat (limited to '')
-rw-r--r--sm/minip12.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sm/minip12.c b/sm/minip12.c
index ae81d821b..1bbe126ae 100644
--- a/sm/minip12.c
+++ b/sm/minip12.c
@@ -936,6 +936,7 @@ parse_bag_encrypted_data (struct p12_parse_ctx_s *ctx, tlv_parser_t tlv)
if (!datalen)
{
err = gpg_error (GPG_ERR_DECRYPT_FAILED);
+ ctx->badpass = 1; /* This is the most likley reason. */
goto bailout;
}
@@ -1461,6 +1462,7 @@ parse_shrouded_key_bag (struct p12_parse_ctx_s *ctx, tlv_parser_t tlv)
if (!datalen)
{
err = gpg_error (GPG_ERR_DECRYPT_FAILED);
+ ctx->badpass = 1;
goto bailout;
}