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

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