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; }