diff options
| author | J08nY | 2022-10-21 14:15:54 +0200 |
|---|---|---|
| committer | J08nY | 2022-10-21 14:17:14 +0200 |
| commit | 5930fea670dd37f3e3f25bef7b0ed4176b99e09a (patch) | |
| tree | a8f8dc84470bcf3bec16010fb11b1c5fa339f0ff | |
| parent | 6ccdf21ef34e9532e518ed6ae3a4dabb8565d290 (diff) | |
| download | sec-certs-5930fea670dd37f3e3f25bef7b0ed4176b99e09a.tar.gz sec-certs-5930fea670dd37f3e3f25bef7b0ed4176b99e09a.tar.zst sec-certs-5930fea670dd37f3e3f25bef7b0ed4176b99e09a.zip | |
Ditch the special handling of FIPS rules.
Add a separator anyway, not doing so messes stuff up.
| -rw-r--r-- | sec_certs/cert_rules.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sec_certs/cert_rules.py b/sec_certs/cert_rules.py index cd6c6d9a..d4f207bd 100644 --- a/sec_certs/cert_rules.py +++ b/sec_certs/cert_rules.py @@ -204,15 +204,13 @@ def _load(): return loaded -def _process(obj, add_sep=True): +def _process(obj): if isinstance(obj, dict): - return {k: _process(v, add_sep=add_sep) for k, v in obj.items()} + return {k: _process(v) for k, v in obj.items()} elif isinstance(obj, list): return [ re.compile( - REGEXEC_SEP_START + MATCH_START + rule + MATCH_END + REGEXEC_SEP_END - if add_sep - else MATCH_START + rule + MATCH_END, + REGEXEC_SEP_START + MATCH_START + rule + MATCH_END + REGEXEC_SEP_END, re.MULTILINE, ) for rule in obj @@ -227,7 +225,7 @@ for rule_group in rules["cc_rules"]: fips_rules = {} for rule_group in rules["fips_rules"]: - fips_rules[rule_group] = _process(rules[rule_group], False) + fips_rules[rule_group] = _process(rules[rule_group]) PANDAS_KEYWORDS_CATEGORIES: Final[List[str]] = [ |
