证书校验选项及校验失败动作自测通过。

This commit is contained in:
zhengchao
2019-05-24 11:26:41 +08:00
parent d553c0f5f6
commit 6b197e3347
2 changed files with 15 additions and 15 deletions

View File

@@ -107,7 +107,7 @@ void intercept_param_new_cb(int table_id, const char* key, const char* table_lin
item=cJSON_GetObjectItem(cert_verify, "fail_method");
if(item && item->type==cJSON_String)
{
if(0==strcasecmp(item->string, "Fail-Close"))
if(0==strcasecmp(item->valuestring, "Fail-Close"))
{
param->block_fake_cert=1;
}
@@ -121,9 +121,9 @@ void intercept_param_new_cb(int table_id, const char* key, const char* table_lin
if(!param->mirror_client_version)
{
item=cJSON_GetObjectItem(ssl_ver, "min");
if(item && item->type==cJSON_String) param->ssl_min_version=sslver_str2num(item->string);
if(item && item->type==cJSON_String) param->ssl_min_version=sslver_str2num(item->valuestring);
item=cJSON_GetObjectItem(ssl_ver, "max");
if(item && item->type==cJSON_String) param->ssl_max_version=sslver_str2num(item->string);
if(item && item->type==cJSON_String) param->ssl_max_version=sslver_str2num(item->valuestring);
}
}
*ad=param;