mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-12 10:13:39 +00:00
Fix for crypto config default value
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
ee521b6137
commit
d723b51bef
@ -599,12 +599,16 @@ class CryptoConfig(Config):
|
||||
for (active, name, value, section)
|
||||
in self.configfile.parse_file()})
|
||||
|
||||
def set(self, name, value=None):
|
||||
def set(self, name, value='1'):
|
||||
if name in UNSUPPORTED_FEATURE:
|
||||
raise ValueError(f'Feature is unsupported: \'{name}\'')
|
||||
if name in UNSTABLE_FEATURE:
|
||||
raise ValueError(f'Feature is unstable: \'{name}\'')
|
||||
|
||||
# The default value in the crypto config is '1'
|
||||
if not value:
|
||||
value = '1'
|
||||
|
||||
if name not in self.settings:
|
||||
self.configfile.templates.append((name, '', '#define ' + name + ' '))
|
||||
|
||||
@ -655,6 +659,10 @@ class MultiConfig(Config):
|
||||
if name in UNSTABLE_FEATURE:
|
||||
raise ValueError(f'Feature is unstable: \'{name}\'')
|
||||
|
||||
# The default value in the crypto config is '1'
|
||||
if not value:
|
||||
value = '1'
|
||||
|
||||
if name not in self.settings:
|
||||
configfile.templates.append((name, '', '#define ' + name + ' '))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user