Supply the time regardless of whether DO_TIME is set because
authorPaul Park <pjpark@mit.edu>
Wed, 26 Apr 1995 21:53:42 +0000 (21:53 +0000)
committerPaul Park <pjpark@mit.edu>
Wed, 26 Apr 1995 21:53:42 +0000 (21:53 +0000)
decryption/deserialization fails if the time is bogus.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5527 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/mk_priv.c

index 40c9bfa578109e6e5797a1c67f95c844cc3ce04e..b29e886f3bf79427c3996eceac2b53f4bf9dadcb 100644 (file)
@@ -161,15 +161,14 @@ krb5_mk_priv(context, auth_context, userdata, outbuf, outdata)
        /* Need a better error */
        return KRB5_RC_REQUIRED;
 
-    if ((auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_TIME) ||
-       (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_RET_TIME)) {
-       if (retval = krb5_us_timeofday(context, &replaydata.timestamp,
-                                      &replaydata.usec))
-           return retval;
-       if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_RET_TIME) {
-           outdata->timestamp = replaydata.timestamp;
-           outdata->usec = replaydata.usec;
-       }
+    /* Do the time, regardless */
+    if (retval = krb5_us_timeofday(context, &replaydata.timestamp,
+                                  &replaydata.usec))
+      return retval;
+
+    if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_RET_TIME) {
+       outdata->timestamp = replaydata.timestamp;
+       outdata->usec = replaydata.usec;
     }
     if ((auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) ||
        (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_RET_SEQUENCE)) {