(self, tdata, tmp_path)
| 67 | assert tstore.get_cert(None, []).cert.cn is None |
| 68 | |
| 69 | def test_chain_file(self, tdata, tmp_path): |
| 70 | cert = Path(tdata.path("mitmproxy/data/confdir/mitmproxy-ca.pem")).read_bytes() |
| 71 | (tmp_path / "mitmproxy-ca.pem").write_bytes(cert) |
| 72 | ca = certs.CertStore.from_store(tmp_path, "mitmproxy", 2048) |
| 73 | assert ca.default_chain_file is None |
| 74 | assert len(ca.default_chain_certs) == 1 |
| 75 | |
| 76 | (tmp_path / "mitmproxy-ca.pem").write_bytes(2 * cert) |
| 77 | ca = certs.CertStore.from_store(tmp_path, "mitmproxy", 2048) |
| 78 | assert ca.default_chain_file == (tmp_path / "mitmproxy-ca.pem") |
| 79 | assert len(ca.default_chain_certs) == 2 |
| 80 | |
| 81 | def test_sans(self, tstore): |
| 82 | c1 = tstore.get_cert("foo.com", [x509.DNSName("*.bar.com")]) |
nothing calls this directly
no test coverage detected