1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Explain why DH and DSA are still explicitly excluded

If we don't exclude them from test case enumeration, then
detect_not_implemented_dependencies would cause the generated test cases to
be commented out, but the test case generation would fail before that
because asymmetric_key_data.py doesn't include DH and DSA keys.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2024-04-11 11:38:29 +02:00
parent b8ddf6acd4
commit 0311b211e4

View File

@ -65,8 +65,13 @@ class Information:
def remove_unwanted_macros( def remove_unwanted_macros(
constructors: macro_collector.PSAMacroEnumerator constructors: macro_collector.PSAMacroEnumerator
) -> None: ) -> None:
# Mbed TLS doesn't support finite-field DH yet and will not support """Remove macros from consideration during value enumeration."""
# finite-field DSA. Don't attempt to generate any related test case. # Remove some mechanisms that are declared but not implemented.
# The corresponding test cases would be commented out anyway
# thanks to the detect_not_implemented_dependencies mechanism,
# but for those particular key types, we don't even have enough
# support in the test scripts to construct test keys. So
# we arrange to not even attempt to generate test cases.
constructors.key_types.discard('PSA_KEY_TYPE_DH_KEY_PAIR') constructors.key_types.discard('PSA_KEY_TYPE_DH_KEY_PAIR')
constructors.key_types.discard('PSA_KEY_TYPE_DH_PUBLIC_KEY') constructors.key_types.discard('PSA_KEY_TYPE_DH_PUBLIC_KEY')
constructors.key_types.discard('PSA_KEY_TYPE_DSA_KEY_PAIR') constructors.key_types.discard('PSA_KEY_TYPE_DSA_KEY_PAIR')