From 0e6b5c5c223a23d8fcb9bae6212ce03ebbca53a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 28 May 2009 01:17:17 +0000 Subject: [PATCH] remove trailing whitespace git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25232 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/asn1/ChangeLog | 278 +++++++++++++++++++-------------------- lib/asn1/Makefile.am | 2 +- lib/asn1/asn1_gen.c | 12 +- lib/asn1/asn1_print.c | 2 +- lib/asn1/canthandle.asn1 | 2 +- lib/asn1/check-common.c | 4 +- lib/asn1/check-gen.c | 6 +- lib/asn1/cms.asn1 | 12 +- lib/asn1/der.h | 2 +- lib/asn1/der_get.c | 8 +- lib/asn1/der_put.c | 2 +- lib/asn1/digest.asn1 | 2 +- lib/asn1/extra.c | 4 +- lib/asn1/gen.c | 2 +- lib/asn1/gen_copy.c | 2 +- lib/asn1/gen_decode.c | 6 +- lib/asn1/gen_encode.c | 4 +- lib/asn1/gen_free.c | 2 +- lib/asn1/gen_length.c | 2 +- lib/asn1/krb5.asn1 | 8 +- lib/asn1/lex.l | 4 +- lib/asn1/main.c | 4 +- lib/asn1/parse.y | 4 +- lib/asn1/pkcs12.asn1 | 2 +- lib/asn1/pkcs8.asn1 | 2 +- lib/asn1/pkinit.asn1 | 26 ++-- lib/asn1/rfc2459.asn1 | 22 ++-- lib/asn1/setchgpw2.asn1 | 2 +- lib/asn1/test.asn1 | 14 +- 29 files changed, 221 insertions(+), 221 deletions(-) diff --git a/lib/asn1/ChangeLog b/lib/asn1/ChangeLog index df631ace7..523e24bad 100644 --- a/lib/asn1/ChangeLog +++ b/lib/asn1/ChangeLog @@ -7,15 +7,15 @@ 2008-04-07 Love Hörnquist Åstrand * gen.c: Use unsigned where appropriate. - + 2008-03-22 Love Hörnquist Åstrand - + * k5.asn1: Match name in ClientCanonicalizedNames with -10 * k5.asn1: add referral-valid-until 2008-01-13 Love Hörnquist Åstrand - + * asn1-common.h gen.c der.c gen_encode.c: add and use der_{malloc,free} 2007-12-13 Love Hörnquist Åstrand @@ -27,11 +27,11 @@ * Makefile.am: Add DigestTypes, add --seq to antoher type. * digest.asn1: Add supportedMechs request. - + 2007-10-18 Love Hörnquist Åstrand * k5.asn1: Some "old" windows enctypes. From Andy Polyakov. - + 2007-07-23 Love Hörnquist Åstrand * Makefile.am: Fold in pk-init-alg-agilty. @@ -63,8 +63,8 @@ 2007-07-02 Love Hörnquist Åstrand - * rfc2459.asn1: Re-add size limits. - + * rfc2459.asn1: Re-add size limits. + * k5.asn1: Add size limits from RFC 4120. * gen_decode.c: Check range on SEQ OF and OCTET STRING. @@ -80,7 +80,7 @@ * rfc2459.asn1: Add AuthorityInfoAccessSyntax. * rfc2459.asn1: Add authorityInfoAccess, rename proxyCertInfo. - + * Makefile.am: Add authorityInfoAccess, rename proxyCertInfo. 2007-06-27 Love Hörnquist Åstrand @@ -138,9 +138,9 @@ * der_format.c (der_parse_hex_heim_integer): check length before reading data. - + * check-gen.c (test_authenticator): free memory - + 2007-05-31 Love Hörnquist Åstrand * Makefile.am: add MS-UPN-SAN @@ -149,13 +149,13 @@ * rfc2459.asn1: Do evil things to handle IMPLICIT encoded structures. Add id-ms-client-authentication. - + 2007-05-30 Love Hörnquist Åstrand * Makefile.am: Add asn1_id_ms_cert_enroll_domaincontroller.x - + 2007-05-10 Love Hörnquist Åstrand - + * gen.c: Add struct units; as a forward declaration. Pointed out by Marcus Watts. @@ -164,65 +164,65 @@ * Makefile.am: add U.S. Federal PKI Common Policy Framework * rfc2459.asn1: add U.S. Federal PKI Common Policy Framework - + 2007-04-24 Love Hörnquist Åstrand * gen_seq.c: Handle the case of resize to 0 and realloc that returns NULL. * check-gen.c (check_seq): free seq. - + 2007-04-19 Love Hörnquist Åstrand * check-der.c (test_heim_oid_format_same): avoid leaking memory in the non failure case too - + 2007-04-16 Love Hörnquist Åstrand - + * Makefile.am: remove extra ^Q - + 2007-04-11 Love Hörnquist Åstrand - + * der_get.c: Allow trailing NULs. We allow this since MIT Kerberos sends an strings in the NEED_PREAUTH case that includes a trailing NUL. - + 2007-02-17 Love Hörnquist Åstrand - - + + * Makefile.am: Add PA-ClientCanonicalized and friends. * k5.asn1: Add PA-ClientCanonicalized and friends. - + 2007-02-08 Love Hörnquist Åstrand * check-der.c: Drop one over INT_MAX test-case. - + 2007-02-05 Love Hörnquist Åstrand - + * pkinit.asn1: add id-pkinit-ms-eku - + * pkinit.asn1: fill in more bits of id-pkinit-ms-san - + 2007-02-02 Love Hörnquist Åstrand - + * digest.asn1: rename hash-a1 to session key - + 2007-02-01 Love Hörnquist Åstrand - + * digest.asn1: Add elements to send in requestResponse to KDC and get status of the request. - + 2007-01-31 Love Hörnquist Åstrand - + * Makefile.am: seq rules for CRLDistributionPoints - + 2007-01-30 Love Hörnquist Åstrand - + * Makefile.am: add CRLDistributionPoints and friends - + 2007-01-20 Love Hörnquist Åstrand - + * check-der.c: check BMPstring oddlength more * check-der.c: Test for NUL char in string in GENERAL STRING. @@ -231,23 +231,23 @@ ASN1_BAD_CHARACTER error-code if we find them. * asn1_err.et: Add BAD_CHARACTER error. - + 2007-01-16 Love Hörnquist Åstrand - + * Makefile.am: Add id-at-streetAddress. * rfc2459.asn1: Add id-at-streetAddress. - + 2007-01-12 Love Hörnquist Åstrand - + * rfc2459.asn1: Add PKIXXmppAddr and id-pkix-on-xmppAddr. - + 2006-12-30 Love Hörnquist Åstrand - + * Makefile.am: Add id-pkix-kp oids. * rfc2459.asn1: Add id-pkix-kp oids. - + 2006-12-29 Love Hörnquist Åstrand * gen_encode.c: Named bit strings have this horrible, disgusting, @@ -258,9 +258,9 @@ * check-gen.c: Check all other silly bitstring combinations. * Makefile.am: Add --sequence=Extensions to rfc2459. - + 2006-12-28 Love Hörnquist Åstrand - + * kx509.asn1: Add kx509. * Makefile.am: Add kx509. @@ -272,41 +272,41 @@ * Makefile.am: Add ntlm files. * digest.asn1: Add bits for handling NTLM. - + 2006-12-08 Love Hörnquist Åstrand * Makefile.am: add pkix proxy cert policy lang oids * rfc2459.asn1: add pkix proxy cert policy lang oids - + 2006-12-07 Love Hörnquist Åstrand - + * rfc2459.asn1: unbreak id-pe-proxyCertInfo * rfc2459.asn1: Add id-pkix-on-dnsSRV and related oids 2006-11-28 Love Hörnquist Åstrand - + * Makefile.am: Add explicit depenency to LIB_roken for libasn1.la, make AIX happy. - + 2006-11-27 Love Hörnquist Åstrand * der_format.c (der_print_heim_oid): oid with zero length is invalid, fail to print. - + 2006-11-24 Love Hörnquist Åstrand - + * der_format.c (der_print_heim_oid): use delim when printing. - + 2006-11-21 Love Hörnquist Åstrand - + * k5.asn1: Make KRB5-PADATA-S4U2SELF pa type 129. - + 2006-10-24 Love Hörnquist Åstrand * asn1_err.et: add EXTRA_DATA - + 2006-10-21 Love Hörnquist Åstrand * check-gen.c: avoid leaking memory @@ -321,17 +321,17 @@ unaligned. * lex.l: add missing */ - + * lex.c: need %e for hpux lex 2006-10-20 Love Hörnquist Åstrand - + * Makefile.am: remove dups from gen_files_test, add check-timegm. - + * Makefile.am: include more test.asn1 built files * Makefile.am: More files, now for make check. - + 2006-10-19 Love Hörnquist Åstrand * Makefile.am: Add missing files @@ -345,16 +345,16 @@ * timegm.c: make more strict * der_locl.h: Rename timegm to _der_timegm. - + 2006-10-17 Love Hörnquist Åstrand - + * timegm.c: vJust fail if tm_mon is out of range for now XXXX this is wrong. - + 2006-10-16 Love Hörnquist Åstrand - + * Makefile.am: extra depencies on der-protos.h - + 2006-10-14 Love Hörnquist Åstrand * check-der.c: Prefix primitive types with der_. @@ -364,7 +364,7 @@ * heim_asn1.h: move prototype away from here. * der_format.c: Add der_parse_heim_oid - + * gen_free.c: prefix primitive types with der_ * der_copy.c: prefix primitive types with der_ @@ -384,7 +384,7 @@ * der_copy.c: rename copy_ to der_copy_ * Makefile.am: Add der-protos.h to nodist_include_HEADERS. - + * der.h: use newly built * Makefile.am: Generate der prototypes. @@ -400,28 +400,28 @@ * check-der.c: New der_print_heim_oid signature. Test der_parse_heim_oid - + 2006-10-07 Love Hörnquist Åstrand - + * lex.l: Grow an even larger output table size. * Makefile.am: split build files into dist_ and noinst_ SOURCES - + 2006-10-04 Love Hörnquist Åstrand * gen_seq.c: In generation of remove_TYPE: if you just removed the last element, you must not memmove memory beyond the array. From Andrew Bartlett - + 2006-10-01 Love Hörnquist Åstrand * lex.l: Grow (%p, %a, %n) tables for Solaris 10 lex. From Harald Barth. - + 2006-09-24 Love Hörnquist Åstrand * gen_decode.c (decode_type): drop unused variable realtype. - + 2006-09-11 Love Hörnquist Åstrand * Makefile.am: Add KRB5SignedPath and friends. @@ -434,7 +434,7 @@ * CMS.asn1 (CMSVersion): rename versions from v0 to CMSVersion_v0, ... - + 2006-09-05 Love Hörnquist Åstrand * Makefile.am: Add TESTSeqOf for testing sequence generation code. @@ -462,22 +462,22 @@ TType". I'm tried of writing realloc(foo->data, sizeof(foo->data[0]) + (foo->len + 1)); Only generated for those type that is enabled by the command flag --sequence. - + 2006-08-25 Love Hörnquist Åstrand * digest.asn1 (DigestRequest): add authid * digest.asn1: Comment describing on how to communicate the sasl int/conf mode. - + 2006-08-23 Love Hörnquist Åstrand * digest.asn1: Add some missing fields needed for digest. - + 2006-08-21 Love Hörnquist Åstrand * digest.asn1: Tweak to make consisten and more easier to use. - + 2006-07-20 Love Hörnquist Åstrand * Makefile.am: Remove CMS symmetric encryption support. Add @@ -486,9 +486,9 @@ * digest.asn1: DigestProtocol * k5.asn1: Remove CMS symmetric encryption support. - + 2006-06-22 Love Hörnquist Åstrand - + * check-der.c (check_fail_heim_integer): disable test * der_get.c (der_get_heim_integer): revert part of previous @@ -501,29 +501,29 @@ * check-der.c: Add one check for heim_int, add checking for oid printing - + 2006-06-06 Love Hörnquist Åstrand * Makefile.am: Impersonation support bits (and sort) * k5.asn1: Impersonation support bits. - + 2006-05-13 Love Hörnquist Åstrand * der_format.c (der_parse_hex_heim_integer): avoid shadowing. - + 2006-04-29 Love Hörnquist Åstrand - + * Makefile.am: Add ExternalPrincipalIdentifiers, shared between several elements. * pkinit.asn1: Add ExternalPrincipalIdentifiers, shared between several elements. - + 2006-04-28 Love Hörnquist Åstrand * parse.y: Add missing ;'s, found by bison on a SuSE 8.2 machine. - + 2006-04-26 Love Hörnquist Åstrand * Makefile.am: Add definitions from RFC 3820, Proxy Certificate @@ -531,7 +531,7 @@ * rfc2459.asn1: Add definitions from RFC 3820, Proxy Certificate Profile. - + 2006-04-24 Love Hörnquist Åstrand * rfc2459.asn1: Add id-Userid @@ -539,19 +539,19 @@ * Makefile.am: Add UID and email * pkcs9.asn1: Add id-pkcs9-emailAddress - + * Makefile.am: Add attribute type oids from X520 and RFC 2247 DC oid * rfc2459.asn1: Add attribute type oids from X520 and RFC 2247 DC oid - + 2006-04-21 Love Hörnquist Åstrand * Makefile.am: add sha-1 and sha-2 * rfc2459.asn1: add sha-1 and sha-2 - + 2006-04-15 Love Hörnquist Åstrand * Makefile.am: Add id-pkcs1-sha256WithRSAEncryption and friends @@ -560,25 +560,25 @@ * CMS.asn1: Turn CMSRC2CBCParameter.rc2ParameterVersion into a constrained integer - + 2006-04-08 Love Hörnquist Åstrand * hash.c (hashtabnew): check for NULL before setting structure. Coverity, NetBSD CID#4 - + 2006-03-31 Love Hörnquist Åstrand * Makefile.am: gen_files_rfc2459 += asn1_ExtKeyUsage.x - + * rfc2459.asn1: Add ExtKeyUsage. * gen.c (generate_header_of_codefile): remove unused variable. - + 2006-03-30 Love Hörnquist Åstrand * gen.c: Put all the IMPORTed headers into the headerfile to avoid hidden depencies. - + 2006-03-27 Love Hörnquist Åstrand * Makefile.am: Add id-pkinit-ms-san. @@ -586,23 +586,23 @@ * pkinit.asn1: Add id-pkinit-ms-san. * k5.asn1 (PADATA-TYPE): Add KRB5-PADATA-PA-PK-OCSP-RESPONSE - + 2006-03-26 Love Hörnquist Åstrand * Makefile.am: Add pkinit-san. * pkinit.asn1: Rename id-pksan to id-pkinit-san - + 2006-03-08 Love Hörnquist Åstrand * gen.c (init_generate): Nothing in the generated files needs timegm(), so no need to provide a prototype for it. - + 2006-02-13 Love Hörnquist Åstrand * pkinit.asn1: paChecksum is now OPTIONAL so it can be upgraded to something better then SHA1 - + 2006-01-31 Love Hörnquist Åstrand * extra.c: Stub-generator now generates alloc statements for @@ -611,7 +611,7 @@ * check-gen.c: check for "tagless ANY OPTIONAL" * test.asn1: check for "tagless ANY OPTIONAL" - + 2006-01-30 Love Hörnquist Åstrand * der.h: UniversalString and BMPString are both implemented. @@ -619,16 +619,16 @@ * der.h: Remove , after the last element of enum. * asn1_gen.c: Spelling. - + 2006-01-20 Love Hörnquist Åstrand - + * der_length.c (length_heim_integer): Try handle negative length of integers better. * der_get.c (der_get_heim_integer): handle negative integers. - + * check-der.c: check heim_integer. - + 2006-01-18 Love Hörnquist Åstrand * Makefile.am: Its cRLReason, not cRLReasons @@ -646,7 +646,7 @@ * der_cmp.c (heim_integer_cmp): make it work with negative numbers. - + 2006-01-17 Love Hörnquist Åstrand * check-der.c: check that der_parse_hex_heim_integer() handles odd @@ -656,19 +656,19 @@ to errors, handle odd length numbers. 2006-01-13 Love Hörnquist Åstrand - + * Makefile.am: Add RSAPrivateKey - + * rfc2459.asn1: Add RSAPrivateKey. - + 2006-01-05 Love Hörnquist Åstrand - + * der_copy.c (copy_heim_integer): copy the negative flag - + 2005-12-14 Love Hörnquist Åstrand * parse.y: Drop ExceptionSpec for now, its not used. - + 2005-12-06 Love Hörnquist Åstrand * test.asn1: Add test string for constraints. @@ -679,66 +679,66 @@ constructed types. * parse.y: Add support for parsing part of the Constraint-s - + 2005-10-29 Love Hörnquist Åstrand - + * Makefile.am: Add some X9.57 (DSA) oids, sort lines * rfc2459.asn1: Add some X9.57 (DSA) oids. - + 2005-10-07 Love Hörnquist Åstrand * Makefile.am: Remove pk-init-19 support. - + * pkinit.asn1: Fix comment - + * check-der.c: Add tests for parse and print functions for heim_integer. * Makefile.am: Add parse and print functions for heim_integer. - + * der_format.c: Add parse and print functions for heim_integer. * der.h: Add parse and print functions for heim_integer. - + 2005-09-22 Love Hörnquist Åstrand * Makefile.am (gen_files_rfc2459) += asn1_DHPublicKey.x - + * rfc2459.asn1: Add DHPublicKey, and INTEGER to for storing the DH public key in the SubjectPublicKeyInfo.subjectPublicKey BIT STRING. - + 2005-09-20 Love Hörnquist Åstrand * gen_decode.c: TSequenceOf/TSetOf: Increase the length of the array after successful decoding the next element, so that the array don't contain heap-data. - + 2005-09-13 Love Hörnquist Åstrand * check-der.c: Avoid empty array initiators. - + * pkcs8.asn1 (PKCS8PrivateKeyInfo): Inline SET OF to avoid compiler "feature" - + * check-common.c: Avoid signedness warnings. - + * check-common.h: Makes bytes native platform signed to avoid casting everywhere - + * check-der.c: Don't depend on malloc(very-very-larger-value) will fail. Cast to unsigned long before printing size_t. - + * check-gen.c: Don't depend on malloc(very-very-larger-value) will fail. - + * check-gen.c: Fix signedness warnings. - + * lex.l: unput() have to hanppen in actions for flex 2.5.31, can do them in user code sesction, so move up handle_comment and handle_string into action, not much sharing was done anyway. - + 2005-09-09 Love Hörnquist Åstrand * check-der.c (test_one_int): len and len_len is size_t @@ -756,11 +756,11 @@ * gen_decode.c: Change name of oldret for each instance its used to avoid shadow warning. From: Stefan Metzmacher . - + * parse.y: Const poision yyerror. * gen.c: Const poision. - + 2005-08-22 Love Hörnquist Åstrand * k5.asn1: Add KRB5-PADATA-PK-AS-09-BINDING, client send @@ -768,7 +768,7 @@ client support the binding the PA-REP to the AS-REQ packet. This is to fix the problem lack of binding the AS-REQ to the PK-AS-REP in pre PK-INIT-27. The nonce is replaced with a asCheckSum. - + 2005-08-11 Love Hörnquist Åstrand * canthandle.asn1: Allocation is done on CONTEXT tags. @@ -799,15 +799,15 @@ * Makefile.am: Update to pkinit-27 * pkinit.asn1: Update to pkinit-27 - + 2005-07-25 Love Hörnquist Åstrand * check-der.c: make it work for non c99 compilers too - + * check-der.c: start testing BIT STRING * der_cmp.c (heim_bit_string_cmp): try handle corner cases better - + * gen_free.c (free_type): free bignum integers 2005-07-23 Love Hörnquist Åstrand @@ -829,18 +829,18 @@ work. * check-gen.c: Two implicit tests, one with all structures inlined - + * test.asn1: fix workaround for IMPLICIT CONS case - + * canthandle.asn1: fix workaround for IMPLICIT CONS case - + * asn1_print.c: hint that there are IMPLICIT content when we find it * check-gen.c: Added #ifdef out test for IMPLICIT tagging. * Makefile.am: test several IMPLICIT tag level deep - + * test.asn1: test several IMPLICIT tag level deep * test.asn1: tests for IMPLICIT diff --git a/lib/asn1/Makefile.am b/lib/asn1/Makefile.am index 0a11c94d2..1e5edfe12 100644 --- a/lib/asn1/Makefile.am +++ b/lib/asn1/Makefile.am @@ -370,7 +370,7 @@ gen_files_pkinit = \ asn1_KDCDHKeyInfo_Win2k.x \ asn1_ReplyKeyPack_Win2k.x \ asn1_PkinitSP80056AOtherInfo.x \ - asn1_PkinitSuppPubInfo.x + asn1_PkinitSuppPubInfo.x gen_files_pkcs12 = \ asn1_id_pkcs_12.x \ diff --git a/lib/asn1/asn1_gen.c b/lib/asn1/asn1_gen.c index e25f6d919..925cc72cb 100644 --- a/lib/asn1/asn1_gen.c +++ b/lib/asn1/asn1_gen.c @@ -119,24 +119,24 @@ doit(const char *fn) &sz); if (ret) errx(1, "der_put_length_and_tag: %d", ret); - + if (fwrite(p + sizeof(p) - sz , sz, 1, fout) != 1) err(1, "fwrite length/tag failed"); offset += sz; - + if (data) { size_t datalen; - + datalen = strlen(data) / 2; pdata = emalloc(sz); - + if (hex_decode(data, pdata, datalen) != datalen) errx(1, "failed to decode data"); - + if (fwrite(pdata, datalen, 1, fout) != 1) err(1, "fwrite data failed"); offset += datalen; - + free(pdata); } } diff --git a/lib/asn1/asn1_print.c b/lib/asn1/asn1_print.c index f45d6e10a..258fd4d87 100644 --- a/lib/asn1/asn1_print.c +++ b/lib/asn1/asn1_print.c @@ -215,7 +215,7 @@ loop (unsigned char *buf, size_t len, int indent) ret = der_get_integer (buf, length, &num, NULL); if (ret) errx (1, "der_get_enum: %s", error_message (ret)); - + printf("%u\n", num); break; } diff --git a/lib/asn1/canthandle.asn1 b/lib/asn1/canthandle.asn1 index 5c2690f9b..a335ee89e 100644 --- a/lib/asn1/canthandle.asn1 +++ b/lib/asn1/canthandle.asn1 @@ -7,7 +7,7 @@ CANTHANDLE DEFINITIONS ::= BEGIN -- Code the tag [2] but it should be primitive since KAKA3 is -- Workaround: use the INTEGER type directly -Kaka2 ::= SEQUENCE { +Kaka2 ::= SEQUENCE { kaka2-1 [0] INTEGER } diff --git a/lib/asn1/check-common.c b/lib/asn1/check-common.c index 6b27e2eb1..b39690383 100644 --- a/lib/asn1/check-common.c +++ b/lib/asn1/check-common.c @@ -328,7 +328,7 @@ generic_decode_fail (const struct test_case *tests, int ret; size_t sz; const void *bytes; - + current_test = tests[i].name; current_state = "init"; @@ -350,7 +350,7 @@ generic_decode_fail (const struct test_case *tests, sz = 4096; bytes = NULL; } - + buf = map_alloc(OVERRUN, bytes, sz, &buf_map); if (tests[i].byte_len == -1) diff --git a/lib/asn1/check-gen.c b/lib/asn1/check-gen.c index d634cb724..9adf4f3e0 100644 --- a/lib/asn1/check-gen.c +++ b/lib/asn1/check-gen.c @@ -894,7 +894,7 @@ check_seq_of_size(void) TESTSeqSizeOf2 ssof2ok1 = { 1, integers }; TESTSeqSizeOf2 ssof2ok2 = { 2, integers }; TESTSeqSizeOf2 ssof2f2 = { 3, integers }; - + test_seq_of(TESTSeqSizeOf2, 0, &ssof2f1); test_seq_of(TESTSeqSizeOf2, 1, &ssof2ok1); test_seq_of(TESTSeqSizeOf2, 1, &ssof2ok2); @@ -904,7 +904,7 @@ check_seq_of_size(void) TESTSeqSizeOf3 ssof3f1 = { 0, NULL }; TESTSeqSizeOf3 ssof3ok1 = { 1, integers }; TESTSeqSizeOf3 ssof3ok2 = { 2, integers }; - + test_seq_of(TESTSeqSizeOf3, 0, &ssof3f1); test_seq_of(TESTSeqSizeOf3, 1, &ssof3ok1); test_seq_of(TESTSeqSizeOf3, 1, &ssof3ok2); @@ -914,7 +914,7 @@ check_seq_of_size(void) TESTSeqSizeOf4 ssof4ok2 = { 1, integers }; TESTSeqSizeOf4 ssof4ok3 = { 2, integers }; TESTSeqSizeOf4 ssof4f1 = { 3, integers }; - + test_seq_of(TESTSeqSizeOf4, 1, &ssof4ok1); test_seq_of(TESTSeqSizeOf4, 1, &ssof4ok2); test_seq_of(TESTSeqSizeOf4, 1, &ssof4ok3); diff --git a/lib/asn1/cms.asn1 b/lib/asn1/cms.asn1 index 65a467521..1c13d5f38 100644 --- a/lib/asn1/cms.asn1 +++ b/lib/asn1/cms.asn1 @@ -18,8 +18,8 @@ id-pkcs7-digestedData OBJECT IDENTIFIER ::= { id-pkcs7 5 } id-pkcs7-encryptedData OBJECT IDENTIFIER ::= { id-pkcs7 6 } CMSVersion ::= INTEGER { - CMSVersion_v0(0), - CMSVersion_v1(1), + CMSVersion_v0(0), + CMSVersion_v1(1), CMSVersion_v2(2), CMSVersion_v3(3), CMSVersion_v4(4) @@ -34,7 +34,7 @@ MessageDigest ::= OCTET STRING ContentInfo ::= SEQUENCE { contentType ContentType, - content [0] EXPLICIT heim_any OPTIONAL -- DEFINED BY contentType + content [0] EXPLICIT heim_any OPTIONAL -- DEFINED BY contentType } EncapsulatedContentInfo ::= SEQUENCE { @@ -53,7 +53,7 @@ IssuerAndSerialNumber ::= SEQUENCE { serialNumber CertificateSerialNumber } --- RecipientIdentifier is same as SignerIdentifier, +-- RecipientIdentifier is same as SignerIdentifier, -- lets glue them togheter and save some bytes and share code for them CMSIdentifier ::= CHOICE { @@ -67,7 +67,7 @@ RecipientIdentifier ::= CMSIdentifier --- CMSAttributes are the combined UnsignedAttributes and SignedAttributes --- to store space and share code -CMSAttributes ::= SET OF Attribute -- SIZE (1..MAX) +CMSAttributes ::= SET OF Attribute -- SIZE (1..MAX) SignatureValue ::= OCTET STRING @@ -79,7 +79,7 @@ SignerInfo ::= SEQUENCE { SET OF Attribute OPTIONAL, signatureAlgorithm SignatureAlgorithmIdentifier, signature SignatureValue, - unsignedAttrs [1] IMPLICIT -- CMSAttributes -- + unsignedAttrs [1] IMPLICIT -- CMSAttributes -- SET OF Attribute OPTIONAL } diff --git a/lib/asn1/der.h b/lib/asn1/der.h index 3b6f30887..5b24b917d 100644 --- a/lib/asn1/der.h +++ b/lib/asn1/der.h @@ -52,7 +52,7 @@ typedef enum {PRIM = 0, CONS = 1} Der_type; enum { UT_EndOfContent = 0, UT_Boolean = 1, - UT_Integer = 2, + UT_Integer = 2, UT_BitString = 3, UT_OctetString = 4, UT_Null = 5, diff --git a/lib/asn1/der_get.c b/lib/asn1/der_get.c index 52f645f3a..c0a9a28b9 100644 --- a/lib/asn1/der_get.c +++ b/lib/asn1/der_get.c @@ -266,8 +266,8 @@ der_get_octet_string_ber (const unsigned char *p, size_t len, e = der_get_tag (p, len, &class, &type, &tag, &l); if (e) goto out; if (class != ASN1_C_UNIV) { - e = ASN1_BAD_ID; - goto out; + e = ASN1_BAD_ID; + goto out; } if (type == PRIM && tag == UT_EndOfContent) { if (depth == 0) @@ -285,7 +285,7 @@ der_get_octet_string_ber (const unsigned char *p, size_t len, if (e) goto out; p += l; len -= l; - + if (datalen > len) return ASN1_OVERRUN; @@ -464,7 +464,7 @@ der_get_oid (const unsigned char *p, size_t len, ++p; for (n = 2; len > 0; ++n) { unsigned u = 0, u1; - + do { --len; u1 = u * 128 + (*p++ % 128); diff --git a/lib/asn1/der_put.c b/lib/asn1/der_put.c index 5afddb1d0..7e71443da 100644 --- a/lib/asn1/der_put.c +++ b/lib/asn1/der_put.c @@ -384,7 +384,7 @@ der_put_tag (unsigned char *p, size_t len, Der_class class, Der_type type, } else { size_t ret = 0; unsigned int continuation = 0; - + do { if (len < 1) return ASN1_OVERFLOW; diff --git a/lib/asn1/digest.asn1 b/lib/asn1/digest.asn1 index 1cf58b463..5ee5bd4a9 100644 --- a/lib/asn1/digest.asn1 +++ b/lib/asn1/digest.asn1 @@ -139,7 +139,7 @@ DigestREP ::= [APPLICATION 129] SEQUENCE { -- qop == auth -- A2 = Method ":" digest-uri-value -- qop == auth-int --- A2 = Method ":" digest-uri-value ":" H(entity-body) +-- A2 = Method ":" digest-uri-value ":" H(entity-body) -- request-digest = HEX(KD(HEX(H(A1)), -- unq(nonce-value) ":" nc-value ":" unq(cnonce-value) ":" unq(qop-value) ":" HEX(H(A2)))) diff --git a/lib/asn1/extra.c b/lib/asn1/extra.c index bbf75c838..b244dbb52 100644 --- a/lib/asn1/extra.c +++ b/lib/asn1/extra.c @@ -75,13 +75,13 @@ decode_heim_any(const unsigned char *p, size_t len, if (len < length + len_len + l) return ASN1_OVERFLOW; } - + data->data = malloc(length + len_len + l); if (data->data == NULL) return ENOMEM; data->length = length + len_len + l; memcpy(data->data, p, length + len_len + l); - + if (size) *size = length + len_len + l; diff --git a/lib/asn1/gen.c b/lib/asn1/gen.c index 7098f2675..6b0351494 100644 --- a/lib/asn1/gen.c +++ b/lib/asn1/gen.c @@ -595,7 +595,7 @@ define_type (int level, const char *name, Type *t, int typedefp, int preservep) fprintf (headerfile, "struct %s {\n", typedefp ? name : ""); ASN1_TAILQ_FOREACH(m, t->members, members) { char *n; - + asprintf (&n, "%s:1", m->gen_name); if (n == NULL) errx(1, "malloc"); diff --git a/lib/asn1/gen_copy.c b/lib/asn1/gen_copy.c index 37c930477..5042ed64e 100644 --- a/lib/asn1/gen_copy.c +++ b/lib/asn1/gen_copy.c @@ -149,7 +149,7 @@ copy_type (const char *from, const char *to, const Type *t, int preserve) to, have_ellipsis->gen_name); used_fail++; } - fprintf(codefile, "}\n"); + fprintf(codefile, "}\n"); } break; } diff --git a/lib/asn1/gen_decode.c b/lib/asn1/gen_decode.c index 641355e40..cf7f0b05d 100644 --- a/lib/asn1/gen_decode.c +++ b/lib/asn1/gen_decode.c @@ -353,7 +353,7 @@ decode_type (const char *name, const Type *t, int optional, decode_type (s, m->type, m->optional, forwstr, m->gen_name, NULL); free (s); } - + break; } case TSet: { @@ -517,7 +517,7 @@ decode_type (const char *name, const Type *t, int optional, } else { fprintf(codefile, "if (e == 0 && %s != %s) { e = ASN1_BAD_ID; }\n", - typestring, + typestring, is_primitive_type(t->subtype->type) ? "PRIM" : "CONS"); } @@ -590,7 +590,7 @@ decode_type (const char *name, const Type *t, int optional, Der_class cl; Der_type ty; unsigned tag; - + if (m->ellipsis) { have_ellipsis = m; continue; diff --git a/lib/asn1/gen_encode.c b/lib/asn1/gen_encode.c index d80a2f8d1..1f8078a0e 100644 --- a/lib/asn1/gen_encode.c +++ b/lib/asn1/gen_encode.c @@ -257,7 +257,7 @@ encode_type (const char *name, const Type *t, const char *tmpstr) if (t->members == NULL) break; - + ASN1_TAILQ_FOREACH_REVERSE(m, t->members, memhead, members) { char *s; @@ -388,7 +388,7 @@ encode_type (const char *name, const Type *t, const char *tmpstr) int c; asprintf (&tname, "%s_tag", tmpstr); if (tname == NULL) - errx(1, "malloc"); + errx(1, "malloc"); c = encode_type (name, t->subtype, tname); fprintf (codefile, "e = der_put_length_and_tag (p, len, ret, %s, %s, %s, &l);\n" diff --git a/lib/asn1/gen_free.c b/lib/asn1/gen_free.c index 305d7de24..fac1f6da5 100644 --- a/lib/asn1/gen_free.c +++ b/lib/asn1/gen_free.c @@ -110,7 +110,7 @@ free_type (const char *name, const Type *t, int preserve) if(t->type == TChoice) fprintf(codefile, "break;\n"); } - + if(t->type == TChoice) { if (have_ellipsis) fprintf(codefile, diff --git a/lib/asn1/gen_length.c b/lib/asn1/gen_length.c index a1df4eef6..7f9755e2d 100644 --- a/lib/asn1/gen_length.c +++ b/lib/asn1/gen_length.c @@ -139,7 +139,7 @@ length_type (const char *name, const Type *t, ASN1_TAILQ_FOREACH(m, t->members, members) { char *s; - + if (m->ellipsis) { have_ellipsis = m; continue; diff --git a/lib/asn1/krb5.asn1 b/lib/asn1/krb5.asn1 index 8770966c2..8edb0fde6 100644 --- a/lib/asn1/krb5.asn1 +++ b/lib/asn1/krb5.asn1 @@ -80,8 +80,8 @@ PADATA-TYPE ::= INTEGER { KRB5-PADATA-FOR-X509-USER(130), -- MS-KILE KRB5-PADATA-FOR-CHECK-DUPS(131), -- MS-KILE KRB5-PADATA-AS-CHECKSUM(132), -- MS-KILE - KRB5-PADATA-PK-AS-09-BINDING(132), -- client send this to - -- tell KDC that is supports + KRB5-PADATA-PK-AS-09-BINDING(132), -- client send this to + -- tell KDC that is supports -- the asCheckSum in the -- PK-AS-REP KRB5-PADATA-CLIENT-CANONICALIZED(133), -- referals @@ -411,7 +411,7 @@ PA-ENC-TS-ENC ::= SEQUENCE { -- draft-brezak-win2k-krb-authz-01 PA-PAC-REQUEST ::= SEQUENCE { - include-pac[0] BOOLEAN -- Indicates whether a PAC + include-pac[0] BOOLEAN -- Indicates whether a PAC -- should be included or not } @@ -650,7 +650,7 @@ KRB5SignedPathData ::= SEQUENCE { KRB5SignedPath ::= SEQUENCE { -- DERcoded KRB5SignedPathData - -- krbtgt key (etype), KeyUsage = XXX + -- krbtgt key (etype), KeyUsage = XXX etype[0] ENCTYPE, cksum[1] Checksum, -- srvs delegated though diff --git a/lib/asn1/lex.l b/lib/asn1/lex.l index 1198ef16a..6d22e6665 100644 --- a/lib/asn1/lex.l +++ b/lib/asn1/lex.l @@ -216,7 +216,7 @@ WITH { return kw_WITH; } char *p = buf; int f = 0; int skip_ws = 0; - + while((c = input()) != EOF) { if(isspace(c) && skip_ws) { if(c == '\n') @@ -224,7 +224,7 @@ WITH { return kw_WITH; } continue; } skip_ws = 0; - + if(c == '"') { if(f) { *p++ = '"'; diff --git a/lib/asn1/main.c b/lib/asn1/main.c index f53c8c320..115c82a9c 100644 --- a/lib/asn1/main.c +++ b/lib/asn1/main.c @@ -145,7 +145,7 @@ main(int argc, char **argv) arg[0] = option_file; arg[1] = NULL; len = 1; - + while (fgets(buf, sizeof(buf), opt) != NULL) { buf[strcspn(buf, "\n\r")] = '\0'; @@ -196,6 +196,6 @@ main(int argc, char **argv) free(arg[i]); free(arg); } - + return 0; } diff --git a/lib/asn1/parse.y b/lib/asn1/parse.y index 3ff89c8a4..7975fe4f6 100644 --- a/lib/asn1/parse.y +++ b/lib/asn1/parse.y @@ -348,7 +348,7 @@ range : '(' Value RANGE Value ')' $$->max = $4->u.integervalue; } | '(' Value RANGE kw_MAX ')' - { + { if($2->type != integervalue) error_message("Non-integer in first part of range"); $$ = ecalloc(1, sizeof(*$$)); @@ -356,7 +356,7 @@ range : '(' Value RANGE Value ')' $$->max = $2->u.integervalue - 1; } | '(' kw_MIN RANGE Value ')' - { + { if($4->type != integervalue) error_message("Non-integer in second part of range"); $$ = ecalloc(1, sizeof(*$$)); diff --git a/lib/asn1/pkcs12.asn1 b/lib/asn1/pkcs12.asn1 index 4d6454a08..8b604c68d 100644 --- a/lib/asn1/pkcs12.asn1 +++ b/lib/asn1/pkcs12.asn1 @@ -50,7 +50,7 @@ PKCS12-AuthenticatedSafe ::= SEQUENCE OF ContentInfo PKCS12-Attribute ::= SEQUENCE { attrId OBJECT IDENTIFIER, - attrValues -- SET OF -- heim_any_set + attrValues -- SET OF -- heim_any_set } PKCS12-Attributes ::= SET OF PKCS12-Attribute diff --git a/lib/asn1/pkcs8.asn1 b/lib/asn1/pkcs8.asn1 index 203d91eef..45a7d715d 100644 --- a/lib/asn1/pkcs8.asn1 +++ b/lib/asn1/pkcs8.asn1 @@ -24,7 +24,7 @@ PKCS8EncryptedData ::= OCTET STRING PKCS8EncryptedPrivateKeyInfo ::= SEQUENCE { encryptionAlgorithm AlgorithmIdentifier, - encryptedData PKCS8EncryptedData + encryptedData PKCS8EncryptedData } END diff --git a/lib/asn1/pkinit.asn1 b/lib/asn1/pkinit.asn1 index 302b0c3e8..f36ebf0b3 100644 --- a/lib/asn1/pkinit.asn1 +++ b/lib/asn1/pkinit.asn1 @@ -27,11 +27,11 @@ id-pkinit-san OBJECT IDENTIFIER ::= x509-sanan(2) } id-pkinit-ms-eku OBJECT IDENTIFIER ::= - { iso(1) org(3) dod(6) internet(1) private(4) + { iso(1) org(3) dod(6) internet(1) private(4) enterprise(1) microsoft(311) 20 2 2 } id-pkinit-ms-san OBJECT IDENTIFIER ::= - { iso(1) org(3) dod(6) internet(1) private(4) + { iso(1) org(3) dod(6) internet(1) private(4) enterprise(1) microsoft(311) 20 2 3 } MS-UPN-SAN ::= UTF8String @@ -152,15 +152,15 @@ TrustedCA-Win2k ::= CHOICE { issuerAndSerial [2] IssuerAndSerialNumber } -PA-PK-AS-REQ-Win2k ::= SEQUENCE { - signed-auth-pack [0] IMPLICIT OCTET STRING, - trusted-certifiers [2] SEQUENCE OF TrustedCA-Win2k OPTIONAL, - kdc-cert [3] IMPLICIT OCTET STRING OPTIONAL, +PA-PK-AS-REQ-Win2k ::= SEQUENCE { + signed-auth-pack [0] IMPLICIT OCTET STRING, + trusted-certifiers [2] SEQUENCE OF TrustedCA-Win2k OPTIONAL, + kdc-cert [3] IMPLICIT OCTET STRING OPTIONAL, encryption-cert [4] IMPLICIT OCTET STRING OPTIONAL } PA-PK-AS-REP-Win2k ::= CHOICE { - dhSignedData [0] IMPLICIT OCTET STRING, + dhSignedData [0] IMPLICIT OCTET STRING, encKeyPack [1] IMPLICIT OCTET STRING } @@ -181,12 +181,12 @@ PA-PK-AS-REP-BTMM ::= SEQUENCE { } -PkinitSP80056AOtherInfo ::= SEQUENCE { - algorithmID AlgorithmIdentifier, - partyUInfo [0] OCTET STRING, - partyVInfo [1] OCTET STRING, - suppPubInfo [2] OCTET STRING OPTIONAL, - suppPrivInfo [3] OCTET STRING OPTIONAL +PkinitSP80056AOtherInfo ::= SEQUENCE { + algorithmID AlgorithmIdentifier, + partyUInfo [0] OCTET STRING, + partyVInfo [1] OCTET STRING, + suppPubInfo [2] OCTET STRING OPTIONAL, + suppPrivInfo [3] OCTET STRING OPTIONAL } PkinitSuppPubInfo ::= SEQUENCE { diff --git a/lib/asn1/rfc2459.asn1 b/lib/asn1/rfc2459.asn1 index 0c4ffe884..51cac55cc 100644 --- a/lib/asn1/rfc2459.asn1 +++ b/lib/asn1/rfc2459.asn1 @@ -6,7 +6,7 @@ RFC2459 DEFINITIONS ::= BEGIN IMPORTS heim_any FROM heim; Version ::= INTEGER { - rfc3280_version_1(0), + rfc3280_version_1(0), rfc3280_version_2(1), rfc3280_version_3(2) } @@ -29,7 +29,7 @@ id-pkcs2-md2 OBJECT IDENTIFIER ::= { id-pkcs-2 2 } id-pkcs2-md4 OBJECT IDENTIFIER ::= { id-pkcs-2 4 } id-pkcs2-md5 OBJECT IDENTIFIER ::= { id-pkcs-2 5 } -id-rsa-digestAlgorithm OBJECT IDENTIFIER ::= +id-rsa-digestAlgorithm OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) 2 } id-rsa-digest-md2 OBJECT IDENTIFIER ::= { id-rsa-digestAlgorithm 2 } @@ -54,7 +54,7 @@ id-secsig-sha-1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3) id-nistAlgorithm OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) 4 } - + id-nist-aes-algs OBJECT IDENTIFIER ::= { id-nistAlgorithm 1 } id-aes-128-cbc OBJECT IDENTIFIER ::= { id-nist-aes-algs 2 } @@ -289,8 +289,8 @@ KeyIdentifier ::= OCTET STRING AuthorityKeyIdentifier ::= SEQUENCE { keyIdentifier [0] IMPLICIT OCTET STRING OPTIONAL, - authorityCertIssuer [1] IMPLICIT -- GeneralName -- - SEQUENCE -- SIZE (1..MAX) -- OF GeneralName OPTIONAL, + authorityCertIssuer [1] IMPLICIT -- GeneralName -- + SEQUENCE -- SIZE (1..MAX) -- OF GeneralName OPTIONAL, authorityCertSerialNumber [2] IMPLICIT INTEGER OPTIONAL } @@ -302,7 +302,7 @@ id-x509-ce-basicConstraints OBJECT IDENTIFIER ::= { id-x509-ce 19 } BasicConstraints ::= SEQUENCE { cA BOOLEAN OPTIONAL -- DEFAULT FALSE --, - pathLenConstraint INTEGER (0..4294967295) OPTIONAL + pathLenConstraint INTEGER (0..4294967295) OPTIONAL } id-x509-ce-nameConstraints OBJECT IDENTIFIER ::= { id-x509-ce 30 } @@ -430,7 +430,7 @@ DigestInfo ::= SEQUENCE { -- szOID_CERTIFICATE_TEMPLATE "1.3.6.1.4.1.311.21.7" is Encoded as: --- TemplateVersion ::= INTEGER (0..4294967295) +-- TemplateVersion ::= INTEGER (0..4294967295) -- CertificateTemplate ::= SEQUENCE { -- templateID OBJECT IDENTIFIER, @@ -441,7 +441,7 @@ DigestInfo ::= SEQUENCE { -- -- CRL --- +-- TBSCRLCertList ::= SEQUENCE { version Version OPTIONAL, -- if present, MUST be v2 @@ -537,16 +537,16 @@ id-uspkicommon-piv-interim OBJECT IDENTIFIER ::= { 2 16 840 1 101 3 6 9 1 } --- Netscape extentions -id-netscape OBJECT IDENTIFIER ::= +id-netscape OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) netscape(113730) } id-netscape-cert-comment OBJECT IDENTIFIER ::= { id-netscape 1 13 } --- MS extentions -id-ms-cert-enroll-domaincontroller OBJECT IDENTIFIER ::= +id-ms-cert-enroll-domaincontroller OBJECT IDENTIFIER ::= { 1 3 6 1 4 1 311 20 2 } -id-ms-client-authentication OBJECT IDENTIFIER ::= +id-ms-client-authentication OBJECT IDENTIFIER ::= { 1 3 6 1 5 5 7 3 2 } -- DER:1e:20:00:44:00:6f:00:6d:00:61:00:69:00:6e:00:43:00:6f:00:6e:00:74:00:72:00:6f:00:6c:00:6c:00:65:00:72 diff --git a/lib/asn1/setchgpw2.asn1 b/lib/asn1/setchgpw2.asn1 index 9dcc0737f..2f52cb1ce 100644 --- a/lib/asn1/setchgpw2.asn1 +++ b/lib/asn1/setchgpw2.asn1 @@ -138,7 +138,7 @@ Op-req ::= CHOICE { get-supported-etypes[5] Req-get-supported-etypes, ... } - + Op-rep ::= CHOICE { null[0] Rep-null, change-pw[1] Rep-change-pw, diff --git a/lib/asn1/test.asn1 b/lib/asn1/test.asn1 index d07bba618..f6237b85b 100644 --- a/lib/asn1/test.asn1 +++ b/lib/asn1/test.asn1 @@ -20,12 +20,12 @@ TESTSeq ::= SEQUENCE { TESTChoice1 ::= CHOICE { i1[1] INTEGER (-2147483648..2147483647), i2[2] INTEGER (-2147483648..2147483647), - ... + ... } TESTChoice2 ::= CHOICE { i1[1] INTEGER (-2147483648..2147483647), - ... + ... } TESTInteger ::= INTEGER (-2147483648..2147483647) @@ -35,7 +35,7 @@ TESTInteger3 ::= [5] IMPLICIT TESTInteger2 TESTImplicit ::= SEQUENCE { ti1[0] IMPLICIT INTEGER (-2147483648..2147483647), - ti2[1] IMPLICIT SEQUENCE { + ti2[1] IMPLICIT SEQUENCE { foo[127] INTEGER (-2147483648..2147483647) }, ti3[2] IMPLICIT [5] IMPLICIT [4] IMPLICIT INTEGER (-2147483648..2147483647) @@ -59,19 +59,19 @@ TESTAlloc ::= SEQUENCE { TESTCONTAINING ::= OCTET STRING ( CONTAINING INTEGER ) -TESTENCODEDBY ::= OCTET STRING ( ENCODED BY +TESTENCODEDBY ::= OCTET STRING ( ENCODED BY { joint-iso-itu-t(2) asn(1) ber-derived(2) distinguished-encoding(1) } ) -TESTDer OBJECT IDENTIFIER ::= { +TESTDer OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) asn(1) ber-derived(2) distinguished-encoding(1) } -TESTCONTAININGENCODEDBY ::= OCTET STRING ( CONTAINING INTEGER ENCODED BY +TESTCONTAININGENCODEDBY ::= OCTET STRING ( CONTAINING INTEGER ENCODED BY { joint-iso-itu-t(2) asn(1) ber-derived(2) distinguished-encoding(1) } ) -TESTCONTAININGENCODEDBY2 ::= OCTET STRING ( +TESTCONTAININGENCODEDBY2 ::= OCTET STRING ( CONTAINING INTEGER ENCODED BY TESTDer )