def get_server_certificate(addr, ssl_version=DEF_SSL, ca_certs=None):

    host, port = addr
    if (ca_certs is not None):
        cert_reqs = CERT_REQUIRED
    else:
        cert_reqs = CERT_NONE
    s = create_connection(addr)
    s = wrap_socket(s, ssl_version=ssl_version,
                    cert_reqs=cert_reqs, ca_certs=ca_certs)
    dercert = s.getpeercert(True)
    s.close()
    return DER_cert_to_PEM_cert(dercert)
Retrieve the certificate from the server at the specified address,
dataset/ETHPy150Open veegee/guv/guv/green/_ssl33.py/get_server_certificate