8078495: End time checking for native TGT is wrong
authorweijun
Mon, 04 May 2015 17:56:33 +0800
changeset 30322 c08d5c975168
parent 30321 ec4de14b3161
child 30323 1b121c8569a2
8078495: End time checking for native TGT is wrong Reviewed-by: xuelei
jdk/src/java.security.jgss/windows/native/libw2k_lsa_auth/NativeCreds.c
--- a/jdk/src/java.security.jgss/windows/native/libw2k_lsa_auth/NativeCreds.c	Mon May 04 10:13:19 2015 +0200
+++ b/jdk/src/java.security.jgss/windows/native/libw2k_lsa_auth/NativeCreds.c	Mon May 04 17:56:33 2015 +0800
@@ -389,7 +389,7 @@
     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 @@
             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;