PyDocs

Nav

Networking and Interprocess Communication

get_server_certificate

ssl

function (source) not WASI
  • get_server_certificate(addr, ssl_version=PROTOCOL_TLS_CLIENT, ca_certs=None[, timeout])
Retrieve the certificate from the server at the specified address,
and return it as a PEM-encoded string.
If 'ca_certs' is specified, validate the server cert against it.
If 'ssl_version' is specified, use it in the connection attempt.
If 'timeout' is specified, use it in the connection attempt.
Changed in 3.3, 3.5, 3.10
  • 3.3: This function is now IPv6-compatible.
  • 3.5: The default ssl_version is changed from PROTOCOL_SSLv3 to PROTOCOL_TLS for maximum compatibility with modern servers.
  • 3.10: The timeout parameter was added.
0 Examples
No examples for ssl/get_server_certificate.
See Also
No see-alsos for ssl/get_server_certificate
0 Notes
No notes for get_server_certificate