From c1f54960b7f1d4d22b253be9454a82bbfd5cecb8 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Fri, 6 Oct 2023 10:08:23 +0200 Subject: [PATCH] feat(SSL):updated version --- VirtualMachineService/VirtualMachineServer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VirtualMachineService/VirtualMachineServer.py b/VirtualMachineService/VirtualMachineServer.py index 31f0e58d..5bc30f24 100644 --- a/VirtualMachineService/VirtualMachineServer.py +++ b/VirtualMachineService/VirtualMachineServer.py @@ -42,11 +42,11 @@ ] -def _load_ss_context(certfile, ca_path): +def _load_ss_context(certfile, ca_path=None): click.echo("Use SSL - Loading SSL Context") ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) ssl_context.load_cert_chain(certfile) - if CA_CERTS_PATH: + if ca_path: click.echo(f"CA Certs present. Verify...") ssl_context.load_verify_locations(ca_path) ssl_context.minimum_version = ssl.TLSVersion.TLSv1_3