The ssl.match_hostname function in CPython (aka Python) before 2.7.9 and 3.x before 3.3.3 does not properly handle wildcards in hostnames, which might allow man-in-the-middle attackers to spoof servers via a crafted certificate.
https://hg.python.org/cpython/rev/10d0edadbcdd
https://bugzilla.redhat.com/show_bug.cgi?id=1224999
https://bugs.python.org/issue17997
https://access.redhat.com/errata/RHSA-2016:1166
http://www.securityfocus.com/bid/74707