@@ -88,22 +88,22 @@ def verify(lb):
88
88
if {'send_proxy' , 'send_proxy_v2' } <= set (bk_server_conf ):
89
89
raise ConfigError (f'Cannot use both "send-proxy" and "send-proxy-v2" for server "{ bk_server } "' )
90
90
91
+ if 'ssl' in back_config :
92
+ if {'no_verify' , 'ca_certificate' } <= set (back_config ['ssl' ]):
93
+ raise ConfigError (f'backend { back } cannot have both ssl options no-verify and ca-certificate set!' )
94
+
91
95
# Check if http-response-headers are configured in any frontend/backend where mode != http
92
96
for group in ['service' , 'backend' ]:
93
97
for config_name , config in lb [group ].items ():
94
98
if 'http_response_headers' in config and ('mode' not in config or config ['mode' ] != 'http' ):
95
99
raise ConfigError (f'{ group } { config_name } must be set to http mode to use http_response_headers!' )
96
100
97
- if 'ssl' in back_config :
98
- if {'no_verify' , 'ca_certificate' } <= set (back_config ['ssl' ]):
99
- raise ConfigError (f'backend { back } cannot have both ssl options no-verify and ca-certificate set!' )
100
-
101
101
for front , front_config in lb ['service' ].items ():
102
102
for cert in dict_search ('ssl.certificate' , front_config ) or []:
103
103
verify_pki_certificate (lb , cert )
104
104
105
105
for back , back_config in lb ['backend' ].items ():
106
- tmp = dict_search ('ssl.ca_certificate' , front_config )
106
+ tmp = dict_search ('ssl.ca_certificate' , back_config )
107
107
if tmp : verify_pki_ca_certificate (lb , tmp )
108
108
109
109
0 commit comments