File tree Expand file tree Collapse file tree 5 files changed +17
-8
lines changed
Expand file tree Collapse file tree 5 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ Requires: rpm-libs
569569%if 0%{?rhel}
570570Requires: python3-urllib3 >= 1.24.2-3
571571%else
572- Requires: python3-urllib3 >= 1.25.7
572+ Requires: python3-urllib3 >= 1.25.8
573573%endif
574574
575575%description -n python3-ipaserver
@@ -896,6 +896,12 @@ Requires: platform-python-setuptools
896896%else
897897Requires: python3-setuptools
898898%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
899905
900906%description -n python3-ipalib
901907IPA is an integrated solution to provide centrally managed Identity (users,
Original file line number Diff line number Diff line change 3636import datetime
3737import enum
3838import ipaddress
39- import ssl
4039import base64
4140import re
4241
5352from pyasn1_modules import rfc2315 , rfc2459
5453import six
5554
55+ try :
56+ from urllib3 .util import ssl_match_hostname
57+ except ImportError :
58+ from urllib3 .packages import ssl_match_hostname
59+
5660from ipalib import errors
5761from ipapython .dnsutil import DNSName
5862
@@ -385,6 +389,7 @@ def san_a_label_dns_names(self):
385389 return result
386390
387391 def match_hostname (self , hostname ):
392+ # The caller is expected to catch any exceptions
388393 match_cert = {}
389394
390395 match_cert ['subject' ] = match_subject = []
@@ -401,8 +406,7 @@ def match_hostname(self, hostname):
401406 for value in values :
402407 match_san .append (('DNS' , value ))
403408
404- # deprecated in Python3.7 without replacement
405- ssl .match_hostname ( # pylint: disable=deprecated-method
409+ ssl_match_hostname .match_hostname (
406410 match_cert , DNSName (hostname ).ToASCII ()
407411 )
408412
Original file line number Diff line number Diff line change 3030import os
3131import re
3232import shutil
33- import ssl
3433import sys
3534import syslog
3635import time
@@ -2378,7 +2377,7 @@ def check_ipa_ca_san(cert):
23782377
23792378 try :
23802379 cert .match_hostname (expect )
2381- except ssl .CertificateError :
2380+ except x509 . ssl_match_hostname .CertificateError :
23822381 raise errors .ValidationError (
23832382 name = 'certificate' ,
23842383 error = 'Does not have a \' {}\' SAN' .format (expect )
Original file line number Diff line number Diff line change 1212import glob
1313import shutil
1414import fileinput
15- import ssl
1615import stat
1716import sys
1817import tempfile
@@ -717,7 +716,7 @@ def http_certificate_ensure_ipa_ca_dnsname(http):
717716
718717 try :
719718 cert .match_hostname (expect )
720- except ssl .CertificateError :
719+ except x509 . ssl_match_hostname .CertificateError :
721720 if certs .is_ipa_issued_cert (api , cert ):
722721 request_id = certmonger .get_request_id (
723722 {'cert-file' : paths .HTTPD_CERT_FILE })
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ PACKAGE_VERSION = {
7979 'python-ldap': 'python-ldap >= 3.0.0',
8080 'python-yubico': 'python-yubico >= 1.2.3',
8181 'qrcode': 'qrcode >= 5.0',
82+ 'urllib3': 'urllib3 >= 1.25.8',
8283}
8384
8485
You can’t perform that action at this time.
0 commit comments