Add an Instance in place of Date for KeyStore and KeyStoreSpi

XMLWordPrintable

    • Type: CSR
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Component/s: security-libs
    • None
    • minimal
    • Does not affect existing `getCreationDate` functionality. The new functionality provides a default implementation for `getCreationTimestamp(String alias)` which is based on existing `getCreationDate`
    • Java API

      Summary

      This csr proposes addition of methods allowing to retrieve the creation timestamp as a java.time.Instant.

      Problem

      In the current implementation the creation timestamp is a java.util.Date which is mutable. java.util.Date is also rarely used with preference given to java.time objects. This introduces certain friction.

      Solution

      Addition of a method which allows retrieval of java.time.Instant type timestamp in addition to the java.util.Date. By default this is based on existing java.util.Date functionality implemented by providers so no compatibility issues should araise.

      Specification

      In addition to existing java.util.Date methods, the java.time.Instant methods are added.

      In KeyStore.java: getCreationDate method gets a similar java.time.Instant method getCreationTimestamp.

      In KeyStoreSpi: engineGetCreationTimestamp is a non-abstract method by default utilising exiting java.util.Date engineGetCreationDate method to retrieve java.time.Instant. This allows the use of the new timestamp method in any provider even if no engineGetCreationTimestamp implementation exist.

            Assignee:
            Mikhail Yankelevich
            Reporter:
            Mikhail Yankelevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: