Dave Rodgman
c5e0a8a890
Add missing error message
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:25:45 +01:00
Dave Rodgman
64937856e0
Correct order of extended key usage attributes
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:25:45 +01:00
Dave Rodgman
18b02d35d6
Remove redundant sig_alg argument
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:25:45 +01:00
Dave Rodgman
2ee7bbd10a
Replace some constant values with sizeof
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:25:45 +01:00
Dave Rodgman
e2b772d1b6
Fix whitespace, missing const
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:25:45 +01:00
Dave Rodgman
5f3f0d06e6
Address minor review comments
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:25:45 +01:00
Dave Rodgman
ec9f6b4de1
Fix minor compile errors
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:25:45 +01:00
Dave Rodgman
abdb0df91d
Fix test fails due to changes in cert generation
...
Test certs were originally generated with an old version of Mbed TLS
that used printableString where we now use utf8string (e.g., in the
organizationName). Otherwise the certs are identical.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:25:45 +01:00
Nicholas Wilson
ca841d32db
Add test for mbedtls_x509write_crt_set_ext_key_usage, and fix reversed order
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:25:43 +01:00
Nicholas Wilson
99a96b1c22
Improve programs/cert_write with a way to set the signature digest
...
This is useful for generating SHA-1 and MD5 certificates for test
purposes. I guess RSA-PSS could be added too, but I don't need that
now.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:08:43 +01:00
Nicholas Wilson
8e5bdfbbcf
Improve programs/cert_write with a way to set extended key usages
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-30 10:08:43 +01:00
Dave Rodgman
0edfa9dd26
Merge pull request #6207 from daverodgman/ticket_time
...
Fix type used for capturing TLS ticket generation time
2022-08-30 10:03:06 +01:00
Werner Lewis
81f24443b7
Modify wording in docstrings
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-30 09:37:07 +01:00
Jerry Yu
63d40e6b46
shorten the description
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-30 09:45:40 +08:00
Jerry Yu
e5834fd0d7
remove unnecessary test
...
also optimize check sum
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-29 20:33:33 +08:00
Tom Cosgrove
d932de8857
Remove incorrect constant-time claim from doc for mbedtls_mpi_core_add_if()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2022-08-25 16:43:43 +01:00
Werner Lewis
3366ebcb66
Add test_generation.py dependency in builds
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 16:18:22 +01:00
Jerry Yu
e7b4b58403
Add psk kex mode tests
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-25 20:47:44 +08:00
Werner Lewis
76f45625e6
Fix trailing whitespace
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 13:21:45 +01:00
Werner Lewis
9df9faac5c
Use argparser default for targets
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 12:49:41 +01:00
Werner Lewis
6ef5436f3c
Clarify documentation
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 12:29:46 +01:00
Werner Lewis
f156c43702
Use argparser default for directory
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 11:31:55 +01:00
Werner Lewis
a16b617fe9
Disable abstract check in pylint
...
Version of pylint used in CI does not recognize abstract subclasses of
BaseTarget, so disable warning in these abstract classes.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 11:17:35 +01:00
Jerry Yu
3e06fce260
Remove old tests.
...
only reserve "no valid ciphersuite" test
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-25 17:51:57 +08:00
Werner Lewis
c4afef7f46
Use spec values as-is for test data
...
Spec values are now always used for test data, and conversion to
internal representation is done in the test function.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 10:32:30 +01:00
Tom Cosgrove
ecbb124292
Fix incorrect parameter name in mbedtls_mpi_core_add_if() doc comment
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2022-08-25 10:13:44 +01:00
Werner Lewis
e3ad22ecf2
Fix TARGET types and code style
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 10:02:06 +01:00
Werner Lewis
6d654c6491
Raise NotImplementedError in abstract methods
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 09:56:51 +01:00
Jerry Yu
3c01d47ef7
Update test cases
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-25 11:34:36 +08:00
Jerry Yu
0baf907e11
remove select_ciphersuite
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-25 11:21:04 +08:00
Jerry Yu
c5a23a0f12
fix various issues
...
- code style
- variable initialize
- update comments
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-25 11:09:35 +08:00
Werner Lewis
a195ce73f5
Disable pylint unused arg in __new__
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:55 +01:00
Werner Lewis
9990b30568
Use typing casts for fixed-width tuples
...
Enforces fixed-width tuple types where mypy does not recognize.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:47 +01:00
Werner Lewis
6300b4f7e0
Add missing typing
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:41 +01:00
Werner Lewis
d03d2a3a91
Remove trailing whitespace in description
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:25 +01:00
Werner Lewis
cfd4768df2
Use __new__() for case counting
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:13 +01:00
Werner Lewis
2b527a394d
Split generate_tests to reduce code complexity
...
Previous implementation mixed the test case generation and the
recursive generation calls together. A separate method is added to
generate test cases for the current class' test function. This reduces
the need to override generate_tests().
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:13 +01:00
Tom Cosgrove
b2c06f4acf
Remove stale comment, and fix whitespace issue
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2022-08-24 17:45:58 +01:00
Werner Lewis
699e126942
Use ABCMeta for abstract classes
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:33:21 +01:00
Werner Lewis
169034ae63
Add details to docstrings
...
Clarification is added to docstrings, mostly in abstract classes.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:30:30 +01:00
Werner Lewis
6c70d745d1
Convert bools to int before arithmetic
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:29:18 +01:00
Werner Lewis
92c876aaa9
Remove unneeded list concatenation
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:29:18 +01:00
Werner Lewis
55e638ca57
Remove abbreviations and clarify attributes
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:29:08 +01:00
Dave Rodgman
fac3ea5656
Merge pull request #6184 from leorosen/ssl_tls_curve_group_id_null_protect
...
mbedtls_ssl_check_curve prevent potential NULL pointer dereferencing
2022-08-24 15:16:45 +01:00
Werner Lewis
fbb75e3fc5
Separate common test generation classes/functions
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 15:08:56 +01:00
Tom Cosgrove
bcc13c943f
Add further missing whitespaces inside parentheses
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
Co-authored-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-24 15:08:16 +01:00
Werner Lewis
383461c92f
Separate CMake targets for bignum and PSA
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 15:07:55 +01:00
Tom Cosgrove
20c1137350
Fix coding style
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
Co-authored-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-24 15:06:13 +01:00
Dave Rodgman
5a28142410
Merge pull request #6189 from Kxuan/fix-ctr_drbg-uninit
...
ctr_drbg: fix free uninitialized aes context
2022-08-24 14:58:44 +01:00
Tom Cosgrove
72594633a1
Apply the function parameter naming convention
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2022-08-24 11:51:58 +01:00