diff options
author | Ingo Klöcker <dev@ingo-kloecker.de> | 2022-09-09 18:19:16 +0200 |
---|---|---|
committer | Ingo Klöcker <dev@ingo-kloecker.de> | 2022-09-09 18:23:11 +0200 |
commit | a47b3a4087349f3873eb04a83dc2a0f512cacf86 (patch) | |
tree | 9839f726d2a8ed53af7d4ef755ea6198706aeb6e | |
parent | Revert "common: Add a default OpenPGP ECC mapping." (diff) | |
download | gnupg2-a47b3a4087349f3873eb04a83dc2a0f512cacf86.tar.xz gnupg2-a47b3a4087349f3873eb04a83dc2a0f512cacf86.zip |
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
-rw-r--r-- | sm/minip12.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sm/minip12.c b/sm/minip12.c index ad29fc24d..29b48984e 100644 --- a/sm/minip12.c +++ b/sm/minip12.c @@ -1946,7 +1946,10 @@ p12_parse (const unsigned char *buffer, size_t length, const char *pw, where = "bag.encryptedData"; consumed = 0; if (parse_bag_encrypted_data (&ctx, p, n, (p - p_start), &consumed)) - goto bailout; + { + *r_badpass = ctx.badpass; + goto bailout; + } if (lenndef) len += consumed; } |