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

sm: Fix reporting of bad passphrase error

* sm/minip12.c (p12_parse): Set badpass flag to result in ctx.
--

Fixes-commit: a4e04375e84ecb7ea0d02e153cb27988fca4c2d0
GnuPG-bug-id: 5713, 6037
This commit is contained in:
Ingo Klöcker 2022-09-09 18:19:16 +02:00
parent 07b0786939
commit a47b3a4087
No known key found for this signature in database
GPG Key ID: F5A5D1692277A1E9

View File

@ -1946,7 +1946,10 @@ p12_parse (const unsigned char *buffer, size_t length, const char *pw,
where = "bag.encryptedData"; where = "bag.encryptedData";
consumed = 0; consumed = 0;
if (parse_bag_encrypted_data (&ctx, p, n, (p - p_start), &consumed)) if (parse_bag_encrypted_data (&ctx, p, n, (p - p_start), &consumed))
{
*r_badpass = ctx.badpass;
goto bailout; goto bailout;
}
if (lenndef) if (lenndef)
len += consumed; len += consumed;
} }