From: John Kohl Date: Thu, 1 Feb 1990 18:08:26 +0000 (+0000) Subject: use macro for checking valid etype X-Git-Tag: krb5-1.0-alpha2~1156 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e1061a7dd53241052313af216c4b4616ad9b13a7;p=krb5.git use macro for checking valid etype git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@227 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 7ec02ff9a..f677933bb 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -101,8 +101,7 @@ krb5_data **response; /* filled in with a response packet */ return(retval); } - if (request->etype > max_cryptosystem || request->etype < 0 || - !csarray[request->etype]) { + if (!valid_etype(request->etype)) { /* unsupported etype */ cleanup(); diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index 9b7f69f68..3fc58b1ef 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -97,8 +97,7 @@ krb5_data **response; /* filled in with a response packet */ return(retval); } - if (request->etype > max_cryptosystem || - !csarray[request->etype]->system) { + if (!valid_etype(request->etype)) { /* unsupported etype */ cleanup(); @@ -197,7 +196,7 @@ krb5_data **response; /* filled in with a response packet */ } else enc_tkt_reply.times.starttime = kdc_time; - if (isset(request->kdc_options, KDC_OPT_POSTDATED) || + if (isset(request->kdc_options, KDC_OPT_DUPLICATE_SKEY) || isset(request->kdc_options, KDC_OPT_REUSE_SKEY)) set(enc_tkt_reply.flags, TKT_FLG_DUPLICATE_SKEY); if (isset(request->kdc_options, KDC_OPT_VALIDATE)) {