File tree 5 files changed +17
-8
lines changed 5 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ Requires: rpm-libs
569
569
%if 0%{?rhel}
570
570
Requires: python3-urllib3 >= 1.24.2-3
571
571
%else
572
- Requires: python3-urllib3 >= 1.25.7
572
+ Requires: python3-urllib3 >= 1.25.8
573
573
%endif
574
574
575
575
%description -n python3-ipaserver
@@ -896,6 +896,12 @@ Requires: platform-python-setuptools
896
896
%else
897
897
Requires: python3-setuptools
898
898
%endif
899
+ # Indirect dependency: use newer urllib3 with TLS 1.3 PHA support
900
+ %if 0%{?rhel}
901
+ Requires: python3-urllib3 >= 1.24.2-3
902
+ %else
903
+ Requires: python3-urllib3 >= 1.25.8
904
+ %endif
899
905
900
906
%description -n python3-ipalib
901
907
IPA is an integrated solution to provide centrally managed Identity (users,
Original file line number Diff line number Diff line change 36
36
import datetime
37
37
import enum
38
38
import ipaddress
39
- import ssl
40
39
import base64
41
40
import re
42
41
53
52
from pyasn1_modules import rfc2315 , rfc2459
54
53
import six
55
54
55
+ try :
56
+ from urllib3 .util import ssl_match_hostname
57
+ except ImportError :
58
+ from urllib3 .packages import ssl_match_hostname
59
+
56
60
from ipalib import errors
57
61
from ipapython .dnsutil import DNSName
58
62
@@ -385,6 +389,7 @@ def san_a_label_dns_names(self):
385
389
return result
386
390
387
391
def match_hostname (self , hostname ):
392
+ # The caller is expected to catch any exceptions
388
393
match_cert = {}
389
394
390
395
match_cert ['subject' ] = match_subject = []
@@ -401,8 +406,7 @@ def match_hostname(self, hostname):
401
406
for value in values :
402
407
match_san .append (('DNS' , value ))
403
408
404
- # deprecated in Python3.7 without replacement
405
- ssl .match_hostname ( # pylint: disable=deprecated-method
409
+ ssl_match_hostname .match_hostname (
406
410
match_cert , DNSName (hostname ).ToASCII ()
407
411
)
408
412
Original file line number Diff line number Diff line change 30
30
import os
31
31
import re
32
32
import shutil
33
- import ssl
34
33
import sys
35
34
import syslog
36
35
import time
@@ -2378,7 +2377,7 @@ def check_ipa_ca_san(cert):
2378
2377
2379
2378
try :
2380
2379
cert .match_hostname (expect )
2381
- except ssl .CertificateError :
2380
+ except x509 . ssl_match_hostname .CertificateError :
2382
2381
raise errors .ValidationError (
2383
2382
name = 'certificate' ,
2384
2383
error = 'Does not have a \' {}\' SAN' .format (expect )
Original file line number Diff line number Diff line change 12
12
import glob
13
13
import shutil
14
14
import fileinput
15
- import ssl
16
15
import stat
17
16
import sys
18
17
import tempfile
@@ -717,7 +716,7 @@ def http_certificate_ensure_ipa_ca_dnsname(http):
717
716
718
717
try :
719
718
cert .match_hostname (expect )
720
- except ssl .CertificateError :
719
+ except x509 . ssl_match_hostname .CertificateError :
721
720
if certs .is_ipa_issued_cert (api , cert ):
722
721
request_id = certmonger .get_request_id (
723
722
{'cert-file' : paths .HTTPD_CERT_FILE })
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ PACKAGE_VERSION = {
79
79
'python-ldap': 'python-ldap >= 3.0.0',
80
80
'python-yubico': 'python-yubico >= 1.2.3',
81
81
'qrcode': 'qrcode >= 5.0',
82
+ 'python-urllib3': 'python-urllib3 >= 1.25.8',
82
83
}
83
84
84
85
You can’t perform that action at this time.
0 commit comments