From: Greg Hudson Date: Sat, 31 Oct 2009 03:50:54 +0000 (+0000) Subject: Reformat lib/krb5/asn.1 internal prototypes to avoid problematic parens X-Git-Tag: krb5-1.8-alpha1~232 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4a47f566daa9e1e6a1946a027edc2d9d44b9bb7d;p=krb5.git Reformat lib/krb5/asn.1 internal prototypes to avoid problematic parens at beginnings of lines. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23105 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/asn.1/asn1_decode.h b/src/lib/krb5/asn.1/asn1_decode.h index b90a369d6..016ba2d8a 100644 --- a/src/lib/krb5/asn.1/asn1_decode.h +++ b/src/lib/krb5/asn.1/asn1_decode.h @@ -60,37 +60,30 @@ Returns asn1 errors. */ -asn1_error_code asn1_decode_boolean - (asn1buf *buf, unsigned int *val); -asn1_error_code asn1_decode_integer - (asn1buf *buf, long *val); -asn1_error_code asn1_decode_unsigned_integer - (asn1buf *buf, unsigned long *val); -asn1_error_code asn1_decode_maybe_unsigned - (asn1buf *buf, unsigned long *val); -asn1_error_code asn1_decode_null - (asn1buf *buf); +asn1_error_code asn1_decode_boolean(asn1buf *buf, unsigned int *val); +asn1_error_code asn1_decode_integer(asn1buf *buf, long *val); +asn1_error_code asn1_decode_unsigned_integer(asn1buf *buf, unsigned long *val); +asn1_error_code asn1_decode_maybe_unsigned(asn1buf *buf, unsigned long *val); +asn1_error_code asn1_decode_null(asn1buf *buf); -asn1_error_code asn1_decode_oid - (asn1buf *buf, unsigned int *retlen, asn1_octet **val); -asn1_error_code asn1_decode_octetstring - (asn1buf *buf, unsigned int *retlen, asn1_octet **val); -asn1_error_code asn1_decode_generalstring - (asn1buf *buf, unsigned int *retlen, char **val); -asn1_error_code asn1_decode_charstring - (asn1buf *buf, unsigned int *retlen, char **val); +asn1_error_code asn1_decode_oid(asn1buf *buf, unsigned int *retlen, + asn1_octet **val); +asn1_error_code asn1_decode_octetstring(asn1buf *buf, unsigned int *retlen, + asn1_octet **val); +asn1_error_code asn1_decode_generalstring(asn1buf *buf, unsigned int *retlen, + char **val); +asn1_error_code asn1_decode_charstring(asn1buf *buf, unsigned int *retlen, + char **val); /* Note: A charstring is a special hack to account for the fact that krb5 structures store some OCTET STRING values in krb5_octet arrays and others in krb5_data structures (which use char arrays). From the ASN.1 point of view, the two string types are the same, only the receptacles differ. */ -asn1_error_code asn1_decode_printablestring - (asn1buf *buf, int *retlen, char **val); -asn1_error_code asn1_decode_ia5string - (asn1buf *buf, int *retlen, char **val); +asn1_error_code asn1_decode_printablestring(asn1buf *buf, int *retlen, + char **val); +asn1_error_code asn1_decode_ia5string(asn1buf *buf, int *retlen, char **val); -asn1_error_code asn1_decode_generaltime - (asn1buf *buf, time_t *val); +asn1_error_code asn1_decode_generaltime(asn1buf *buf, time_t *val); #endif diff --git a/src/lib/krb5/asn.1/asn1_encode.h b/src/lib/krb5/asn.1/asn1_encode.h index 289b98db1..df971ab7f 100644 --- a/src/lib/krb5/asn.1/asn1_encode.h +++ b/src/lib/krb5/asn.1/asn1_encode.h @@ -51,10 +51,10 @@ asn1_encode_oid */ -asn1_error_code asn1_encode_boolean - (asn1buf *buf, asn1_intmax val, unsigned int *retlen); -asn1_error_code asn1_encode_integer - (asn1buf *buf, asn1_intmax val, unsigned int *retlen); +asn1_error_code asn1_encode_boolean(asn1buf *buf, asn1_intmax val, + unsigned int *retlen); +asn1_error_code asn1_encode_integer(asn1buf *buf, asn1_intmax val, + unsigned int *retlen); /* requires *buf is allocated modifies *buf, *retlen effects Inserts the encoding of val into *buf and returns @@ -62,12 +62,11 @@ asn1_error_code asn1_encode_integer Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_enumerated -(asn1buf *buf, long val, unsigned int *retlen); +asn1_error_code asn1_encode_enumerated(asn1buf *buf, long val, + unsigned int *retlen); -asn1_error_code asn1_encode_unsigned_integer - (asn1buf *buf, asn1_uintmax val, - unsigned int *retlen); +asn1_error_code asn1_encode_unsigned_integer(asn1buf *buf, asn1_uintmax val, + unsigned int *retlen); /* requires *buf is allocated modifies *buf, *retlen effects Inserts the encoding of val into *buf and returns @@ -75,10 +74,8 @@ asn1_error_code asn1_encode_unsigned_integer Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_octetstring - (asn1buf *buf, - unsigned int len, const void *val, - unsigned int *retlen); +asn1_error_code asn1_encode_octetstring(asn1buf *buf, unsigned int len, + const void *val, unsigned int *retlen); /* requires *buf is allocated modifies *buf, *retlen effects Inserts the encoding of val into *buf and returns @@ -87,10 +84,8 @@ asn1_error_code asn1_encode_octetstring to expand the buffer. */ #define asn1_encode_charstring asn1_encode_octetstring -asn1_error_code asn1_encode_oid - (asn1buf *buf, - unsigned int len, const asn1_octet *val, - unsigned int *retlen); +asn1_error_code asn1_encode_oid(asn1buf *buf, unsigned int len, + const asn1_octet *val, unsigned int *retlen); /* requires *buf is allocated modifies *buf, *retlen effects Inserts the encoding of val into *buf and returns @@ -98,8 +93,7 @@ asn1_error_code asn1_encode_oid Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_null - (asn1buf *buf, int *retlen); +asn1_error_code asn1_encode_null(asn1buf *buf, int *retlen); /* requires *buf is allocated modifies *buf, *retlen effects Inserts the encoding of NULL into *buf and returns @@ -107,10 +101,8 @@ asn1_error_code asn1_encode_null Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_printablestring - (asn1buf *buf, - unsigned int len, const char *val, - int *retlen); +asn1_error_code asn1_encode_printablestring (asn1buf *buf, unsigned int len, + const char *val, int *retlen); /* requires *buf is allocated modifies *buf, *retlen effects Inserts the encoding of val into *buf and returns diff --git a/src/lib/krb5/asn.1/asn1_get.h b/src/lib/krb5/asn.1/asn1_get.h index ecafa2aec..286764957 100644 --- a/src/lib/krb5/asn.1/asn1_get.h +++ b/src/lib/krb5/asn.1/asn1_get.h @@ -52,19 +52,17 @@ typedef struct { asn1_error_code asn1_get_tag_2 (asn1buf *buf, taginfo *tinfo); #if 0 -asn1_error_code asn1_get_tag_indef - (asn1buf *buf, - asn1_class *Class, - asn1_construction *construction, - asn1_tagnum *tagnum, - unsigned int *retlen, int *indef); +asn1_error_code asn1_get_tag_indef(asn1buf *buf, + asn1_class *Class, + asn1_construction *construction, + asn1_tagnum *tagnum, + unsigned int *retlen, int *indef); -asn1_error_code asn1_get_tag - (asn1buf *buf, - asn1_class *Class, - asn1_construction *construction, - asn1_tagnum *tagnum, - unsigned int *retlen); +asn1_error_code asn1_get_tag(asn1buf *buf, + asn1_class *Class, + asn1_construction *construction, + asn1_tagnum *tagnum, + unsigned int *retlen); /* requires *buf is allocated effects Decodes the tag in *buf. If class != NULL, returns the class in *Class. Similarly, the construction, @@ -75,8 +73,8 @@ asn1_error_code asn1_get_tag Returns ASN1_OVERRUN if *buf is exhausted during the parse. */ #endif -asn1_error_code asn1_get_sequence - (asn1buf *buf, unsigned int *retlen, int *indef); +asn1_error_code asn1_get_sequence(asn1buf *buf, unsigned int *retlen, + int *indef); /* requires *buf is allocated effects Decodes a tag from *buf and returns ASN1_BAD_ID if it doesn't have a sequence ID. If retlen != NULL, the diff --git a/src/lib/krb5/asn.1/asn1_k_decode.h b/src/lib/krb5/asn.1/asn1_k_decode.h index 4cf7e080f..ffa7dbde1 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.h +++ b/src/lib/krb5/asn.1/asn1_k_decode.h @@ -68,224 +68,183 @@ the bounds of *buf */ /* scalars */ -asn1_error_code asn1_decode_int - (asn1buf *buf, int *val); -asn1_error_code asn1_decode_int32 - (asn1buf *buf, krb5_int32 *val); -asn1_error_code asn1_decode_kvno - (asn1buf *buf, krb5_kvno *val); -asn1_error_code asn1_decode_enctype - (asn1buf *buf, krb5_enctype *val); -asn1_error_code asn1_decode_msgtype - (asn1buf *buf, krb5_msgtype *val); -asn1_error_code asn1_decode_cksumtype - (asn1buf *buf, krb5_cksumtype *val); -asn1_error_code asn1_decode_octet - (asn1buf *buf, krb5_octet *val); -asn1_error_code asn1_decode_addrtype - (asn1buf *buf, krb5_addrtype *val); -asn1_error_code asn1_decode_authdatatype - (asn1buf *buf, krb5_authdatatype *val); -asn1_error_code asn1_decode_ui_2 - (asn1buf *buf, krb5_ui_2 *val); -asn1_error_code asn1_decode_ui_4 - (asn1buf *buf, krb5_ui_4 *val); -asn1_error_code asn1_decode_seqnum - (asn1buf *buf, krb5_ui_4 *val); -asn1_error_code asn1_decode_kerberos_time - (asn1buf *buf, krb5_timestamp *val); -asn1_error_code asn1_decode_sam_flags - (asn1buf *buf, krb5_flags *val); +asn1_error_code asn1_decode_int(asn1buf *buf, int *val); +asn1_error_code asn1_decode_int32(asn1buf *buf, krb5_int32 *val); +asn1_error_code asn1_decode_kvno(asn1buf *buf, krb5_kvno *val); +asn1_error_code asn1_decode_enctype(asn1buf *buf, krb5_enctype *val); +asn1_error_code asn1_decode_msgtype(asn1buf *buf, krb5_msgtype *val); +asn1_error_code asn1_decode_cksumtype(asn1buf *buf, krb5_cksumtype *val); +asn1_error_code asn1_decode_octet(asn1buf *buf, krb5_octet *val); +asn1_error_code asn1_decode_addrtype(asn1buf *buf, krb5_addrtype *val); +asn1_error_code asn1_decode_authdatatype(asn1buf *buf, krb5_authdatatype *val); +asn1_error_code asn1_decode_ui_2(asn1buf *buf, krb5_ui_2 *val); +asn1_error_code asn1_decode_ui_4(asn1buf *buf, krb5_ui_4 *val); +asn1_error_code asn1_decode_seqnum(asn1buf *buf, krb5_ui_4 *val); +asn1_error_code asn1_decode_kerberos_time(asn1buf *buf, krb5_timestamp *val); +asn1_error_code asn1_decode_sam_flags(asn1buf *buf, krb5_flags *val); /* structures */ -asn1_error_code asn1_decode_realm - (asn1buf *buf, krb5_principal *val); -asn1_error_code asn1_decode_principal_name - (asn1buf *buf, krb5_principal *val); -asn1_error_code asn1_decode_checksum - (asn1buf *buf, krb5_checksum *val); -asn1_error_code asn1_decode_checksum_ptr - (asn1buf *buf, krb5_checksum **valptr); -asn1_error_code asn1_decode_encryption_key - (asn1buf *buf, krb5_keyblock *val); -asn1_error_code asn1_decode_encryption_key_ptr - (asn1buf *buf, krb5_keyblock **valptr); -asn1_error_code asn1_decode_encrypted_data - (asn1buf *buf, krb5_enc_data *val); -asn1_error_code asn1_decode_ticket_flags - (asn1buf *buf, krb5_flags *val); -asn1_error_code asn1_decode_transited_encoding - (asn1buf *buf, krb5_transited *val); -asn1_error_code asn1_decode_enc_kdc_rep_part - (asn1buf *buf, krb5_enc_kdc_rep_part *val); -asn1_error_code asn1_decode_krb5_flags - (asn1buf *buf, krb5_flags *val); -asn1_error_code asn1_decode_ap_options - (asn1buf *buf, krb5_flags *val); -asn1_error_code asn1_decode_kdc_options - (asn1buf *buf, krb5_flags *val); -asn1_error_code asn1_decode_ticket - (asn1buf *buf, krb5_ticket *val); -asn1_error_code asn1_decode_ticket_ptr - (asn1buf *buf, krb5_ticket **valptr); -asn1_error_code asn1_decode_kdc_req - (asn1buf *buf, krb5_kdc_req *val); -asn1_error_code asn1_decode_kdc_req_body - (asn1buf *buf, krb5_kdc_req *val); -asn1_error_code asn1_decode_krb_safe_body - (asn1buf *buf, krb5_safe *val); -asn1_error_code asn1_decode_host_address - (asn1buf *buf, krb5_address *val); -asn1_error_code asn1_decode_host_address_ptr - (asn1buf *buf, krb5_address **valptr); -asn1_error_code asn1_decode_kdc_rep - (asn1buf *buf, krb5_kdc_rep *val); -asn1_error_code asn1_decode_last_req_entry - (asn1buf *buf, krb5_last_req_entry *val); -asn1_error_code asn1_decode_last_req_entry_ptr - (asn1buf *buf, krb5_last_req_entry **valptr); -asn1_error_code asn1_decode_authdata_elt - (asn1buf *buf, krb5_authdata *val); -asn1_error_code asn1_decode_authdata_elt_ptr - (asn1buf *buf, krb5_authdata **valptr); -asn1_error_code asn1_decode_krb_cred_info - (asn1buf *buf, krb5_cred_info *val); -asn1_error_code asn1_decode_krb_cred_info_ptr - (asn1buf *buf, krb5_cred_info **valptr); -asn1_error_code asn1_decode_pa_data - (asn1buf *buf, krb5_pa_data *val); -asn1_error_code asn1_decode_pa_data_ptr - (asn1buf *buf, krb5_pa_data **valptr); -asn1_error_code asn1_decode_passwdsequence - (asn1buf *buf, passwd_phrase_element *val); -asn1_error_code asn1_decode_passwdsequence_ptr - (asn1buf *buf, passwd_phrase_element **valptr); -asn1_error_code asn1_decode_sam_challenge - (asn1buf *buf, krb5_sam_challenge *val); -asn1_error_code asn1_decode_sam_challenge_2 - (asn1buf *buf, krb5_sam_challenge_2 *val); -asn1_error_code asn1_decode_sam_challenge_2_body - (asn1buf *buf, krb5_sam_challenge_2_body *val); -asn1_error_code asn1_decode_enc_sam_key - (asn1buf *buf, krb5_sam_key *val); -asn1_error_code asn1_decode_enc_sam_response_enc - (asn1buf *buf, krb5_enc_sam_response_enc *val); -asn1_error_code asn1_decode_enc_sam_response_enc_2 - (asn1buf *buf, krb5_enc_sam_response_enc_2 *val); -asn1_error_code asn1_decode_sam_response - (asn1buf *buf, krb5_sam_response *val); -asn1_error_code asn1_decode_sam_response_2 - (asn1buf *buf, krb5_sam_response_2 *val); -asn1_error_code asn1_decode_predicted_sam_response - (asn1buf *buf, krb5_predicted_sam_response *val); -asn1_error_code asn1_decode_external_principal_identifier - (asn1buf *buf, krb5_external_principal_identifier *val); -asn1_error_code asn1_decode_external_principal_identifier_ptr - (asn1buf *buf, krb5_external_principal_identifier **valptr); -asn1_error_code asn1_decode_pa_pk_as_req - (asn1buf *buf, krb5_pa_pk_as_req *val); -asn1_error_code asn1_decode_trusted_ca - (asn1buf *buf, krb5_trusted_ca *val); -asn1_error_code asn1_decode_trusted_ca_ptr - (asn1buf *buf, krb5_trusted_ca **valptr); -asn1_error_code asn1_decode_pa_pk_as_req_draft9 - (asn1buf *buf, krb5_pa_pk_as_req_draft9 *val); -asn1_error_code asn1_decode_dh_rep_info - (asn1buf *buf, krb5_dh_rep_info *val); -asn1_error_code asn1_decode_pk_authenticator - (asn1buf *buf, krb5_pk_authenticator *val); -asn1_error_code asn1_decode_pk_authenticator_draft9 - (asn1buf *buf, krb5_pk_authenticator_draft9 *val); -asn1_error_code asn1_decode_subject_pk_info - (asn1buf *buf, krb5_subject_pk_info *val); -asn1_error_code asn1_decode_algorithm_identifier - (asn1buf *buf, krb5_algorithm_identifier *val); -asn1_error_code asn1_decode_algorithm_identifier_ptr - (asn1buf *buf, krb5_algorithm_identifier **valptr); -asn1_error_code asn1_decode_auth_pack - (asn1buf *buf, krb5_auth_pack *val); -asn1_error_code asn1_decode_auth_pack_draft9 - (asn1buf *buf, krb5_auth_pack_draft9 *val); -asn1_error_code asn1_decode_pa_pk_as_rep - (asn1buf *buf, krb5_pa_pk_as_rep *val); -asn1_error_code asn1_decode_pa_pk_as_rep_draft9 - (asn1buf *buf, krb5_pa_pk_as_rep_draft9 *val); -asn1_error_code asn1_decode_kdc_dh_key_info - (asn1buf *buf, krb5_kdc_dh_key_info *val); -asn1_error_code asn1_decode_krb5_principal_name - (asn1buf *buf, krb5_principal *val); -asn1_error_code asn1_decode_reply_key_pack - (asn1buf *buf, krb5_reply_key_pack *val); -asn1_error_code asn1_decode_reply_key_pack_draft9 - (asn1buf *buf, krb5_reply_key_pack_draft9 *val); -asn1_error_code asn1_decode_sequence_of_typed_data - (asn1buf *buf, krb5_typed_data ***val); -asn1_error_code asn1_decode_typed_data - (asn1buf *buf, krb5_typed_data *val); -asn1_error_code asn1_decode_typed_data_ptr - (asn1buf *buf, krb5_typed_data **valptr); +asn1_error_code asn1_decode_realm(asn1buf *buf, krb5_principal *val); +asn1_error_code asn1_decode_principal_name(asn1buf *buf, krb5_principal *val); +asn1_error_code asn1_decode_checksum(asn1buf *buf, krb5_checksum *val); +asn1_error_code asn1_decode_checksum_ptr(asn1buf *buf, krb5_checksum **valptr); +asn1_error_code asn1_decode_encryption_key(asn1buf *buf, krb5_keyblock *val); +asn1_error_code asn1_decode_encryption_key_ptr(asn1buf *buf, + krb5_keyblock **valptr); +asn1_error_code asn1_decode_encrypted_data(asn1buf *buf, krb5_enc_data *val); +asn1_error_code asn1_decode_ticket_flags(asn1buf *buf, krb5_flags *val); +asn1_error_code asn1_decode_transited_encoding(asn1buf *buf, + krb5_transited *val); +asn1_error_code asn1_decode_enc_kdc_rep_part(asn1buf *buf, + krb5_enc_kdc_rep_part *val); +asn1_error_code asn1_decode_krb5_flags(asn1buf *buf, krb5_flags *val); +asn1_error_code asn1_decode_ap_options(asn1buf *buf, krb5_flags *val); +asn1_error_code asn1_decode_kdc_options(asn1buf *buf, krb5_flags *val); +asn1_error_code asn1_decode_ticket(asn1buf *buf, krb5_ticket *val); +asn1_error_code asn1_decode_ticket_ptr(asn1buf *buf, krb5_ticket **valptr); +asn1_error_code asn1_decode_kdc_req(asn1buf *buf, krb5_kdc_req *val); +asn1_error_code asn1_decode_kdc_req_body(asn1buf *buf, krb5_kdc_req *val); +asn1_error_code asn1_decode_krb_safe_body(asn1buf *buf, krb5_safe *val); +asn1_error_code asn1_decode_host_address(asn1buf *buf, krb5_address *val); +asn1_error_code asn1_decode_host_address_ptr(asn1buf *buf, + krb5_address **valptr); +asn1_error_code asn1_decode_kdc_rep(asn1buf *buf, krb5_kdc_rep *val); +asn1_error_code asn1_decode_last_req_entry(asn1buf *buf, + krb5_last_req_entry *val); +asn1_error_code asn1_decode_last_req_entry_ptr(asn1buf *buf, + krb5_last_req_entry **valptr); +asn1_error_code asn1_decode_authdata_elt(asn1buf *buf, krb5_authdata *val); +asn1_error_code asn1_decode_authdata_elt_ptr(asn1buf *buf, + krb5_authdata **valptr); +asn1_error_code asn1_decode_krb_cred_info(asn1buf *buf, krb5_cred_info *val); +asn1_error_code asn1_decode_krb_cred_info_ptr(asn1buf *buf, + krb5_cred_info **valptr); +asn1_error_code asn1_decode_pa_data(asn1buf *buf, krb5_pa_data *val); +asn1_error_code asn1_decode_pa_data_ptr(asn1buf *buf, krb5_pa_data **valptr); +asn1_error_code asn1_decode_passwdsequence(asn1buf *buf, + passwd_phrase_element *val); +asn1_error_code asn1_decode_passwdsequence_ptr(asn1buf *buf, + passwd_phrase_element **valptr); +asn1_error_code asn1_decode_sam_challenge(asn1buf *buf, + krb5_sam_challenge *val); +asn1_error_code asn1_decode_sam_challenge_2(asn1buf *buf, + krb5_sam_challenge_2 *val); +asn1_error_code +asn1_decode_sam_challenge_2_body(asn1buf *buf, + krb5_sam_challenge_2_body *val); +asn1_error_code asn1_decode_enc_sam_key(asn1buf *buf, krb5_sam_key *val); +asn1_error_code +asn1_decode_enc_sam_response_enc(asn1buf *buf, + krb5_enc_sam_response_enc *val); +asn1_error_code +asn1_decode_enc_sam_response_enc_2(asn1buf *buf, + krb5_enc_sam_response_enc_2 *val); +asn1_error_code asn1_decode_sam_response(asn1buf *buf, krb5_sam_response *val); +asn1_error_code asn1_decode_sam_response_2(asn1buf *buf, + krb5_sam_response_2 *val); +asn1_error_code +asn1_decode_predicted_sam_response(asn1buf *buf, + krb5_predicted_sam_response *val); +asn1_error_code asn1_decode_external_principal_identifier( + asn1buf *buf, krb5_external_principal_identifier *val); +asn1_error_code asn1_decode_external_principal_identifier_ptr( + asn1buf *buf, krb5_external_principal_identifier **valptr); +asn1_error_code asn1_decode_pa_pk_as_req(asn1buf *buf, krb5_pa_pk_as_req *val); +asn1_error_code asn1_decode_trusted_ca(asn1buf *buf, krb5_trusted_ca *val); +asn1_error_code asn1_decode_trusted_ca_ptr(asn1buf *buf, + krb5_trusted_ca **valptr); +asn1_error_code asn1_decode_pa_pk_as_req_draft9(asn1buf *buf, + krb5_pa_pk_as_req_draft9 *val); +asn1_error_code asn1_decode_dh_rep_info(asn1buf *buf, krb5_dh_rep_info *val); +asn1_error_code asn1_decode_pk_authenticator(asn1buf *buf, + krb5_pk_authenticator *val); +asn1_error_code +asn1_decode_pk_authenticator_draft9(asn1buf *buf, + krb5_pk_authenticator_draft9 *val); +asn1_error_code asn1_decode_subject_pk_info(asn1buf *buf, + krb5_subject_pk_info *val); +asn1_error_code +asn1_decode_algorithm_identifier(asn1buf *buf, krb5_algorithm_identifier *val); +asn1_error_code +asn1_decode_algorithm_identifier_ptr(asn1buf *buf, + krb5_algorithm_identifier **valptr); +asn1_error_code asn1_decode_auth_pack(asn1buf *buf, krb5_auth_pack *val); +asn1_error_code asn1_decode_auth_pack_draft9(asn1buf *buf, + krb5_auth_pack_draft9 *val); +asn1_error_code asn1_decode_pa_pk_as_rep(asn1buf *buf, + krb5_pa_pk_as_rep *val); +asn1_error_code asn1_decode_pa_pk_as_rep_draft9(asn1buf *buf, + krb5_pa_pk_as_rep_draft9 *val); +asn1_error_code asn1_decode_kdc_dh_key_info(asn1buf *buf, + krb5_kdc_dh_key_info *val); +asn1_error_code asn1_decode_krb5_principal_name(asn1buf *buf, + krb5_principal *val); +asn1_error_code asn1_decode_reply_key_pack(asn1buf *buf, + krb5_reply_key_pack *val); +asn1_error_code +asn1_decode_reply_key_pack_draft9(asn1buf *buf, + krb5_reply_key_pack_draft9 *val); +asn1_error_code +asn1_decode_sequence_of_typed_data(asn1buf *buf, krb5_typed_data ***val); +asn1_error_code asn1_decode_typed_data(asn1buf *buf, krb5_typed_data *val); +asn1_error_code asn1_decode_typed_data_ptr(asn1buf *buf, + krb5_typed_data **valptr); /* arrays */ -asn1_error_code asn1_decode_authorization_data - (asn1buf *buf, krb5_authdata ***val); -asn1_error_code asn1_decode_host_addresses - (asn1buf *buf, krb5_address ***val); -asn1_error_code asn1_decode_sequence_of_ticket - (asn1buf *buf, krb5_ticket ***val); -asn1_error_code asn1_decode_sequence_of_krb_cred_info - (asn1buf *buf, krb5_cred_info ***val); -asn1_error_code asn1_decode_sequence_of_pa_data - (asn1buf *buf, krb5_pa_data ***val); -asn1_error_code asn1_decode_last_req - (asn1buf *buf, krb5_last_req_entry ***val); - -asn1_error_code asn1_decode_sequence_of_enctype - (asn1buf *buf, int *num, krb5_enctype **val); - -asn1_error_code asn1_decode_sequence_of_checksum - (asn1buf *buf, krb5_checksum ***val); - -asn1_error_code asn1_decode_sequence_of_passwdsequence - (asn1buf *buf, passwd_phrase_element ***val); - -asn1_error_code asn1_decode_etype_info - (asn1buf *buf, krb5_etype_info_entry ***val); -asn1_error_code asn1_decode_etype_info2 - (asn1buf *buf, krb5_etype_info_entry ***val, krb5_boolean v1_3_behavior); -asn1_error_code asn1_decode_sequence_of_external_principal_identifier - (asn1buf *buf, krb5_external_principal_identifier ***val); -asn1_error_code asn1_decode_sequence_of_trusted_ca - (asn1buf *buf, krb5_trusted_ca ***val); -asn1_error_code asn1_decode_sequence_of_algorithm_identifier - (asn1buf *buf, krb5_algorithm_identifier ***val); - -asn1_error_code asn1_decode_setpw_req - (asn1buf *buf, krb5_data *rep, krb5_principal *principal); -asn1_error_code asn1_decode_pa_for_user - (asn1buf *buf, krb5_pa_for_user *val); -asn1_error_code asn1_decode_s4u_userid - (asn1buf *buf, krb5_s4u_userid *val); -asn1_error_code asn1_decode_pa_s4u_x509_user - (asn1buf *buf, krb5_pa_s4u_x509_user *val); -asn1_error_code asn1_decode_pa_pac_req - (asn1buf *buf, krb5_pa_pac_req *val); - -asn1_error_code asn1_decode_fast_armor -(asn1buf *buf, krb5_fast_armor *val); - -asn1_error_code asn1_decode_fast_armor_ptr -(asn1buf *buf, krb5_fast_armor **val); - -asn1_error_code asn1_decode_fast_finished -(asn1buf *buf, krb5_fast_finished *val); - -asn1_error_code asn1_decode_fast_finished_ptr -(asn1buf *buf, krb5_fast_finished **val); - -asn1_error_code asn1_decode_ad_kdcissued -(asn1buf *buf, krb5_ad_kdcissued *val); - -asn1_error_code asn1_decode_ad_kdcissued_ptr -(asn1buf *buf, krb5_ad_kdcissued **val); +asn1_error_code asn1_decode_authorization_data(asn1buf *buf, + krb5_authdata ***val); +asn1_error_code asn1_decode_host_addresses(asn1buf *buf, krb5_address ***val); +asn1_error_code asn1_decode_sequence_of_ticket(asn1buf *buf, + krb5_ticket ***val); +asn1_error_code asn1_decode_sequence_of_krb_cred_info(asn1buf *buf, + krb5_cred_info ***val); +asn1_error_code asn1_decode_sequence_of_pa_data(asn1buf *buf, + krb5_pa_data ***val); +asn1_error_code asn1_decode_last_req(asn1buf *buf, krb5_last_req_entry ***val); + +asn1_error_code asn1_decode_sequence_of_enctype(asn1buf *buf, int *num, + krb5_enctype **val); + +asn1_error_code asn1_decode_sequence_of_checksum(asn1buf *buf, + krb5_checksum ***val); + +asn1_error_code asn1_decode_sequence_of_passwdsequence(asn1buf *buf, + passwd_phrase_element ***val); + +asn1_error_code asn1_decode_etype_info(asn1buf *buf, + krb5_etype_info_entry ***val); +asn1_error_code asn1_decode_etype_info2(asn1buf *buf, + krb5_etype_info_entry ***val, + krb5_boolean v1_3_behavior); +asn1_error_code asn1_decode_sequence_of_external_principal_identifier( + asn1buf *buf, krb5_external_principal_identifier ***val); +asn1_error_code asn1_decode_sequence_of_trusted_ca(asn1buf *buf, + krb5_trusted_ca ***val); +asn1_error_code asn1_decode_sequence_of_algorithm_identifier( + asn1buf *buf, krb5_algorithm_identifier ***val); + +asn1_error_code asn1_decode_setpw_req(asn1buf *buf, krb5_data *rep, + krb5_principal *principal); +asn1_error_code asn1_decode_pa_for_user(asn1buf *buf, krb5_pa_for_user *val); +asn1_error_code asn1_decode_s4u_userid(asn1buf *buf, krb5_s4u_userid *val); +asn1_error_code asn1_decode_pa_s4u_x509_user(asn1buf *buf, + krb5_pa_s4u_x509_user *val); +asn1_error_code asn1_decode_pa_pac_req(asn1buf *buf, krb5_pa_pac_req *val); + +asn1_error_code asn1_decode_fast_armor(asn1buf *buf, krb5_fast_armor *val); + +asn1_error_code asn1_decode_fast_armor_ptr(asn1buf *buf, + krb5_fast_armor **val); + +asn1_error_code asn1_decode_fast_finished(asn1buf *buf, + krb5_fast_finished *val); + +asn1_error_code asn1_decode_fast_finished_ptr(asn1buf *buf, + krb5_fast_finished **val); + +asn1_error_code asn1_decode_ad_kdcissued(asn1buf *buf, krb5_ad_kdcissued *val); + +asn1_error_code asn1_decode_ad_kdcissued_ptr(asn1buf *buf, + krb5_ad_kdcissued **val); #endif diff --git a/src/lib/krb5/asn.1/asn1_k_encode.h b/src/lib/krb5/asn.1/asn1_k_encode.h index 94b8f7b60..9004bcdd2 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.h +++ b/src/lib/krb5/asn.1/asn1_k_encode.h @@ -67,70 +67,95 @@ asn1_error_code asn1_encode_asn1_type(asn1buf *buf, /* PKINIT */ -asn1_error_code asn1_encode_pk_authenticator - (asn1buf *buf, const krb5_pk_authenticator *val, unsigned int *retlen); - -asn1_error_code asn1_encode_pk_authenticator_draft9 - (asn1buf *buf, const krb5_pk_authenticator_draft9 *val, unsigned int *retlen); - -asn1_error_code asn1_encode_algorithm_identifier - (asn1buf *buf, const krb5_algorithm_identifier *val, unsigned int *retlen); - -asn1_error_code asn1_encode_subject_pk_info - (asn1buf *buf, const krb5_subject_pk_info *val, unsigned int *retlen); - -asn1_error_code asn1_encode_sequence_of_algorithm_identifier - (asn1buf *buf, const krb5_algorithm_identifier **val, unsigned int *retlen); - -asn1_error_code asn1_encode_auth_pack - (asn1buf *buf, const krb5_auth_pack *val, unsigned int *retlen); - -asn1_error_code asn1_encode_auth_pack_draft9 - (asn1buf *buf, const krb5_auth_pack_draft9 *val, unsigned int *retlen); - -asn1_error_code asn1_encode_external_principal_identifier - (asn1buf *buf, const krb5_external_principal_identifier *val, unsigned int *retlen); - -asn1_error_code asn1_encode_sequence_of_external_principal_identifier - (asn1buf *buf, const krb5_external_principal_identifier **val, unsigned int *retlen); - -asn1_error_code asn1_encode_pa_pk_as_req - (asn1buf *buf, const krb5_pa_pk_as_req *val, unsigned int *retlen); - -asn1_error_code asn1_encode_trusted_ca - (asn1buf *buf, const krb5_trusted_ca *val, unsigned int *retlen); - -asn1_error_code asn1_encode_sequence_of_trusted_ca - (asn1buf *buf, const krb5_trusted_ca **val, unsigned int *retlen); - -asn1_error_code asn1_encode_pa_pk_as_req_draft9 - (asn1buf *buf, const krb5_pa_pk_as_req_draft9 *val, unsigned int *retlen); - -asn1_error_code asn1_encode_dh_rep_info - (asn1buf *buf, const krb5_dh_rep_info *val, unsigned int *retlen); - -asn1_error_code asn1_encode_kdc_dh_key_info - (asn1buf *buf, const krb5_kdc_dh_key_info *val, unsigned int *retlen); - -asn1_error_code asn1_encode_reply_key_pack - (asn1buf *buf, const krb5_reply_key_pack *val, unsigned int *retlen); - -asn1_error_code asn1_encode_reply_key_pack_draft9 - (asn1buf *buf, const krb5_reply_key_pack_draft9 *val, unsigned int *retlen); - -asn1_error_code asn1_encode_pa_pk_as_rep - (asn1buf *buf, const krb5_pa_pk_as_rep *val, unsigned int *retlen); - -asn1_error_code asn1_encode_pa_pk_as_rep_draft9 - (asn1buf *buf, const krb5_pa_pk_as_rep_draft9 *val, unsigned int *retlen); - -asn1_error_code asn1_encode_td_trusted_certifiers - (asn1buf *buf, const krb5_external_principal_identifier **val, unsigned int *retlen); - -asn1_error_code asn1_encode_typed_data - (asn1buf *buf, const krb5_typed_data *val, unsigned int *retlen); - -asn1_error_code asn1_encode_sequence_of_typed_data - (asn1buf *buf, const krb5_typed_data **val, unsigned int *retlen); +asn1_error_code asn1_encode_pk_authenticator(asn1buf *buf, + const krb5_pk_authenticator *val, + unsigned int *retlen); + +asn1_error_code +asn1_encode_pk_authenticator_draft9(asn1buf *buf, + const krb5_pk_authenticator_draft9 *val, + unsigned int *retlen); + +asn1_error_code +asn1_encode_algorithm_identifier(asn1buf *buf, + const krb5_algorithm_identifier *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_subject_pk_info(asn1buf *buf, + const krb5_subject_pk_info *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_sequence_of_algorithm_identifier( + asn1buf *buf, const krb5_algorithm_identifier **val, unsigned int *retlen); + +asn1_error_code asn1_encode_auth_pack(asn1buf *buf, const krb5_auth_pack *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_auth_pack_draft9(asn1buf *buf, + const krb5_auth_pack_draft9 *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_external_principal_identifier( + asn1buf *buf, const krb5_external_principal_identifier *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_sequence_of_external_principal_identifier( + asn1buf *buf, const krb5_external_principal_identifier **val, + unsigned int *retlen); + +asn1_error_code asn1_encode_pa_pk_as_req(asn1buf *buf, + const krb5_pa_pk_as_req *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_trusted_ca(asn1buf *buf, + const krb5_trusted_ca *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_sequence_of_trusted_ca(asn1buf *buf, + const krb5_trusted_ca **val, + unsigned int *retlen); + +asn1_error_code +asn1_encode_pa_pk_as_req_draft9(asn1buf *buf, + const krb5_pa_pk_as_req_draft9 *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_dh_rep_info(asn1buf *buf, + const krb5_dh_rep_info *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_kdc_dh_key_info(asn1buf *buf, + const krb5_kdc_dh_key_info *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_reply_key_pack(asn1buf *buf, + const krb5_reply_key_pack *val, + unsigned int *retlen); + +asn1_error_code +asn1_encode_reply_key_pack_draft9(asn1buf *buf, + const krb5_reply_key_pack_draft9 *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_pa_pk_as_rep(asn1buf *buf, + const krb5_pa_pk_as_rep *val, + unsigned int *retlen); + +asn1_error_code +asn1_encode_pa_pk_as_rep_draft9(asn1buf *buf, + const krb5_pa_pk_as_rep_draft9 *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_td_trusted_certifiers( + asn1buf *buf, const krb5_external_principal_identifier **val, + unsigned int *retlen); + +asn1_error_code asn1_encode_typed_data(asn1buf *buf, + const krb5_typed_data *val, + unsigned int *retlen); + +asn1_error_code asn1_encode_sequence_of_typed_data(asn1buf *buf, + const krb5_typed_data **val, + unsigned int *retlen); #endif diff --git a/src/lib/krb5/asn.1/asn1_misc.h b/src/lib/krb5/asn.1/asn1_misc.h index ca9d57999..e9d5e3627 100644 --- a/src/lib/krb5/asn.1/asn1_misc.h +++ b/src/lib/krb5/asn.1/asn1_misc.h @@ -31,8 +31,8 @@ #include "k5-int.h" #include "krbasn1.h" -asn1_error_code asn1_krb5_realm_copy - (krb5_principal target, krb5_principal source); +asn1_error_code asn1_krb5_realm_copy(krb5_principal target, + krb5_principal source); /* requires target, source, and source->realm are allocated effects Copies source->realm into target->realm. Returns ENOMEM if memory is exhausted. */