%global module_name backports.ssl_match_hostname Name: python-backports-ssl_match_hostname Version: 3.5.0.1 Release: 4%{?dist} Summary: The ssl.match_hostname() function from Python 3 License: Python URL: https://bitbucket.org/brandon/backports.ssl_match_hostname Source0: http://pypi.python.org/packages/source/b/%{module_name}/%{module_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel Requires: python-backports %if 0%{?fedora} || 0%{?rhel} && 0%{?rhel} >= 7 # python-ipaddress has yet to be built for epel6. When it is we can Require # this everywhere Requires: python-ipaddress %endif Provides: python2-backports-ssl_match_hostname %description The Secure Sockets layer is only actually secure if you check the hostname in the certificate returned by the server to which you are connecting, and verify that it matches to hostname that you are trying to reach. But the matching logic, defined in RFC2818, can be a bit tricky to implement on your own. So the ssl package in the Standard Library of Python 3.2 now includes a match_hostname() function for performing this check instead of requiring every application to implement the check separately. This backport brings match_hostname() to users of earlier versions of Python. The actual code is only slightly modified from Python 3.5. %prep %setup -qn %{module_name}-%{version} cp backports/ssl_match_hostname/README.txt ./ cp backports/ssl_match_hostname/LICENSE.txt ./ %build python2 setup.py build %install python2 setup.py install --skip-build --root %{buildroot} rm -f %{buildroot}%{python_sitelib}/backports/__init__.py* %files %{!?_licensedir:%global license %%doc} %license LICENSE.txt %doc README.txt %{python_sitelib}/backports/ssl_match_hostname/ %{python_sitelib}/backports.ssl_match_hostname-%{version}-*egg* %changelog * Sat Feb 11 2017 Fedora Release Engineering - 3.5.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Jul 19 2016 Fedora Release Engineering - 3.5.0.1-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 3.5.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sat Dec 19 2015 Toshio Kuratomi - - 3.5.0.1-1 - New upstream release - Brings IP Address ServerAltName handling - Better fix for namespace issues that doesn't involve setuptools. * Thu Oct 15 2015 David Sommerseth - 3.4.0.2-6 - Further fix namespace declaration, to be buildable on more recent Fedora 23 * Thu Jun 18 2015 Fedora Release Engineering - 3.4.0.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Sep 17 2014 Ralph Bean - 3.4.0.2-4 - Apply upstream patch to fix python namespace handling. - Narrow down directory ownership to just the ssl_match_hostname module. * Thu Jul 31 2014 Tom Callaway - 3.4.0.2-3 - fix license handling * Sat Jun 07 2014 Fedora Release Engineering - 3.4.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Oct 27 2013 Toshio Kuratomi - 3.4.0.2-1 - Update to upstream 3.4.0.2 for a security fix - http://bugs.python.org/issue17997 * Mon Sep 02 2013 Ian Weller - 3.4.0.1-1 - Update to upstream 3.4.0.1 * Mon Aug 19 2013 Ian Weller - 3.2-0.5.a3 - Use python-backports instead of providing backports/__init__.py * Sun Aug 04 2013 Fedora Release Engineering - 3.2-0.4.a3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Mon May 20 2013 Toshio Kuratomi - 3.2-0.3.a3 - Add patch for CVE 2013-2099 https://bugzilla.redhat.com/show_bug.cgi?id=963260 * Tue Feb 05 2013 Ian Weller - 3.2-0.2.a3 - Fix Python issue 12000 * Fri Dec 07 2012 Ian Weller - 3.2-0.1.a3 - Initial package build