MCPcopy Create free account
hub / github.com/apache/httpd / check_md

Method check_md

test/modules/md/md_env.py:304–327  ·  view source on GitHub ↗
(self, domain, md=None, state=-1, ca=None, protocol=None, agreement=None, contacts=None)

Source from the content-addressed store, hash-verified

302 return os.listdir(os.path.join(self._store_dir, 'accounts'))
303
304 def check_md(self, domain, md=None, state=-1, ca=None, protocol=None, agreement=None, contacts=None):
305 domains = None
306 if isinstance(domain, list):
307 domains = domain
308 domain = domains[0]
309 if md:
310 domain = md
311 path = self.store_domain_file(domain, 'md.json')
312 with open(path) as f:
313 md = json.load(f)
314 assert md
315 if domains:
316 assert md['domains'] == domains
317 if state >= 0:
318 assert md['state'] == state
319 if ca:
320 assert len(md['ca']['urls']) == 1
321 assert md['ca']['urls'][0] == ca
322 if protocol:
323 assert md['ca']['proto'] == protocol
324 if agreement:
325 assert md['ca']['agreement'] == agreement
326 if contacts:
327 assert md['contacts'] == contacts
328
329 def pkey_fname(self, pkeyspec=None):
330 if pkeyspec and not re.match(r'^rsa( ?\d+)?$', pkeyspec.lower()):

Callers 15

test_md_741_002Method · 0.80
test_md_702_001Method · 0.80
test_md_702_002Method · 0.80
test_md_702_003Method · 0.80
test_md_702_004Method · 0.80
test_md_702_005Method · 0.80
test_md_702_006Method · 0.80
test_md_702_010Method · 0.80
test_md_702_011Method · 0.80
test_md_702_030Method · 0.80
test_md_702_031Method · 0.80
test_md_702_032Method · 0.80

Calls 1

store_domain_fileMethod · 0.95

Tested by 15

test_md_741_002Method · 0.64
test_md_702_001Method · 0.64
test_md_702_002Method · 0.64
test_md_702_003Method · 0.64
test_md_702_004Method · 0.64
test_md_702_005Method · 0.64
test_md_702_006Method · 0.64
test_md_702_010Method · 0.64
test_md_702_011Method · 0.64
test_md_702_030Method · 0.64
test_md_702_031Method · 0.64
test_md_702_032Method · 0.64