Lines Matching +full:check +full:- +full:test +full:- +full:suites
4 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
11 from tests/data_files/ and tests/suites/*.data files by default.
31 import scripts_path # pylint: disable=unused-import
36 match = re.match(r'^[0-9]+', cryptography.__version__)
38 raise Exception("audit-validity-dates requires cryptography >= 35.0.0"
48 PEM = 1 # Privacy-Enhanced Mail
54 #pylint: disable=too-few-public-methods
94 PEM_REGEX = br'-{5}BEGIN (?P<type>.*?)-{5}(?P<data>.*?)-{5}END (?P=type)-{5}'
95 PEM_TAG_REGEX = br'-{5}BEGIN (?P<type>.*?)-{5}\n'
107 -> None:
143 def pem_data_type(data: bytes) -> typing.Optional[str]:
151 return m.group('type').decode('UTF-8')
156 def check_hex_string(hex_str: str) -> bool:
157 """Check if the hex string is possibly DER data."""
162 # Check if Type (1 byte) is SEQUENCE.
165 # Check LENGTH (1 byte) value
173 length_len = (content_len - 128) * 2
176 # Check LENGTH
187 - collect_default_files: Return a list of file names that are defaultly
190 - parse_file: Method that parses a single file to a list of AuditData.
193 - parse_bytes: Defaultly, it parses `bytes` that contains only one valid
195 - walk_all: Defaultly, it iterates over all the files in the provided
217 def collect_default_files(self) -> typing.List[str]:
221 def parse_file(self, filename: str) -> typing.List[AuditData]:
246 -> None:
267 """Get the relative path for the Mbed TLS test directory."""
282 def parse_file(self, filename: str) -> typing.List[AuditData]:
314 Parses .data file for test arguments that possiblly have a
319 :return: Generator that yields test function argument list.
327 # Check parameters line
330 # Read test vectors
338 """Class for auditing files in `tests/suites/*.data`"""
341 """Collect all files in `tests/suites/*.data`"""
343 suites_data_folder = os.path.join(test_dir, 'suites')
349 Parse a list of AuditData from test suite data file.
358 match = re.match(r'"(?P<data>[0-9a-fA-F]+)"', test_arg)
390 parser.add_argument('-a', '--all',
393 parser.add_argument('-v', '--verbose',
396 parser.add_argument('--from', dest='start_date',
397 help=('Start of desired validity period (UTC, YYYY-MM-DD). '
400 parser.add_argument('--to', dest='end_date',
401 help=('End of desired validity period (UTC, YYYY-MM-DD). '
402 'Default: --from'),
404 parser.add_argument('--data-files', action='append', nargs='*',
407 parser.add_argument('--suite-data-files', action='append', nargs='*',