| 545 | time.sleep(0.1) |
| 546 | |
| 547 | def check_file_permissions(self, domain): |
| 548 | dpath = os.path.join(self.store_dir, 'domains', domain) |
| 549 | assert os.path.isdir(dpath) |
| 550 | md = json.load(open(os.path.join(dpath, 'md.json'))) |
| 551 | assert md |
| 552 | acct = md['ca']['account'] |
| 553 | assert acct |
| 554 | self.check_file_access(self.path_store_json(), 0o600) |
| 555 | # domains |
| 556 | self.check_file_access(self.store_domains(), 0o700) |
| 557 | self.check_file_access(os.path.join(self.store_domains(), domain), 0o700) |
| 558 | self.check_file_access(self.store_domain_file(domain, 'privkey.pem'), 0o600) |
| 559 | self.check_file_access(self.store_domain_file(domain, 'pubcert.pem'), 0o600) |
| 560 | self.check_file_access(self.store_domain_file(domain, 'md.json'), 0o600) |
| 561 | # archive |
| 562 | self.check_file_access(self.store_archived_file(domain, 1, 'md.json'), 0o600) |
| 563 | # accounts |
| 564 | self.check_file_access(os.path.join(self._store_dir, 'accounts'), 0o755) |
| 565 | self.check_file_access(os.path.join(self._store_dir, 'accounts', acct), 0o755) |
| 566 | self.check_file_access(self.path_account(acct), 0o644) |
| 567 | self.check_file_access(self.path_account_key(acct), 0o644) |
| 568 | # staging |
| 569 | self.check_file_access(self.store_stagings(), 0o755) |
| 570 | |
| 571 | def get_ocsp_status(self, domain, proto=None, cipher=None, ca_file=None): |
| 572 | stat = {} |