forked from Krautspace/doorstatus
setstatus.py: set the same cipher suite as the server
This commit is contained in:
parent
1fbd95facf
commit
a0fda2aaa2
1 changed files with 2 additions and 3 deletions
|
@ -67,9 +67,8 @@ def main():
|
||||||
|
|
||||||
context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH,
|
context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH,
|
||||||
cafile=SERVER_CERT)
|
cafile=SERVER_CERT)
|
||||||
context.options &= ~ssl.PROTOCOL_TLS
|
context.set_ciphers('EECDH+AESGCM') # only ciphers for tls 1.2 and 1.3
|
||||||
context.verify_mode = ssl.CERT_OPTIONAL
|
context.options |= getattr(ssl._ssl, 'OP_NO_COMPRESSION', 0)
|
||||||
# context.set_ciphers('HIGHT:!aNULL:!RC4:!DSS')
|
|
||||||
context.load_cert_chain(certfile=CLIENT_CERT, keyfile=CLIENT_KEY)
|
context.load_cert_chain(certfile=CLIENT_CERT, keyfile=CLIENT_KEY)
|
||||||
print('SSL context created')
|
print('SSL context created')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue