(self)
| 135 | return self.cert.get_pubkey().bits() |
| 136 | |
| 137 | def get_san_list(self): |
| 138 | text = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_TEXT, self.cert).decode("utf-8") |
| 139 | m = re.search(r"X509v3 Subject Alternative Name:(\s+critical)?\s*(.*)", text) |
| 140 | sans_list = [] |
| 141 | if m: |
| 142 | sans_list = m.group(2).split(",") |
| 143 | |
| 144 | def _strip_prefix(s): |
| 145 | return s.split(":")[1] if s.strip().startswith("DNS:") else s.strip() |
| 146 | return list(map(_strip_prefix, sans_list)) |
| 147 | |
| 148 | def get_must_staple(self): |
| 149 | text = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_TEXT, self.cert).decode("utf-8") |
no outgoing calls