Update ssl

Allow to disable verification for self signed cert.
This commit is contained in:
angelblue05 2018-06-10 16:43:23 -05:00
parent 83ea76d7eb
commit bec267bfe4
2 changed files with 3 additions and 8 deletions

View file

@ -70,7 +70,6 @@ class UserClient(threading.Thread):
return True
except Exception as error:
# Server connection failed
log.error(error)
return False
@classmethod
@ -80,11 +79,7 @@ class UserClient(threading.Thread):
True: Verify ssl
False: Don't verify connection
"""
certificate = settings('sslcert')
if certificate != "None":
return certificate
return True if settings('sslverify') == "true" else False
return settings('sslverify') == "true"
def get_access(self):

View file

@ -11,8 +11,8 @@
<!-- User settings -->
<setting id="serverName" label="30001" type="text" default="" />
<setting id="server" label="30000" type="text" default="" visible="!eq(-1,)" />
<setting id="sslverify" label="30500" type="bool" default="false" visible="!eq(-1,)" subsetting="true" />
<setting id="sslcert" label="30501" type="file" default="None" visible="eq(-1,true)" subsetting="true" />
<setting id="sslverify" label="30500" type="bool" default="true" visible="!eq(-1,)" subsetting="true" />
<!--<setting id="sslcert" label="30501" type="file" default="None" visible="eq(-1,true)" subsetting="true" />==>
<setting id="accessToken" type="text" default="" visible="false" />
<setting id="userId" type="text" default="" visible="false" />
<!-- Device settings -->