修改Keyring表读取结构
修改json表配置
This commit is contained in:
@@ -73,11 +73,14 @@
|
||||
{
|
||||
"table_name": "PXY_PROFILE_KEYRING",
|
||||
"table_content": [
|
||||
"0\tname_01\troot\t/home/fengweihao/build/transfer/test_cert/root/tango-ca-v3-untrust-ca.pem\t/home/fengweihao/build/transfer/test_cert/root/tango-ca-v3-untrust-ca.pem\t30\tNULL\tNULL\t1024\t1\t",
|
||||
"1\tname_01\troot\t/home/fengweihao/build/transfer/test_cert/root/tango-ca-v3-trust-ca.pem\t/home/fengweihao/build/transfer/test_cert/root/tango-ca-v3-trust-ca.pem\t30\tNULL\tNULL\t1024\t1\t",
|
||||
"0\tname_01\troot\t/home/fengweihao/tool/test_cert/root/tango-ca-v3-untrust-ca.pem\t/home/fengweihao/tool/test_cert/root/tango-ca-v3-untrust-ca.pem\t0\trsa1024\tNULL\t1\t",
|
||||
"1\tname_01\troot\t/home/fengweihao/tool/test_cert/root/tango-ca-v3-trust-ca.pem\t//home/fengweihao/tool/test_cert/root/tango-ca-v3-trust-ca.pem\t0\trsa1024\tNULL\t1\t",
|
||||
|
||||
"2\tname_01\troot\t/home/fengweihao/build/transfer/test_cert/root/tango-ca-trust-ca-key.pem\t/home/fengweihao/build/transfer/test_cert/root/tango-ca-trust-ca-cer.pem\t24\tNULL\tNULL\t2048\t1\t",
|
||||
"3\tname_01\troot\t/home/fengweihao/build/transfer/test_cert/root/tango-ca-trust-ca-key.pem\t/home/fengweihao/build/transfer/test_cert/root/tango-ca-trust-ca-cer.pem\t-1\tNULL\tNULL\t4096\t1\t"
|
||||
"2\tname_01\troot\t/home/fengweihao/tool/test_cert/root/tango-ca-trust-ca-key.pem\t/home/fengweihao/tool/test_cert/root/tango-ca-trust-ca-cer.pem\t24\trsa2048\tNULL\t1\t",
|
||||
"3\tname_01\troot\t/home/fengweihao/tool/test_cert/root/tango-ca-trust-ca-key.pem\t/home/fengweihao/tool/test_cert/root/tango-ca-trust-ca-cer.pem\t30\trsa4096\tNULL\t1\t",
|
||||
"4\tname_01\troot\t/home/fengweihao/tool/test_cert/Intermediate/tang-ca-v3-intermediate-01-key.pem\t/home/fengweihao/tool/test_cert/Intermediate/tang-ca-v3-intermediate-01-cer.pem\t30\trsa4096\tNULL\t1\t",
|
||||
"5\tname_01\tintermediate\t/home/fengweihao/tool/test_cert/Intermediate/ca01-mle-key.pem\t/home/fengweihao/tool/test_cert/Intermediate/ca01-mle.pem\t30\trsa4096\tNULL\t1\t",
|
||||
"6\tname_01\tend-entity\t/home/fengweihao/tool/test_cert/end-entity/tang-ca-v3-www.bing.com-key.pem\t/home/fengweihao/tool/test_cert/end-entity/tang-ca-v3-www.bing.com-cer.pem\t30\trsa4096\tNULL\t1\t"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
#id name type src_charset dst_charset do_merge cross_cache quick_mode
|
||||
1 COMPILE compile
|
||||
2 GROUP group
|
||||
3 PXY_PROFILE_KEYRING plugin {"key":1,"valid":10,"foreign":"4,5"}
|
||||
3 PXY_PROFILE_KEYRING plugin {"key":1,"valid":9,"foreign":"4,5"}
|
||||
|
||||
@@ -1947,12 +1947,12 @@ const char* table_line, MAAT_PLUGIN_EX_DATA* ad, long __attribute__((__unused__)
|
||||
memset(pxy_obj, 0, sizeof(struct pxy_obj_keyring));
|
||||
atomic64_set(&pxy_obj->ref_cnt, 1);
|
||||
|
||||
ret=sscanf(table_line, "%d\t%s\t%s\t%s\t%s\t%s\t%lu\t%s\t%d", &pxy_obj->keyring_id, profile_name,
|
||||
pxy_obj->keyring_type, private_file, public_file, pxy_obj->public_algo, &pxy_obj->expire_time,
|
||||
pxy_obj->v3_ctl, &pxy_obj->is_valid);
|
||||
ret=sscanf(table_line, "%d\t%s\t%s\t%s\t%s\t%lu\t%s\t%s\t%d", &pxy_obj->keyring_id, profile_name,
|
||||
pxy_obj->keyring_type, private_file, public_file, &pxy_obj->expire_time, pxy_obj->public_algo,
|
||||
pxy_obj->v3_ctl, &pxy_obj->is_valid);
|
||||
if(ret!=9)
|
||||
{
|
||||
kfree(&pxy_obj);
|
||||
kfree(pxy_obj);
|
||||
mesa_runtime_log(RLOG_LV_FATAL, MODULE_NAME, "certstore parse config failed: %s", table_line);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user