diff options
| author | Petr Svenda | 2021-01-15 13:32:50 +0100 |
|---|---|---|
| committer | Petr Svenda | 2021-01-15 13:32:50 +0100 |
| commit | b03c2a3edb43e164d74c9286fd9e8ce30199a6d2 (patch) | |
| tree | b73e18c9d947077658d05e50ea3e7cfb22f43434 | |
| parent | 0ac47ca8a89efae43e92be01f162d24ab76e08c3 (diff) | |
| download | sec-certs-b03c2a3edb43e164d74c9286fd9e8ce30199a6d2.tar.gz sec-certs-b03c2a3edb43e164d74c9286fd9e8ce30199a6d2.tar.zst sec-certs-b03c2a3edb43e164d74c9286fd9e8ce30199a6d2.zip | |
changed search of keywords to string without newlines
| -rw-r--r-- | sec_certs/extract_certificates.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sec_certs/extract_certificates.py b/sec_certs/extract_certificates.py index 12054f0a..3dd49c1c 100644 --- a/sec_certs/extract_certificates.py +++ b/sec_certs/extract_certificates.py @@ -169,13 +169,17 @@ def parse_cert_file(file_name, search_rules, limit_max_lines=-1, line_separator= rule_str = rule rule_and_sep = rule + REGEXEC_SEP - for m in re.finditer(rule_and_sep, whole_text_with_newlines): + #matches_with_newlines_count = sum(1 for _ in re.finditer(rule_and_sep, whole_text_with_newlines)) + #matches_without_newlines_count = sum(1 for _ in re.finditer(rule_and_sep, whole_text)) + #for m in re.finditer(rule_and_sep, whole_text_with_newlines): + for m in re.finditer(rule_and_sep, whole_text): # insert rule if at least one match for it was found if rule not in items_found: items_found[rule_str] = {} match = m.group() match = normalize_match_string(match) + is_algorithm = False if fips_items and match != '': certs = [x['Certificate'] |
