@@ -56,8 +56,8 @@ def __init__(self, args: dict = None):
5656 probe_config ["spp" ]["verify_host" ] = str (self .get_config_value (
5757 "SPP_TLS_VERIFY_HOST" , probe_config ["spp" ].get ("verify_host" ), True
5858 )).lower () == "true"
59- probe_config ["spp" ]["disable_tls " ] = str (self .get_config_value (
60- "SPP_DISABLE_TLS " , probe_config ["spp" ].get ("disable_tls " ), False
59+ probe_config ["spp" ]["ssl_enabled " ] = str (self .get_config_value (
60+ "SPP_HTTP_SSL_ENABLED " , probe_config ["spp" ].get ("ssl_enabled " ), True
6161 )).lower () == "true"
6262 probe_config ["skywalking" ]["agent" ]["service_name" ] = self .get_config_value (
6363 "SPP_SERVICE_NAME" , probe_config ["skywalking" ]["agent" ].get ("service_name" ), "spp"
@@ -90,21 +90,21 @@ def attach(self):
9090 collector_address = self .probe_config ["skywalking" ]["collector" ]["backend_service" ],
9191 service_name = self .probe_config ["skywalking" ]["agent" ]["service_name" ],
9292 log_reporter_active = True ,
93- force_tls = self .probe_config ["spp" ]["disable_tls " ] is False ,
93+ force_tls = self .probe_config ["spp" ]["ssl_enabled " ] is True ,
9494 log_reporter_formatted = False
9595 )
9696 agent .start ()
9797
9898 ca_data = None
99- if self .probe_config ["spp" ]["disable_tls " ] is False \
99+ if self .probe_config ["spp" ]["ssl_enabled " ] is True \
100100 and self .probe_config ["spp" ].get ("probe_certificate" ) is not None :
101101 ca_data = "-----BEGIN CERTIFICATE-----\n " + \
102102 self .probe_config ["spp" ]["probe_certificate" ] + \
103103 "\n -----END CERTIFICATE-----"
104104
105105 ssl_ctx = ssl .create_default_context (cadata = ca_data )
106106 ssl_ctx .check_hostname = self .probe_config ["spp" ]["verify_host" ]
107- if self .probe_config ["spp" ]["disable_tls " ] is True :
107+ if self .probe_config ["spp" ]["ssl_enabled " ] is False :
108108 ssl_ctx = None
109109 elif ssl_ctx .check_hostname is True :
110110 ssl_ctx .verify_mode = ssl .CERT_REQUIRED
0 commit comments