Blob Blame History Raw
From 81003c91187947e7f3baf99186e0604ea3e66cc2 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 11 Jun 2019 10:32:53 -0400
Subject: [PATCH] provide system ca-bundle as default if no bundle is set

Signed-off-by: rpm-build <rpm-build>
---
 websocket/_http.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/websocket/_http.py b/websocket/_http.py
index 5b9a26d..34a87f1 100644
--- a/websocket/_http.py
+++ b/websocket/_http.py
@@ -245,6 +245,8 @@ def _ssl_socket(sock, user_sslopt, hostname):
     sslopt.update(user_sslopt)
 
     certPath = os.environ.get('WEBSOCKET_CLIENT_CA_BUNDLE')
+    if certPath is None:
+        certPath = '/etc/pki/tls/certs/ca-bundle.crt'
     if certPath and os.path.isfile(certPath) \
             and user_sslopt.get('ca_certs', None) is None \
             and user_sslopt.get('ca_cert', None) is None:
-- 
2.17.2