def verify_hostname(ssl_sock, server_hostname):
 if isinstance(server_hostname, bytes):
  server_hostname = server_hostname.decode('ascii')
 return _verify(ssl_sock._conn, server_hostname)

def verify_hostname ( ssl_sock , server_hostname ) : if isinstance ( server_hostname , bytes ) : server_hostname = server_hostname . decode ( 'ascii' ) return _verify ( ssl_sock . _conn , server_hostname )
a method nearly compatible with the stdlibs match_hostname .