Skip to content

Commit 33ac133

Browse files
Merge pull request #34 from eleuzi01/replace-ecc-keys
Replace MBEDTLS_PK_HAVE_ECC_KEYS with PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY Validated for dev by the CI of Mbed-TLS/mbedtls#9492, for 3.6 by the CI of Mbed-TLS/mbedtls#9640.
2 parents 4e9e839 + f7b2465 commit 33ac133

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

scripts/generate_config_tests.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from mbedtls_framework import config_common
1515
from mbedtls_framework import test_case
1616
from mbedtls_framework import test_data_generation
17+
from mbedtls_framework import build_tree
1718

1819

1920
def single_setting_case(setting: config_common.Setting, when_on: bool,
@@ -87,7 +88,13 @@ def dependencies_of_setting(cfg: config_common.Config,
8788
if name.startswith('MBEDTLS_CIPHER_PADDING_'):
8889
return 'MBEDTLS_CIPHER_C:MBEDTLS_CIPHER_MODE_CBC'
8990
if name.startswith('MBEDTLS_PK_PARSE_EC_'):
90-
return 'MBEDTLS_PK_C:MBEDTLS_PK_HAVE_ECC_KEYS'
91+
#temporary solution to determine correct dependency macros between 3.6 and 4.0
92+
#see issue #51 in mbedtls-framework
93+
if build_tree.is_mbedtls_3_6():
94+
return 'MBEDTLS_PK_C:MBEDTLS_PK_HAVE_ECC_KEYS'
95+
else:
96+
return 'MBEDTLS_PK_C:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY'
97+
9198
# For TLS settings, insist on having them once off and once on in
9299
# a configuration where both client support and server support are
93100
# enabled. The settings are also meaningful when only one side is

scripts/generate_pkcs7_tests.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import sys
1818
from os.path import exists
19+
from mbedtls_framework import build_tree
1920

2021
PKCS7_TEST_FILE = "../suites/test_suite_pkcs7.data"
2122

@@ -37,7 +38,13 @@ class TestData:
3738
Take in test_suite_pkcs7.data file.
3839
Allow for new tests to be added.
3940
"""
40-
mandatory_dep = "MBEDTLS_MD_CAN_SHA256"
41+
#temporary solution to determine correct dependency macros between 3.6 and 4.0
42+
#see issue #51 in mbedtls-framework
43+
if build_tree.is_mbedtls_3_6():
44+
mandatory_dep = "MBEDTLS_MD_CAN_SHA256"
45+
else:
46+
mandatory_dep = "PSA_WANT_ALG_SHA_256"
47+
4148
test_name = "PKCS7 Parse Failure Invalid ASN1"
4249
test_function = "pkcs7_asn1_fail:"
4350
def __init__(self, file_name):

0 commit comments

Comments
 (0)