| from abc import ABC |
| from typing import List, Tuple, Optional |
| from OpenSSL import crypto |
| |
| |
| class AbstractCertificate(ABC): |
| """ |
| A class representing a abstract certificate. |
| """ |
| |
| @property |
| def cert(self) -> Tuple[crypto.PKey, crypto.X509]: |
| pass |
| |
| @staticmethod |
| def load(file_path: str) -> 'AbstractCertificate': |
| pass |
| |
| @staticmethod |
| def create(subject: List[Tuple[str, str]], issuer: Optional['AbstractCertificate'] = None): |
| pass |
| |
| def save(self, path_2_file: str) -> None: |
| pass |
| |
| def verify(self) -> bool: |
| pass |
| |
| def verify_from_archive(self, file_2_archive: str) -> bool: |
| pass |
| |
| def save_archive(self, path_2_file: str) -> None: |
| pass |
| |
| def sign(self, path_2_file: str) -> bytes: |
| pass |