From 29cdc398e048b739c19a23fa0ffb5073df256009 Mon Sep 17 00:00:00 2001 From: "stonezdj(Daojun Zhang)" Date: Mon, 26 Feb 2024 17:46:40 +0800 Subject: [PATCH] =?UTF-8?q?Check=20if=20the=20internal=5Ftls=5Fconfig=20is?= =?UTF-8?q?=20not=20null=20when=20get=20strong=5Fssl=5Fciph=E2=80=A6=20(#2?= =?UTF-8?q?0032)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check if the internal_tls_config is not null when get strong_ssl_cipher value Signed-off-by: stonezdj Co-authored-by: stonezdj --- make/photon/prepare/utils/configs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/make/photon/prepare/utils/configs.py b/make/photon/prepare/utils/configs.py index 3a1266215..aff786729 100644 --- a/make/photon/prepare/utils/configs.py +++ b/make/photon/prepare/utils/configs.py @@ -303,10 +303,13 @@ def parse_yaml_config(config_file_path, with_trivy): # for compatibility, user could configure the strong_ssl_ciphers either in https section or under internal_tls section, # but it is more reasonable to configure it in https_config if https_config: - config_dict['strong_ssl_ciphers'] = https_config.get('strong_ssl_ciphers') or internal_tls_config.get('strong_ssl_ciphers') + config_dict['strong_ssl_ciphers'] = https_config.get('strong_ssl_ciphers') else: config_dict['strong_ssl_ciphers'] = False + if internal_tls_config: + config_dict['strong_ssl_ciphers'] = config_dict['strong_ssl_ciphers'] or internal_tls_config.get('strong_ssl_ciphers') + # ip_family config config_dict['ip_family'] = configs.get('ip_family') or {'ipv4': {'enabled': True}, 'ipv6': {'enabled': False}}