From 47abf305db8fccf739d3ec3428fd23a237a82776 Mon Sep 17 00:00:00 2001 From: Chris Provenzano Date: Wed, 6 Sep 1995 03:28:12 +0000 Subject: [PATCH] * cnv_tkt_skey.c, getcred.c, k524init.c, krb524d.c, test.c : Remove krb5_enctype references, and replace with krb5_keytype where appropriate. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6674 dc483132-0cff-0310-8789-dd5450dbe970 --- src/krb524/ChangeLog | 7 +++++++ src/krb524/cnv_tkt_skey.c | 2 +- src/krb524/getcred.c | 2 +- src/krb524/k524init.c | 2 +- src/krb524/krb524d.c | 10 ++++------ src/krb524/test.c | 5 ++--- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog index 1ba34d700..8b006ff45 100644 --- a/src/krb524/ChangeLog +++ b/src/krb524/ChangeLog @@ -1,3 +1,10 @@ + +Tue Sep 05 22:10:34 1995 Chris Provenzano (proven@mit.edu) + + * cnv_tkt_skey.c, getcred.c, k524init.c, krb524d.c, test.c : + Remove krb5_enctype references, and replace with + krb5_keytype where appropriate. + Thu Aug 24 18:40:22 1995 Theodore Y. Ts'o * .Sanitize: Update file list diff --git a/src/krb524/cnv_tkt_skey.c b/src/krb524/cnv_tkt_skey.c index 2849370d8..0b4bd0deb 100644 --- a/src/krb524/cnv_tkt_skey.c +++ b/src/krb524/cnv_tkt_skey.c @@ -60,7 +60,7 @@ int krb524_convert_tkt_skey(context, v5tkt, v4tkt, skey) return ret; } - if (v5etkt->session->keytype != KEYTYPE_DES || + if (v5etkt->session->keytype != KEYTYPE_DES_CBC_CRC || v5etkt->session->length != sizeof(C_Block)) { if (krb524_debug) fprintf(stderr, "v5 session keyblock type %d length %d != C_Block size %d\n", diff --git a/src/krb524/getcred.c b/src/krb524/getcred.c index de591f504..c5b396242 100644 --- a/src/krb524/getcred.c +++ b/src/krb524/getcred.c @@ -55,7 +55,7 @@ main(argc, argv) v5creds.client = client; v5creds.server = server; v5creds.times.endtime = 0; - v5creds.keyblock.keytype = KEYTYPE_DES; + v5creds.keyblock.keytype = KEYTYPE_DES_CBC_MD5; if (ret = krb5_get_credentials(context, 0, cc, &v5creds)) { com_err("getcred", ret, "getting V5 credentials"); exit(1); diff --git a/src/krb524/k524init.c b/src/krb524/k524init.c index a4aa2101c..048f53053 100644 --- a/src/krb524/k524init.c +++ b/src/krb524/k524init.c @@ -108,7 +108,7 @@ int main(argc, argv) increds.client = client; increds.server = server; increds.times.endtime = 0; - increds.keyblock.keytype = KEYTYPE_DES; + increds.keyblock.keytype = KEYTYPE_DES_CBC_MD5; if ((code = krb5_get_credentials(context, 0, cc, &increds, &v5creds))) { com_err("k524init", code, "getting V5 credentials"); exit(1); diff --git a/src/krb524/krb524d.c b/src/krb524/krb524d.c index 66f74c6d1..0e73f2087 100644 --- a/src/krb524/krb524d.c +++ b/src/krb524/krb524d.c @@ -217,10 +217,8 @@ void init_master(context) cleanup_and_exit(1, context); } - master_keyblock.keytype = KEYTYPE_DES; - krb5_use_cstype(context, &master_encblock, - krb5_keytype_array[master_keyblock.keytype]-> - system->proto_enctype); + master_keyblock.keytype = KEYTYPE_DES_CBC_MD5; + krb5_use_keytype(context, &master_encblock, master_keyblock.keytype); if ((ret = krb5_db_fetch_mkey(context, master_princ, &master_encblock, FALSE, /* non-manual type-in */ FALSE, /* irrelevant, given prev. arg */ @@ -271,9 +269,9 @@ krb5_error_code do_connection(s, context) if (debug) printf("V5 ticket decoded\n"); - /* XXX KEYTYPE_DES shouldn't be hardcoded here. Should be + /* XXX KEYTYPE_DES_CBC_MD5 shouldn't be hardcoded here. Should be derived from the ticket. */ - if ((ret = lookup_service_key(context, v5tkt->server, KEYTYPE_DES, + if ((ret = lookup_service_key(context, v5tkt->server, KEYTYPE_DES_CBC_MD5, &service_key))) goto error; if (debug) diff --git a/src/krb524/test.c b/src/krb524/test.c index d16ec2db5..3f52fb120 100644 --- a/src/krb524/test.c +++ b/src/krb524/test.c @@ -105,7 +105,6 @@ void krb5_print_ticket(context, ticket_data, key) krb5_unparse_name(context, tkt->server, &p); printf("Ticket: Server: %s\n", p); free(p); - printf("Ticket: EType: %d\n", tkt->enc_part.etype); printf("Ticket: kvno: %d\n", tkt->enc_part.kvno); printf("Ticket: Flags: 0x%08x\n", tkt->enc_part2->flags); krb5_print_keyblock("Ticket: Session Keyblock", @@ -254,7 +253,7 @@ int main(argc, argv) increds.client = client; increds.server = server; increds.times.endtime = 0; - increds.keyblock.keytype = KEYTYPE_DES; + increds.keyblock.keytype = KEYTYPE_DES_CBC_MD5; if ((ret = krb5_get_credentials(context, 0, cc, &increds, &v5creds))) { com_err("test", ret, "getting V5 credentials"); exit(1); @@ -281,7 +280,7 @@ int main(argc, argv) keybuf[i] += c; } - key.keytype = KEYTYPE_DES; + key.keytype = KEYTYPE_DES_CBC_MD5; key.length = KEYSIZE; /* presumably */ key.contents = (krb5_octet *) keybuf; -- 2.26.2