From 0fe323de80b10d66ef597a2b474fdd84130512b0 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 10 Apr 2019 22:32:20 +0200 Subject: [PATCH] asn1_tag: remove unused field and initialize the others [-Wmissing-field-initializers] --- client/crypto/asn1dump.c | 72 ++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/client/crypto/asn1dump.c b/client/crypto/asn1dump.c index 47fe791d4..90f11e4ba 100644 --- a/client/crypto/asn1dump.c +++ b/client/crypto/asn1dump.c @@ -43,48 +43,48 @@ struct asn1_tag { tlv_tag_t tag; const char *name; enum asn1_tag_t type; - const void *data; +// const void *data; }; static const struct asn1_tag asn1_tags[] = { // internal - { 0x00, "Unknown ???" }, + { 0x00, "Unknown ???", ASN1_TAG_GENERIC }, // ASN.1 - { 0x01, "BOOLEAN", ASN1_TAG_BOOLEAN }, - { 0x02, "INTEGER", ASN1_TAG_INTEGER }, - { 0x03, "BIT STRING" }, - { 0x04, "OCTET STRING", ASN1_TAG_OCTET_STRING}, - { 0x05, "NULL" }, - { 0x06, "OBJECT IDENTIFIER", ASN1_TAG_OBJECT_ID }, - { 0x07, "OBJECT DESCRIPTOR" }, - { 0x08, "EXTERNAL" }, - { 0x09, "REAL" }, - { 0x0A, "ENUMERATED" }, - { 0x0B, "EMBEDDED_PDV" }, - { 0x0C, "UTF8String", ASN1_TAG_STRING }, - { 0x10, "SEQUENCE" }, - { 0x11, "SET" }, - { 0x12, "NumericString", ASN1_TAG_STRING }, - { 0x13, "PrintableString", ASN1_TAG_STRING }, - { 0x14, "T61String" }, - { 0x15, "VideotexString" }, - { 0x16, "IA5String" }, - { 0x17, "UTCTime", ASN1_TAG_UTC_TIME }, - { 0x18, "GeneralizedTime", ASN1_TAG_STR_TIME }, - { 0x19, "GraphicString" }, - { 0x1A, "VisibleString", ASN1_TAG_STRING }, - { 0x1B, "GeneralString", ASN1_TAG_STRING }, - { 0x1C, "UniversalString", ASN1_TAG_STRING }, - { 0x1E, "BMPString" }, - { 0x30, "SEQUENCE" }, - { 0x31, "SET" }, - { 0xa0, "[0]" }, - { 0xa1, "[1]" }, - { 0xa2, "[2]" }, - { 0xa3, "[3]" }, - { 0xa4, "[4]" }, - { 0xa5, "[5]" }, + { 0x01, "BOOLEAN", ASN1_TAG_BOLEAN }, + { 0x02, "INTEGER", ASN1_TAG_INTEGER }, + { 0x03, "BIT STRING", ASN1_TAG_GENERIC }, + { 0x04, "OCTET STRING", ASN1_TAG_OCTET_STRING }, + { 0x05, "NULL", ASN1_TAG_GENERIC }, + { 0x06, "OBJECT IDENTIFIER", ASN1_TAG_OBJECT_ID }, + { 0x07, "OBJECT DESCRIPTOR", ASN1_TAG_GENERIC }, + { 0x08, "EXTERNAL", ASN1_TAG_GENERIC }, + { 0x09, "REAL", ASN1_TAG_GENERIC }, + { 0x0A, "ENUMERATED", ASN1_TAG_GENERIC }, + { 0x0B, "EMBEDDED_PDV", ASN1_TAG_GENERIC }, + { 0x0C, "UTF8String", ASN1_TAG_STRING }, + { 0x10, "SEQUENCE", ASN1_TAG_GENERIC }, + { 0x11, "SET", ASN1_TAG_GENERIC }, + { 0x12, "NumericString", ASN1_TAG_STRING }, + { 0x13, "PrintableString", ASN1_TAG_STRING }, + { 0x14, "T61String", ASN1_TAG_GENERIC }, + { 0x15, "VideotexString", ASN1_TAG_GENERIC }, + { 0x16, "IA5String", ASN1_TAG_GENERIC }, + { 0x17, "UTCTime", ASN1_TAG_UTC_TIME }, + { 0x18, "GeneralizedTime", ASN1_TAG_STR_TIME }, + { 0x19, "GraphicString", ASN1_TAG_GENERIC }, + { 0x1A, "VisibleString", ASN1_TAG_STRING }, + { 0x1B, "GeneralString", ASN1_TAG_STRING }, + { 0x1C, "UniversalString", ASN1_TAG_STRING }, + { 0x1E, "BMPString", ASN1_TAG_GENERIC }, + { 0x30, "SEQUENCE", ASN1_TAG_GENERIC }, + { 0x31, "SET", ASN1_TAG_GENERIC }, + { 0xa0, "[0]", ASN1_TAG_GENERIC }, + { 0xa1, "[1]", ASN1_TAG_GENERIC }, + { 0xa2, "[2]", ASN1_TAG_GENERIC }, + { 0xa3, "[3]", ASN1_TAG_GENERIC }, + { 0xa4, "[4]", ASN1_TAG_GENERIC }, + { 0xa5, "[5]", ASN1_TAG_GENERIC }, }; static int asn1_sort_tag(tlv_tag_t tag) {