Commit graph

8928 commits

Author SHA1 Message Date
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
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
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
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
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
Paul Elliott
26070670d6
Merge pull request #7565 from gabor-mezei-arm/7263_split_out_Koblitz_raw_functions
[Bignum] Split out _raw Koblitz reduction functions
2023-05-22 16:03:17 +01:00
Andrzej Kurek
00d55988d9 Fix wrong makefile target
Missing tab and a prerequisite that's not a file
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-05-22 09:37:55 -04:00
Xiaokang Qian
f33b4a5aed Update comments how to generate the randoms to make it reproducible
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-22 10:55:46 +00:00
Xiaokang Qian
10b6daf755 Fix the comments of sum in ecp function
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-22 02:28:06 +00:00
Xiaokang Qian
be860a14ce Generate test data with special seed 2,3,4
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-19 07:39:48 +00:00
Xiaokang Qian
bead774daa Fix the limb mismatch issue on 32-bit platform
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-19 07:39:48 +00:00
Xiaokang Qian
6d02c2fefc Compare the libs of two input value and add comments
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-19 07:39:48 +00:00
Xiaokang Qian
c304e53209 Remove useless parameters for ecp_mod_add_sub
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-19 07:39:48 +00:00
Xiaokang Qian
61b0c1c3dd Refine code to align with the styles of ecp_mod_mul_inv
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-19 07:39:48 +00:00
Xiaokang Qian
4dd1c0a475 Add test data for ecp_add_sub
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-19 07:39:48 +00:00
Xiaokang Qian
9fe2587ccf Add add_sub test data for named moduli curves
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-19 07:39:48 +00:00
Xiaokang Qian
5fc7846507 Add add_sub test cases for named moduli curves
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-19 07:39:48 +00:00
Janos Follath
399fa48e95
Merge pull request #7479 from xkqian/bignumber_test_mul_inv_named_moduli
[Bignum] Bignumber test mul inv named moduli
2023-05-18 11:55:01 +01:00
Paul Elliott
aa266f29e6
Merge pull request #7602 from mprse/AuthorityKeyId_leak_fix
Fix for memory leak while parsing AuthorityKeyId ext
2023-05-18 09:57:56 +01:00
Xiaokang Qian
c8f677d33e Both compare the least significant limb 1 and the left limbs 0
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-18 03:41:31 +00:00
Xiaokang Qian
c1f5e54d2d Remove useless parameter iret for ecp mul_inv cases
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-18 02:02:48 +00:00
Valerio Setti
483738ed67 tests: fixes for using the new public key raw format
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 15:38:39 +02:00
Valerio Setti
92c3f36866 test_suite_debug: fix USE_PSA_INIT/DONE guards in a test
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 15:38:34 +02:00
Manuel Pégourié-Gonnard
b1c0afe484
Merge pull request #7595 from valeriosetti/deprecate_pk_ec
Set mbedtls_pk_ec() as internal function when ECP_C is not defined
2023-05-17 12:27:03 +02:00
Xiaokang Qian
11dd5c0b36 Compare final result with ASSERT_COMPARE
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00