aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorAdam Janovsky2022-12-10 09:01:55 +0100
committerAdam Janovsky2022-12-10 09:01:55 +0100
commit53a709e7e16e1ee07e0f4baeb270fcc1d41bb811 (patch)
tree1abe1837e9198d165e1bc724190e3488403b3642 /tests
parent1c43b173667b2aee8ac64d423b1f46d774643eb3 (diff)
downloadsec-certs-53a709e7e16e1ee07e0f4baeb270fcc1d41bb811.tar.gz
sec-certs-53a709e7e16e1ee07e0f4baeb270fcc1d41bb811.tar.zst
sec-certs-53a709e7e16e1ee07e0f4baeb270fcc1d41bb811.zip
Rename CommonCriteriaCert -> CCCertificate
Diffstat (limited to 'tests')
-rw-r--r--tests/cc/test_cc_analysis.py26
-rw-r--r--tests/cc/test_cc_certificate.py40
-rw-r--r--tests/cc/test_cc_dataset.py12
-rw-r--r--tests/data/cc/analysis/cc_full_dataset.json8
-rw-r--r--tests/data/cc/analysis/reference_dataset.json24
-rw-r--r--tests/data/cc/analysis/transitive_vulnerability_dataset.json24
-rw-r--r--tests/data/cc/analysis/vulnerable_dataset.json8
-rw-r--r--tests/data/cc/certificate/fictional_cert.json10
-rw-r--r--tests/data/cc/dataset/auxillary_datasets/maintenances/maintenance_updates.json6
-rw-r--r--tests/data/cc/dataset/toy_dataset.json26
10 files changed, 92 insertions, 92 deletions
diff --git a/tests/cc/test_cc_analysis.py b/tests/cc/test_cc_analysis.py
index 08cd91e1..ff9fe3c0 100644
--- a/tests/cc/test_cc_analysis.py
+++ b/tests/cc/test_cc_analysis.py
@@ -10,7 +10,7 @@ from sec_certs.cert_rules import SARS_IMPLIED_FROM_EAL
from sec_certs.dataset import CCDataset
from sec_certs.dataset.cpe import CPEDataset
from sec_certs.dataset.cve import CVEDataset
-from sec_certs.sample.cc import CommonCriteriaCert
+from sec_certs.sample.cc import CCCertificate
from sec_certs.sample.cpe import CPE
from sec_certs.sample.cve import CVE
from sec_certs.sample.protection_profile import ProtectionProfile
@@ -105,26 +105,26 @@ def transitive_vulnerability_dataset(data_dir) -> CCDataset:
@pytest.fixture
-def random_certificate(cc_dset: CCDataset) -> CommonCriteriaCert:
+def random_certificate(cc_dset: CCDataset) -> CCCertificate:
return cc_dset["ebd276cca70fd723"]
-def test_match_cpe(cpe_single_sign_on: CPE, random_certificate: CommonCriteriaCert):
+def test_match_cpe(cpe_single_sign_on: CPE, random_certificate: CCCertificate):
assert {cpe_single_sign_on.uri} == random_certificate.heuristics.cpe_matches
def test_find_related_cves(
- cc_dset: CCDataset, cpe_single_sign_on: CPE, cves: set[CVE], random_certificate: CommonCriteriaCert
+ cc_dset: CCDataset, cpe_single_sign_on: CPE, cves: set[CVE], random_certificate: CCCertificate
):
random_certificate.heuristics.cpe_matches = {cpe_single_sign_on.uri}
cc_dset.compute_related_cves()
assert {x.cve_id for x in cves} == random_certificate.heuristics.related_cves
-def test_version_extraction(random_certificate: CommonCriteriaCert):
+def test_version_extraction(random_certificate: CCCertificate):
assert random_certificate.heuristics.extracted_versions == {"8.2"}
- new_cert = CommonCriteriaCert(
+ new_cert = CCCertificate(
"",
"",
"IDOneClassIC Card : ID-One Cosmo 64 RSA v5.4 and applet IDOneClassIC v1.0 embedded on P5CT072VOP",
@@ -147,15 +147,15 @@ def test_version_extraction(random_certificate: CommonCriteriaCert):
assert new_cert.heuristics.extracted_versions == {"5.4", "1.0"}
-def test_cert_lab_heuristics(random_certificate: CommonCriteriaCert):
+def test_cert_lab_heuristics(random_certificate: CCCertificate):
assert random_certificate.heuristics.cert_lab == ["BSI"]
-def test_cert_id_heuristics(random_certificate: CommonCriteriaCert):
+def test_cert_id_heuristics(random_certificate: CCCertificate):
assert random_certificate.heuristics.cert_id == "BSI-DSZ-CC-0683-2014"
-def test_keywords_heuristics(random_certificate: CommonCriteriaCert):
+def test_keywords_heuristics(random_certificate: CCCertificate):
assert random_certificate.pdf_data.st_keywords
extracted_keywords: dict = random_certificate.pdf_data.st_keywords
@@ -174,7 +174,7 @@ def test_keywords_heuristics(random_certificate: CommonCriteriaCert):
assert extracted_keywords["cipher_mode"]["CBC"]["CBC"] == 2
-def test_protection_profile_matching(cc_dset: CCDataset, random_certificate: CommonCriteriaCert):
+def test_protection_profile_matching(cc_dset: CCDataset, random_certificate: CCCertificate):
artificial_pp: ProtectionProfile = ProtectionProfile(
"Korean National Protection Profile for Single Sign On V1.0",
"EAL1+",
@@ -194,7 +194,7 @@ def test_protection_profile_matching(cc_dset: CCDataset, random_certificate: Com
assert random_certificate.protection_profiles == {expected_pp}
-def test_single_record_references_heuristics(random_certificate: CommonCriteriaCert):
+def test_single_record_references_heuristics(random_certificate: CCCertificate):
# Single record in daset is not affecting nor affected by other records
assert not random_certificate.heuristics.report_references.directly_referenced_by
assert not random_certificate.heuristics.report_references.indirectly_referenced_by
@@ -242,7 +242,7 @@ def test_sar_object():
SAR.from_string("XALC_FLR")
-def test_sar_transformation(random_certificate: CommonCriteriaCert):
+def test_sar_transformation(random_certificate: CCCertificate):
assert random_certificate.heuristics.extracted_sars
# This one should be taken from security level and not overwritten by stronger SARs in ST
@@ -254,7 +254,7 @@ def test_sar_transformation(random_certificate: CommonCriteriaCert):
assert SAR("ADV_FSP", 6) not in random_certificate.heuristics.extracted_sars
-def test_eal_implied_sar_inference(random_certificate: CommonCriteriaCert):
+def test_eal_implied_sar_inference(random_certificate: CCCertificate):
assert random_certificate.actual_sars
actual_sars = random_certificate.actual_sars
diff --git a/tests/cc/test_cc_certificate.py b/tests/cc/test_cc_certificate.py
index e11e5f43..2234ee11 100644
--- a/tests/cc/test_cc_certificate.py
+++ b/tests/cc/test_cc_certificate.py
@@ -8,7 +8,7 @@ import pytest
import tests.data.cc.analysis
import tests.data.cc.certificate
from sec_certs.dataset import CCDataset
-from sec_certs.sample import CommonCriteriaCert
+from sec_certs.sample import CCCertificate
from sec_certs.sample.protection_profile import ProtectionProfile
@@ -18,7 +18,7 @@ def data_dir() -> Path:
@pytest.fixture(scope="module")
-def vulnerable_certificate(tmp_path_factory) -> CommonCriteriaCert:
+def vulnerable_certificate(tmp_path_factory) -> CCCertificate:
tmp_dir = tmp_path_factory.mktemp("dset")
dset_json_path = Path(tests.data.cc.analysis.__path__[0]) / "vulnerable_dataset.json"
data_dir_path = dset_json_path.parent
@@ -31,8 +31,8 @@ def vulnerable_certificate(tmp_path_factory) -> CommonCriteriaCert:
@pytest.fixture(scope="module")
-def cert_one() -> CommonCriteriaCert:
- return CommonCriteriaCert(
+def cert_one() -> CCCertificate:
+ return CCCertificate(
"active",
"Access Control Devices and Systems",
"NetIQ Identity Manager 4.7",
@@ -54,13 +54,13 @@ def cert_one() -> CommonCriteriaCert:
@pytest.fixture(scope="module")
-def cert_two() -> CommonCriteriaCert:
+def cert_two() -> CCCertificate:
pp = ProtectionProfile("sample_pp", None, pp_link="https://sample.pp")
- update = CommonCriteriaCert.MaintenanceReport(
+ update = CCCertificate.MaintenanceReport(
date(1900, 1, 1), "Sample maintenance", "https://maintenance.up", "https://maintenance.up"
)
- return CommonCriteriaCert(
+ return CCCertificate(
"archived",
"Sample category",
"Sample certificate name",
@@ -81,44 +81,44 @@ def cert_two() -> CommonCriteriaCert:
)
-def test_extract_metadata(vulnerable_certificate: CommonCriteriaCert):
+def test_extract_metadata(vulnerable_certificate: CCCertificate):
vulnerable_certificate.state.st_extract_ok = True
- CommonCriteriaCert.extract_st_pdf_metadata(vulnerable_certificate)
+ CCCertificate.extract_st_pdf_metadata(vulnerable_certificate)
assert vulnerable_certificate.state.st_extract_ok
vulnerable_certificate.state.report_extract_ok = True
- CommonCriteriaCert.extract_report_pdf_metadata(vulnerable_certificate)
+ CCCertificate.extract_report_pdf_metadata(vulnerable_certificate)
assert vulnerable_certificate.state.report_extract_ok
-def test_extract_frontpage(vulnerable_certificate: CommonCriteriaCert):
+def test_extract_frontpage(vulnerable_certificate: CCCertificate):
vulnerable_certificate.state.st_extract_ok = True
- CommonCriteriaCert.extract_st_pdf_frontpage(vulnerable_certificate)
+ CCCertificate.extract_st_pdf_frontpage(vulnerable_certificate)
assert vulnerable_certificate.state.st_extract_ok
vulnerable_certificate.state.report_extract_ok = True
- CommonCriteriaCert.extract_report_pdf_frontpage(vulnerable_certificate)
+ CCCertificate.extract_report_pdf_frontpage(vulnerable_certificate)
assert vulnerable_certificate.state.report_extract_ok
-def test_keyword_extraction(vulnerable_certificate: CommonCriteriaCert):
+def test_keyword_extraction(vulnerable_certificate: CCCertificate):
vulnerable_certificate.state.st_extract_ok = True
- CommonCriteriaCert.extract_st_pdf_keywords(vulnerable_certificate)
+ CCCertificate.extract_st_pdf_keywords(vulnerable_certificate)
assert vulnerable_certificate.state.st_extract_ok
vulnerable_certificate.state.report_extract_ok = True
- CommonCriteriaCert.extract_report_pdf_keywords(vulnerable_certificate)
+ CCCertificate.extract_report_pdf_keywords(vulnerable_certificate)
assert vulnerable_certificate.state.report_extract_ok
-def test_cert_link_escaping(cert_one: CommonCriteriaCert):
+def test_cert_link_escaping(cert_one: CCCertificate):
assert (
cert_one.report_link
== "https://www.commoncriteriaportal.org/files/epfiles/Certification%20Report%20-%20NetIQ®%20Identity%20Manager%204.7.pdf"
)
-def test_cert_to_json(cert_two: CommonCriteriaCert, tmp_path: Path, data_dir: Path):
+def test_cert_to_json(cert_two: CCCertificate, tmp_path: Path, data_dir: Path):
cert_two.to_json(tmp_path / "crt_two.json")
with (tmp_path / "crt_two.json").open("r") as handle:
@@ -130,6 +130,6 @@ def test_cert_to_json(cert_two: CommonCriteriaCert, tmp_path: Path, data_dir: Pa
assert data == template_data
-def test_cert_from_json(cert_two: CommonCriteriaCert, data_dir: Path):
- crt = CommonCriteriaCert.from_json(data_dir / "fictional_cert.json")
+def test_cert_from_json(cert_two: CCCertificate, data_dir: Path):
+ crt = CCCertificate.from_json(data_dir / "fictional_cert.json")
assert cert_two == crt
diff --git a/tests/cc/test_cc_dataset.py b/tests/cc/test_cc_dataset.py
index 0355143b..5d0b8fc5 100644
--- a/tests/cc/test_cc_dataset.py
+++ b/tests/cc/test_cc_dataset.py
@@ -9,7 +9,7 @@ import pytest
import tests.data.cc.dataset
from sec_certs import constants
from sec_certs.dataset import CCDataset
-from sec_certs.sample.cc import CommonCriteriaCert
+from sec_certs.sample.cc import CCCertificate
@pytest.fixture(scope="module")
@@ -18,8 +18,8 @@ def data_dir() -> Path:
@pytest.fixture(scope="module")
-def crt() -> CommonCriteriaCert:
- return CommonCriteriaCert(
+def crt() -> CCCertificate:
+ return CCCertificate(
"active",
"Access Control Devices and Systems",
"NetIQ Identity Manager 4.7",
@@ -128,7 +128,7 @@ def test_build_empty_dataset():
assert not dset.state.certs_analyzed
-def test_build_dataset(data_dir: Path, crt: CommonCriteriaCert, toy_dataset: CCDataset):
+def test_build_dataset(data_dir: Path, crt: CCCertificate, toy_dataset: CCDataset):
with TemporaryDirectory() as tmp_dir:
dataset_path = Path(tmp_dir)
(dataset_path / "web").mkdir()
@@ -170,6 +170,6 @@ def test_download_csv_html_files():
def test_to_pandas(toy_dataset: CCDataset):
df = toy_dataset.to_pandas()
- assert df.shape == (len(toy_dataset), len(CommonCriteriaCert.pandas_columns))
+ assert df.shape == (len(toy_dataset), len(CCCertificate.pandas_columns))
assert df.index.name == "dgst"
- assert set(df.columns) == (set(CommonCriteriaCert.pandas_columns).union({"year_from"})) - {"dgst"}
+ assert set(df.columns) == (set(CCCertificate.pandas_columns).union({"year_from"})) - {"dgst"}
diff --git a/tests/data/cc/analysis/cc_full_dataset.json b/tests/data/cc/analysis/cc_full_dataset.json
index a7b3c834..d12a9456 100644
--- a/tests/data/cc/analysis/cc_full_dataset.json
+++ b/tests/data/cc/analysis/cc_full_dataset.json
@@ -15,7 +15,7 @@
"n_certs": 1,
"certs": [
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "ebd276cca70fd723",
"status": "active",
"category": "Access Control Devices and Systems",
@@ -54,7 +54,7 @@
"elements": []
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": true,
"report_download_ok": true,
"st_convert_garbage": false,
@@ -69,7 +69,7 @@
"report_txt_hash": "35627594d3806ac3926ec47f466503fe27781533da12beb6f8705882fccf125e"
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": {
"pdf_file_size_bytes": 1174271,
"pdf_is_encrypted": false,
@@ -512,7 +512,7 @@
"st_filename": "0683b_pdf.pdf"
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": {
"_type": "Set",
"elements": [
diff --git a/tests/data/cc/analysis/reference_dataset.json b/tests/data/cc/analysis/reference_dataset.json
index d05826a3..57ae81f1 100644
--- a/tests/data/cc/analysis/reference_dataset.json
+++ b/tests/data/cc/analysis/reference_dataset.json
@@ -14,7 +14,7 @@
"n_certs": 3,
"certs": [
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "c30de3192d2e8ec2",
"status": "archived",
"category": "Other Devices and Systems",
@@ -43,7 +43,7 @@
"elements": []
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": true,
"report_download_ok": true,
"st_convert_ok": true,
@@ -56,7 +56,7 @@
"report_txt_hash": "460e8010dbc8f5de5b87bf96fd45c71cfd9f3869f34ca6ac1ab02cbd70d2523f"
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": {
"pdf_file_size_bytes": 393439,
"pdf_is_encrypted": false,
@@ -468,7 +468,7 @@
}
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": {
"_type": "Set",
"elements": [
@@ -573,7 +573,7 @@
}
},
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "53fe111411edfa45",
"status": "archived",
"category": "Other Devices and Systems",
@@ -602,7 +602,7 @@
"elements": []
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": true,
"report_download_ok": true,
"st_convert_ok": true,
@@ -615,7 +615,7 @@
"report_txt_hash": "0535df1c56fb4f87153cbffee51ba4d77fac47a6f17f024aa7d9df461028bc65"
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": {
"pdf_file_size_bytes": 296713,
"pdf_is_encrypted": false,
@@ -1056,7 +1056,7 @@
}
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": {
"_type": "Set",
"elements": [
@@ -1210,7 +1210,7 @@
}
},
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "692e91451741ef49",
"status": "archived",
"category": "Other Devices and Systems",
@@ -1239,7 +1239,7 @@
"elements": []
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": true,
"report_download_ok": true,
"st_convert_ok": true,
@@ -1252,7 +1252,7 @@
"report_txt_hash": "11e1262fd8f5df1b140f5e8813883b71447503781399427b35adbbecd00b4d63"
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": {
"pdf_file_size_bytes": 628533,
"pdf_is_encrypted": false,
@@ -1687,7 +1687,7 @@
}
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": {
"_type": "Set",
"elements": [
diff --git a/tests/data/cc/analysis/transitive_vulnerability_dataset.json b/tests/data/cc/analysis/transitive_vulnerability_dataset.json
index bd20bf90..da2348bf 100644
--- a/tests/data/cc/analysis/transitive_vulnerability_dataset.json
+++ b/tests/data/cc/analysis/transitive_vulnerability_dataset.json
@@ -14,7 +14,7 @@
"n_certs": 3,
"certs": [
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "d0705c9e6fbaeba3",
"status": "active",
"category": "Operating Systems",
@@ -53,7 +53,7 @@
"elements": []
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": true,
"report_download_ok": true,
"st_convert_ok": true,
@@ -66,7 +66,7 @@
"report_txt_hash": "9d360141a98e764b15855f519b456c4e4639f993c4f8b5ab67e9c8ae7fbfc9e4"
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": {
"pdf_file_size_bytes": 1235750,
"pdf_is_encrypted": false,
@@ -1061,7 +1061,7 @@
}
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": {
"_type": "Set",
"elements": [
@@ -1329,7 +1329,7 @@
}
},
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "011796336c7b94de",
"status": "archived",
"category": "Operating Systems",
@@ -1358,7 +1358,7 @@
"elements": []
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": true,
"report_download_ok": true,
"st_convert_ok": true,
@@ -1371,7 +1371,7 @@
"report_txt_hash": "dd120ba7667c2385839c96ee70c56f2a4d464fc95e3ea2818d31b3347d06fd4f"
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": {
"pdf_file_size_bytes": 1178202,
"pdf_is_encrypted": false,
@@ -2014,7 +2014,7 @@
}
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": {
"_type": "Set",
"elements": [
@@ -2269,7 +2269,7 @@
}
},
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "ebc77980250ee68f",
"status": "active",
"category": "Operating Systems",
@@ -2308,7 +2308,7 @@
"elements": []
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": true,
"report_download_ok": true,
"st_convert_ok": true,
@@ -2321,7 +2321,7 @@
"report_txt_hash": "0a7c65e3d11f082c8f75aba7de0079c0b1aa5e67bb28d4635cbcaa4cd200d1c2"
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": {
"pdf_file_size_bytes": 1932018,
"pdf_is_encrypted": false,
@@ -3380,7 +3380,7 @@
}
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": {
"_type": "Set",
"elements": [
diff --git a/tests/data/cc/analysis/vulnerable_dataset.json b/tests/data/cc/analysis/vulnerable_dataset.json
index 5fe3dee6..d433fac1 100644
--- a/tests/data/cc/analysis/vulnerable_dataset.json
+++ b/tests/data/cc/analysis/vulnerable_dataset.json
@@ -15,7 +15,7 @@
"n_certs": 1,
"certs": [
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "ebd276cca70fd723",
"status": "active",
"category": "Access Control Devices and Systems",
@@ -38,7 +38,7 @@
"protection_profiles": [],
"maintenance_updates": [],
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": true,
"report_download_ok": true,
"st_convert_ok": true,
@@ -47,7 +47,7 @@
"report_extract_ok": true
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": null,
"st_metadata": null,
"report_frontpage": null,
@@ -58,7 +58,7 @@
"st_filename": null
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": [
"8.2"
],
diff --git a/tests/data/cc/certificate/fictional_cert.json b/tests/data/cc/certificate/fictional_cert.json
index 32e78b32..5d5a0499 100644
--- a/tests/data/cc/certificate/fictional_cert.json
+++ b/tests/data/cc/certificate/fictional_cert.json
@@ -1,5 +1,5 @@
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "a9ccb81a92e547dc",
"status": "archived",
"category": "Sample category",
@@ -31,7 +31,7 @@
"_type": "Set",
"elements": [
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.MaintenanceReport",
+ "_type": "sec_certs.sample.cc.CCCertificate.MaintenanceReport",
"maintenance_date": "1900-01-01",
"maintenance_title": "Sample maintenance",
"maintenance_report_link": "https://maintenance.up",
@@ -40,7 +40,7 @@
]
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": false,
"report_download_ok": false,
"st_convert_garbage": false,
@@ -55,7 +55,7 @@
"report_txt_hash": null
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": null,
"st_metadata": null,
"report_frontpage": null,
@@ -66,7 +66,7 @@
"st_filename": null
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": null,
"cpe_matches": null,
"verified_cpe_matches": null,
diff --git a/tests/data/cc/dataset/auxillary_datasets/maintenances/maintenance_updates.json b/tests/data/cc/dataset/auxillary_datasets/maintenances/maintenance_updates.json
index ed72b631..09e52395 100644
--- a/tests/data/cc/dataset/auxillary_datasets/maintenances/maintenance_updates.json
+++ b/tests/data/cc/dataset/auxillary_datasets/maintenances/maintenance_updates.json
@@ -21,7 +21,7 @@
"report_link": "https://www.commoncriteriaportal.org/files/epfiles/383-7-159%20MR%20v1.0e.pdf",
"st_link": "https://www.commoncriteriaportal.org/files/epfiles/383-7-159%20ST%20v1.4%20CCRA.pdf",
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": true,
"report_download_ok": true,
"st_convert_garbage": false,
@@ -36,7 +36,7 @@
"report_txt_hash": null
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": null,
"st_metadata": null,
"report_frontpage": null,
@@ -47,7 +47,7 @@
"st_filename": "383-7-159 ST v1.4 CCRA.pdf"
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": null,
"cpe_matches": null,
"verified_cpe_matches": null,
diff --git a/tests/data/cc/dataset/toy_dataset.json b/tests/data/cc/dataset/toy_dataset.json
index 42531e2c..bd674311 100644
--- a/tests/data/cc/dataset/toy_dataset.json
+++ b/tests/data/cc/dataset/toy_dataset.json
@@ -15,7 +15,7 @@
"n_certs": 3,
"certs": [
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "309ac2fd7f2dcf17",
"status": "active",
"category": "Access Control Devices and Systems",
@@ -44,7 +44,7 @@
"elements": []
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": false,
"report_download_ok": false,
"st_convert_garbage": false,
@@ -59,7 +59,7 @@
"report_txt_hash": null
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": null,
"st_metadata": null,
"report_frontpage": null,
@@ -70,7 +70,7 @@
"st_filename": null
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": null,
"cpe_matches": null,
"verified_cpe_matches": null,
@@ -97,7 +97,7 @@
}
},
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "8cf86948f02f047d",
"status": "active",
"category": "Access Control Devices and Systems",
@@ -131,7 +131,7 @@
"elements": []
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": false,
"report_download_ok": false,
"st_convert_garbage": false,
@@ -146,7 +146,7 @@
"report_txt_hash": null
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": null,
"st_metadata": null,
"report_frontpage": null,
@@ -157,7 +157,7 @@
"st_filename": null
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": null,
"cpe_matches": null,
"verified_cpe_matches": null,
@@ -184,7 +184,7 @@
}
},
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert",
+ "_type": "sec_certs.sample.cc.CCCertificate",
"dgst": "8a5e6bcda602920c",
"status": "active",
"category": "Boundary Protection Devices and Systems",
@@ -217,7 +217,7 @@
"_type": "Set",
"elements": [
{
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.MaintenanceReport",
+ "_type": "sec_certs.sample.cc.CCCertificate.MaintenanceReport",
"maintenance_date": "2019-08-26",
"maintenance_title": "Fortinet FortiGate w/ FortiOS v5.6.7 Build 6022",
"maintenance_report_link": "https://www.commoncriteriaportal.org/files/epfiles/383-7-159%20MR%20v1.0e.pdf",
@@ -226,7 +226,7 @@
]
},
"state": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.InternalState",
+ "_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"st_download_ok": false,
"report_download_ok": false,
"st_convert_garbage": false,
@@ -241,7 +241,7 @@
"report_txt_hash": null
},
"pdf_data": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.PdfData",
+ "_type": "sec_certs.sample.cc.CCCertificate.PdfData",
"report_metadata": null,
"st_metadata": null,
"report_frontpage": null,
@@ -252,7 +252,7 @@
"st_filename": null
},
"heuristics": {
- "_type": "sec_certs.sample.cc.CommonCriteriaCert.Heuristics",
+ "_type": "sec_certs.sample.cc.CCCertificate.Heuristics",
"extracted_versions": null,
"cpe_matches": null,
"verified_cpe_matches": null,