Class QualifiedTimestampInfo

java.lang.Object
co.ankatech.ankasecure.sdk.model.QualifiedTimestampInfo

public final class QualifiedTimestampInfo extends Object
Informational view of an embedded RFC 3161 qualified timestamp (JAdES sigTst) reported by a verification operation (PRD §60).

This block is purely informational: its presence, trust status, or absence never affects the signature validity verdict (valid). A stamped signature that verifies cryptographically is valid == true regardless of whether the timestamp is trusted, untrusted, revoked, expired, or exhibits a time anomaly.

Instances are immutable and thread-safe. They are populated from the server verify response only when a qualified timestamp is present in the verified JWS; otherwise the enclosing result's timestamp accessor returns null.

Since:
3.0.0
Author:
ANKATech Solutions Inc.
  • Constructor Details

    • QualifiedTimestampInfo

      public QualifiedTimestampInfo(boolean present, String trustStatus, String genTime, String serialNumber, String policyOid)
      Creates an immutable qualified-timestamp view.
      Parameters:
      present - whether a qualified timestamp was present in the JWS
      trustStatus - typed TSA trust outcome (e.g. VALID, UNTRUSTED, REVOKED, EXPIRED, TIME_ANOMALY); may be null
      genTime - TSA-asserted generation time (ISO-8601); may be null when unparseable
      serialNumber - timestamp token serial number (decimal); may be null when unparseable
      policyOid - TSA policy OID (dotted-decimal); may be null when unparseable
  • Method Details

    • from

      public static QualifiedTimestampInfo from(co.ankatech.secure.client.model.QualifiedTimestamp src)
      Maps a generated OpenAPI QualifiedTimestamp to this public view.
      Parameters:
      src - the generated wire model; may be null
      Returns:
      the mapped view, or null when src is null
    • isPresent

      public boolean isPresent()
      Returns:
      true if a qualified timestamp was present in the JWS
    • getTrustStatus

      public String getTrustStatus()
      Returns:
      typed TSA trust outcome (independent of the signature verdict); may be null
    • getGenTime

      public String getGenTime()
      Returns:
      TSA-asserted generation time (ISO-8601); null when unparseable
    • getSerialNumber

      public String getSerialNumber()
      Returns:
      timestamp token serial number (decimal); null when unparseable
    • getPolicyOid

      public String getPolicyOid()
      Returns:
      TSA policy OID (dotted-decimal); null when unparseable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object