Fabian Deutsch has uploaded a new change for review.

Change subject: register: Fix certificate validation
......................................................................

register: Fix certificate validation

Change-Id: Idcd1eab617ea21655ec89419c0f3532eefeec4f9
Signed-off-by: Fabian Deutsch <fabi...@fedoraproject.org>
---
M lib/vdsm/tool/register.py
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/81/46981/1

diff --git a/lib/vdsm/tool/register.py b/lib/vdsm/tool/register.py
index 035480d..0af3ce4 100644
--- a/lib/vdsm/tool/register.py
+++ b/lib/vdsm/tool/register.py
@@ -161,12 +161,14 @@
 
         Returns: Content of http request
         """
-        if self.check_fqdn:
-            cert_validation = self.ca_engine
-        else:
-            cert_validation = False
+        verify = True
+        cert = self.ca_engine
 
-        res = requests.get("{u}".format(u=url), verify=cert_validation)
+        if not self.check_fqdn:
+            verify = False
+            cert = None
+
+        res = requests.get("{u}".format(u=url), verify=verify, cert=cert)
         if res.status_code != 200:
             raise requests.RequestException(
                 "http response was non OK, code {r}".format(r=res.status_code)


-- 
To view, visit https://gerrit.ovirt.org/46981
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcd1eab617ea21655ec89419c0f3532eefeec4f9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabi...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to