aboutsummaryrefslogtreecommitdiffhomepage
path: root/sec_certs/sample/common_criteria.py
diff options
context:
space:
mode:
authoradamjanovsky2022-06-22 20:40:57 +0200
committerGitHub2022-06-22 20:40:57 +0200
commit81d5a3e023ac30b63fb42f99588166d5052b5492 (patch)
tree22669e4f0cc8db87856f8327c2f9bd4316324bdc /sec_certs/sample/common_criteria.py
parent52ead1014c58a26509e5992089d735b199293384 (diff)
parenteca01edd4cc9f62ddae9bc400cea9a9f0ac51cd9 (diff)
downloadsec-certs-0.1.0.tar.gz
sec-certs-0.1.0.tar.zst
sec-certs-0.1.0.zip
Merge pull request #238 from crocs-muni:fix/document-hashes-constructors0.1.0
fix CommonCriteriaCert.InternalState constructor
Diffstat (limited to 'sec_certs/sample/common_criteria.py')
-rw-r--r--sec_certs/sample/common_criteria.py30
1 files changed, 18 insertions, 12 deletions
diff --git a/sec_certs/sample/common_criteria.py b/sec_certs/sample/common_criteria.py
index ac4163f4..ca935c02 100644
--- a/sec_certs/sample/common_criteria.py
+++ b/sec_certs/sample/common_criteria.py
@@ -95,30 +95,32 @@ class CommonCriteriaCert(
report_convert_ok: bool
st_extract_ok: bool
report_extract_ok: bool
+
errors: List[str]
- st_pdf_path: Path
- report_pdf_path: Path
st_pdf_hash: Optional[str]
report_pdf_hash: Optional[str]
- st_txt_path: Path
- report_txt_path: Path
st_txt_hash: Optional[str]
report_txt_hash: Optional[str]
+ st_pdf_path: Path
+ report_pdf_path: Path
+ st_txt_path: Path
+ report_txt_path: Path
+
def __init__(
self,
st_download_ok: bool = True,
report_download_ok: bool = True,
- st_pdf_hash: Optional[str] = None,
- report_pdf_hash: Optional[str] = None,
st_convert_ok: bool = True,
report_convert_ok: bool = True,
- st_txt_hash: Optional[str] = None,
- report_txt_hash: Optional[str] = None,
st_extract_ok: bool = True,
report_extract_ok: bool = True,
errors: Optional[List[str]] = None,
+ st_pdf_hash: Optional[str] = None,
+ report_pdf_hash: Optional[str] = None,
+ st_txt_hash: Optional[str] = None,
+ report_txt_hash: Optional[str] = None,
):
self.st_download_ok = st_download_ok
self.report_download_ok = report_download_ok
@@ -127,21 +129,25 @@ class CommonCriteriaCert(
self.st_extract_ok = st_extract_ok
self.report_extract_ok = report_extract_ok
self.errors = errors if errors else []
+ self.st_pdf_hash = st_pdf_hash
+ self.report_pdf_hash = report_pdf_hash
+ self.st_txt_hash = st_txt_hash
+ self.report_txt_hash = report_txt_hash
@property
def serialized_attributes(self) -> List[str]:
return [
"st_download_ok",
"report_download_ok",
- "st_pdf_hash",
- "report_pdf_hash",
"st_convert_ok",
"report_convert_ok",
- "st_txt_hash",
- "report_txt_hash",
"st_extract_ok",
"report_extract_ok",
"errors",
+ "st_pdf_hash",
+ "report_pdf_hash",
+ "st_txt_hash",
+ "report_txt_hash",
]
def report_is_ok_to_download(self, fresh: bool = True) -> bool: