FULL PRODUCT VERSION :
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.26.8-57.fc8 #1 SMP Thu Dec 18 19:19:45 EST 2008 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The method getRemainingInitLifetime returnd milliseconds not seconds.
The specificaton states that the return values are seconds.
In sun.security.jgss.krb5.Krb5InitCredential
/**
* Returns the init lifetime remaining.
*
* @return the init lifetime remaining in seconds
* @exception GSSException may be thrown
*/
public int getInitLifetime() throws GSSException {
int retVal = 0;
retVal = (int)(getEndTime().getTime()
- (new Date().getTime()));
return retVal;
}
java.util.Date.getTime() returns milliseconds.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a GSS initiate credential and display the results of getRemainingInitLifetime
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Values in seconds
ACTUAL -
Values in milliseconds
REPRODUCIBILITY :
This bug can be reproduced always.