diff options
author | Ken Raeburn <raeburn@mit.edu> | 2002-04-06 01:47:59 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2002-04-06 01:47:59 +0000 |
commit | 912d4caa379df94d4c82001bed40aa3858b525f0 (patch) | |
tree | fc7e1f44f091fade60e0d10e906ef6a7c30df847 /src/lib/krb5/krb | |
parent | 7a7abd3b16d31acd862145157b931ebaa151f28a (diff) | |
download | krb5-912d4caa379df94d4c82001bed40aa3858b525f0.zip krb5-912d4caa379df94d4c82001bed40aa3858b525f0.tar.gz krb5-912d4caa379df94d4c82001bed40aa3858b525f0.tar.bz2 |
call krb5_c_ versions of enctype/cksumtype checking routines
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14367 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb')
-rw-r--r-- | src/lib/krb5/krb/ChangeLog | 18 | ||||
-rw-r--r-- | src/lib/krb5/krb/decrypt_tk.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/encode_kdc.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/gc_frm_kdc.c | 6 | ||||
-rw-r--r-- | src/lib/krb5/krb/gic_keytab.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/in_tkt_ktb.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/in_tkt_sky.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/init_ctx.c | 4 | ||||
-rw-r--r-- | src/lib/krb5/krb/mk_safe.c | 5 | ||||
-rw-r--r-- | src/lib/krb5/krb/rd_safe.c | 6 | ||||
-rw-r--r-- | src/lib/krb5/krb/send_tgs.c | 2 |
11 files changed, 35 insertions, 16 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index f2d3ac2..9e062c3 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,21 @@ +2002-04-05 Ken Raeburn <raeburn@mit.edu> + + * decrypt_tk.c (krb5_decrypt_tkt_part): Call krb5_c_valid_enctype + instead of valid_enctype. + * encode_kdc.c (krb5_encode_kdc_rep): Likewise. + * gc_frm_kdc.c (krb5_get_cred_from_kdc_opt): Likewise. + * gic_keytab.c (krb5_get_as_key_keytab): Likewise. + * in_tkt_ktb.c (keytab_keyproc): Likewise. + * in_tkt_sky.c (skey_keyproc): Likewise. + * init_ctx.c (krb5_set_default_in_tkt_ktypes, + krb5_set_default_tgs_enctypes): Likewise. + * send_tgs.c (krb5_send_tgs): Likewise. + + * mk_safe.c (krb5_mk_safe_basic): Call krb5_c_valid_cksumtype, + krb5_c_is_coll_proof_cksum, krb5_c_is_keyed_cksum instead of + non-prefixed forms. + * rd_safe.c (krb5_rd_safe_basic): Likewise. + 2002-03-28 Sam Hartman <hartmans@mit.edu> * Makefile.in : New file init_keyblock.c diff --git a/src/lib/krb5/krb/decrypt_tk.c b/src/lib/krb5/krb/decrypt_tk.c index c8b35d4..d1c44ba 100644 --- a/src/lib/krb5/krb/decrypt_tk.c +++ b/src/lib/krb5/krb/decrypt_tk.c @@ -48,7 +48,7 @@ krb5_decrypt_tkt_part(context, srv_key, ticket) krb5_data scratch; krb5_error_code retval; - if (!valid_enctype(ticket->enc_part.enctype)) + if (!krb5_c_valid_enctype(ticket->enc_part.enctype)) return KRB5_PROG_ETYPE_NOSUPP; scratch.length = ticket->enc_part.ciphertext.length; diff --git a/src/lib/krb5/krb/encode_kdc.c b/src/lib/krb5/krb/encode_kdc.c index 3b0410d..fb19f3f 100644 --- a/src/lib/krb5/krb/encode_kdc.c +++ b/src/lib/krb5/krb/encode_kdc.c @@ -59,7 +59,7 @@ krb5_encode_kdc_rep(context, type, encpart, using_subkey, client_key, krb5_enc_kdc_rep_part tmp_encpart; krb5_keyusage usage; - if (!valid_enctype(dec_rep->enc_part.enctype)) + if (!krb5_c_valid_enctype(dec_rep->enc_part.enctype)) return KRB5_PROG_ETYPE_NOSUPP; switch (type) { diff --git a/src/lib/krb5/krb/gc_frm_kdc.c b/src/lib/krb5/krb/gc_frm_kdc.c index 25ae0a6..26f195b 100644 --- a/src/lib/krb5/krb/gc_frm_kdc.c +++ b/src/lib/krb5/krb/gc_frm_kdc.c @@ -230,7 +230,7 @@ krb5_get_cred_from_kdc_opt(context, ccache, in_cred, out_cred, tgts, kdcopt) /* didn't find it in the cache so try and get one */ /* with current tgt. */ - if (!valid_enctype(tgt.keyblock.enctype)) { + if (!krb5_c_valid_enctype(tgt.keyblock.enctype)) { retval = KRB5_PROG_ETYPE_NOSUPP; goto cleanup; } @@ -291,7 +291,7 @@ krb5_get_cred_from_kdc_opt(context, ccache, in_cred, out_cred, tgts, kdcopt) /* not in the cache so try and get one with our current tgt. */ - if (!valid_enctype(tgt.keyblock.enctype)) { + if (!krb5_c_valid_enctype(tgt.keyblock.enctype)) { retval = KRB5_PROG_ETYPE_NOSUPP; goto cleanup; } @@ -375,7 +375,7 @@ krb5_get_cred_from_kdc_opt(context, ccache, in_cred, out_cred, tgts, kdcopt) /* got/finally have tgt! try for the creds */ - if (!valid_enctype(tgt.keyblock.enctype)) { + if (!krb5_c_valid_enctype(tgt.keyblock.enctype)) { retval = KRB5_PROG_ETYPE_NOSUPP; goto cleanup; } diff --git a/src/lib/krb5/krb/gic_keytab.c b/src/lib/krb5/krb/gic_keytab.c index 4619406..4fd0aed 100644 --- a/src/lib/krb5/krb/gic_keytab.c +++ b/src/lib/krb5/krb/gic_keytab.c @@ -28,7 +28,7 @@ krb5_get_as_key_keytab( as_key->length = 0; } - if (!valid_enctype(etype)) + if (!krb5_c_valid_enctype(etype)) return(KRB5_PROG_ETYPE_NOSUPP); if ((ret = krb5_kt_get_entry(context, keytab, client, diff --git a/src/lib/krb5/krb/in_tkt_ktb.c b/src/lib/krb5/krb/in_tkt_ktb.c index 9991c97..5d8cf3c 100644 --- a/src/lib/krb5/krb/in_tkt_ktb.c +++ b/src/lib/krb5/krb/in_tkt_ktb.c @@ -64,7 +64,7 @@ keytab_keyproc(context, type, salt, keyseed, key) kt_id = arg->keytab; - if (!valid_enctype(type)) + if (!krb5_c_valid_enctype(type)) return KRB5_PROG_ETYPE_NOSUPP; if (kt_id == NULL) diff --git a/src/lib/krb5/krb/in_tkt_sky.c b/src/lib/krb5/krb/in_tkt_sky.c index 245a032..168ada5 100644 --- a/src/lib/krb5/krb/in_tkt_sky.c +++ b/src/lib/krb5/krb/in_tkt_sky.c @@ -61,7 +61,7 @@ skey_keyproc(context, type, salt, keyseed, key) keyblock = (const krb5_keyblock *)keyseed; - if (!valid_enctype(type)) + if (!krb5_c_valid_enctype(type)) return KRB5_PROG_ETYPE_NOSUPP; if ((retval = krb5_copy_keyblock(context, keyblock, &realkey))) diff --git a/src/lib/krb5/krb/init_ctx.c b/src/lib/krb5/krb/init_ctx.c index 79a1cb0..c2477c5 100644 --- a/src/lib/krb5/krb/init_ctx.c +++ b/src/lib/krb5/krb/init_ctx.c @@ -273,7 +273,7 @@ krb5_set_default_in_tkt_ktypes(context, ktypes) if (ktypes) { for (i = 0; ktypes[i]; i++) { - if (!valid_enctype(ktypes[i])) + if (!krb5_c_valid_enctype(ktypes[i])) return KRB5_PROG_ETYPE_NOSUPP; } @@ -400,7 +400,7 @@ krb5_set_default_tgs_enctypes (context, ktypes) if (ktypes) { for (i = 0; ktypes[i]; i++) { - if (!valid_enctype(ktypes[i])) + if (!krb5_c_valid_enctype(ktypes[i])) return KRB5_PROG_ETYPE_NOSUPP; } diff --git a/src/lib/krb5/krb/mk_safe.c b/src/lib/krb5/krb/mk_safe.c index eef7120..d34f886 100644 --- a/src/lib/krb5/krb/mk_safe.c +++ b/src/lib/krb5/krb/mk_safe.c @@ -64,9 +64,10 @@ krb5_mk_safe_basic(context, userdata, keyblock, replaydata, local_addr, krb5_checksum safe_checksum; krb5_data *scratch1, *scratch2; - if (!valid_cksumtype(sumtype)) + if (!krb5_c_valid_cksumtype(sumtype)) return KRB5_PROG_SUMTYPE_NOSUPP; - if (!is_coll_proof_cksum(sumtype) || !is_keyed_cksum(sumtype)) + if (!krb5_c_is_coll_proof_cksum(sumtype) + || !krb5_c_is_keyed_cksum(sumtype)) return KRB5KRB_AP_ERR_INAPP_CKSUM; safemsg.user_data = *userdata; diff --git a/src/lib/krb5/krb/rd_safe.c b/src/lib/krb5/krb/rd_safe.c index a7f87b2..200a338 100644 --- a/src/lib/krb5/krb/rd_safe.c +++ b/src/lib/krb5/krb/rd_safe.c @@ -70,12 +70,12 @@ krb5_rd_safe_basic(context, inbuf, keyblock, recv_addr, sender_addr, if ((retval = decode_krb5_safe(inbuf, &message))) return retval; - if (!valid_cksumtype(message->checksum->checksum_type)) { + if (!krb5_c_valid_cksumtype(message->checksum->checksum_type)) { retval = KRB5_PROG_SUMTYPE_NOSUPP; goto cleanup; } - if (!is_coll_proof_cksum(message->checksum->checksum_type) || - !is_keyed_cksum(message->checksum->checksum_type)) { + if (!krb5_c_is_coll_proof_cksum(message->checksum->checksum_type) || + !krb5_c_is_keyed_cksum(message->checksum->checksum_type)) { retval = KRB5KRB_AP_ERR_INAPP_CKSUM; goto cleanup; } diff --git a/src/lib/krb5/krb/send_tgs.c b/src/lib/krb5/krb/send_tgs.c index 4526002..341296c 100644 --- a/src/lib/krb5/krb/send_tgs.c +++ b/src/lib/krb5/krb/send_tgs.c @@ -197,7 +197,7 @@ krb5_send_tgs(context, kdcoptions, timestruct, ktypes, sname, addrs, if (ktypes) { /* Check passed ktypes and make sure they're valid. */ for (tgsreq.nktypes = 0; ktypes[tgsreq.nktypes]; tgsreq.nktypes++) { - if (!valid_enctype(ktypes[tgsreq.nktypes])) + if (!krb5_c_valid_enctype(ktypes[tgsreq.nktypes])) return KRB5_PROG_ETYPE_NOSUPP; } tgsreq.ktype = (krb5_enctype *)ktypes; |