summaryrefslogtreecommitdiff
path: root/platform/src/ssl_fetch_cert.cpp
diff options
context:
space:
mode:
authorfengweihao <[email protected]>2024-07-12 11:13:56 +0800
committerfengweihao <[email protected]>2024-07-12 11:13:56 +0800
commit88a7a8c5c48f681cdd0478a809652ac94c2647ee (patch)
treeb0b56b4faaa0a5d667112dd1a3868ef0bc6c05a1 /platform/src/ssl_fetch_cert.cpp
parent5eccfbb882852a9c4779ee4d7039b1ae7e6a9bbb (diff)
TSG-21787 Proxy初始化kafka topic时增加client.id参数v4.9.7-20240712
TSG-21730 Proxy优化Manipulation日志中host和fqdn字段的格式
Diffstat (limited to 'platform/src/ssl_fetch_cert.cpp')
-rw-r--r--platform/src/ssl_fetch_cert.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/platform/src/ssl_fetch_cert.cpp b/platform/src/ssl_fetch_cert.cpp
index fe7d22c..7a4a0de 100644
--- a/platform/src/ssl_fetch_cert.cpp
+++ b/platform/src/ssl_fetch_cert.cpp
@@ -45,10 +45,15 @@ struct ssl_mid_cert_ctx mid_cert_ctx;
int ssl_mid_cert_kafka_logger_create(const char *profile, const char *section)
{
+ int ret=0;
char topic_name[TFE_SYMBOL_MAX] = {0};
+ char sasl_username[TFE_STRING_MAX] = {0};
+ char sasl_passwd[TFE_STRING_MAX] = {0};
MESA_load_profile_int_def(profile, section, "mc_cache_enable", &mid_cert_ctx.enable, 0);
- MESA_load_profile_string_def(profile, "tfe", "mc_cache_topic", topic_name, sizeof(topic_name), "PXY-EXCH-INTERMEDIA-CERT");
+ MESA_load_profile_string_def(profile, "kafka", "mc_cache_topic", topic_name, sizeof(topic_name), "PXY-EXCH-INTERMEDIA-CERT");
+ MESA_load_profile_string_def(profile, "kafka", "SASL_USERNAME", sasl_username, sizeof(sasl_username), "");
+ MESA_load_profile_string_def(profile, "kafka", "SASL_PASSWD", sasl_passwd, sizeof(sasl_passwd), "");
if(mid_cert_ctx.enable == 0)
{
@@ -60,7 +65,8 @@ int ssl_mid_cert_kafka_logger_create(const char *profile, const char *section)
{
return -1;
}
- int ret = tfe_kafka_logger_topic_new(mid_cert_ctx.g_kafka_logger, topic_name, TOPIC_MC_CACHE, g_default_logger);
+
+ ret = tfe_logger_create_kafka_topic(mid_cert_ctx.g_kafka_logger, sasl_username, sasl_passwd, topic_name, TOPIC_MC_CACHE, g_default_logger);
if(ret < 0)
{
return -1;