Heray-Was-Here
Server : Apache
System : Linux hybrid3195.ca.ns.planethoster.net 3.10.0-1160.119.1.el7.tuxcare.els19.x86_64 #1 SMP Mon Mar 31 17:29:00 UTC 2025 x86_64
User : alliancerealtynb ( 1004)
PHP Version : 7.4.33
Disable Function : noop
Directory :  /opt/alt/python35/lib/python3.5/site-packages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python35/lib/python3.5/site-packages/idna_ssl.py
import ssl

import idna

__version__ = '1.0.1'

real_match_hostname = ssl.match_hostname


def patched_match_hostname(cert, hostname):
    try:
        hostname = idna.encode(hostname, uts46=True).decode('ascii')
    except UnicodeError:
        hostname = hostname.encode('idna').decode('ascii')

    return real_match_hostname(cert, hostname)


def patch_match_hostname():
    if hasattr(ssl.match_hostname, 'patched'):
        return

    ssl.match_hostname = patched_match_hostname
    ssl.match_hostname.patched = True


def reset_match_hostname():
    if not hasattr(ssl.match_hostname, 'patched'):
        return

    ssl.match_hostname = real_match_hostname

Hry