certapi 0.2.0__tar.gz → 0.2.1__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.1}/PKG-INFO +1 -1
- {certapi-0.2.0 → certapi-0.2.1}/setup.py +1 -1
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/certauthority.py +4 -1
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/db.py +6 -3
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi.egg-info/PKG-INFO +1 -1
- {certapi-0.2.0 → certapi-0.2.1}/MANIFEST.in +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/README.md +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/pyproject.toml +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/setup.cfg +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/Acme.py +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/__init__.py +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/challenge.py +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/cloudflare_challenge_store.py +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/cloudflare_client.py +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/crypto.py +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/crypto_classes.py +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/custom_certauthority.py +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi/util.py +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi.egg-info/SOURCES.txt +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi.egg-info/dependency_links.txt +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/src/certapi.egg-info/requires.txt +0 -0
- {certapi-0.2.0 → certapi-0.2.1}/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()
|
|
@@ -192,6 +192,9 @@ class FilesystemKeyStore(KeyStore):
|
|
|
192
192
|
with open(key_path, "rb") as f:
|
|
193
193
|
key_content = f.read()
|
|
194
194
|
for domain in domains:
|
|
195
|
+
if name.endswith(".selfsigned"):
|
|
196
|
+
domain = domain + ".selfsigned"
|
|
197
|
+
|
|
195
198
|
if domain != private_key_id:
|
|
196
199
|
with open(os.path.join(self.keys_dir, f"{domain}.key"), "wb") as f:
|
|
197
200
|
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
|