Adapt to the changes in the addition and deletion flags of the callback table.

This commit is contained in:
fengweihao
2024-10-17 18:18:17 +08:00
parent 9a437cb057
commit 5a1ecfba92
2 changed files with 18 additions and 27 deletions

View File

@@ -250,7 +250,6 @@ void trusted_CA_update_cert_cb(const char *table_name, const char *table_line, e
}
char *uuid_sring=NULL;
int is_valid=0;
char cert_name[128]={0}, cert_file[1024]={0};
cJSON *uuid = cJSON_GetObjectItem(trust_ca_cert, "uuid");
@@ -268,13 +267,8 @@ void trusted_CA_update_cert_cb(const char *table_name, const char *table_line, e
{
memcpy(cert_file, item->valuestring, strlen(item->valuestring));
}
item = cJSON_GetObjectItem(trust_ca_cert, "is_valid");
if(item && item->type==cJSON_Number)
{
is_valid=item->valueint;
}
if(is_valid==1)
if(op==MAAT_OP_ADD)
{
ret=tfe_proxy_ssl_add_trust_ca(cert_file);
if(ret<0)