From d725af6166e506aeaefd680b4368d6ddc4db916e Mon Sep 17 00:00:00 2001 From: Petr Svenda Date: Thu, 18 Feb 2021 09:02:08 +0100 Subject: add more precise detection of Common Criteria methodology reference --- sec_certs/cert_rules.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sec_certs/cert_rules.py b/sec_certs/cert_rules.py index d8749495..291bfe3b 100644 --- a/sec_certs/cert_rules.py +++ b/sec_certs/cert_rules.py @@ -58,8 +58,7 @@ rules_protection_profiles = [ 'PP-SSCD.+?', 'PP_DBMS_.+?' # 'Protection Profile', - 'CCMB-20.+?', - 'CCMB-20[0-9]+?-[0-9]+?-[0-9]+?', + #'CCMB-20.+?', 'BSI-CCPP-.+?', 'ANSSI-CC-PP.+?', 'WBIS_V[0-9]\\.[0-9]', @@ -97,6 +96,8 @@ rules_standard_id = [ '[Xx]\\.509', 'RFC [0-9]+', '(?:SCP|scp)[ \']*[0-9][0-9]', + 'CC[I]*MB-20[0-9]+?-[0-9]+?-[0-9]+?', # Common Criteria methodology + 'CCIMB-9[0-9]-[0-9]+?' # Common Criteria methodology old ] rules_security_level = [ @@ -504,7 +505,8 @@ fips_rules['rules_fips_algorithms'] = rules_fips_remove_algorithm_ids fips_rules['rules_security_level'] = rules_fips_security_level fips_rules['rules_cert_id'] = rules_fips_cert fips_common_rules = copy.deepcopy(common_rules) # make separate copy not to process cc rules by fips's re.compile +fips_rules.update(fips_common_rules) for rule in fips_rules: for current_rule in range(len(fips_rules[rule])): - fips_rules[rule][current_rule] = re.compile(fips_rules[rule][current_rule]) + fips_rules[rule][current_rule] = re.compile(fips_rules[rule][current_rule] + REGEXEC_SEP) \ No newline at end of file -- cgit v1.3.1