mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 19:21:09 +01:00
Switch from config_history to config_macros
Switch from the `config_history` module to the new module `config_macros`. No behavior change. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@@ -8,7 +8,7 @@ from typing import Iterator
|
|||||||
import framework_scripts_path # pylint: disable=unused-import
|
import framework_scripts_path # pylint: disable=unused-import
|
||||||
from mbedtls_framework.config_checks_generator import * \
|
from mbedtls_framework.config_checks_generator import * \
|
||||||
#pylint: disable=wildcard-import,unused-wildcard-import
|
#pylint: disable=wildcard-import,unused-wildcard-import
|
||||||
from mbedtls_framework import config_history
|
from mbedtls_framework import config_macros
|
||||||
|
|
||||||
class CryptoInternal(SubprojectInternal):
|
class CryptoInternal(SubprojectInternal):
|
||||||
SUBPROJECT = 'TF-PSA-Crypto'
|
SUBPROJECT = 'TF-PSA-Crypto'
|
||||||
@@ -23,17 +23,17 @@ ALWAYS_ENABLED_SINCE_4_0 = frozenset([
|
|||||||
|
|
||||||
def checkers_for_removed_options() -> Iterator[Checker]:
|
def checkers_for_removed_options() -> Iterator[Checker]:
|
||||||
"""Discover removed options. Yield corresponding checkers."""
|
"""Discover removed options. Yield corresponding checkers."""
|
||||||
history = config_history.ConfigHistory()
|
previous_major = config_macros.History('mbedtls', '3.6')
|
||||||
old_public = history.options('mbedtls', '3.6')
|
this_major = config_macros.History('mbedtls', '4.0')
|
||||||
new_public = history.options('mbedtls', '4.0')
|
old_public = previous_major.options()
|
||||||
crypto_public = history.options('tfpsacrypto', '1.0')
|
new_public = this_major.options()
|
||||||
crypto_internal = history.internal('tfpsacrypto', '1.0')
|
crypto = config_macros.History('tfpsacrypto', '1.0')
|
||||||
for option in sorted(old_public - new_public):
|
for option in sorted(old_public - new_public):
|
||||||
if option in ALWAYS_ENABLED_SINCE_4_0:
|
if option in ALWAYS_ENABLED_SINCE_4_0:
|
||||||
continue
|
continue
|
||||||
if option in crypto_public:
|
if option in crypto.options():
|
||||||
yield CryptoOption(option)
|
yield CryptoOption(option)
|
||||||
elif option in crypto_internal:
|
elif option in crypto.internal():
|
||||||
yield CryptoInternal(option)
|
yield CryptoInternal(option)
|
||||||
else:
|
else:
|
||||||
yield Removed(option, 'Mbed TLS 4.0')
|
yield Removed(option, 'Mbed TLS 4.0')
|
||||||
|
|||||||
Reference in New Issue
Block a user