summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-13 16:48:12 +0100
committerSimon Rettberg2019-02-13 16:48:12 +0100
commit426638b0a9a82e98af5dc212da86f13391d1127f (patch)
treeb37b5582979cf7ec0ca4ebd117e0497775f4d535
parentThrift chang to default ssl context (diff)
downloadbwlp-monitoring-426638b0a9a82e98af5dc212da86f13391d1127f.tar.gz
bwlp-monitoring-426638b0a9a82e98af5dc212da86f13391d1127f.tar.xz
bwlp-monitoring-426638b0a9a82e98af5dc212da86f13391d1127f.zip
Thrift: Verify SSL cert
-rwxr-xr-xmain.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.py b/main.py
index 3008c39..d685b7c 100755
--- a/main.py
+++ b/main.py
@@ -127,7 +127,8 @@ def thrift(name, ip, port, server, SSL=False):
ssl_factory = None
if SSL == 'true':
# ssl_factory = ssl.create_default_context()
- ssl_factory = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
+ ssl_factory = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
+ ssl_factory.load_default_certs()
organisations = []
# Different clients for SAT / Master is needed.