Commit graph

25079 commits

Author SHA1 Message Date
Pengyu Lv
5e2f312195 Update cert macros in tests/src/certs.c
This commit manually updates:
  - TEST_CA_CRT_EC_PEM
  - TEST_CA_CRT_EC_DER
  - TEST_SRV_CRT_EC_PEM
  - TEST_SRV_CRT_EC_DER

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:32:28 +08:00
Pengyu Lv
1ced2cce9b Update crl-ec-sha*.pem, crl.pem, crl_cat_*.pem
This commit updates the files manually, the rules
of generating these files will be upload in other
PR.

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:32:16 +08:00
Pengyu Lv
f4b568cc98 Add rules to generate crl_cat*
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:32:01 +08:00
Pengyu Lv
89d71e241a Update server10*.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:32:01 +08:00
Pengyu Lv
1fa43077fb Update server8*.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:32:01 +08:00
Pengyu Lv
7c1781caa8 Update server7*.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:31:51 +08:00
Pengyu Lv
cd378f2ffe Update pkcs7 files
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:31:30 +08:00
Pengyu Lv
0a7108f32d Extend the validity period of pkcs7-rsa-sha*.crt to 10 years
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:31:30 +08:00
Pengyu Lv
193f414cf8 Update test-int-ca*.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:31:30 +08:00
Pengyu Lv
0f5ca2dc87 Add rules to generate test-int-ca{2,3}.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:31:30 +08:00
Pengyu Lv
465c6eb371 Update test-ca2_cat-*.crt and test-ca_cat*.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:31:30 +08:00
Pengyu Lv
b8f15a66c8 Update server6.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:31:29 +08:00
Pengyu Lv
0c0f84e54f Update test-ca[1|2].crt[.der]
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-06-06 10:31:14 +08:00
Pengyu Lv
0f704b094b Update server5[-der*|-sha*].crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Pengyu Lv
467deeffbb Add rules to generate test-ca2_cat-*.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Pengyu Lv
309d434f94 Add rules to generate server10*.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Pengyu Lv
44c42fe303 Add rules to generate server8*.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Pengyu Lv
2d5e6aecdf Add rules to generate server7*.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Jerry Yu
964ddb5cb4 Add rules to generate server6.crt
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 20:55:40 +08:00
Jerry Yu
540b0220a0 Add rules to generate server5-sha*.crt
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 20:55:40 +08:00
Jerry Yu
460b6cf0ba Add server5-der*crt generate command
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 20:55:40 +08:00
Jerry Yu
b7b40b494d Add rules to generate server5[-badsign].crt
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 20:55:40 +08:00
Pengyu Lv
543d912495 Update server3.crt and server4.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Pengyu Lv
f31d18a52b Add rules to generate server4.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Pengyu Lv
cd61b740c5 Add rules to generate server3.crt
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Pengyu Lv
6f804693e5 Fix wrong target names in the Makefile in tests/data_files
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Pengyu Lv
491c64cd37 Mark all_intermediate as intermediate files
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-29 20:55:40 +08:00
Jerry Yu
bffe31cbfb change path of mbedtls_x509_crl_parse input data
- Move data_files/crl-malformed-trailing-spaces.pem->data_files/parse_input/crl-malformed-trailing-spaces.pem
- Move data_files/crl-idp.pem->data_files/parse_input/crl-idp.pem
- Move data_files/crl-idpnc.pem->data_files/parse_input/crl-idpnc.pem

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 17:28:45 +08:00
Jerry Yu
87f647776b change path of mbedtls_x509_csr_parse_file input data
- Move data_files/test_csr_v3_all_malformed_attributes_sequence_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_attributes_sequence_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_attributes_id_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_attributes_id_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_attributes_extension_request.csr.der->data_files/parse_input/test_csr_v3_all_malformed_attributes_extension_request.csr.der
- Move data_files/test_csr_v3_all_malformed_attributes_extension_request_set_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_attributes_extension_request_set_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_attributes_extension_request_sequence_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_attributes_extension_request_sequence_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_attributes_len1.csr.der->data_files/parse_input/test_csr_v3_all_malformed_attributes_len1.csr.der
- Move data_files/test_csr_v3_all_malformed_attributes_len2.csr.der->data_files/parse_input/test_csr_v3_all_malformed_attributes_len2.csr.der
- Move data_files/test_csr_v3_all_malformed_attributes_extension_request_sequence_len1.csr.der->data_files/parse_input/test_csr_v3_all_malformed_attributes_extension_request_sequence_len1.csr.der
- Move data_files/test_csr_v3_all_malformed_attributes_extension_request_sequence_len2.csr.der->data_files/parse_input/test_csr_v3_all_malformed_attributes_extension_request_sequence_len2.csr.der
- Move data_files/test_csr_v3_all_malformed_extensions_sequence_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_extensions_sequence_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_extension_id_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_extension_id_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_extension_data_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_extension_data_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_extension_data_len1.csr.der->data_files/parse_input/test_csr_v3_all_malformed_extension_data_len1.csr.der
- Move data_files/test_csr_v3_all_malformed_extension_data_len2.csr.der->data_files/parse_input/test_csr_v3_all_malformed_extension_data_len2.csr.der
- Move data_files/test_csr_v3_all_malformed_extension_key_usage_bitstream_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_extension_key_usage_bitstream_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_extension_subject_alt_name_sequence_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_extension_subject_alt_name_sequence_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_extension_ns_cert_bitstream_tag.csr.der->data_files/parse_input/test_csr_v3_all_malformed_extension_ns_cert_bitstream_tag.csr.der
- Move data_files/test_csr_v3_all_malformed_duplicated_extension.csr.der->data_files/parse_input/test_csr_v3_all_malformed_duplicated_extension.csr.der
- Move data_files/test_csr_v3_all_malformed_extension_type_oid.csr.der->data_files/parse_input/test_csr_v3_all_malformed_extension_type_oid.csr.der

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 17:28:45 +08:00
Jerry Yu
a3e249cb2b change path of mbedtls_x509_csr_info input data
- Copy data_files/server1.req.md5->data_files/parse_input/server1.req.md5
- Copy data_files/server1.req.sha1->data_files/parse_input/server1.req.sha1
- Copy data_files/server1.req.sha224->data_files/parse_input/server1.req.sha224
- Copy data_files/server1.req.sha256->data_files/parse_input/server1.req.sha256
- Copy data_files/server1.req.sha384->data_files/parse_input/server1.req.sha384
- Copy data_files/server1.req.sha512->data_files/parse_input/server1.req.sha512
- Move data_files/server1.req.commas.sha256->data_files/parse_input/server1.req.commas.sha256
- Move data_files/server5.req.sha1->data_files/parse_input/server5.req.sha1
- Move data_files/server5.req.sha224->data_files/parse_input/server5.req.sha224
- Move data_files/server5.req.sha256->data_files/parse_input/server5.req.sha256
- Move data_files/server5.req.sha384->data_files/parse_input/server5.req.sha384
- Move data_files/server5.req.sha512->data_files/parse_input/server5.req.sha512
- Move data_files/server9.req.sha1->data_files/parse_input/server9.req.sha1
- Move data_files/server9.req.sha224->data_files/parse_input/server9.req.sha224
- Move data_files/server9.req.sha256->data_files/parse_input/server9.req.sha256
- Move data_files/server9.req.sha384->data_files/parse_input/server9.req.sha384
- Move data_files/server9.req.sha512->data_files/parse_input/server9.req.sha512
- Move data_files/server1-ms.req.sha256->data_files/parse_input/server1-ms.req.sha256
- Move data_files/test_csr_v3_all.csr.der->data_files/parse_input/test_csr_v3_all.csr.der
- Move data_files/test_csr_v3_nsCertType.csr.der->data_files/parse_input/test_csr_v3_nsCertType.csr.der
- Move data_files/test_csr_v3_subjectAltName.csr.der->data_files/parse_input/test_csr_v3_subjectAltName.csr.der
- Move data_files/test_csr_v3_keyUsage.csr.der->data_files/parse_input/test_csr_v3_keyUsage.csr.der

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 17:28:44 +08:00
Jerry Yu
e8e7bbb59d change path of x509_parse_san input data
- Move data_files/server5-othername.crt->data_files/parse_input/server5-othername.crt
- Move data_files/server5-nonprintable_othername.crt->data_files/parse_input/server5-nonprintable_othername.crt
- Move data_files/server5-directoryname.crt.der->data_files/parse_input/server5-directoryname.crt.der
- Move data_files/server5-directoryname-seq-malformed.crt.der->data_files/parse_input/server5-directoryname-seq-malformed.crt.der
- Move data_files/server5-second-directoryname-oid-malformed.crt.der->data_files/parse_input/server5-second-directoryname-oid-malformed.crt.der
- Copy data_files/cert_example_multi.crt->data_files/parse_input/cert_example_multi.crt
- Move data_files/multiple_san.crt->data_files/parse_input/multiple_san.crt
- Copy data_files/server4.crt->data_files/parse_input/server4.crt
- Move data_files/server5-unsupported_othername.crt->data_files/parse_input/server5-unsupported_othername.crt
- Move data_files/test_cert_rfc822name.crt.der->data_files/parse_input/test_cert_rfc822name.crt.der

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 17:28:43 +08:00
Jerry Yu
1c3cfb3ed6 change path of x509parse_crt_file input data
- Move data_files/server1_pathlen_int_max.crt->data_files/parse_input/server1_pathlen_int_max.crt
- Move data_files/server1_pathlen_int_max-1.crt->data_files/parse_input/server1_pathlen_int_max-1.crt
- Copy data_files/server7_int-ca.crt->data_files/parse_input/server7_int-ca.crt
- Move data_files/server7_pem_space.crt->data_files/parse_input/server7_pem_space.crt
- Move data_files/server7_all_space.crt->data_files/parse_input/server7_all_space.crt
- Move data_files/server7_trailing_space.crt->data_files/parse_input/server7_trailing_space.crt
- Move data_files/cli-rsa-sha256-badalg.crt.der->data_files/parse_input/cli-rsa-sha256-badalg.crt.der

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 17:28:42 +08:00
Jerry Yu
85b0758b41 change path of x509_cert_info input data
- Copy data_files/server1.crt->data_files/parse_input/server1.crt
- Move data_files/server1.crt.der->data_files/parse_input/server1.crt.der
- Copy data_files/server2.crt->data_files/parse_input/server2.crt
- Copy data_files/server2.crt.der->data_files/parse_input/server2.crt.der
- Copy data_files/test-ca.crt->data_files/parse_input/test-ca.crt
- Move data_files/test-ca.crt.der->data_files/parse_input/test-ca.crt.der
- Copy data_files/cert_md5.crt->data_files/parse_input/cert_md5.crt
- Copy data_files/cert_sha1.crt->data_files/parse_input/cert_sha1.crt
- Copy data_files/cert_sha224.crt->data_files/parse_input/cert_sha224.crt
- Copy data_files/cert_sha256.crt->data_files/parse_input/cert_sha256.crt
- Copy data_files/cert_sha384.crt->data_files/parse_input/cert_sha384.crt
- Copy data_files/cert_sha512.crt->data_files/parse_input/cert_sha512.crt
- Copy data_files/server9.crt->data_files/parse_input/server9.crt
- Copy data_files/server9-sha224.crt->data_files/parse_input/server9-sha224.crt
- Copy data_files/server9-sha256.crt->data_files/parse_input/server9-sha256.crt
- Copy data_files/server9-sha384.crt->data_files/parse_input/server9-sha384.crt
- Copy data_files/server9-sha512.crt->data_files/parse_input/server9-sha512.crt
- Copy data_files/server5-sha1.crt->data_files/parse_input/server5-sha1.crt
- Copy data_files/server5-sha224.crt->data_files/parse_input/server5-sha224.crt
- Copy data_files/server5.crt->data_files/parse_input/server5.crt
- Copy data_files/server5-sha384.crt->data_files/parse_input/server5-sha384.crt
- Copy data_files/server5-sha512.crt->data_files/parse_input/server5-sha512.crt
- Copy data_files/server5-othername.crt->data_files/parse_input/server5-othername.crt
- Copy data_files/server5-nonprintable_othername.crt->data_files/parse_input/server5-nonprintable_othername.crt
- Copy data_files/server5-directoryname.crt.der->data_files/parse_input/server5-directoryname.crt.der
- Move data_files/server5-two-directorynames.crt.der->data_files/parse_input/server5-two-directorynames.crt.der
- Move data_files/server5-fan.crt->data_files/parse_input/server5-fan.crt
- Copy data_files/server1.cert_type.crt->data_files/parse_input/server1.cert_type.crt
- Copy data_files/server1.key_usage.crt->data_files/parse_input/server1.key_usage.crt
- Copy data_files/keyUsage.decipherOnly.crt->data_files/parse_input/keyUsage.decipherOnly.crt
- Copy data_files/cert_example_multi.crt->data_files/parse_input/cert_example_multi.crt
- Copy data_files/multiple_san.crt->data_files/parse_input/multiple_san.crt
- Copy data_files/cert_example_multi_nocn.crt->data_files/parse_input/cert_example_multi_nocn.crt
- Move data_files/rsa_single_san_uri.crt.der->data_files/parse_input/rsa_single_san_uri.crt.der
- Move data_files/rsa_multiple_san_uri.crt.der->data_files/parse_input/rsa_multiple_san_uri.crt.der
- Move data_files/test-ca-any_policy.crt->data_files/parse_input/test-ca-any_policy.crt
- Move data_files/test-ca-any_policy_ec.crt->data_files/parse_input/test-ca-any_policy_ec.crt
- Move data_files/test-ca-any_policy_with_qualifier.crt->data_files/parse_input/test-ca-any_policy_with_qualifier.crt
- Move data_files/test-ca-any_policy_with_qualifier_ec.crt->data_files/parse_input/test-ca-any_policy_with_qualifier_ec.crt
- Move data_files/test-ca-multi_policy.crt->data_files/parse_input/test-ca-multi_policy.crt
- Move data_files/test-ca-multi_policy_ec.crt->data_files/parse_input/test-ca-multi_policy_ec.crt
- Move data_files/test-ca-unsupported_policy.crt->data_files/parse_input/test-ca-unsupported_policy.crt
- Move data_files/test-ca-unsupported_policy_ec.crt->data_files/parse_input/test-ca-unsupported_policy_ec.crt
- Move data_files/server1.ext_ku.crt->data_files/parse_input/server1.ext_ku.crt
- Copy data_files/server4.crt->data_files/parse_input/server4.crt
- Copy data_files/server3.crt->data_files/parse_input/server3.crt
- Move data_files/bitstring-in-dn.pem->data_files/parse_input/bitstring-in-dn.pem
- Move data_files/non-ascii-string-in-issuer.crt->data_files/parse_input/non-ascii-string-in-issuer.crt

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 17:28:42 +08:00
Jerry Yu
2d412c6b24 change path of mbedtls_x509_crl_info input data
- Copy data_files/crl_expired.pem->data_files/parse_input/crl_expired.pem
- Move data_files/crl_md5.pem->data_files/parse_input/crl_md5.pem
- Move data_files/crl_sha1.pem->data_files/parse_input/crl_sha1.pem
- Move data_files/crl_sha224.pem->data_files/parse_input/crl_sha224.pem
- Copy data_files/crl_sha256.pem->data_files/parse_input/crl_sha256.pem
- Move data_files/crl_sha384.pem->data_files/parse_input/crl_sha384.pem
- Move data_files/crl_sha512.pem->data_files/parse_input/crl_sha512.pem
- Copy data_files/crl-rsa-pss-sha1.pem->data_files/parse_input/crl-rsa-pss-sha1.pem
- Copy data_files/crl-rsa-pss-sha224.pem->data_files/parse_input/crl-rsa-pss-sha224.pem
- Copy data_files/crl-rsa-pss-sha256.pem->data_files/parse_input/crl-rsa-pss-sha256.pem
- Copy data_files/crl-rsa-pss-sha384.pem->data_files/parse_input/crl-rsa-pss-sha384.pem
- Copy data_files/crl-rsa-pss-sha512.pem->data_files/parse_input/crl-rsa-pss-sha512.pem
- Copy data_files/crl-ec-sha1.pem->data_files/parse_input/crl-ec-sha1.pem
- Move data_files/crl-ec-sha224.pem->data_files/parse_input/crl-ec-sha224.pem
- Copy data_files/crl-ec-sha256.pem->data_files/parse_input/crl-ec-sha256.pem
- Move data_files/crl-ec-sha384.pem->data_files/parse_input/crl-ec-sha384.pem
- Move data_files/crl-ec-sha512.pem->data_files/parse_input/crl-ec-sha512.pem

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-29 17:28:40 +08:00
Gilles Peskine
36ad151b20
Merge pull request #7191 from oberon-microsystems/fix-test-sign-hash-check-for-pure-eddsa
Fix test conditions because PURE_EDDSA does not support sign_hash
2023-05-25 18:59:40 +02:00
Paul Elliott
981d8b6fc7
Merge pull request #7566 from paul-elliott-arm/core_ecp_mod_p448
[Bignum] Convert ecp_mod_p448 over to using core functions
2023-05-25 17:11:57 +01:00
Gilles Peskine
3c0e4effe4
Merge pull request #7512 from lpy4105/issue/7014/cert_audit-improvement
cert_audit: Improvements of audit script
2023-05-24 20:24:48 +02:00
Gilles Peskine
835be986e0
Merge pull request #7631 from tom-daubney-arm/remove_surplus_loop_condition_issue_7529
Remove extraneous check in for loop condition
2023-05-24 20:24:28 +02:00
Paul Elliott
7050662a48 Correct comment header block
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-05-24 17:31:57 +01:00
Janos Follath
a0aa5d8f7e
Merge pull request #7582 from xkqian/bignum/test_add_sub_named_moduli
[Bignum] Add add_sub test cases for named moduli curves
2023-05-24 14:42:24 +01:00
Dave Rodgman
2b22834357
Merge pull request #7644 from tom-daubney-arm/alignment_h_refactoring
Refactor reading of multi-byte values using functions in alignment.h
2023-05-24 08:32:52 +01:00
Thomas Daubney
f9f0ba8211 Use functions in alignment.h to get value
Refactor code using get functions from alignment.h to
read values.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-05-24 06:24:16 +01:00
Xiaokang Qian
b5844e47c0 Change assert to equal base one comments
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-24 02:11:06 +00:00
Dave Rodgman
b2e551d347
Merge pull request #6943 from ucko/2023b-platform 2023-05-23 18:37:54 +01:00
Paul Elliott
3b6bf105d1 Fix missed renames from N to X
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-05-23 17:51:52 +01:00
Manuel Pégourié-Gonnard
9dc9204b77
Merge pull request #7554 from valeriosetti/issue7073-reshape
Avoid parse/unparse public ECC keys in PK with USE_PSA when !ECP_C
2023-05-23 15:08:45 +02:00
Manuel Pégourié-Gonnard
d7d1039755
Merge pull request #7634 from AndrzejKurek/fix-bad-keyfile-prereqs
Fix wrong makefile target
2023-05-23 09:27:29 +02:00
Xiaokang Qian
967b477954 Add test data "modulus-1" and "modulus-2" for every curve
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-23 06:07:32 +00:00
Valerio Setti
016264b6cb pk: fix a return value and a typo in comment
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-22 18:40:35 +02:00
Valerio Setti
a7cb845705 pk: add checks for the returned ECC family
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-22 18:39:43 +02:00