Merge pull request #6962 from davidhorstmann-arm/fix-check-python-errors
Fix check python errors
This commit is contained in:
commit
b82977a429
2 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,7 @@ This module is entirely based on the PSA API.
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
import re
|
import re
|
||||||
from typing import FrozenSet, Iterable, List, Optional, Tuple
|
from typing import FrozenSet, Iterable, List, Optional, Tuple, Dict
|
||||||
|
|
||||||
from .asymmetric_key_data import ASYMMETRIC_KEY_DATA
|
from .asymmetric_key_data import ASYMMETRIC_KEY_DATA
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ class KeyType:
|
||||||
'PSA_ECC_FAMILY_BRAINPOOL_P_R1': (160, 192, 224, 256, 320, 384, 512),
|
'PSA_ECC_FAMILY_BRAINPOOL_P_R1': (160, 192, 224, 256, 320, 384, 512),
|
||||||
'PSA_ECC_FAMILY_MONTGOMERY': (255, 448),
|
'PSA_ECC_FAMILY_MONTGOMERY': (255, 448),
|
||||||
'PSA_ECC_FAMILY_TWISTED_EDWARDS': (255, 448),
|
'PSA_ECC_FAMILY_TWISTED_EDWARDS': (255, 448),
|
||||||
}
|
} # type: Dict[str, Tuple[int, ...]]
|
||||||
KEY_TYPE_SIZES = {
|
KEY_TYPE_SIZES = {
|
||||||
'PSA_KEY_TYPE_AES': (128, 192, 256), # exhaustive
|
'PSA_KEY_TYPE_AES': (128, 192, 256), # exhaustive
|
||||||
'PSA_KEY_TYPE_ARIA': (128, 192, 256), # exhaustive
|
'PSA_KEY_TYPE_ARIA': (128, 192, 256), # exhaustive
|
||||||
|
@ -162,7 +162,7 @@ class KeyType:
|
||||||
'PSA_KEY_TYPE_PEPPER': (128, 256), # sample
|
'PSA_KEY_TYPE_PEPPER': (128, 256), # sample
|
||||||
'PSA_KEY_TYPE_RAW_DATA': (8, 40, 128), # sample
|
'PSA_KEY_TYPE_RAW_DATA': (8, 40, 128), # sample
|
||||||
'PSA_KEY_TYPE_RSA_KEY_PAIR': (1024, 1536), # small sample
|
'PSA_KEY_TYPE_RSA_KEY_PAIR': (1024, 1536), # small sample
|
||||||
}
|
} # type: Dict[str, Tuple[int, ...]]
|
||||||
def sizes_to_test(self) -> Tuple[int, ...]:
|
def sizes_to_test(self) -> Tuple[int, ...]:
|
||||||
"""Return a tuple of key sizes to test.
|
"""Return a tuple of key sizes to test.
|
||||||
|
|
||||||
|
|
|
@ -355,7 +355,7 @@ class OpFail:
|
||||||
dependencies[i] = '!' + dep
|
dependencies[i] = '!' + dep
|
||||||
tc.set_dependencies(dependencies)
|
tc.set_dependencies(dependencies)
|
||||||
tc.set_function(category.name.lower() + '_fail')
|
tc.set_function(category.name.lower() + '_fail')
|
||||||
arguments = []
|
arguments = [] # type: List[str]
|
||||||
if kt:
|
if kt:
|
||||||
key_material = kt.key_material(kt.sizes_to_test()[0])
|
key_material = kt.key_material(kt.sizes_to_test()[0])
|
||||||
arguments += [key_type, test_case.hex_string(key_material)]
|
arguments += [key_type, test_case.hex_string(key_material)]
|
||||||
|
|
Loading…
Reference in a new issue