1 %define module_name backports.ssl_match_hostname
2 Summary: The ssl.match_hostname() function from Python 3
3 Summary(pl.UTF-8): Funkcja ssl.match_hostname() z Pythona 3
4 Name: python-backports-ssl_match_hostname
8 Group: Libraries/Python
9 # Source0Download: https://pypi.python.org/simple/backports.ssl-match-hostname/
10 Source0: https://pypi.python.org/packages/source/b/backports.ssl_match_hostname/%{module_name}-%{version}.tar.gz
11 # Source0-md5: c03fc5e2c7b3da46b81acf5cbacfe1e6
12 URL: https://bitbucket.org/brandon/backports.ssl_match_hostname
13 BuildRequires: python-modules >= 1:2.4
14 BuildRequires: rpm-pythonprov
15 BuildRequires: rpmbuild(macros) >= 1.714
16 Requires: python-backports
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 The Secure Sockets layer is only actually secure if you check the
22 hostname in the certificate returned by the server to which you are
23 connecting, and verify that it matches to hostname that you are trying
26 But the matching logic, defined in RFC2818, can be a bit tricky to
27 implement on your own. So the ssl package in the Standard Library of
28 Python 3.2 now includes a match_hostname() function for performing
29 this check instead of requiring every application to implement the
32 This backport brings match_hostname() to users of earlier versions of
33 Python. The actual code inside comes verbatim from Python 3.2.
35 %description -l pl.UTF-8
36 Warstwa bezpiecznych gniazd (Secure Sockets Layer) jest naprawdę
37 bezpieczna tylko jeśli sprawdza się nazwę hosta w certyfikacie
38 zwracanym przez serwer, z którym się łączy i weryfikuje, że zgadza się
39 ona z pożądaną nazwą hosta.
41 Ale logika dopasowująca, zdefiniowana w RFC2818, może być nietrywialna
42 do zaimplementowania samemu. Dlatego też pakiet ssl biblioteki
43 standardowej Pythona 3.2 zawiera teraz funkcję match_hostname(), która
44 wykonuje to sprawdzenie zamiast wymagania implementacji w każdej
47 Ten backport udostępnia match_hostname() użytkownikom wcześniejszych
48 wersji Pythona. Sam kod pochodzi bez zmian z Pythona 3.2.
51 %setup -qn %{module_name}-%{version}
53 %{__mv} backports/ssl_match_hostname/*.txt .
54 touch backports/ssl_match_hostname/README.txt
60 rm -rf $RPM_BUILD_ROOT
65 rm -rf $RPM_BUILD_ROOT
68 %defattr(644,root,root,755)
69 %doc README.txt LICENSE.txt
70 %{py_sitescriptdir}/backports/__init__.py[co]
71 %{py_sitescriptdir}/backports/ssl_match_hostname
72 %{py_sitescriptdir}/backports.ssl_match_hostname-%{version}-py*.egg-info