|
@@ -553,27 +553,60 @@ class SocketDevice(Device): |
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
@property |
|
|
@property |
|
|
def ssl_certificiate(self): |
|
|
|
|
|
|
|
|
def ssl_certificate(self): |
|
|
|
|
|
""" |
|
|
|
|
|
Retrieves the SSL client certificate path used for authentication. |
|
|
|
|
|
|
|
|
|
|
|
:returns: The certificate path |
|
|
|
|
|
""" |
|
|
return self._ssl_certificate |
|
|
return self._ssl_certificate |
|
|
|
|
|
|
|
|
@ssl_certificiate.setter |
|
|
|
|
|
|
|
|
@ssl_certificate.setter |
|
|
def ssl_certificate(self, value): |
|
|
def ssl_certificate(self, value): |
|
|
|
|
|
""" |
|
|
|
|
|
Sets the SSL client certificate to use for authentication. |
|
|
|
|
|
|
|
|
|
|
|
:param value: The path to the SSL certificate. |
|
|
|
|
|
:type value: str |
|
|
|
|
|
""" |
|
|
self._ssl_certificate = value |
|
|
self._ssl_certificate = value |
|
|
|
|
|
|
|
|
@property |
|
|
@property |
|
|
def ssl_key(self): |
|
|
def ssl_key(self): |
|
|
|
|
|
""" |
|
|
|
|
|
Retrieves the SSL client certificate key used for authentication. |
|
|
|
|
|
|
|
|
|
|
|
:returns: The key path |
|
|
|
|
|
""" |
|
|
return self._ssl_key |
|
|
return self._ssl_key |
|
|
|
|
|
|
|
|
@ssl_key.setter |
|
|
@ssl_key.setter |
|
|
def ssl_key(self, value): |
|
|
def ssl_key(self, value): |
|
|
|
|
|
""" |
|
|
|
|
|
Sets the SSL client certificate key to use for authentication. |
|
|
|
|
|
|
|
|
|
|
|
:param value: The path to the SSL key. |
|
|
|
|
|
:type value: str |
|
|
|
|
|
""" |
|
|
self._ssl_key = value |
|
|
self._ssl_key = value |
|
|
|
|
|
|
|
|
@property |
|
|
@property |
|
|
def ssl_ca(self): |
|
|
def ssl_ca(self): |
|
|
|
|
|
""" |
|
|
|
|
|
Retrieves the SSL Certificate Authority certificate used for authentication. |
|
|
|
|
|
|
|
|
|
|
|
:returns: The CA path |
|
|
|
|
|
""" |
|
|
return self._ssl_ca |
|
|
return self._ssl_ca |
|
|
|
|
|
|
|
|
@ssl_ca.setter |
|
|
@ssl_ca.setter |
|
|
def ssl_ca(self, value): |
|
|
def ssl_ca(self, value): |
|
|
|
|
|
""" |
|
|
|
|
|
Sets the SSL Certificate Authority certificate used for authentication. |
|
|
|
|
|
|
|
|
|
|
|
:param value: The path to the SSL CA certificate. |
|
|
|
|
|
:type value: str |
|
|
|
|
|
""" |
|
|
self._ssl_ca = value |
|
|
self._ssl_ca = value |
|
|
|
|
|
|
|
|
def __init__(self, interface=("localhost", 10000), use_ssl=False, ssl_certificate=None, ssl_key=None, ssl_ca=None): |
|
|
def __init__(self, interface=("localhost", 10000), use_ssl=False, ssl_certificate=None, ssl_key=None, ssl_ca=None): |
|
@@ -635,7 +668,7 @@ class SocketDevice(Device): |
|
|
self._read_thread.start() |
|
|
self._read_thread.start() |
|
|
|
|
|
|
|
|
def close(self): |
|
|
def close(self): |
|
|
"""verify_ssl |
|
|
|
|
|
|
|
|
""" |
|
|
Closes the device. |
|
|
Closes the device. |
|
|
""" |
|
|
""" |
|
|
self._running = False |
|
|
self._running = False |
|
|