(self)
| 161 | |
| 162 | @property |
| 163 | def keyinfo(self) -> tuple[str, int]: |
| 164 | public_key = self._cert.public_key() |
| 165 | if isinstance(public_key, rsa.RSAPublicKey): |
| 166 | return "RSA", public_key.key_size |
| 167 | if isinstance(public_key, dsa.DSAPublicKey): |
| 168 | return "DSA", public_key.key_size |
| 169 | if isinstance(public_key, ec.EllipticCurvePublicKey): |
| 170 | return f"EC ({public_key.curve.name})", public_key.key_size |
| 171 | return ( |
| 172 | public_key.__class__.__name__.replace("PublicKey", "").replace("_", ""), |
| 173 | getattr(public_key, "key_size", -1), |
| 174 | ) # pragma: no cover |
| 175 | |
| 176 | @property |
| 177 | def cn(self) -> str | None: |
nothing calls this directly
no test coverage detected