Coverage for frappe_manager / ssl_manager / ssl_certificate_service.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-07-02 18:35 +0530

1from pathlib import Path 

2from typing import TYPE_CHECKING, Protocol, runtime_checkable 

3 

4if TYPE_CHECKING: 

5 from frappe_manager.ssl_manager.certificate import SSLCertificate 

6 

7 

8@runtime_checkable 

9class SSLCertificateService(Protocol): 

10 """ 

11 Protocol for SSL certificate service implementations. 

12 

13 All certificate services generate individual certificates (one domain per certificate). 

14 SAN certificates are deprecated. 

15 """ 

16 

17 root_dir: Path 

18 

19 def renew_certificate(self, certificate: "SSLCertificate", dry_run: bool = False) -> bool: ... 

20 

21 def remove_certificate(self, certificate: "SSLCertificate") -> bool: ... 

22 

23 def generate_certificate(self, certificate: "SSLCertificate", dry_run: bool = False) -> tuple[Path, Path]: 

24 """Generate individual certificate for a single domain (no SANs).""" 

25 ...