aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorAdam Janovsky2021-05-11 10:08:16 +0200
committerAdam Janovsky2021-05-11 10:08:16 +0200
commitf76db3c02de008a2362b6e55bf6f9c83f35ee3db (patch)
tree150c5d1aed7e7edf96a020460e676a306403229b /tests
parent796a02ee698a8d395f5464d9e9f08c1f694a91f2 (diff)
downloadsec-certs-f76db3c02de008a2362b6e55bf6f9c83f35ee3db.tar.gz
sec-certs-f76db3c02de008a2362b6e55bf6f9c83f35ee3db.tar.zst
sec-certs-f76db3c02de008a2362b6e55bf6f9c83f35ee3db.zip
cc links http -> https
Diffstat (limited to 'tests')
-rw-r--r--tests/data/test_cc_oop/fictional_cert.json12
-rw-r--r--tests/data/test_cc_oop/toy_dataset.json16
-rw-r--r--tests/test_cc_oop.py40
3 files changed, 34 insertions, 34 deletions
diff --git a/tests/data/test_cc_oop/fictional_cert.json b/tests/data/test_cc_oop/fictional_cert.json
index dd106e74..ed47f3bf 100644
--- a/tests/data/test_cc_oop/fictional_cert.json
+++ b/tests/data/test_cc_oop/fictional_cert.json
@@ -1,6 +1,6 @@
{
"_type": "CommonCriteriaCert",
- "dgst": "9cf077f8b3c4a825",
+ "dgst": "a9ccb81a92e547dc",
"status": "archived",
"category": "Sample category",
"name": "Sample certificate name",
@@ -11,16 +11,16 @@
],
"not_valid_before": "1900-01-02",
"not_valid_after": "1900-01-03",
- "report_link": "http://path.to/report/link",
- "st_link": "http://path.to/st/link",
+ "report_link": "https://path.to/report/link",
+ "st_link": "https://path.to/st/link",
"src": "custom",
- "cert_link": "http://path.to/cert/link",
- "manufacturer_web": "http://path.to/manufacturer/web",
+ "cert_link": "https://path.to/cert/link",
+ "manufacturer_web": "https://path.to/manufacturer/web",
"protection_profiles": [
{
"_type": "ProtectionProfile",
"pp_name": "sample_pp",
- "pp_link": "http://sample.pp"
+ "pp_link": "https://sample.pp"
}
],
"maintainance_updates": [
diff --git a/tests/data/test_cc_oop/toy_dataset.json b/tests/data/test_cc_oop/toy_dataset.json
index 4be9f90d..1c92f93c 100644
--- a/tests/data/test_cc_oop/toy_dataset.json
+++ b/tests/data/test_cc_oop/toy_dataset.json
@@ -16,7 +16,7 @@
"certs": [
{
"_type": "CommonCriteriaCert",
- "dgst": "869415cc4b91282e",
+ "dgst": "309ac2fd7f2dcf17",
"status": "active",
"category": "Access Control Devices and Systems",
"name": "NetIQ Identity Manager 4.7",
@@ -28,10 +28,10 @@
],
"not_valid_before": "2020-06-15",
"not_valid_after": "2025-06-15",
- "report_link": "http://www.commoncriteriaportal.org/files/epfiles/Certification%20Report%20-%20NetIQ®%20Identity%20Manager%204.7.pdf",
- "st_link": "http://www.commoncriteriaportal.org/files/epfiles/ST%20-%20NetIQ%20Identity%20Manager%204.7.pdf",
+ "report_link": "https://www.commoncriteriaportal.org/files/epfiles/Certification%20Report%20-%20NetIQ®%20Identity%20Manager%204.7.pdf",
+ "st_link": "https://www.commoncriteriaportal.org/files/epfiles/ST%20-%20NetIQ%20Identity%20Manager%204.7.pdf",
"src": "csv + html",
- "cert_link": "http://www.commoncriteriaportal.org/files/epfiles/Certifikat%20CCRA%20-%20NetIQ%20Identity%20Manager%204.7_signed.pdf",
+ "cert_link": "https://www.commoncriteriaportal.org/files/epfiles/Certifikat%20CCRA%20-%20NetIQ%20Identity%20Manager%204.7_signed.pdf",
"manufacturer_web": "https://www.netiq.com/",
"protection_profiles": [],
"maintainance_updates": [],
@@ -67,7 +67,7 @@
},
{
"_type": "CommonCriteriaCert",
- "dgst": "2d010ecfb604747a",
+ "dgst": "8cf86948f02f047d",
"status": "active",
"category": "Access Control Devices and Systems",
"name": "Magic SSO V4.0",
@@ -76,8 +76,8 @@
"security_level": [],
"not_valid_before": "2019-11-15",
"not_valid_after": "2024-11-15",
- "report_link": "http://www.commoncriteriaportal.org/files/epfiles/KECS-CR-19-70%20Magic%20SSO%20V4.0(eng)%20V1.0.pdf",
- "st_link": "http://www.commoncriteriaportal.org/files/epfiles/Magic_SSO_V4.0-ST-v1.4_EN.pdf",
+ "report_link": "https://www.commoncriteriaportal.org/files/epfiles/KECS-CR-19-70%20Magic%20SSO%20V4.0(eng)%20V1.0.pdf",
+ "st_link": "https://www.commoncriteriaportal.org/files/epfiles/Magic_SSO_V4.0-ST-v1.4_EN.pdf",
"src": "csv + html",
"cert_link": null,
"manufacturer_web": "https://www.dreamsecurity.com/",
@@ -85,7 +85,7 @@
{
"_type": "ProtectionProfile",
"pp_name": "Korean National Protection Profile for Single Sign On V1.0",
- "pp_link": "http://www.commoncriteriaportal.org/files/ppfiles/KECS-PP-0822-2017%20Korean%20National%20PP%20for%20Single%20Sign%20On%20V1.0(eng).pdf"
+ "pp_link": "https://www.commoncriteriaportal.org/files/ppfiles/KECS-PP-0822-2017%20Korean%20National%20PP%20for%20Single%20Sign%20On%20V1.0(eng).pdf"
}
],
"maintainance_updates": [],
diff --git a/tests/test_cc_oop.py b/tests/test_cc_oop.py
index 9a586f14..c995ff9a 100644
--- a/tests/test_cc_oop.py
+++ b/tests/test_cc_oop.py
@@ -25,10 +25,10 @@ class TestCommonCriteriaOOP(TestCase):
'EAL3+'},
date(2020, 6, 15),
date(2025, 6, 15),
- 'http://www.commoncriteriaportal.org/files/epfiles/Certification%20Report%20-%20NetIQ®%20Identity%20Manager%204.7.pdf',
- 'http://www.commoncriteriaportal.org/files/epfiles/ST%20-%20NetIQ%20Identity%20Manager%204.7.pdf',
+ 'https://www.commoncriteriaportal.org/files/epfiles/Certification%20Report%20-%20NetIQ®%20Identity%20Manager%204.7.pdf',
+ 'https://www.commoncriteriaportal.org/files/epfiles/ST%20-%20NetIQ%20Identity%20Manager%204.7.pdf',
'csv + html',
- 'http://www.commoncriteriaportal.org/files/epfiles/Certifikat%20CCRA%20-%20NetIQ%20Identity%20Manager%204.7_signed.pdf',
+ 'https://www.commoncriteriaportal.org/files/epfiles/Certifikat%20CCRA%20-%20NetIQ%20Identity%20Manager%204.7_signed.pdf',
'https://www.netiq.com/',
set(),
set(),
@@ -44,19 +44,19 @@ class TestCommonCriteriaOOP(TestCase):
set(),
date(2019, 11, 15),
date(2024, 11, 15),
- 'http://www.commoncriteriaportal.org/files/epfiles/KECS-CR-19-70%20Magic%20SSO%20V4.0(eng)%20V1.0.pdf',
- 'http://www.commoncriteriaportal.org/files/epfiles/Magic_SSO_V4.0-ST-v1.4_EN.pdf',
+ 'https://www.commoncriteriaportal.org/files/epfiles/KECS-CR-19-70%20Magic%20SSO%20V4.0(eng)%20V1.0.pdf',
+ 'https://www.commoncriteriaportal.org/files/epfiles/Magic_SSO_V4.0-ST-v1.4_EN.pdf',
'csv + html',
None,
'https://www.dreamsecurity.com/',
{CommonCriteriaCert.ProtectionProfile('Korean National Protection Profile for Single Sign On V1.0',
- 'http://www.commoncriteriaportal.org/files/ppfiles/KECS-PP-0822-2017%20Korean%20National%20PP%20for%20Single%20Sign%20On%20V1.0(eng).pdf')},
+ 'https://www.commoncriteriaportal.org/files/ppfiles/KECS-PP-0822-2017%20Korean%20National%20PP%20for%20Single%20Sign%20On%20V1.0(eng).pdf')},
set(),
None,
None,
None)
- pp = CommonCriteriaCert.ProtectionProfile('sample_pp', 'http://sample.pp')
+ pp = CommonCriteriaCert.ProtectionProfile('sample_pp', 'https://sample.pp')
update = CommonCriteriaCert.MaintainanceReport(date(1900, 1, 1), 'Sample maintainance', 'https://maintainance.up', 'https://maintainance.up')
self.fictional_cert = CommonCriteriaCert('archived',
'Sample category',
@@ -66,11 +66,11 @@ class TestCommonCriteriaOOP(TestCase):
{'Sample security level'},
date(1900, 1, 2),
date(1900, 1, 3),
- 'http://path.to/report/link',
- 'http://path.to/st/link',
+ 'https://path.to/report/link',
+ 'https://path.to/st/link',
'custom',
- 'http://path.to/cert/link',
- 'http://path.to/manufacturer/web',
+ 'https://path.to/cert/link',
+ 'https://path.to/manufacturer/web',
{pp},
{update},
None,
@@ -80,17 +80,17 @@ class TestCommonCriteriaOOP(TestCase):
self.template_dataset.timestamp = datetime(2020, 11, 16, hour=17, minute=4, second=14, microsecond=770153)
self.template_dataset.state.meta_sources_parsed = True
- self.template_report_pdf_hashes = {'869415cc4b91282e': '774c41fbba980191ca40ae610b2f61484c5997417b3325b6fd68b345173bde52',
- '2d010ecfb604747a': '533a5995ef8b736cc48cfda30e8aafec77d285511471e0e5a9e8007c8750203a'}
- self.template_target_pdf_hashes = {'869415cc4b91282e': 'b9a45995d9e40b2515506bbf5945e806ef021861820426c6d0a6a074090b47a9',
- '2d010ecfb604747a': '3c8614338899d956e9e56f1aa88d90e37df86f3310b875d9d14ec0f71e4759be'}
+ self.template_report_pdf_hashes = {'309ac2fd7f2dcf17': '774c41fbba980191ca40ae610b2f61484c5997417b3325b6fd68b345173bde52',
+ '8cf86948f02f047d': '533a5995ef8b736cc48cfda30e8aafec77d285511471e0e5a9e8007c8750203a'}
+ self.template_target_pdf_hashes = {'309ac2fd7f2dcf17': 'b9a45995d9e40b2515506bbf5945e806ef021861820426c6d0a6a074090b47a9',
+ '8cf86948f02f047d': '3c8614338899d956e9e56f1aa88d90e37df86f3310b875d9d14ec0f71e4759be'}
self.template_report_txt_path = self.test_data_dir / 'report_869415cc4b91282e.txt'
self.template_target_txt_path = self.test_data_dir / 'target_869415cc4b91282e.txt'
def test_certificate_input_sanity(self):
self.assertEqual(self.crt_one.report_link,
- 'http://www.commoncriteriaportal.org/files/epfiles/Certification%20Report%20-%20NetIQ®%20Identity%20Manager%204.7.pdf',
+ 'https://www.commoncriteriaportal.org/files/epfiles/Certification%20Report%20-%20NetIQ®%20Identity%20Manager%204.7.pdf',
'Report link contains some improperly escaped characters.')
def test_download_and_convert_pdfs(self):
@@ -107,14 +107,14 @@ class TestCommonCriteriaOOP(TestCase):
self.assertEqual(actual_report_pdf_hashes, self.template_report_pdf_hashes, 'Hashes of downloaded pdfs (certificate report) do not the template')
self.assertEqual(actual_target_pdf_hashes, self.template_target_pdf_hashes, 'Hashes of downloaded pdfs (security target) do not match the template')
- self.assertTrue(dset['869415cc4b91282e'].state.report_txt_path.exists())
- self.assertTrue(dset['869415cc4b91282e'].state.st_txt_path.exists())
+ self.assertTrue(dset['309ac2fd7f2dcf17'].state.report_txt_path.exists())
+ self.assertTrue(dset['309ac2fd7f2dcf17'].state.st_txt_path.exists())
- self.assertAlmostEqual(dset['869415cc4b91282e'].state.st_txt_path.stat().st_size,
+ self.assertAlmostEqual(dset['309ac2fd7f2dcf17'].state.st_txt_path.stat().st_size,
self.template_target_txt_path.stat().st_size,
delta=1000)
- self.assertAlmostEqual(dset['869415cc4b91282e'].state.report_txt_path.stat().st_size,
+ self.assertAlmostEqual(dset['309ac2fd7f2dcf17'].state.report_txt_path.stat().st_size,
self.template_report_txt_path.stat().st_size,
delta=1000)