mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
sm: Improve the octet string cramming for pkcs#12
* sm/minip12.c (need_octet_string_cramming): New.
(tlv_expect_object, tlv_expect_octet_string): Run the test before
cramming.
* sm/minip12.c (ENABLE_DER_STRUCT_DUMPING): New but undefined macro
for debug purposes.
(bag_decrypted_data_p, bag_data_p): Use macro to allow dumping.
--
This bug was exhibited by importing a gpgsm exported EC certificate.
We use an extra test instead of retrying to allow retruning an error
from malloc failure. And well, for easier reading of the code.
GnuPG-bug-id: 6536
(cherry picked from commit c1f78634ec
)
This commit is contained in:
parent
a0ac529d08
commit
bb157044a0
4 changed files with 73 additions and 17 deletions
BIN
tests/samplekeys/edward.tester@demo.gnupg.com.p12
Normal file
BIN
tests/samplekeys/edward.tester@demo.gnupg.com.p12
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue