From b4dc8b67ff0e6f87b339c061f55a40695fc7eefc Mon Sep 17 00:00:00 2001
From: Weijun Wang <weijun@openjdk.org>
Date: Mon, 4 May 2015 17:56:33 +0800
Subject: [PATCH] 8078495: End time checking for native TGT is wrong

Reviewed-by: xuelei
---
 .../windows/native/libw2k_lsa_auth/NativeCreds.c             | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/jdk/src/java.security.jgss/windows/native/libw2k_lsa_auth/NativeCreds.c b/jdk/src/java.security.jgss/windows/native/libw2k_lsa_auth/NativeCreds.c
index ab0ee036e6b..554eb63c19d 100644
--- a/jdk/src/java.security.jgss/windows/native/libw2k_lsa_auth/NativeCreds.c
+++ b/jdk/src/java.security.jgss/windows/native/libw2k_lsa_auth/NativeCreds.c
@@ -389,7 +389,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ
     jobject authTime, renewTillTime, hostAddresses = NULL;
     KERB_EXTERNAL_TICKET *msticket;
     int found = 0;
-    FILETIME Now, EndTime, LocalEndTime;
+    FILETIME Now, EndTime;
 
     int i, netypes;
     jint *etypes = NULL;
@@ -476,8 +476,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ
             GetSystemTimeAsFileTime(&Now);
             EndTime.dwLowDateTime = msticket->EndTime.LowPart;
             EndTime.dwHighDateTime = msticket->EndTime.HighPart;
-            FileTimeToLocalFileTime(&EndTime, &LocalEndTime);
-            if (CompareFileTime(&Now, &LocalEndTime) < 0) {
+            if (CompareFileTime(&Now, &EndTime) < 0) {
                 for (i=0; i<netypes; i++) {
                     if (etypes[i] == msticket->SessionKey.KeyType) {
                         found = 1;