use macro for checking valid etype
authorJohn Kohl <jtkohl@mit.edu>
Thu, 1 Feb 1990 18:08:26 +0000 (18:08 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Thu, 1 Feb 1990 18:08:26 +0000 (18:08 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@227 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/do_as_req.c
src/kdc/do_tgs_req.c

index 7ec02ff9a15d5990da5b684913dc6634589f38e6..f677933bbd588e06b76ab34d826fa4dfcca8e6b4 100644 (file)
@@ -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();
index 9b7f69f6888ff8526d2a497d5ec5de04091097dc..3fc58b1efd48ec0ceffadc5fa32b38271e2666cb 100644 (file)
@@ -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)) {