Add test for invalid KeyIdentifier tag length + adapt error code
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/tests/data_files/Makefile b/tests/data_files/Makefile
index 461ad8b..3b23ec6 100644
--- a/tests/data_files/Makefile
+++ b/tests/data_files/Makefile
@@ -574,6 +574,9 @@
authorityKeyId_subjectKeyId_keyid_tag_malformed.crt.der: authorityKeyId_subjectKeyId.crt.der
hexdump -ve '1/1 "%.2X"' $< | sed "s/306D80145061A58FD407/306D00145061A58FD407/" | xxd -r -p > $@
+authorityKeyId_subjectKeyId_keyid_tag_len_malformed.crt.der: authorityKeyId_subjectKeyId.crt.der
+ hexdump -ve '1/1 "%.2X"' $< | sed "s/306D80145061A58FD407/306D80FF5061A58FD407/" | xxd -r -p > $@
+
authorityKeyId_subjectKeyId_issuer_tag1_malformed.crt.der: authorityKeyId_subjectKeyId.crt.der
hexdump -ve '1/1 "%.2X"' $< | sed "s/A13FA43D303B310B3009/003FA43D303B310B3009/" | xxd -r -p > $@
diff --git a/tests/data_files/authorityKeyId_subjectKeyId_keyid_tag_len_malformed.crt.der b/tests/data_files/authorityKeyId_subjectKeyId_keyid_tag_len_malformed.crt.der
new file mode 100644
index 0000000..1e29042
--- /dev/null
+++ b/tests/data_files/authorityKeyId_subjectKeyId_keyid_tag_len_malformed.crt.der
Binary files differ