mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 19:45:37 +01:00
Use regexp pattern instaed of string
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
This commit is contained in:
parent
7e0d724d40
commit
5071a2e30e
@ -19,7 +19,7 @@ This module is entirely based on the PSA API.
|
||||
# limitations under the License.
|
||||
|
||||
import re
|
||||
from typing import Dict, Iterable, Optional, Tuple
|
||||
from typing import Dict, Iterable, Optional, Pattern, Tuple
|
||||
|
||||
from mbedtls_dev.asymmetric_key_data import ASYMMETRIC_KEY_DATA
|
||||
|
||||
@ -138,9 +138,9 @@ class KeyType:
|
||||
[self.DATA_BLOCK[:length % len(self.DATA_BLOCK)]])
|
||||
|
||||
KEY_TYPE_FOR_SIGNATURE = {
|
||||
'PSA_KEY_USAGE_SIGN_HASH': '.*KEY_PAIR',
|
||||
'PSA_KEY_USAGE_VERIFY_HASH': '.*KEY.*'
|
||||
} #type: Dict[str, str]
|
||||
'PSA_KEY_USAGE_SIGN_HASH': re.compile('.*KEY_PAIR'),
|
||||
'PSA_KEY_USAGE_VERIFY_HASH': re.compile('.*KEY.*')
|
||||
} #type: Dict[str, Pattern]
|
||||
"""Use a regexp to determine key types for which signature is possible
|
||||
when using the actual usage flag.
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user