1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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.
--
This commit is contained in:
Werner Koch 2023-11-14 09:47:13 +01:00
parent bafa7bf27f
commit e6cedba119
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -936,6 +936,7 @@ parse_bag_encrypted_data (struct p12_parse_ctx_s *ctx, tlv_parser_t tlv)
if (!datalen) if (!datalen)
{ {
err = gpg_error (GPG_ERR_DECRYPT_FAILED); err = gpg_error (GPG_ERR_DECRYPT_FAILED);
ctx->badpass = 1; /* This is the most likley reason. */
goto bailout; goto bailout;
} }
@ -1461,6 +1462,7 @@ parse_shrouded_key_bag (struct p12_parse_ctx_s *ctx, tlv_parser_t tlv)
if (!datalen) if (!datalen)
{ {
err = gpg_error (GPG_ERR_DECRYPT_FAILED); err = gpg_error (GPG_ERR_DECRYPT_FAILED);
ctx->badpass = 1;
goto bailout; goto bailout;
} }