diff options
| author | J08nY | 2022-07-17 15:04:14 +0200 |
|---|---|---|
| committer | J08nY | 2022-07-17 15:04:14 +0200 |
| commit | 01a7b9de34851205fecdcfa22befce094e983b3a (patch) | |
| tree | 10a5f44b988287ea998d0b2cf577e6551c3c0243 /sec_certs/sample/fips_algorithm.py | |
| parent | e0a2a1420cf3c21f0522b4de6db28446b19bbb69 (diff) | |
| download | sec-certs-01a7b9de34851205fecdcfa22befce094e983b3a.tar.gz sec-certs-01a7b9de34851205fecdcfa22befce094e983b3a.tar.zst sec-certs-01a7b9de34851205fecdcfa22befce094e983b3a.zip | |
Fix FIPSalgo serialization.
Diffstat (limited to 'sec_certs/sample/fips_algorithm.py')
| -rw-r--r-- | sec_certs/sample/fips_algorithm.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sec_certs/sample/fips_algorithm.py b/sec_certs/sample/fips_algorithm.py index fcfd42b6..ea74cd33 100644 --- a/sec_certs/sample/fips_algorithm.py +++ b/sec_certs/sample/fips_algorithm.py @@ -1,20 +1,21 @@ -from dataclasses import dataclass +from dataclasses import dataclass, field +from typing import Optional from sec_certs import constants from sec_certs.serialization.json import ComplexSerializableType -@dataclass(eq=True) +@dataclass(eq=True, order=True, frozen=True) class FIPSAlgorithm(ComplexSerializableType): """ Data structure for algorithm of `FIPSCertificate` """ - cert_id: int - vendor: str - implementation: str - algorithm_type: str - date: str + cert_id: str + algorithm_type: Optional[str] = field(default=None) + vendor: Optional[str] = field(default=None) + implementation: Optional[str] = field(default=None) + date: Optional[str] = field(default=None) @property def dgst(self) -> str: |
