get_peer_x509() checked only whether the session was NULL and then built a WolfSSLX509, whose __init__ called wolfSSL_get_peer_certificate() and raised SSLError on NULL. On a valid connection where the peer presented no certificate (e.g. a server not requesting a client cert), this raised instead of returning None as the stdlib ssl getpeercert() contract requires. Fetch the certificate in get_peer_x509(), return None when it is NULL, and have WolfSSLX509 wrap the already-obtained pointer. |
||
|---|---|---|
| .. | ||
| conftest.py | ||
| test_client.py | ||
| test_client_example.py | ||
| test_context.py | ||
| test_dtls_handshake_once.py | ||
| test_dtls_server_example.py | ||
| test_getpeercert.py | ||
| test_io_error_mapping.py | ||
| test_methods.py | ||
| test_write_bytes.py | ||
| wolfssltestserver.py | ||