From b7a9ca2eb939e8d605424749a50fae8d4470725d Mon Sep 17 00:00:00 2001 From: Chris Provenzano Date: Wed, 6 Sep 1995 03:32:46 +0000 Subject: [PATCH] * asn1_k_decode.c, asn1_k_decode.h, asn1_k_encode.c, asn1_k_encode.h * krb5_decode.c : Remove krb5_enctype references, and replace with krb5_keytype where appropriate git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6682 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/asn.1/ChangeLog | 7 +++++++ src/lib/krb5/asn.1/asn1_k_decode.c | 18 ++++++++---------- src/lib/krb5/asn.1/asn1_k_decode.h | 6 ++---- src/lib/krb5/asn.1/asn1_k_encode.c | 8 ++++---- src/lib/krb5/asn.1/asn1_k_encode.h | 6 +++--- src/lib/krb5/asn.1/krb5_decode.c | 1 - 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index d48e9fe74..7e14b92f9 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,10 @@ + +Tue Sep 05 22:10:34 1995 Chris Provenzano (proven@mit.edu) + + * asn1_k_decode.c, asn1_k_decode.h, asn1_k_encode.c, asn1_k_encode.h + * krb5_decode.c : Remove krb5_enctype references, and replace with + krb5_keytype where appropriate + Mon Aug 28 12:54:05 1995 * krb5_decode.c (decode_krb5_alt_method, diff --git a/src/lib/krb5/asn.1/asn1_k_decode.c b/src/lib/krb5/asn.1/asn1_k_decode.c index 187f1917b..c781c8d04 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.c +++ b/src/lib/krb5/asn.1/asn1_k_decode.c @@ -158,7 +158,6 @@ integer_convert(asn1_decode_int32,krb5_int32) integer_convert(asn1_decode_kvno,krb5_kvno) integer_convert(asn1_decode_keytype,krb5_keytype) integer_convert(asn1_decode_cksumtype,krb5_cksumtype) -integer_convert(asn1_decode_enctype,krb5_enctype) integer_convert(asn1_decode_octet,krb5_octet) integer_convert(asn1_decode_addrtype,krb5_addrtype) integer_convert(asn1_decode_authdatatype,krb5_authdatatype) @@ -245,7 +244,6 @@ asn1_error_code asn1_decode_encryption_key(buf, val) get_lenfield(val->length,val->contents,1,asn1_decode_octetstring); end_structure(); val->magic = KV5M_KEYBLOCK; - val->etype = ETYPE_UNKNOWN; } cleanup(); } @@ -256,7 +254,7 @@ asn1_error_code asn1_decode_encrypted_data(buf, val) { setup(); { begin_structure(); - get_field(val->etype,0,asn1_decode_enctype); + get_field(val->keytype,0,asn1_decode_keytype); opt_field(val->kvno,1,asn1_decode_kvno,0); get_lenfield(val->ciphertext.length,val->ciphertext.data,2,asn1_decode_charstring); end_structure(); @@ -411,13 +409,13 @@ asn1_error_code asn1_decode_kdc_req_body(buf, val) get_field(val->till,5,asn1_decode_kerberos_time); opt_field(val->rtime,6,asn1_decode_kerberos_time,0); get_field(val->nonce,7,asn1_decode_int32); - get_lenfield(val->netypes,val->etype,8,asn1_decode_sequence_of_enctype); + get_lenfield(val->nktypes,val->ktype,8,asn1_decode_sequence_of_keytype); opt_field(val->addresses,9,asn1_decode_host_addresses,0); if(tagnum == 10){ get_field(val->authorization_data,10,asn1_decode_encrypted_data); } else{ val->authorization_data.magic = 0; - val->authorization_data.etype = 0; + val->authorization_data.keytype = 0; val->authorization_data.kvno = 0; val->authorization_data.ciphertext.data = NULL; val->authorization_data.ciphertext.length = 0; @@ -634,21 +632,21 @@ asn1_error_code asn1_decode_last_req_entry(buf, val) cleanup(); } -asn1_error_code asn1_decode_sequence_of_enctype(buf, num, val) +asn1_error_code asn1_decode_sequence_of_keytype(buf, num, val) asn1buf * buf; int * num; - krb5_enctype ** val; + krb5_keytype ** val; { asn1_error_code retval; { sequence_of(buf); while(asn1buf_remains(&seqbuf) > 0){ size++; if (*val == NULL) - *val = (krb5_enctype*)malloc(size*sizeof(krb5_enctype)); + *val = (krb5_keytype*)malloc(size*sizeof(krb5_keytype)); else - *val = (krb5_enctype*)realloc(*val,size*sizeof(krb5_enctype)); + *val = (krb5_keytype*)realloc(*val,size*sizeof(krb5_keytype)); if(*val == NULL) return ENOMEM; - retval = asn1_decode_enctype(&seqbuf,&((*val)[size-1])); + retval = asn1_decode_keytype(&seqbuf,&((*val)[size-1])); if(retval) return retval; } *num = size; diff --git a/src/lib/krb5/asn.1/asn1_k_decode.h b/src/lib/krb5/asn.1/asn1_k_decode.h index a411d1b2e..74964453a 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.h +++ b/src/lib/krb5/asn.1/asn1_k_decode.h @@ -76,8 +76,6 @@ 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_octet PROTOTYPE((asn1buf *buf, krb5_octet *val)); asn1_error_code asn1_decode_addrtype @@ -155,8 +153,8 @@ asn1_error_code asn1_decode_sequence_of_pa_data 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)); +asn1_error_code asn1_decode_sequence_of_keytype + PROTOTYPE((asn1buf *buf, int *num, krb5_keytype **val)); asn1_error_code asn1_decode_sequence_of_passwdsequence PROTOTYPE((asn1buf *buf, passwd_phrase_element ***val)); diff --git a/src/lib/krb5/asn.1/asn1_k_encode.c b/src/lib/krb5/asn.1/asn1_k_encode.c index 2bdcf7c7e..67b51a18f 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.c +++ b/src/lib/krb5/asn.1/asn1_k_encode.c @@ -228,7 +228,7 @@ asn1_error_code asn1_encode_encrypted_data(buf, val, retlen) asn1_addlenfield(val->ciphertext.length,val->ciphertext.data,2,asn1_encode_charstring); if(val->kvno) asn1_addfield(val->kvno,1,asn1_encode_integer); - asn1_addfield(val->etype,0,asn1_encode_integer); + asn1_addfield(val->keytype,0,asn1_encode_integer); asn1_makeseq(); @@ -431,7 +431,7 @@ asn1_error_code asn1_encode_kdc_req_body(buf, rep, retlen) /* etype[8] SEQUENCE OF INTEGER, -- EncryptionType, */ /* -- in preference order */ - asn1_addlenfield(rep->netypes,rep->etype,8,asn1_encode_sequence_of_enctype); + asn1_addlenfield(rep->nktypes,rep->ktype,8,asn1_encode_sequence_of_keytype); /* nonce[7] INTEGER, */ asn1_addfield(rep->nonce,7,asn1_encode_integer); @@ -641,10 +641,10 @@ asn1_error_code asn1_encode_ticket(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_sequence_of_enctype(buf, len, val, retlen) +asn1_error_code asn1_encode_sequence_of_keytype(buf, len, val, retlen) asn1buf * buf; const int len; - const krb5_enctype * val; + const krb5_keytype * val; int * retlen; { asn1_setup(); diff --git a/src/lib/krb5/asn.1/asn1_k_encode.h b/src/lib/krb5/asn.1/asn1_k_encode.h index 6add4dad4..cad25e244 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.h +++ b/src/lib/krb5/asn.1/asn1_k_encode.h @@ -65,7 +65,7 @@ asn1_encode_last_req asn1_encode_sequence_of_pa_data asn1_encode_sequence_of_ticket - asn1_encode_sequence_of_enctype + asn1_encode_sequence_of_keytype asn1_encode_sequence_of_krb_cred_info */ @@ -176,9 +176,9 @@ asn1_error_code asn1_encode_sequence_of_pa_data asn1_error_code asn1_encode_sequence_of_ticket PROTOTYPE((asn1buf *buf, const krb5_ticket **val, int *retlen)); -asn1_error_code asn1_encode_sequence_of_enctype +asn1_error_code asn1_encode_sequence_of_keytype PROTOTYPE((asn1buf *buf, - const int len, const krb5_enctype *val, + const int len, const krb5_keytype *val, int *retlen)); asn1_error_code asn1_encode_kdc_req diff --git a/src/lib/krb5/asn.1/krb5_decode.c b/src/lib/krb5/asn.1/krb5_decode.c index 1a5a988bb..7e745e662 100644 --- a/src/lib/krb5/asn.1/krb5_decode.c +++ b/src/lib/krb5/asn.1/krb5_decode.c @@ -210,7 +210,6 @@ krb5_error_code decode_krb5_encryption_key(code, rep) get_lenfield((*rep)->length,(*rep)->contents,1,asn1_decode_octetstring); end_structure(); (*rep)->magic = KV5M_KEYBLOCK; - (*rep)->etype = ETYPE_UNKNOWN; } cleanup(); } -- 2.26.2