aboutsummaryrefslogtreecommitdiffhomepage
path: root/notebooks
diff options
context:
space:
mode:
authorAdam Janovsky2022-12-10 09:01:55 +0100
committerAdam Janovsky2022-12-10 09:01:55 +0100
commit53a709e7e16e1ee07e0f4baeb270fcc1d41bb811 (patch)
tree1abe1837e9198d165e1bc724190e3488403b3642 /notebooks
parent1c43b173667b2aee8ac64d423b1f46d774643eb3 (diff)
downloadsec-certs-53a709e7e16e1ee07e0f4baeb270fcc1d41bb811.tar.gz
sec-certs-53a709e7e16e1ee07e0f4baeb270fcc1d41bb811.tar.zst
sec-certs-53a709e7e16e1ee07e0f4baeb270fcc1d41bb811.zip
Rename CommonCriteriaCert -> CCCertificate
Diffstat (limited to 'notebooks')
-rw-r--r--notebooks/examples/common_criteria.ipynb17
1 files changed, 10 insertions, 7 deletions
diff --git a/notebooks/examples/common_criteria.ipynb b/notebooks/examples/common_criteria.ipynb
index 8adb1656..fe53be27 100644
--- a/notebooks/examples/common_criteria.ipynb
+++ b/notebooks/examples/common_criteria.ipynb
@@ -1,12 +1,13 @@
{
"cells": [
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Common Criteria example\n",
"\n",
- "This notebook illustrates basic functionality with the `CCDataset` class that holds Common Criteria dataset and of its sample `CommonCriteriaCert`.\n",
+ "This notebook illustrates basic functionality with the `CCDataset` class that holds Common Criteria dataset and of its sample `CCCertificate`.\n",
"\n",
"Note that there exists a front end to this functionality at [seccerts.org/cc](https://seccerts.org/cc/). Before reinventing the wheel, it's good idea to check our web. Maybe you don't even need to run the code, but just use our web instead. "
]
@@ -17,8 +18,8 @@
"metadata": {},
"outputs": [],
"source": [
- "from sec_certs.dataset.cc import CCDataset\n",
- "from sec_certs.sample.cc import CommonCriteriaCert\n",
+ "from sec_certs.dataset import CCDataset\n",
+ "from sec_certs.sample import CCCertificate\n",
"import pandas as pd"
]
},
@@ -77,12 +78,13 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Simple dataset manipulation\n",
"\n",
- "The certificates of the dataset are stored in a dictionary that maps certificate's primary key (we call it `dgst`) to the `CommonCriteriaCert` object. The primary key of the certificate is simply a hash of the attributes that make the certificate unique.\n",
+ "The certificates of the dataset are stored in a dictionary that maps certificate's primary key (we call it `dgst`) to the `CCCertificate` object. The primary key of the certificate is simply a hash of the attributes that make the certificate unique.\n",
"\n",
"You can iterate over the dataset which is handy when selecting some subset of certificates."
]
@@ -123,12 +125,13 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Dissect single certificate\n",
"\n",
- "The `CommonCriteriaCert` is basically a data structure that holds all the data we keep about a certificate. Other classes (`CCDataset` or `model` package members) are used to transform and process the certificates. You can see all its attributes at [API docs](https://seccerts.org/docs/api/sample.html)."
+ "The `CCCertificate` is basically a data structure that holds all the data we keep about a certificate. Other classes (`CCDataset` or `model` package members) are used to transform and process the certificates. You can see all its attributes at [API docs](https://seccerts.org/docs/api/sample.html)."
]
},
{
@@ -138,7 +141,7 @@
"outputs": [],
"source": [
"# Select a certificate and print some attributes\n",
- "cert: CommonCriteriaCert = dset[\"bad93fb821395db2\"]\n",
+ "cert: CCCertificate = dset[\"bad93fb821395db2\"]\n",
"print(f\"{cert.name=}\")\n",
"print(f\"{cert.heuristics.cpe_matches=}\")\n",
"print(f\"{cert.heuristics.report_references.directly_referencing=}\")"
@@ -240,7 +243,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.13"
+ "version": "3.8.13 (default, Jul 27 2022, 12:09:23) \n[Clang 13.1.6 (clang-1316.0.21.2.3)]"
},
"orig_nbformat": 4,
"vscode": {