certapi 1.1.7__tar.gz → 1.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {certapi-1.1.7/src/certapi.egg-info → certapi-1.1.8}/PKG-INFO +1 -1
- {certapi-1.1.7 → certapi-1.1.8}/setup.py +1 -1
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/domain_batching.py +1 -15
- {certapi-1.1.7 → certapi-1.1.8/src/certapi.egg-info}/PKG-INFO +1 -1
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_acme_cert_manager_batching.py +5 -15
- {certapi-1.1.7 → certapi-1.1.8}/MANIFEST.in +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/README.md +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/pyproject.toml +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/setup.cfg +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/acme/Acme.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/acme/AcmeError.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/acme/Challenge.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/acme/Order.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/acme/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/acme/http.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/ChallengeSolver.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/FileSystemChallengeSolver.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/InmemoryChallengeSolver.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/dns/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/dns/cloudflare/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/dns/cloudflare/cloudflare_challenge_solver.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/dns/cloudflare/cloudflare_client.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/dns/digitalocean/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/dns/digitalocean/digitalocean_challenge_solver.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/dns/digitalocean/digitalocean_client.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/cli.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/client/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/client/cert_manager_client.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/client/renewal_manager.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/crypto/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/crypto/crypto.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/crypto/crypto_classes.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/errors.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/http/HttpClientBase.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/http/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/http/types.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/issuers/AcmeCertIssuer.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/issuers/SelfCertIssuer.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/issuers/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/issuers/abstract_certissuer.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/keystore/FileSystemKeyStore.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/keystore/KeyStore.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/keystore/PostgresqlKeyStore.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/keystore/RemoteKeyStore.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/keystore/SqliteKeyStore.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/keystore/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/manager/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/manager/acme_cert_manager.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/server/__init__.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/server/api.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/server/cert_api.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/server/key_api.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/util.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi/utils.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi.egg-info/SOURCES.txt +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi.egg-info/dependency_links.txt +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi.egg-info/entry_points.txt +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi.egg-info/requires.txt +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/src/certapi.egg-info/top_level.txt +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_acme_error_handling.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_cert_issuer_generic.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_certs_with_key_types.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_cli.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_domain_batching_boulder_cases.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_http_error_handling.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_keystores.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_obtain_interface.py +0 -0
- {certapi-1.1.7 → certapi-1.1.8}/tests/test_renewal_manager.py +0 -0
|
@@ -36,19 +36,6 @@ def would_trigger(labels: list[str], blocked: set[str]) -> bool:
|
|
|
36
36
|
return False
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
def split_domain_to_safe_groups(domain: str, blocked_labels: list[str] | None = None) -> list[list[str]]:
|
|
40
|
-
"""
|
|
41
|
-
Split labels into contiguous chunks of at most 3 labels.
|
|
42
|
-
This mirrors the "3 labels are always safe for this specific LE heuristic"
|
|
43
|
-
invariant, but these label groups are not used directly as issuance domains.
|
|
44
|
-
"""
|
|
45
|
-
labels = _split_labels(domain)
|
|
46
|
-
n = len(labels)
|
|
47
|
-
if n == 0:
|
|
48
|
-
return []
|
|
49
|
-
return [labels[i : i + 3] for i in range(0, n, 3)]
|
|
50
|
-
|
|
51
|
-
|
|
52
39
|
def create_safe_domain_batches(domains: list[str], blocked_labels: list[str] | None = None) -> list[list[str]]:
|
|
53
40
|
"""
|
|
54
41
|
Create compact issuance batches without any blocked-label list assumptions.
|
|
@@ -74,8 +61,7 @@ def create_safe_domain_batches(domains: list[str], blocked_labels: list[str] | N
|
|
|
74
61
|
compact_batch.append(normalized)
|
|
75
62
|
continue
|
|
76
63
|
|
|
77
|
-
|
|
78
|
-
singleton_batches.append([".".join(labels[i : i + 3])])
|
|
64
|
+
singleton_batches.append([normalized])
|
|
79
65
|
|
|
80
66
|
if compact_batch:
|
|
81
67
|
return [compact_batch, *singleton_batches]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from certapi.domain_batching import create_safe_domain_batches,
|
|
1
|
+
from certapi.domain_batching import create_safe_domain_batches, would_trigger
|
|
2
2
|
from certapi.manager.acme_cert_manager import AcmeCertManager
|
|
3
3
|
|
|
4
4
|
|
|
@@ -42,14 +42,6 @@ def test_would_trigger_exact_rule():
|
|
|
42
42
|
assert would_trigger(["x", "abc", "abc", "example", "com"], blocked) is True
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
def test_split_domain_to_safe_groups_greedy():
|
|
46
|
-
groups = split_domain_to_safe_groups(
|
|
47
|
-
"x.abc.def.ghi.example.com",
|
|
48
|
-
blocked_labels=["abc", "def", "ghi"],
|
|
49
|
-
)
|
|
50
|
-
assert groups == [["x", "abc", "def"], ["ghi", "example", "com"]]
|
|
51
|
-
|
|
52
|
-
|
|
53
45
|
def test_create_safe_domain_batches_compacts_non_triggering_domains():
|
|
54
46
|
domains = ["x.example.com", "y.example.com", "y.example.com"]
|
|
55
47
|
assert create_safe_domain_batches(domains) == [["x.example.com", "y.example.com"]]
|
|
@@ -91,10 +83,9 @@ def test_issue_certificate_in_batches_uses_custom_batch_generator():
|
|
|
91
83
|
|
|
92
84
|
assert issuer.calls == [
|
|
93
85
|
["root.example.com"],
|
|
94
|
-
["x.abc.def"],
|
|
95
|
-
["ghi.example.com"],
|
|
86
|
+
["x.abc.def.ghi.example.com"],
|
|
96
87
|
]
|
|
97
|
-
assert len(response.issued) ==
|
|
88
|
+
assert len(response.issued) == 2
|
|
98
89
|
assert [issued.domains for issued in response.issued] == issuer.calls
|
|
99
90
|
|
|
100
91
|
|
|
@@ -112,10 +103,9 @@ def test_obtain_batch_domains_uses_safe_batches():
|
|
|
112
103
|
|
|
113
104
|
assert issuer.calls == [
|
|
114
105
|
["root.example.com"],
|
|
115
|
-
["x.abc.def"],
|
|
116
|
-
["ghi.example.com"],
|
|
106
|
+
["x.abc.def.ghi.example.com"],
|
|
117
107
|
]
|
|
118
|
-
assert len(response.issued) ==
|
|
108
|
+
assert len(response.issued) == 2
|
|
119
109
|
|
|
120
110
|
|
|
121
111
|
def test_issue_certificate_self_verify_false_skips_strict_solver_check():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/dns/cloudflare/cloudflare_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certapi-1.1.7 → certapi-1.1.8}/src/certapi/challenge_solver/dns/digitalocean/digitalocean_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|