diff options
| author | Stanislav Boboň | 2021-02-11 09:53:07 +0100 |
|---|---|---|
| committer | Stanislav Boboň | 2021-02-11 09:53:07 +0100 |
| commit | 2316928cec3e116f3f5c81b46a2d29aff2cfeecd (patch) | |
| tree | b70a37d02ee74c0293f1ec2cc507f866e55b9cbd | |
| parent | 237eeb3856e05d2ff423460352f455512e054143 (diff) | |
| download | sec-certs-2316928cec3e116f3f5c81b46a2d29aff2cfeecd.tar.gz sec-certs-2316928cec3e116f3f5c81b46a2d29aff2cfeecd.tar.zst sec-certs-2316928cec3e116f3f5c81b46a2d29aff2cfeecd.zip | |
added change and revision history
| -rw-r--r-- | sec_certs/certificate.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sec_certs/certificate.py b/sec_certs/certificate.py index f12270a6..cde4a449 100644 --- a/sec_certs/certificate.py +++ b/sec_certs/certificate.py @@ -542,7 +542,7 @@ class FIPSCertificate(Certificate, ComplexSerializableType): text_to_parse = text_with_newlines if constants.FIPS_USE_NEWLINES else text - items_found, fips_text = FIPSCertificate.parse_cert_file(FIPSCertificate.find_platforms(text_to_parse), + items_found, fips_text = FIPSCertificate.parse_cert_file(FIPSCertificate.remove_platforms(text_to_parse), cert.web_scan.algorithms) save_modified_cert_file(cert.state.fragment_path.with_suffix('.fips.txt'), fips_text, unicode_error) @@ -556,8 +556,8 @@ class FIPSCertificate(Certificate, ComplexSerializableType): return items_found, cert @staticmethod - def find_platforms(text_to_parse: str): - pat = re.compile(r"[Mm]odification [Hh]istory(?! \.*)+[\s\S]*?") + def remove_platforms(text_to_parse: str): + pat = re.compile(r"(?:modification|revision|change) history\n[\s\S]*?", re.IGNORECASE) for match in pat.finditer(text_to_parse): text_to_parse = text_to_parse.replace( match.group(), 'x' * len(match.group())) |
