Blame SOURCES/0010-Replace-SSLCertVerificationError-with-CertificateErr_rhbz#1858318.patch

5144c6
From 66a5a0efd538e31a190ca6ecb775bc1dfc4ee232 Mon Sep 17 00:00:00 2001
5144c6
From: Rob Crittenden <rcritten@redhat.com>
5144c6
Date: Wed, 29 Jul 2020 13:42:43 -0400
5144c6
Subject: [PATCH] Replace SSLCertVerificationError with CertificateError for
5144c6
 py36
5144c6
5144c6
This exception was added in python 3.7. Use CertificateError
5144c6
instead which is an alias and will work with older python releases.
5144c6
5144c6
https://bugzilla.redhat.com/show_bug.cgi?id=1858318
5144c6
5144c6
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
5144c6
---
5144c6
 ipaserver/install/server/upgrade.py | 2 +-
5144c6
 1 file changed, 1 insertion(+), 1 deletion(-)
5144c6
5144c6
diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
5144c6
index 2c36bc0e2..2c1517865 100644
5144c6
--- a/ipaserver/install/server/upgrade.py
5144c6
+++ b/ipaserver/install/server/upgrade.py
5144c6
@@ -667,7 +667,7 @@ def http_certificate_ensure_ipa_ca_dnsname(http):
5144c6
 
5144c6
     try:
5144c6
         cert.match_hostname(expect)
5144c6
-    except ssl.SSLCertVerificationError:
5144c6
+    except ssl.CertificateError:
5144c6
         if certs.is_ipa_issued_cert(api, cert):
5144c6
             request_id = certmonger.get_request_id(
5144c6
                 {'cert-file': paths.HTTPD_CERT_FILE})
5144c6
-- 
5144c6
2.26.2
5144c6