@@ -33,41 +33,6 @@ def _has_word_re(words: typing.Iterable[str],
3333 r'.*\b(?:' + r'|' .join (words ) + r')\b.*' ,
3434 re .DOTALL )
3535
36- # generate_psa_tests.py generates test cases involving cryptographic
37- # mechanisms (key types, families, algorithms) that are declared but
38- # not implemented. Until we improve the Python scripts, ignore those
39- # test cases in the analysis.
40- # https://github.com/Mbed-TLS/mbedtls/issues/9572
41- _PSA_MECHANISMS_NOT_IMPLEMENTED = [
42- r'CBC_MAC' ,
43- r'DETERMINISTIC_DSA' ,
44- r'DET_DSA' ,
45- r'DSA' ,
46- r'ECC_KEY_PAIR\(BRAINPOOL_P_R1\) (?:160|192|224|320)-bit' ,
47- r'ECC_KEY_PAIR\(SECP_K1\) 225-bit' ,
48- r'ECC_PAIR\(BP_R1\) (?:160|192|224|320)-bit' ,
49- r'ECC_PAIR\(SECP_K1\) 225-bit' ,
50- r'ECC_PUBLIC_KEY\(BRAINPOOL_P_R1\) (?:160|192|224|320)-bit' ,
51- r'ECC_PUBLIC_KEY\(SECP_K1\) 225-bit' ,
52- r'ECC_PUB\(BP_R1\) (?:160|192|224|320)-bit' ,
53- r'ECC_PUB\(SECP_K1\) 225-bit' ,
54- r'ED25519PH' ,
55- r'ED448PH' ,
56- r'PEPPER' ,
57- r'PURE_EDDSA' ,
58- r'SECP_R2' ,
59- r'SECT_K1' ,
60- r'SECT_R1' ,
61- r'SECT_R2' ,
62- r'SHAKE256_512' ,
63- r'SHA_512_224' ,
64- r'SHA_512_256' ,
65- r'TWISTED_EDWARDS' ,
66- r'XTS' ,
67- ]
68- PSA_MECHANISM_NOT_IMPLEMENTED_SEARCH_RE = \
69- _has_word_re (_PSA_MECHANISMS_NOT_IMPLEMENTED )
70-
7136 IGNORED_TESTS = {
7237 'ssl-opt' : [
7338 # We don't run ssl-opt.sh with Valgrind on the CI because
@@ -224,25 +189,19 @@ def _has_word_re(words: typing.Iterable[str],
224189 'PSA import DH_PUBLIC_KEY(RFC7919) 2048-bit group not supported' ,
225190 ],
226191 'test_suite_psa_crypto_op_fail.generated' : [
227- # Ignore mechanisms that are not implemented, except
228- # for test cases that assume the mechanism is not supported.
229- _has_word_re (_PSA_MECHANISMS_NOT_IMPLEMENTED ,
230- exclude = (r'.*: !(?:' +
231- r'|' .join (_PSA_MECHANISMS_NOT_IMPLEMENTED ) +
232- r')\b' )),
233- # Incorrect dependency generation. To be fixed as part of the
234- # resolution of https://github.com/Mbed-TLS/mbedtls/issues/9167
235- # by forward-porting the commit
236- # "PSA test case generation: dependency inference class: operation fail"
237- # from https://github.com/Mbed-TLS/mbedtls/pull/9025 .
238- re .compile (r'.* with (?:DH|ECC)_(?:KEY_PAIR|PUBLIC_KEY)\(.*' ),
239192 # We don't test this unusual, but sensible configuration.
240193 # https://github.com/Mbed-TLS/mbedtls/issues/9592
241194 re .compile (r'.*: !ECDSA but DETERMINISTIC_ECDSA with ECC_.*' ),
242195 # We never test with the HMAC algorithm enabled but the HMAC
243196 # key type disabled. Those dependencies don't really make sense.
244197 # https://github.com/Mbed-TLS/mbedtls/issues/9573
245198 re .compile (r'.* !HMAC with HMAC' ),
199+ # We don't test with ECDH disabled but the key type enabled.
200+ # https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/161
201+ re .compile (r'PSA key_agreement.* !ECDH with ECC_KEY_PAIR\(.*' ),
202+ # We don't test with FFDH disabled but the key type enabled.
203+ # https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/160
204+ re .compile (r'PSA key_agreement.* !FFDH with DH_KEY_PAIR\(.*' ),
246205 ],
247206 'test_suite_psa_crypto_op_fail.misc' : [
248207 # We don't test this unusual, but sensible configuration.
0 commit comments