certapi 0.2.0__tar.gz → 0.2.2__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-0.2.0 → certapi-0.2.2}/PKG-INFO +1 -1
- {certapi-0.2.0 → certapi-0.2.2}/setup.py +1 -1
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/certauthority.py +4 -1
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/db.py +7 -3
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi.egg-info/PKG-INFO +1 -1
- {certapi-0.2.0 → certapi-0.2.2}/MANIFEST.in +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/README.md +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/pyproject.toml +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/setup.cfg +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/Acme.py +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/__init__.py +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/challenge.py +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/cloudflare_challenge_store.py +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/cloudflare_client.py +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/crypto.py +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/crypto_classes.py +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/custom_certauthority.py +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi/util.py +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi.egg-info/SOURCES.txt +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi.egg-info/dependency_links.txt +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi.egg-info/requires.txt +0 -0
- {certapi-0.2.0 → certapi-0.2.2}/src/certapi.egg-info/top_level.txt +0 -0
|
@@ -30,11 +30,13 @@ class CertAuthority:
|
|
|
30
30
|
key_store: KeyStore,
|
|
31
31
|
acme_url=None,
|
|
32
32
|
dns_stores: List[challenge.ChallengeStore] = None,
|
|
33
|
+
self_verify_challenge=False,
|
|
33
34
|
):
|
|
34
35
|
self.acme = Acme(key_store.account_key, url=acme_url)
|
|
35
36
|
self.key_store = key_store
|
|
36
37
|
self.challengesStore: challenge.ChallengeStore = challenge_store
|
|
37
38
|
self.dns_stores = dns_stores if dns_stores is not None else []
|
|
39
|
+
self.self_verify_challenge = self_verify_challenge
|
|
38
40
|
|
|
39
41
|
def setup(self):
|
|
40
42
|
self.acme.setup()
|
|
@@ -93,7 +95,8 @@ class CertAuthority:
|
|
|
93
95
|
time.sleep(10)
|
|
94
96
|
|
|
95
97
|
for c in challenges:
|
|
96
|
-
|
|
98
|
+
if self.self_verify_challenge and not has_wildcard:
|
|
99
|
+
c.self_verify()
|
|
97
100
|
c.verify(dns=has_wildcard)
|
|
98
101
|
end = time.time() + 60 # Increase overall timeout
|
|
99
102
|
source: List[Challenge] = [x for x in challenges]
|
|
@@ -141,9 +141,9 @@ class SqliteKeyStore(KeyStore):
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
class FilesystemKeyStore(KeyStore):
|
|
144
|
-
def __init__(self, base_dir="."):
|
|
145
|
-
self.keys_dir = os.path.join(base_dir,
|
|
146
|
-
self.certs_dir = os.path.join(base_dir,
|
|
144
|
+
def __init__(self, base_dir=".", keys_dir_name="keys", certs_dir_name="certs"):
|
|
145
|
+
self.keys_dir = os.path.join(base_dir, keys_dir_name)
|
|
146
|
+
self.certs_dir = os.path.join(base_dir, certs_dir_name)
|
|
147
147
|
os.makedirs(self.keys_dir, exist_ok=True)
|
|
148
148
|
os.makedirs(self.certs_dir, exist_ok=True)
|
|
149
149
|
self._init_account_key()
|
|
@@ -191,7 +191,11 @@ class FilesystemKeyStore(KeyStore):
|
|
|
191
191
|
key_path = os.path.join(self.keys_dir, f"{private_key_id}.key")
|
|
192
192
|
with open(key_path, "rb") as f:
|
|
193
193
|
key_content = f.read()
|
|
194
|
+
|
|
194
195
|
for domain in domains:
|
|
196
|
+
if name is not None and name.endswith(".selfsigned"):
|
|
197
|
+
domain = domain + ".selfsigned"
|
|
198
|
+
|
|
195
199
|
if domain != private_key_id:
|
|
196
200
|
with open(os.path.join(self.keys_dir, f"{domain}.key"), "wb") as f:
|
|
197
201
|
f.write(key_content)
|
|
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
|