diff options
author | Simon Josefsson <simon@josefsson.org> | 2010-04-13 10:32:40 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2010-04-13 10:32:40 +0200 |
commit | 8caa34394355b10e6e58948b9458317aeb882c7b (patch) | |
tree | 1c1a41fd08481777b5773a8434e0adf09629ffec | |
parent | bd50a4d730e75804744f45308c4d4dfb40db042d (diff) | |
download | libtasn1-8caa34394355b10e6e58948b9458317aeb882c7b.tar.gz libtasn1-8caa34394355b10e6e58948b9458317aeb882c7b.tar.bz2 libtasn1-8caa34394355b10e6e58948b9458317aeb882c7b.zip |
Indent examples. Fix syntax-check warnings.
-rw-r--r-- | NEWS | 12 | ||||
-rw-r--r-- | cfg.mk | 5 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | doc/libtasn1.texi | 4 | ||||
-rw-r--r-- | doc/reference/libtasn1-docs.sgml | 2 | ||||
-rw-r--r-- | doc/texinfo.css | 2 | ||||
-rw-r--r-- | examples/CertificateExample.c | 12 | ||||
-rw-r--r-- | examples/CrlExample.c | 12 | ||||
-rw-r--r-- | examples/pkix.asn | 8 | ||||
-rw-r--r-- | lib/ASN1.y | 2 | ||||
-rw-r--r-- | lib/coding.c | 2 | ||||
-rw-r--r-- | lib/decoding.c | 4 | ||||
-rw-r--r-- | lib/libtasn1.map | 2 | ||||
-rw-r--r-- | lib/parser_aux.c | 2 | ||||
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | tests/Test_tree.asn | 2 | ||||
-rw-r--r-- | tests/pkix.asn | 20 |
17 files changed, 50 insertions, 51 deletions
@@ -237,7 +237,7 @@ GNU Libtasn1 NEWS -*- outline -*- - Added the self test with "make check" target - Added management of ANY type with null length - Corrected some writes to invalid data. - + * Noteworthy changes in release 0.2.10 - Added scripts to assist in libtasn1 version detection from configure scripts. @@ -258,17 +258,17 @@ GNU Libtasn1 NEWS -*- outline -*- "INTEGER (5 | 10)" and "INTEGER (5)" - Comments start at "--" and finish at the "end of line" or - with another "--". + with another "--". * Noteworthy changes in release 0.2.5 - Bug fix in ordering procedure for SET OF and SEQUENCE OF types coding. - Manage structured format (BER encoding) in - asn1_der_decoding, asn1_decoding_element and + asn1_der_decoding, asn1_decoding_element and asn1_der_decoding_startEnd for OCTET STRING type. -- Manage SEQUENCE and SET empty structure. +- Manage SEQUENCE and SET empty structure. - Manage "indefinite length method" in asn1_der_decoding, - asn1_decoding_element and asn1_der_decoding_startEnd + asn1_decoding_element and asn1_der_decoding_startEnd for the following types: SEQUENCE, SEQUENCE OF, SET, and SET OF. - Bug fix in asn1_read_value with NULL parameter in case @@ -296,7 +296,7 @@ GNU Libtasn1 NEWS -*- outline -*- * Noteworthy changes in release 0.2.0 - Support for other platforms - Change asn1_create_element function interface (dest_name not needed any more) -- Change OBJECT IDENTIFIER syntax: numbers must be separated by dot in +- Change OBJECT IDENTIFIER syntax: numbers must be separated by dot in asn1_write_element and asn1_read_element functions (e.g. "1.2.3.4") * Noteworthy changes in release 0.1.2 @@ -29,8 +29,7 @@ endif local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_have_config_h \ sc_require_config_h sc_require_config_h_first \ - sc_trailing_blank sc_immutable_NEWS \ - sc_prohibit_magic_number_exit + sc_immutable_NEWS sc_prohibit_magic_number_exit VC_LIST_ALWAYS_EXCLUDE_REGEX = ^(build-aux|gl|lib/gllib|lib/glm4)/.*$ bootstrap-tools := autoconf,automake,libtool,bison @@ -52,7 +51,7 @@ upload-web-coverage: W32ROOT ?= $(HOME)/gnutls4win/inst -mingw32: autoreconf +mingw32: autoreconf ./configure --enable-gtk-doc --host=i586-mingw32msvc --build=`./config.guess` --prefix=$(W32ROOT) ChangeLog: diff --git a/configure.ac b/configure.ac index faec539..6ee9007 100644 --- a/configure.ac +++ b/configure.ac @@ -80,9 +80,9 @@ if test "$gl_gcc_warnings" = yes; then nw="$nw -Wtraditional-conversion" # Too many warnings for now nw="$nw -Wconversion" # Too many warnings for now nw="$nw -Wsign-conversion" # Too many warnings for now - nw="$nw -Wold-style-definition" # + nw="$nw -Wold-style-definition" # nw="$nw -Wpadded" # Our structs are not padded - nw="$nw -Wundef" # + nw="$nw -Wundef" # nw="$nw -Wunreachable-code" # Too many false positives nw="$nw -Wunused-macros" # Breaks on bison generated ASN1.c nw="$nw -Wunsafe-loop-optimizations" diff --git a/doc/libtasn1.texi b/doc/libtasn1.texi index b7467bc..8d823fa 100644 --- a/doc/libtasn1.texi +++ b/doc/libtasn1.texi @@ -128,7 +128,7 @@ definitions must have this syntax: DEFINITIONS <EXPLICIT or IMPLICIT> TAGS ::= - BEGIN + BEGIN <type and constants definitions> @@ -255,7 +255,7 @@ name inside a file with ASN1 definitions. @itemize @bullet -@item Add functions for a C code file generation containing equivalent +@item Add functions for a C code file generation containing equivalent data structures (not a single array like now). @item Type REAL. diff --git a/doc/reference/libtasn1-docs.sgml b/doc/reference/libtasn1-docs.sgml index 49b8844..ee3b3af 100644 --- a/doc/reference/libtasn1-docs.sgml +++ b/doc/reference/libtasn1-docs.sgml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> <book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> <bookinfo> diff --git a/doc/texinfo.css b/doc/texinfo.css index 96df89e..69614b5 100644 --- a/doc/texinfo.css +++ b/doc/texinfo.css @@ -1,4 +1,4 @@ -body { +body { margin: 2%; padding: 0 5%; background: #ffffff; diff --git a/examples/CertificateExample.c b/examples/CertificateExample.c index 396b8cf..4673f5f 100644 --- a/examples/CertificateExample.c +++ b/examples/CertificateExample.c @@ -227,7 +227,7 @@ create_certificate (ASN1_TYPE cert_def, unsigned char *der, int *der_len) /* Use the next 3 lines to visit the empty certificate */ /* printf("-----------------\n"); - asn1_visit_tree(cert1,""); + asn1_visit_tree(cert1,""); printf("-----------------\n"); */ /* version: v3(2) */ @@ -532,8 +532,8 @@ create_certificate (ASN1_TYPE cert_def, unsigned char *der, int *der_len) /* Use the next 3 lines to visit the certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(cert1,""); + /* printf("-----------------\n"); + asn1_visit_tree(cert1,""); printf("-----------------\n"); */ *der_len = max_len; @@ -616,8 +616,8 @@ get_certificate (ASN1_TYPE cert_def, unsigned char *der, int der_len) } /* Use the next 3 lines to visit the certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(cert2,""); + /* printf("-----------------\n"); + asn1_visit_tree(cert2,""); printf("-----------------\n"); */ @@ -659,7 +659,7 @@ main (int argc, char *argv[]) /* Use the following 3 lines to visit the PKIX1Implicit structures */ /* printf("-----------------\n"); - asn1_visit_tree(PKIX1Implicit88,"PKIX1Implicit88"); + asn1_visit_tree(PKIX1Implicit88,"PKIX1Implicit88"); printf("-----------------\n"); */ der_len = 1024; diff --git a/examples/CrlExample.c b/examples/CrlExample.c index 75a7416..f38f1a0 100644 --- a/examples/CrlExample.c +++ b/examples/CrlExample.c @@ -236,7 +236,7 @@ create_CRL (ASN1_TYPE cert_def, unsigned char *der, int *der_len) /* Use the next 3 lines to visit the empty certificate */ /* printf("-----------------\n"); - asn1_visit_tree(crl,""); + asn1_visit_tree(crl,""); printf("-----------------\n"); */ @@ -402,8 +402,8 @@ create_CRL (ASN1_TYPE cert_def, unsigned char *der, int *der_len) /* Use the next 3 lines to visit the certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(crl,""); + /* printf("-----------------\n"); + asn1_visit_tree(crl,""); printf("-----------------\n"); */ *der_len = max_len; @@ -482,8 +482,8 @@ get_CRL (ASN1_TYPE cert_def, unsigned char *der, int der_len) } /* Use the next 3 lines to visit the certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(crl2,""); + /* printf("-----------------\n"); + asn1_visit_tree(crl2,""); printf("-----------------\n"); */ @@ -524,7 +524,7 @@ main (int argc, char *argv[]) /* Use the following 3 lines to visit the PKIX1Implicit structures */ /* printf("-----------------\n"); - asn1_visit_tree(cert_def,"PKIX1Implicit88"); + asn1_visit_tree(cert_def,"PKIX1Implicit88"); printf("-----------------\n"); */ der_len = 1024; diff --git a/examples/pkix.asn b/examples/pkix.asn index 76cbb0d..d13ce20 100644 --- a/examples/pkix.asn +++ b/examples/pkix.asn @@ -384,7 +384,7 @@ id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 } Attribute ::= SEQUENCE { type AttributeType, values SET OF AttributeValue - -- at least one value is required -- + -- at least one value is required -- } AttributeType ::= OBJECT IDENTIFIER @@ -548,7 +548,7 @@ TBSCertificate ::= SEQUENCE { subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL, -- If present, version shall be v2 or v3 extensions [3] EXPLICIT Extensions OPTIONAL - -- If present, version shall be v3 -- + -- If present, version shall be v3 -- } Version ::= INTEGER { v1(0), v2(1), v3(2) } @@ -600,7 +600,7 @@ TBSCertList ::= SEQUENCE { -- if present, shall be v2 } OPTIONAL, crlExtensions [0] EXPLICIT Extensions OPTIONAL - -- if present, shall be v2 -- + -- if present, shall be v2 -- } -- Version, Time, CertificateSerialNumber, and Extensions were @@ -684,7 +684,7 @@ BuiltInStandardAttributes ::= SEQUENCE { personal-name [5] EXPLICIT PersonalName OPTIONAL, -- see also teletex-personal-name organizational-unit-names [6] EXPLICIT OrganizationalUnitNames OPTIONAL - -- see also teletex-organizational-unit-names -- + -- see also teletex-organizational-unit-names -- } CountryName ::= [APPLICATION 1] CHOICE { @@ -299,7 +299,7 @@ type_assig_right_tag_default : type_assig_right_tag {$$=$1;} _asn1_set_down($$,$2);} | type_assig_right_tag OPTIONAL {$$=_asn1_mod_type($1,CONST_OPTION);} ; - + type_assig : IDENTIFIER type_assig_right_tag_default {$$=_asn1_set_name($2,$1);} ; diff --git a/lib/coding.c b/lib/coding.c index 9a28b12..31b5ebb 100644 --- a/lib/coding.c +++ b/lib/coding.c @@ -384,7 +384,7 @@ _asn1_complete_explicit_tag (ASN1_TYPE node, unsigned char *der, p = node->down; /* When there are nested tags we must complete them reverse to the order they were created. This is because completing a tag - modifies all data within it, including the incomplete tags + modifies all data within it, including the incomplete tags which store buffer positions -- simon@josefsson.org 2002-09-06 */ while (p->right) diff --git a/lib/decoding.c b/lib/decoding.c index 253c9ba..689702e 100644 --- a/lib/decoding.c +++ b/lib/decoding.c @@ -2561,7 +2561,7 @@ asn1_expand_any_defined_by (ASN1_TYPE definitions, ASN1_TYPE * element) if ((result == ASN1_SUCCESS) && (!strcmp (p3->value, value))) { - p2 = p2->right; /* pointer to the structure to + p2 = p2->right; /* pointer to the structure to use for expansion */ while ((p2) && (p2->type & CONST_ASSIGN)) p2 = p2->right; @@ -2743,7 +2743,7 @@ asn1_expand_octet_string (ASN1_TYPE definitions, ASN1_TYPE * element, && (!strcmp (objectNode->value, value))) { - p2 = p2->right; /* pointer to the structure to + p2 = p2->right; /* pointer to the structure to use for expansion */ while ((p2) && (p2->type & CONST_ASSIGN)) p2 = p2->right; diff --git a/lib/libtasn1.map b/lib/libtasn1.map index 263a7a7..06d5048 100644 --- a/lib/libtasn1.map +++ b/lib/libtasn1.map @@ -50,7 +50,7 @@ LIBTASN1_0_3 asn1_strerror; asn1_write_value; - # Old symbols + # Old symbols libtasn1_strerror; libtasn1_perror; diff --git a/lib/parser_aux.c b/lib/parser_aux.c index 65d57d0..a3150a8 100644 --- a/lib/parser_aux.c +++ b/lib/parser_aux.c @@ -160,7 +160,7 @@ asn1_find_node (ASN1_TYPE pointer, const char *name) p = p->down; - /* The identifier "?LAST" indicates the last element + /* The identifier "?LAST" indicates the last element in the right chain. */ if (!strcmp (n, "?LAST")) { diff --git a/src/Makefile.am b/src/Makefile.am index e565464..09133f6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,8 +24,8 @@ LDADD = ../lib/libtasn1.la ../gl/libgnu.la bin_PROGRAMS = asn1Parser asn1Coding asn1Decoding -asn1Parser_SOURCES = asn1Parser.c +asn1Parser_SOURCES = asn1Parser.c -asn1Coding_SOURCES = asn1Coding.c +asn1Coding_SOURCES = asn1Coding.c -asn1Decoding_SOURCES = asn1Decoding.c +asn1Decoding_SOURCES = asn1Decoding.c diff --git a/tests/Test_tree.asn b/tests/Test_tree.asn index 2cac58c..ec3c996 100644 --- a/tests/Test_tree.asn +++ b/tests/Test_tree.asn @@ -115,7 +115,7 @@ id-anyTest OBJECT IDENTIFIER ::= {id-ic 29 1} id-anyTest2 OBJECT IDENTIFIER ::= {id-ic 29 2} -anyTest2 ::= INTEGER +anyTest2 ::= INTEGER VisibleString ::= [UNIVERSAL 26] IMPLICIT OCTET STRING diff --git a/tests/pkix.asn b/tests/pkix.asn index 2883361..bd3c435 100644 --- a/tests/pkix.asn +++ b/tests/pkix.asn @@ -208,7 +208,7 @@ DistributionPoint ::= SEQUENCE { DistributionPointName ::= CHOICE { fullName [0] GeneralNames, - nameRelativeToCRLIssuer [1] RelativeDistinguishedName + nameRelativeToCRLIssuer [1] RelativeDistinguishedName } ReasonFlags ::= BIT STRING { @@ -384,7 +384,7 @@ id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 } Attribute ::= SEQUENCE { type AttributeType, values SET OF AttributeValue - -- at least one value is required -- + -- at least one value is required -- } AttributeType ::= OBJECT IDENTIFIER @@ -521,7 +521,7 @@ TBSCertificate ::= SEQUENCE { subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL, -- If present, version shall be v2 or v3 extensions [3] EXPLICIT Extensions OPTIONAL - -- If present, version shall be v3 -- + -- If present, version shall be v3 -- } Version ::= INTEGER { v1(0), v2(1), v3(2) } @@ -573,7 +573,7 @@ TBSCertList ::= SEQUENCE { -- if present, shall be v2 } OPTIONAL, crlExtensions [0] EXPLICIT Extensions OPTIONAL - -- if present, shall be v2 -- + -- if present, shall be v2 -- } -- Version, Time, CertificateSerialNumber, and Extensions were @@ -604,7 +604,7 @@ id-dsa-with-sha1 OBJECT IDENTIFIER ::= { Dss-Sig-Value ::= SEQUENCE { r INTEGER, - s INTEGER + s INTEGER } dhpublicnumber OBJECT IDENTIFIER ::= { @@ -658,7 +658,7 @@ BuiltInStandardAttributes ::= SEQUENCE { personal-name [5] EXPLICIT PersonalName OPTIONAL, -- see also teletex-personal-name organizational-unit-names [6] EXPLICIT OrganizationalUnitNames OPTIONAL - -- see also teletex-organizational-unit-names -- + -- see also teletex-organizational-unit-names -- } CountryName ::= [APPLICATION 1] CHOICE { @@ -939,7 +939,7 @@ pkcs-7-ContentInfo ::= SEQUENCE { pkcs-7-DigestInfo ::= SEQUENCE { digestAlgorithm pkcs-7-DigestAlgorithmIdentifier, - digest pkcs-7-Digest + digest pkcs-7-Digest } pkcs-7-Digest ::= OCTET STRING @@ -952,7 +952,7 @@ pkcs-7-SignedData ::= SEQUENCE { encapContentInfo pkcs-7-EncapsulatedContentInfo, certificates [0] IMPLICIT pkcs-7-CertificateSet OPTIONAL, crls [1] IMPLICIT pkcs-7-CertificateRevocationLists OPTIONAL, - signerInfos pkcs-7-SignerInfos + signerInfos pkcs-7-SignerInfos } pkcs-7-CMSVersion ::= INTEGER { v0(0), v1(1), v2(2), v3(3), v4(4) } @@ -1041,7 +1041,7 @@ pkcs-8-Attributes ::= SET OF Attribute pkcs-8-EncryptedPrivateKeyInfo ::= SEQUENCE { encryptionAlgorithm AlgorithmIdentifier, - encryptedData pkcs-8-EncryptedData + encryptedData pkcs-8-EncryptedData } pkcs-8-EncryptedData ::= OCTET STRING @@ -1080,7 +1080,7 @@ pkcs-5-PBKDF2-params ::= SEQUENCE { }, iterationCount INTEGER (1..MAX), keyLength INTEGER (1..MAX) OPTIONAL, - prf AlgorithmIdentifier OPTIONAL -- DEFAULT pkcs-5-id-hmacWithSHA1 + prf AlgorithmIdentifier OPTIONAL -- DEFAULT pkcs-5-id-hmacWithSHA1 } -- PKCS #12 stuff |