diff options
Diffstat (limited to 'src/lib/krb5/asn.1')
-rw-r--r-- | src/lib/krb5/asn.1/asn1_encode.h | 44 | ||||
-rw-r--r-- | src/lib/krb5/asn.1/asn1_k_decode.c | 9 | ||||
-rw-r--r-- | src/lib/krb5/asn.1/asn1_k_decode.h | 2 | ||||
-rw-r--r-- | src/lib/krb5/asn.1/asn1_k_decode_kdc.c | 5 | ||||
-rw-r--r-- | src/lib/krb5/asn.1/asn1_k_encode.c | 2 |
5 files changed, 31 insertions, 31 deletions
diff --git a/src/lib/krb5/asn.1/asn1_encode.h b/src/lib/krb5/asn.1/asn1_encode.h index 773198f..2e0b993 100644 --- a/src/lib/krb5/asn.1/asn1_encode.h +++ b/src/lib/krb5/asn.1/asn1_encode.h @@ -400,26 +400,26 @@ struct atype_info { &aux_seqinfo_##DESCNAME, \ } /* Integer types. */ -#define DEFINTTYPE(DESCNAME, CTYPENAME) \ - typedef CTYPENAME aux_typedefname_##DESCNAME; \ - static asn1_intmax loadint_##DESCNAME(const void *p) \ - { \ - assert(sizeof(CTYPENAME) <= sizeof(asn1_intmax)); \ - return *(const aux_typedefname_##DESCNAME *)p; \ - } \ - const struct atype_info krb5int_asn1type_##DESCNAME = { \ +#define DEFINTTYPE(DESCNAME, CTYPENAME) \ + typedef CTYPENAME aux_typedefname_##DESCNAME; \ + static asn1_intmax loadint_##DESCNAME(const void *p) \ + { \ + assert(sizeof(CTYPENAME) <= sizeof(asn1_intmax)); \ + return *(const aux_typedefname_##DESCNAME *)p; \ + } \ + const struct atype_info krb5int_asn1type_##DESCNAME = { \ atype_int, sizeof(CTYPENAME), 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - loadint_##DESCNAME, 0, \ + loadint_##DESCNAME, 0, \ } -#define DEFUINTTYPE(DESCNAME, CTYPENAME) \ - typedef CTYPENAME aux_typedefname_##DESCNAME; \ - static asn1_uintmax loaduint_##DESCNAME(const void *p) \ - { \ - assert(sizeof(CTYPENAME) <= sizeof(asn1_uintmax)); \ - return *(const aux_typedefname_##DESCNAME *)p; \ - } \ - const struct atype_info krb5int_asn1type_##DESCNAME = { \ - atype_uint, sizeof(CTYPENAME), 0, 0, 0, 0, 0, 0, 0, 0, \ +#define DEFUINTTYPE(DESCNAME, CTYPENAME) \ + typedef CTYPENAME aux_typedefname_##DESCNAME; \ + static asn1_uintmax loaduint_##DESCNAME(const void *p) \ + { \ + assert(sizeof(CTYPENAME) <= sizeof(asn1_uintmax)); \ + return *(const aux_typedefname_##DESCNAME *)p; \ + } \ + const struct atype_info krb5int_asn1type_##DESCNAME = { \ + atype_uint, sizeof(CTYPENAME), 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, loaduint_##DESCNAME, \ } /* Pointers to other types, to be encoded as those other types. */ @@ -492,17 +492,19 @@ struct atype_info { typedef aux_typedefname_##BASEDESC aux_typedefname_##DESCNAME; \ const struct atype_info krb5int_asn1type_##DESCNAME = { \ atype_tagged_thing, sizeof(aux_typedefname_##DESCNAME), \ - 0, 0, 0, &krb5int_asn1type_##BASEDESC, 0, 0, TAG, APPLICATION, CONSTRUCTED \ + 0, 0, 0, &krb5int_asn1type_##BASEDESC, 0, 0, TAG, APPLICATION, \ + CONSTRUCTED \ } /** * An encoding wrapped in an octet string */ -#define DEFOCTETWRAPTYPE(DESCNAME, BASEDESC) \ +#define DEFOCTETWRAPTYPE(DESCNAME, BASEDESC) \ typedef aux_typedefname_##BASEDESC aux_typedefname_##DESCNAME; \ const struct atype_info krb5int_asn1type_##DESCNAME = { \ atype_tagged_thing, sizeof(aux_typedefname_##DESCNAME), \ - 0, 0, 0, &krb5int_asn1type_##BASEDESC, 0, 0, ASN1_OCTETSTRING, UNIVERSAL, PRIMITIVE \ + 0, 0, 0, &krb5int_asn1type_##BASEDESC, 0, 0, ASN1_OCTETSTRING, \ + UNIVERSAL, PRIMITIVE \ } /* diff --git a/src/lib/krb5/asn.1/asn1_k_decode.c b/src/lib/krb5/asn.1/asn1_k_decode.c index 599a215..db33241 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.c +++ b/src/lib/krb5/asn.1/asn1_k_decode.c @@ -1349,8 +1349,7 @@ asn1_decode_sequence_of_trusted_ca(asn1buf *buf, krb5_trusted_ca ***val) } static asn1_error_code -asn1_decode_kdf_alg_id_ptr( asn1buf *buf, - krb5_octet_data **valptr) +asn1_decode_kdf_alg_id_ptr(asn1buf *buf, krb5_octet_data **valptr) { decode_ptr(krb5_octet_data *, asn1_decode_kdf_alg_id); } @@ -1733,8 +1732,8 @@ asn1_decode_typed_data_ptr(asn1buf *buf, krb5_typed_data **valptr) asn1_error_code asn1_decode_kdf_alg_id( asn1buf *buf, krb5_octet_data *val) { - setup(); - val->data = NULL; + setup(); + val->data = NULL; { begin_structure(); get_lenfield(val->length,val->data,0,asn1_decode_oid); end_structure(); @@ -1745,7 +1744,7 @@ error_out: return retval; } - asn1_error_code +asn1_error_code asn1_decode_sequence_of_kdf_alg_id(asn1buf *buf, krb5_octet_data ***val) { diff --git a/src/lib/krb5/asn.1/asn1_k_decode.h b/src/lib/krb5/asn.1/asn1_k_decode.h index ed51ab1..c19fe83 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.h +++ b/src/lib/krb5/asn.1/asn1_k_decode.h @@ -277,7 +277,7 @@ asn1_error_code asn1_decode_iakerb_finished(asn1buf *buf, krb5_iakerb_finished *val); asn1_error_code -asn1_decode_kdf_alg_id( asn1buf *buf, krb5_octet_data *val); +asn1_decode_kdf_alg_id(asn1buf *buf, krb5_octet_data *val); asn1_error_code asn1_decode_sequence_of_kdf_alg_id(asn1buf *buf, diff --git a/src/lib/krb5/asn.1/asn1_k_decode_kdc.c b/src/lib/krb5/asn.1/asn1_k_decode_kdc.c index c0aa2a2..73abbd4 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode_kdc.c +++ b/src/lib/krb5/asn.1/asn1_k_decode_kdc.c @@ -240,7 +240,7 @@ asn1_decode_auth_pack(asn1buf *buf, krb5_auth_pack *val) } opt_lenfield(val->clientDHNonce.length, val->clientDHNonce.data, 3, asn1_decode_octetstring); opt_field(val->supportedKDFs, 4, asn1_decode_sequence_of_kdf_alg_id, NULL); - end_structure(); + end_structure(); } return 0; error_out: @@ -258,8 +258,7 @@ error_out: } free(val->clientDHNonce.data); if (val->supportedKDFs) { - - for (i=0; val->supportedKDFs[i]; i++) + for (i = 0; val->supportedKDFs[i]; i++) krb5_free_octet_data(NULL, val->supportedKDFs[i]); free(val->supportedKDFs); val->supportedKDFs = NULL; diff --git a/src/lib/krb5/asn.1/asn1_k_encode.c b/src/lib/krb5/asn.1/asn1_k_encode.c index 2c7c43a..9e03b67 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.c +++ b/src/lib/krb5/asn.1/asn1_k_encode.c @@ -1820,7 +1820,7 @@ asn1_encode_auth_pack(asn1buf *buf, const krb5_auth_pack *val, asn1_setup(); if (val->supportedKDFs != NULL) - asn1_addfield( val->supportedKDFs, 4, asn1_encode_supported_kdfs); + asn1_addfield(val->supportedKDFs, 4, asn1_encode_supported_kdfs); if (val->clientDHNonce.length != 0) asn1_addlenfield(val->clientDHNonce.length, val->clientDHNonce.data, 3, asn1_encode_octetstring); if (val->supportedCMSTypes != NULL) |