]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
save some memory by removed unused ASN.1 structures.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 7 Oct 2012 21:36:31 +0000 (23:36 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 7 Oct 2012 21:36:31 +0000 (23:36 +0200)
lib/pkix.asn
lib/pkix_asn1_tab.c

index d892c260e6a9f94704c46ddf16d8e63758566ebf..3f1682cd9c27bed81f9cb88f54159262f16546e3 100644 (file)
@@ -116,11 +116,11 @@ AccessDescription  ::=  SEQUENCE {
 
 -- CRL number extension OID and syntax
 
-CRLNumber ::= INTEGER (0..MAX)
+-- CRLNumber ::= INTEGER (0..MAX)
 
 -- certificate issuer CRL entry extension OID and syntax
 
-CertificateIssuer ::= GeneralNames
+-- CertificateIssuer ::= GeneralNames
 
 -- --------------------------------------
 --  EXPLICIT
@@ -182,13 +182,13 @@ id-at           OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 4}
 -- Maybe this is inefficient and memory consuming. Should we replace with
 -- a table that maps OIDs to structures?
 
-PostalAddress ::= SEQUENCE OF DirectoryString
+-- PostalAddress ::= SEQUENCE OF DirectoryString
 
  -- Legacy attributes
 
 emailAddress AttributeType      ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 1 }
 
-Pkcs9email ::= IA5String (SIZE (1..ub-emailaddress-length))
+-- Pkcs9email ::= IA5String (SIZE (1..ub-emailaddress-length))
 
 -- naming data types --
 
@@ -612,11 +612,9 @@ ResponseData ::= SEQUENCE {
 
 ResponderID ::= CHOICE {
 -- Changed to work with the libtasn1 parser.
-   byName   [1] EXPLICIT RDNSequence, --Name,
-   byKey    [2] KeyHash }
-
-KeyHash ::= OCTET STRING --SHA-1 hash of responder's public key
-                         --(excluding the tag and length fields)
+   byName   [1] EXPLICIT RDNSequence, --Name
+   byKey    [2] OCTET STRING --SHA-1 hash of responder's public key 
+}
 
 SingleResponse ::= SEQUENCE {
    certID                       CertID,
@@ -636,14 +634,6 @@ RevokedInfo ::= SEQUENCE {
 
 UnknownInfo ::= NULL -- this can be replaced with an enumeration
 
-ArchiveCutoff ::= GeneralizedTime
-
-AcceptableResponses ::= SEQUENCE OF OBJECT IDENTIFIER
-
-ServiceLocator ::= SEQUENCE {
-    issuer    Name,
-    locator   AuthorityInfoAccessSyntax }
-
 -- rfc5280
 
 CRLReason ::= ENUMERATED {
index abd3b843b0844803e5f64aeecb03334648938422..be8bcd563c056226e6f8943dc40dda71d022cec4 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <libtasn1.h>
 
-const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
+const asn_static_node_t pkix_asn1_tab[] = {
   { "PKIX1", 536875024, NULL },
   { NULL, 1073741836, NULL },
   { "id-pkix", 1879048204, NULL },
@@ -103,9 +103,6 @@ const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
   { "AccessDescription", 1610612741, NULL },
   { "accessMethod", 1073741836, NULL },
   { "accessLocation", 2, "GeneralName"},
-  { "CRLNumber", 1611137027, NULL },
-  { "0", 10, "MAX"},
-  { "CertificateIssuer", 1073741826, "GeneralNames"},
   { "NumericString", 1610620935, NULL },
   { NULL, 4360, "18"},
   { "IA5String", 1610620935, NULL },
@@ -134,8 +131,6 @@ const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
   { "joint-iso-ccitt", 1073741825, "2"},
   { "ds", 1073741825, "5"},
   { NULL, 1, "4"},
-  { "PostalAddress", 1610612747, NULL },
-  { NULL, 2, "DirectoryString"},
   { "emailAddress", 1880096780, "AttributeType"},
   { "iso", 1073741825, "1"},
   { "member-body", 1073741825, "2"},
@@ -144,8 +139,6 @@ const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
   { "pkcs", 1073741825, "1"},
   { NULL, 1073741825, "9"},
   { NULL, 1, "1"},
-  { "Pkcs9email", 1612709890, "IA5String"},
-  { "ub-emailaddress-length", 524298, "1"},
   { "Name", 1610612754, NULL },
   { "rdnSequence", 2, "RDNSequence"},
   { "RDNSequence", 1610612747, NULL },
@@ -458,9 +451,8 @@ const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
   { "ResponderID", 1610612754, NULL },
   { "byName", 1610620930, "RDNSequence"},
   { NULL, 2056, "1"},
-  { "byKey", 536879106, "KeyHash"},
+  { "byKey", 536879111, NULL },
   { NULL, 4104, "2"},
-  { "KeyHash", 1073741831, NULL },
   { "SingleResponse", 1610612741, NULL },
   { "certID", 1073741826, "CertID"},
   { "certStatus", 1073741826, "CertStatus"},
@@ -481,12 +473,6 @@ const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
   { "revocationReason", 536895490, "CRLReason"},
   { NULL, 2056, "0"},
   { "UnknownInfo", 1073741844, NULL },
-  { "ArchiveCutoff", 1082130449, NULL },
-  { "AcceptableResponses", 1610612747, NULL },
-  { NULL, 12, NULL },
-  { "ServiceLocator", 1610612741, NULL },
-  { "issuer", 1073741826, "Name"},
-  { "locator", 2, "AuthorityInfoAccessSyntax"},
   { "CRLReason", 537133077, NULL },
   { "unspecified", 1073741825, "0"},
   { "keyCompromise", 1073741825, "1"},