diff --git a/mitmproxy/certs.py b/mitmproxy/certs.py index be801b92e..7977d464a 100644 --- a/mitmproxy/certs.py +++ b/mitmproxy/certs.py @@ -49,6 +49,9 @@ class Cert(serializable.Serializable): def __eq__(self, other): return self.fingerprint() == other.fingerprint() + def __repr__(self): + return f"" + @classmethod def from_state(cls, state): return cls.from_pem(state) diff --git a/test/mitmproxy/test_certs.py b/test/mitmproxy/test_certs.py index e3036e839..53658f2ae 100644 --- a/test/mitmproxy/test_certs.py +++ b/test/mitmproxy/test_certs.py @@ -180,6 +180,7 @@ class TestCert: assert c2.issuer assert c2.to_pem() assert c2.has_expired() is not None + assert repr(c2) == "" assert c1 != c2