| 601 | return stat |
| 602 | |
| 603 | def await_ocsp_status(self, domain, timeout=10, ca_file=None): |
| 604 | try_until = time.time() + timeout |
| 605 | while True: |
| 606 | if time.time() >= try_until: |
| 607 | break |
| 608 | stat = self.get_ocsp_status(domain, ca_file=ca_file) |
| 609 | if 'ocsp' in stat and stat['ocsp'] != "no response sent": |
| 610 | return stat |
| 611 | time.sleep(0.1) |
| 612 | raise TimeoutError(f"ocsp respopnse not available: {domain}") |
| 613 | |
| 614 | def create_self_signed_cert(self, spec: CertificateSpec, |
| 615 | valid_from: timedelta = timedelta(days=-1), |