asn1: Use name not gen_name for JSON enum printing

This commit is contained in:
Nicolas Williams
2021-03-07 16:32:41 -06:00
parent 5d7d1897de
commit 00e0475ce2
3 changed files with 12 additions and 12 deletions

View File

@@ -193,23 +193,23 @@ In recent times the following features have been added:
{ {
"_type": "TPMSpecification", "_type": "TPMSpecification",
"family": "2.0", "family": "2.0",
"level": "0", "level": 0,
"revision": "138" "revision": 138
} }
] ]
[ [
{ {
"_type": "TPMSecurityAssertions", "_type": "TPMSecurityAssertions",
"version": "0", "version": 0,
"fieldUpgradable": true, "fieldUpgradable": true,
"ekGenerationType": "655617", "ekGenerationType": "ekgt-injected",
"ekGenerationLocation": "655616", "ekGenerationLocation": "tpmManufacturer",
"ekCertificateGenerationLocation": "655616", "ekCertificateGenerationLocation": "tpmManufacturer",
"ccInfo": { "ccInfo": {
"_type": "CommonCriteriaMeasures", "_type": "CommonCriteriaMeasures",
"version": "3.1", "version": "3.1",
"assurancelevel": "4", "assurancelevel": "ealevel4",
"evaluationStatus": "2", "evaluationStatus": "evaluationCompleted",
"plus": true, "plus": true,
"strengthOfFunction": null, "strengthOfFunction": null,
"profileOid": null, "profileOid": null,
@@ -220,7 +220,7 @@ In recent times the following features have been added:
"fipsLevel": { "fipsLevel": {
"_type": "FIPSLevel", "_type": "FIPSLevel",
"version": "140-2", "version": "140-2",
"level": "2", "level": "sllevel2",
"plus": false "plus": false
}, },
"iso9000Certified": false, "iso9000Certified": false,
@@ -602,7 +602,7 @@ In recent times the following features have been added:
"_type": "TPMSecurityAssertions", "_type": "TPMSecurityAssertions",
"version": 0, "version": 0,
"fieldUpgradable": true, "fieldUpgradable": true,
"ekGenerationType": "ekgt_injected", "ekGenerationType": "ekgt-injected",
"ekGenerationLocation": "tpmManufacturer", "ekGenerationLocation": "tpmManufacturer",
"ekCertificateGenerationLocation": "tpmManufacturer", "ekCertificateGenerationLocation": "tpmManufacturer",
"ccInfo": { "ccInfo": {

View File

@@ -2296,7 +2296,7 @@ test_ios(void)
"101FFA0030A0101A1030A0100A2030A0100A310300E1603332E310A01040A010" "101FFA0030A0101A1030A0100A2030A0100A310300E1603332E310A01040A010"
"20101FFA40F300D16053134302D320A0102010100\"],\"_values_choice\":\"\"," "20101FFA40F300D16053134302D320A0102010100\"],\"_values_choice\":\"\","
"\"_values\":[{\"_type\":\"TPMSecurityAssertions\",\"version\":0,\"fieldUp" "\"_values\":[{\"_type\":\"TPMSecurityAssertions\",\"version\":0,\"fieldUp"
"gradable\":true,\"ekGenerationType\":\"ekgt_injected\",\"ekGenerationL" "gradable\":true,\"ekGenerationType\":\"ekgt-injected\",\"ekGenerationL"
"ocation\":\"tpmManufacturer\",\"ekCertificateGenerationLocation\":\"tp" "ocation\":\"tpmManufacturer\",\"ekCertificateGenerationLocation\":\"tp"
"mManufacturer\",\"ccInfo\":{\"_type\":\"CommonCriteriaMeasures\",\"versi" "mManufacturer\",\"ccInfo\":{\"_type\":\"CommonCriteriaMeasures\",\"versi"
"on\":\"3.1\",\"assurancelevel\":\"ealevel4\",\"evaluationStatus\":\"evalua" "on\":\"3.1\",\"assurancelevel\":\"ealevel4\",\"evaluationStatus\":\"evalua"

View File

@@ -960,7 +960,7 @@ template_members(struct templatehead *temp,
if (m->val > UINT32_MAX) if (m->val > UINT32_MAX)
continue; /* Wouldn't fit in the offset field */ continue; /* Wouldn't fit in the offset field */
add_line(&tl->template, add_line(&tl->template,
"{ A1_OP_NAME, %d, \"%s\" }", m->val, m->gen_name); "{ A1_OP_NAME, %d, \"%s\" }", m->val, m->name);
nmemb++; nmemb++;
} }
tlist_header(tl, "{ 0, 0, ((void *)%lu) }", nmemb); tlist_header(tl, "{ 0, 0, ((void *)%lu) }", nmemb);