From c1f78634ec3927ddcfdc4687bc6e408c658a0ece Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 5 Oct 2023 10:02:59 +0200 Subject: 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 --- tests/cms/samplekeys/edward.tester@demo.gnupg.com.p12 | Bin 0 -> 1561 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/cms/samplekeys/edward.tester@demo.gnupg.com.p12 (limited to 'tests/cms/samplekeys/edward.tester@demo.gnupg.com.p12') diff --git a/tests/cms/samplekeys/edward.tester@demo.gnupg.com.p12 b/tests/cms/samplekeys/edward.tester@demo.gnupg.com.p12 new file mode 100644 index 000000000..a6f983780 Binary files /dev/null and b/tests/cms/samplekeys/edward.tester@demo.gnupg.com.p12 differ -- cgit v1.2.3