mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-10 17:01:41 +08: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)
|
for (active, name, value, section)
|
||||||
in self.configfile.parse_file()})
|
in self.configfile.parse_file()})
|
||||||
|
|
||||||
def set(self, name, value=None):
|
def set(self, name, value='1'):
|
||||||
if name in UNSUPPORTED_FEATURE:
|
if name in UNSUPPORTED_FEATURE:
|
||||||
raise ValueError(f'Feature is unsupported: \'{name}\'')
|
raise ValueError(f'Feature is unsupported: \'{name}\'')
|
||||||
if name in UNSTABLE_FEATURE:
|
if name in UNSTABLE_FEATURE:
|
||||||
raise ValueError(f'Feature is unstable: \'{name}\'')
|
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:
|
if name not in self.settings:
|
||||||
self.configfile.templates.append((name, '', '#define ' + name + ' '))
|
self.configfile.templates.append((name, '', '#define ' + name + ' '))
|
||||||
|
|
||||||
@ -655,6 +659,10 @@ class MultiConfig(Config):
|
|||||||
if name in UNSTABLE_FEATURE:
|
if name in UNSTABLE_FEATURE:
|
||||||
raise ValueError(f'Feature is unstable: \'{name}\'')
|
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:
|
if name not in self.settings:
|
||||||
configfile.templates.append((name, '', '#define ' + name + ' '))
|
configfile.templates.append((name, '', '#define ' + name + ' '))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user