diff --git a/tests/data_files/Makefile b/tests/data_files/Makefile index 8ec84c104..f8144319f 100644 --- a/tests/data_files/Makefile +++ b/tests/data_files/Makefile @@ -556,12 +556,12 @@ authorityKeyId_subjectKeyId.crt.der: authorityKeyId_no_keyid.crt.der: $(OPENSSL) req -x509 -nodes -days 7300 -key server2.key -outform DER -out $@ -config authorityKeyId_subjectKeyId.conf -extensions 'v3_req_authorityKeyId_no_keyid' +authorityKeyId_no_issuer.crt.der: + $(OPENSSL) req -x509 -nodes -days 7300 -key server2.key -outform DER -out $@ -config authorityKeyId_subjectKeyId.conf -extensions 'v3_req_authorityKeyId_no_issuer' + authorityKeyId_no_authorityKeyId.crt.der: $(OPENSSL) req -x509 -nodes -days 7300 -key server2.key -outform DER -out $@ -config authorityKeyId_subjectKeyId.conf -extensions 'v3_req_no_authorityKeyId' -authorityKeyId_empty.crt.der: - $(OPENSSL) req -x509 -nodes -days 7300 -key server2.key -outform DER -out $@ -config authorityKeyId_subjectKeyId.conf -extensions 'v3_req_authorityKeyId_empty' - authorityKeyId_subjectKeyId_tag_malformed.crt.der: authorityKeyId_subjectKeyId.crt.der hexdump -ve '1/1 "%.2X"' $< | sed "s/0414A505E864B8DCDF600F50124D60A864AF4D8B4393/0114A505E864B8DCDF600F50124D60A864AF4D8B4393/" | xxd -r -p > $@ diff --git a/tests/data_files/authorityKeyId_empty.crt.der b/tests/data_files/authorityKeyId_empty.crt.der deleted file mode 100644 index e4a208661..000000000 Binary files a/tests/data_files/authorityKeyId_empty.crt.der and /dev/null differ diff --git a/tests/data_files/authorityKeyId_no_issuer.crt.der b/tests/data_files/authorityKeyId_no_issuer.crt.der new file mode 100644 index 000000000..175ee3f30 Binary files /dev/null and b/tests/data_files/authorityKeyId_no_issuer.crt.der differ diff --git a/tests/data_files/authorityKeyId_subjectKeyId.conf b/tests/data_files/authorityKeyId_subjectKeyId.conf index 94ab20e15..296fac863 100644 --- a/tests/data_files/authorityKeyId_subjectKeyId.conf +++ b/tests/data_files/authorityKeyId_subjectKeyId.conf @@ -12,7 +12,8 @@ authorityKeyIdentifier = keyid:always,issuer:always [v3_req_authorityKeyId_no_keyid] subjectKeyIdentifier = hash authorityKeyIdentifier = issuer:always +[v3_req_authorityKeyId_no_issuer] +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always [v3_req_no_authorityKeyId] subjectKeyIdentifier = hash -[v3_req_authorityKeyId_empty] -subjectKeyIdentifier = hash diff --git a/tests/suites/test_suite_x509parse.data b/tests/suites/test_suite_x509parse.data index 51b92dadc..b49824be8 100644 --- a/tests/suites/test_suite_x509parse.data +++ b/tests/suites/test_suite_x509parse.data @@ -3321,14 +3321,14 @@ X509 CRT parse Authority Key Id - Correct Authority Key ID (no keyid) depends_on:MBEDTLS_MD_CAN_SHA256:MBEDTLS_RSA_C x509_crt_parse_authoritykeyid:"data_files/authorityKeyId_no_keyid.crt.der":"":"NL/PolarSSL/PolarSSL Test CA/":"7581F2D168FE33F964F0AE5FE884FAD3C55F24DA":0 +X509 CRT parse Authority Key Id - Correct Authority Key ID (no issuer) +depends_on:MBEDTLS_MD_CAN_SHA256:MBEDTLS_RSA_C +x509_crt_parse_authoritykeyid:"data_files/authorityKeyId_no_issuer.crt.der":"A505E864B8DCDF600F50124D60A864AF4D8B4393":"":"":0 + X509 CRT parse Authority Key Id - no Authority Key ID depends_on:MBEDTLS_MD_CAN_SHA256:MBEDTLS_RSA_C x509_crt_parse_authoritykeyid:"data_files/authorityKeyId_no_authorityKeyId.crt.der":"":"":"":0 -X509 CRT parse Authority Key Id - Correct Authority Key ID (empty) -depends_on:MBEDTLS_MD_CAN_SHA256:MBEDTLS_RSA_C -x509_crt_parse_authoritykeyid:"data_files/authorityKeyId_empty.crt.der":"":"":"":0 - X509 CRT parse Authority Key Id - Wrong Length depends_on:MBEDTLS_MD_CAN_SHA256:MBEDTLS_RSA_C x509_crt_parse_authoritykeyid:"data_files/authorityKeyId_subjectKeyId_length_malformed.crt.der":"":"":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS+MBEDTLS_ERR_ASN1_LENGTH_MISMATCH