(ssl_socket: SSLTransport)
| 83 | |
| 84 | |
| 85 | def validate_peercert(ssl_socket: SSLTransport) -> None: |
| 86 | binary_cert = ssl_socket.getpeercert(binary_form=True) |
| 87 | assert type(binary_cert) is bytes |
| 88 | assert len(binary_cert) > 0 |
| 89 | |
| 90 | cert = ssl_socket.getpeercert() |
| 91 | assert type(cert) is dict |
| 92 | assert "serialNumber" in cert |
| 93 | assert cert["serialNumber"] != "" |
| 94 | |
| 95 | |
| 96 | class SingleTLSLayerTestCase(SocketDummyServerTestCase): |
no test coverage detected