Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6857802

GSS getRemainingInitLifetime method returns milliseconds not seconds

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 7
    • Component/s: security-libs
    • Labels:

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                weijun Weijun Wang
                Reporter:
                weijun Weijun Wang
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: