rabbitmqadmin: set http ssl purpose to SERVER_AUTH

CLIENT_AUTH is for server to verify client certificates:
https://docs.python.org/2.7/library/ssl.html#ssl.Purpose.CLIENT_AUTH
This commit is contained in:
Carl Hörberg 2017-02-14 23:37:15 +01:00
parent d00eafa3e1
commit 02372cd444
1 changed files with 1 additions and 1 deletions

View File

@ -475,7 +475,7 @@ class Management:
def __initialize_tls_context(self):
# Python 2.7.9+ only
ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
ssl_ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
ssl_ctx.options &= ~ssl.OP_NO_SSLv3
ssl_ctx.verify_mode = ssl.CERT_REQUIRED
ssl_ctx.check_hostname = not self.options.ssl_disable_hostname_verification