Browse Source

Adjusting to configuration layout where SSL for orthanc is under orthanc section of configuration json file

NIX User 4 years ago
parent
commit
284eca278d
1 changed files with 5 additions and 4 deletions
  1. 5 4
      orthancInterface.py

+ 5 - 4
orthancInterface.py

@@ -17,12 +17,13 @@ class orthancInterface:
         
         self.http=urllib3.PoolManager()
 
-        if 'SSL' in self.connectionConfig:
+        if 'SSL' in self.connectionConfig['orthanc']:
+            sslConfig=self.connectionConfig['orthanc']['SSL']
             self.http = urllib3.PoolManager(\
-                cert_file=self.connectionConfig['SSL']['user'],\
+                cert_file=sslConfig['user'],\
                 cert_reqs='CERT_REQUIRED',\
-                key_file=self.connectionConfig['SSL']['key'],\
-                ca_certs=self.connectionConfig['SSL']['ca'])
+                key_file=sslConfig['key'],\
+                ca_certs=sslConfig['ca'])
 
     #password=self.connectionConfig['SSL']['keyPwd'],\ doesnt work until 1.25