diff options
author | John Gilmore <gnu@toad.com> | 1995-02-03 09:06:26 +0000 |
---|---|---|
committer | John Gilmore <gnu@toad.com> | 1995-02-03 09:06:26 +0000 |
commit | f3db55d49cbddc0e7a60e5d44788b8bff0a2b374 (patch) | |
tree | bc08582dbf50644f801515ed8add4d6bf797457c /src/lib/krb5/asn.1/asn1_k_decode.h | |
parent | dfda945e1571e568293fda17926f32adda123a87 (diff) | |
download | krb5-f3db55d49cbddc0e7a60e5d44788b8bff0a2b374.zip krb5-f3db55d49cbddc0e7a60e5d44788b8bff0a2b374.tar.gz krb5-f3db55d49cbddc0e7a60e5d44788b8bff0a2b374.tar.bz2 |
* asn1_decode_k.c => asn1_k_decode.c
* asn1_decode_k.h => asn1_k_decode.h
* asn1_encode_k.c => asn1_k_encode.c
* asn1_encode_k.h => asn1_k_encode.h
* Makefile.sane.in, krb5_decode.c, krb5_encode.c,
asn1_k_encode.c, asn1_k_decode.c: updated to match.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4885 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/asn.1/asn1_k_decode.h')
-rw-r--r-- | src/lib/krb5/asn.1/asn1_k_decode.h | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/src/lib/krb5/asn.1/asn1_k_decode.h b/src/lib/krb5/asn.1/asn1_k_decode.h new file mode 100644 index 0000000..2fc2f65 --- /dev/null +++ b/src/lib/krb5/asn.1/asn1_k_decode.h @@ -0,0 +1,159 @@ +/* + * src/lib/krb5/asn.1/asn1_k_decode.h + * + * Copyright 1994 by the Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ + +#ifndef __ASN1_DECODE_KRB5_H__ +#define __ASN1_DECODE_KRB5_H__ + +#include <krb5/krb5.h> +#include "krbasn1.h" +#include "asn1buf.h" + +/* asn1_error_code asn1_decode_scalar_type(asn1buf *buf, krb5_scalar *val); */ +/* requires *buf is allocated, *buf's current position points to the + beginning of an encoding (<id> <len> <contents>), + *val is allocated + effects Decodes the encoding in *buf, returning the result in *val. + Returns ASN1_BAD_ID if the encoded id does not + indicate the proper type. + Returns ASN1_OVERRUN if the encoded length exceeds + the bounds of *buf */ + + +/* asn1_error_code asn1_decode_structure_type(asn1buf *buf, + krb5_structure *val); */ +/* requires *buf is allocated, *buf's current position points to the + beginning of an encoding (<id> <len> <contents>), + *val is allocated + Assumes that *val is a freshly-allocated structure (i.e. + does not attempt to clean up or free *val). + effects Decodes the encoding in *buf, returning the result in *val. + Returns ASN1_BAD_ID if the encoded id does not + indicate the proper type. + Returns ASN1_OVERRUN if the encoded length exceeds + the bounds of *buf */ + +/* asn1_error_code asn1_decode_array_type(asn1buf *buf, krb5_scalar ***val); */ +/* requires *buf is allocated, *buf's current position points to the + beginning of an encoding (<id> <len> <contents>) + Assumes that *val is empty (i.e. does not attempt to + clean up or free *val). + effects Decodes the encoding in *buf, returning the result in *val. + Returns ASN1_BAD_ID if the encoded id does not + indicate the proper type. + Returns ASN1_OVERRUN if the encoded length exceeds + the bounds of *buf */ + +/* scalars */ +asn1_error_code asn1_decode_int + PROTOTYPE((asn1buf *buf, int *val)); +asn1_error_code asn1_decode_int32 + PROTOTYPE((asn1buf *buf, krb5_int32 *val)); +asn1_error_code asn1_decode_kvno + PROTOTYPE((asn1buf *buf, krb5_kvno *val)); +asn1_error_code asn1_decode_keytype + PROTOTYPE((asn1buf *buf, krb5_keytype *val)); +asn1_error_code asn1_decode_msgtype + PROTOTYPE((asn1buf *buf, krb5_msgtype *val)); +asn1_error_code asn1_decode_cksumtype + PROTOTYPE((asn1buf *buf, krb5_cksumtype *val)); +asn1_error_code asn1_decode_enctype + PROTOTYPE((asn1buf *buf, krb5_enctype *val)); +asn1_error_code asn1_decode_kvno + PROTOTYPE((asn1buf *buf, krb5_kvno *val)); +asn1_error_code asn1_decode_octet + PROTOTYPE((asn1buf *buf, krb5_octet *val)); +asn1_error_code asn1_decode_addrtype + PROTOTYPE((asn1buf *buf, krb5_addrtype *val)); +asn1_error_code asn1_decode_authdatatype + PROTOTYPE((asn1buf *buf, krb5_authdatatype *val)); +asn1_error_code asn1_decode_ui_2 + PROTOTYPE((asn1buf *buf, krb5_ui_2 *val)); +asn1_error_code asn1_decode_ui_4 + PROTOTYPE((asn1buf *buf, krb5_ui_4 *val)); +asn1_error_code asn1_decode_kerberos_time + PROTOTYPE((asn1buf *buf, krb5_timestamp *val)); + +/* structures */ +asn1_error_code asn1_decode_realm + PROTOTYPE((asn1buf *buf, krb5_principal *val)); +asn1_error_code asn1_decode_principal_name + PROTOTYPE((asn1buf *buf, krb5_principal *val)); +asn1_error_code asn1_decode_checksum + PROTOTYPE((asn1buf *buf, krb5_checksum *val)); +asn1_error_code asn1_decode_encryption_key + PROTOTYPE((asn1buf *buf, krb5_keyblock *val)); +asn1_error_code asn1_decode_encrypted_data + PROTOTYPE((asn1buf *buf, krb5_enc_data *val)); +asn1_error_code asn1_decode_ticket_flags + PROTOTYPE((asn1buf *buf, krb5_flags *val)); +asn1_error_code asn1_decode_transited_encoding + PROTOTYPE((asn1buf *buf, krb5_transited *val)); +asn1_error_code asn1_decode_enc_kdc_rep_part + PROTOTYPE((asn1buf *buf, krb5_enc_kdc_rep_part *val)); +asn1_error_code asn1_decode_krb5_flags + PROTOTYPE((asn1buf *buf, krb5_flags *val)); +asn1_error_code asn1_decode_ap_options + PROTOTYPE((asn1buf *buf, krb5_flags *val)); +asn1_error_code asn1_decode_kdc_options + PROTOTYPE((asn1buf *buf, krb5_flags *val)); +asn1_error_code asn1_decode_ticket + PROTOTYPE((asn1buf *buf, krb5_ticket *val)); +asn1_error_code asn1_decode_kdc_req + PROTOTYPE((asn1buf *buf, krb5_kdc_req *val)); +asn1_error_code asn1_decode_kdc_req_body + PROTOTYPE((asn1buf *buf, krb5_kdc_req *val)); +asn1_error_code asn1_decode_krb_safe_body + PROTOTYPE((asn1buf *buf, krb5_safe *val)); +asn1_error_code asn1_decode_host_address + PROTOTYPE((asn1buf *buf, krb5_address *val)); +asn1_error_code asn1_decode_kdc_rep + PROTOTYPE((asn1buf *buf, krb5_kdc_rep *val)); +asn1_error_code asn1_decode_krb_safe_body + PROTOTYPE((asn1buf *buf, krb5_safe *val)); +asn1_error_code asn1_decode_last_req_entry + PROTOTYPE((asn1buf *buf, krb5_last_req_entry *val)); +asn1_error_code asn1_decode_authdata_elt + PROTOTYPE((asn1buf *buf, krb5_authdata *val)); +asn1_error_code asn1_decode_krb_cred_info + PROTOTYPE((asn1buf *buf, krb5_cred_info *val)); +asn1_error_code asn1_decode_pa_data + PROTOTYPE((asn1buf *buf, krb5_pa_data *val)); + +/* arrays */ +asn1_error_code asn1_decode_authorization_data + PROTOTYPE((asn1buf *buf, krb5_authdata ***val)); +asn1_error_code asn1_decode_host_addresses + PROTOTYPE((asn1buf *buf, krb5_address ***val)); +asn1_error_code asn1_decode_sequence_of_ticket + PROTOTYPE((asn1buf *buf, krb5_ticket ***val)); +asn1_error_code asn1_decode_sequence_of_krb_cred_info + PROTOTYPE((asn1buf *buf, krb5_cred_info ***val)); +asn1_error_code asn1_decode_sequence_of_pa_data + PROTOTYPE((asn1buf *buf, krb5_pa_data ***val)); +asn1_error_code asn1_decode_last_req + PROTOTYPE((asn1buf *buf, krb5_last_req_entry ***val)); + +asn1_error_code asn1_decode_sequence_of_enctype + PROTOTYPE((asn1buf *buf, int *num, krb5_enctype **val)); + +#endif |