From 00e0475ce2bcb861c6765989e3a954d48cad20f4 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Sun, 7 Mar 2021 16:32:41 -0600 Subject: [PATCH] asn1: Use name not gen_name for JSON enum printing --- lib/asn1/README.md | 20 ++++++++++---------- lib/asn1/check-gen.c | 2 +- lib/asn1/gen_template.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/asn1/README.md b/lib/asn1/README.md index bba1125a9..f5dc59885 100644 --- a/lib/asn1/README.md +++ b/lib/asn1/README.md @@ -193,23 +193,23 @@ In recent times the following features have been added: { "_type": "TPMSpecification", "family": "2.0", - "level": "0", - "revision": "138" + "level": 0, + "revision": 138 } ] [ { "_type": "TPMSecurityAssertions", - "version": "0", + "version": 0, "fieldUpgradable": true, - "ekGenerationType": "655617", - "ekGenerationLocation": "655616", - "ekCertificateGenerationLocation": "655616", + "ekGenerationType": "ekgt-injected", + "ekGenerationLocation": "tpmManufacturer", + "ekCertificateGenerationLocation": "tpmManufacturer", "ccInfo": { "_type": "CommonCriteriaMeasures", "version": "3.1", - "assurancelevel": "4", - "evaluationStatus": "2", + "assurancelevel": "ealevel4", + "evaluationStatus": "evaluationCompleted", "plus": true, "strengthOfFunction": null, "profileOid": null, @@ -220,7 +220,7 @@ In recent times the following features have been added: "fipsLevel": { "_type": "FIPSLevel", "version": "140-2", - "level": "2", + "level": "sllevel2", "plus": false }, "iso9000Certified": false, @@ -602,7 +602,7 @@ In recent times the following features have been added: "_type": "TPMSecurityAssertions", "version": 0, "fieldUpgradable": true, - "ekGenerationType": "ekgt_injected", + "ekGenerationType": "ekgt-injected", "ekGenerationLocation": "tpmManufacturer", "ekCertificateGenerationLocation": "tpmManufacturer", "ccInfo": { diff --git a/lib/asn1/check-gen.c b/lib/asn1/check-gen.c index c0c68db53..e28d956a2 100644 --- a/lib/asn1/check-gen.c +++ b/lib/asn1/check-gen.c @@ -2296,7 +2296,7 @@ test_ios(void) "101FFA0030A0101A1030A0100A2030A0100A310300E1603332E310A01040A010" "20101FFA40F300D16053134302D320A0102010100\"],\"_values_choice\":\"\"," "\"_values\":[{\"_type\":\"TPMSecurityAssertions\",\"version\":0,\"fieldUp" - "gradable\":true,\"ekGenerationType\":\"ekgt_injected\",\"ekGenerationL" + "gradable\":true,\"ekGenerationType\":\"ekgt-injected\",\"ekGenerationL" "ocation\":\"tpmManufacturer\",\"ekCertificateGenerationLocation\":\"tp" "mManufacturer\",\"ccInfo\":{\"_type\":\"CommonCriteriaMeasures\",\"versi" "on\":\"3.1\",\"assurancelevel\":\"ealevel4\",\"evaluationStatus\":\"evalua" diff --git a/lib/asn1/gen_template.c b/lib/asn1/gen_template.c index fc28f8cff..ef003042f 100644 --- a/lib/asn1/gen_template.c +++ b/lib/asn1/gen_template.c @@ -960,7 +960,7 @@ template_members(struct templatehead *temp, if (m->val > UINT32_MAX) continue; /* Wouldn't fit in the offset field */ add_line(&tl->template, - "{ A1_OP_NAME, %d, \"%s\" }", m->val, m->gen_name); + "{ A1_OP_NAME, %d, \"%s\" }", m->val, m->name); nmemb++; } tlist_header(tl, "{ 0, 0, ((void *)%lu) }", nmemb);