Package zeroinstall :: Package support :: Module ssl_match_hostname
[frames] | no frames]

Module ssl_match_hostname

source code

This is a temporary hack to fix an SSL bug in Python versions before 3.2. It is used automatically when you download an HTTPS URL using a Fetcher.

Copyright: Python Software Foundation License: MIT License Downloaded from: http://pypi.python.org/pypi/backports.ssl_match_hostname/

Classes
  CertificateError
Functions
 
match_hostname(cert, hostname)
Verify that *cert* (in decoded format as returned by SSLSocket.getpeercert()) matches the *hostname*.
source code
Function Details

match_hostname(cert, hostname)

source code 

Verify that *cert* (in decoded format as returned by SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 rules are mostly followed, but IP addresses are not accepted for *hostname*.

CertificateError is raised on failure. On success, the function returns nothing.

Parameters:
  • hostname (str)