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: 32d2f593af01a046bec3d2f5181a420a
12 URL: https://bitbucket.org/brandon/backports.ssl_match_hostname
13 BuildRequires: python-modules >= 1:2.5
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 from Python 3.7 with small
34 changes for portability.
36 %description -l pl.UTF-8
37 Warstwa bezpiecznych gniazd (Secure Sockets Layer) jest naprawdę
38 bezpieczna tylko jeśli sprawdza się nazwę hosta w certyfikacie
39 zwracanym przez serwer, z którym się łączy i weryfikuje, że zgadza się
40 ona z pożądaną nazwą hosta.
42 Ale logika dopasowująca, zdefiniowana w RFC2818, może być nietrywialna
43 do zaimplementowania samemu. Dlatego też pakiet ssl biblioteki
44 standardowej Pythona 3.2 zawiera teraz funkcję match_hostname(), która
45 wykonuje to sprawdzenie zamiast wymagania implementacji w każdej
48 Ten backport udostępnia match_hostname() użytkownikom wcześniejszych
49 wersji Pythona. Sam kod pochodzi z Pythona 3.7 z niewielkimi zmianami
50 pod kątem przenośności.
53 %setup -qn %{module_name}-%{version}
59 rm -rf $RPM_BUILD_ROOT
66 rm -rf $RPM_BUILD_ROOT
69 %defattr(644,root,root,755)
70 %doc README.txt LICENSE.txt
71 %{py_sitescriptdir}/backports/__init__.py[co]
72 %{py_sitescriptdir}/backports/ssl_match_hostname
73 %{py_sitescriptdir}/backports.ssl_match_hostname-%{version}-py*.egg-info