Class QualifiedTimestampInfo
sigTst) reported by a verification operation.
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 whatever the timestamp's trust status.
Trust status. getTrustStatus() carries one of
six values. The server runs its checks in a fixed order and the first check
that fails decides the value:
UNTRUSTED— the token does not parse, or carries no certificate for its signer;SIGNATURE_INVALID— the token's own signature does not verify, or a certificate identifier it carries does not name the certificate that verified it;UNTRUSTED— the token's message imprint declares an unsupported hash, parameters other than absent or NULL, or a digest of the wrong length;IMPRINT_MISMATCH— the token's message imprint is not the digest of the verified signature value: the token time-stamps other bytes;UNTRUSTED— the signer's certificate does not carryid-kp-timeStampingas its sole, critical purpose;EXPIRED— the signer's certificate was not valid atgenTime: expired, or not yet valid, when the token was made;UNTRUSTED— no trust anchor is configured;- the certificate path is validated at
genTime:EXPIREDwhen a certificate in it, a CA's included, was not valid atgenTime;UNTRUSTEDfor every other path failure: it does not end at a configured trust anchor, a certificate signature does not verify, or a name or basic constraint is violated. A signer that is itself a configured self-signed anchor passes this step and the revocation step does not run for it; - only when the deployment checks revocation (the default):
REVOKEDwhen a certificate in the path is revoked in the sense of RFC 3161 section 4;UNTRUSTEDwhen the revocation status of a certificate in the path could not be determined while the deployment's revocation posture is hard-fail (the default), or when the revocation evaluation itself failed; VALID— every check passed.
From step 5 on, a certificate check that cannot be completed at all, for
a reason not listed above (a certificate that cannot be read, for example),
is UNTRUSTED.
A certificate that expired after genTime does not make a stamp
EXPIRED: the certificate path is judged as it stood at
genTime. The token's age is not judged, so a stamp verifies
VALID however long ago it was issued.
Absent fields. getGenTime(),
getSerialNumber() and getPolicyOid() are reported only for
a value decided by the certificate checks (steps 5 to 10 above). They are
null for steps 1 to 4: a token that does not parse, a token without
its signer's certificate, SIGNATURE_INVALID, a malformed message
imprint, and IMPRINT_MISMATCH. Callers must not treat a
null value as an error.
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThegetTrustStatus()value for a trust outcome the server returned that this SDK release does not know. -
Constructor Summary
ConstructorsConstructorDescriptionQualifiedTimestampInfo(boolean present, String trustStatus, String genTime, String serialNumber, String policyOid) Creates an immutable qualified-timestamp view. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic QualifiedTimestampInfofrom(co.ankatech.secure.client.model.QualifiedTimestamp src) Maps a generated OpenAPIQualifiedTimestampto this public view.inthashCode()booleantoString()
-
Field Details
-
TRUST_STATUS_UNKNOWN
ThegetTrustStatus()value for a trust outcome the server returned that this SDK release does not know. Upgrade the SDK to interpret it. It is neverVALID.- See Also:
-
-
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 JWStrustStatus- typed TSA trust outcome: one ofVALID,SIGNATURE_INVALID,IMPRINT_MISMATCH,UNTRUSTED,REVOKED,EXPIRED; may benullgenTime- TSA-asserted generation time (ISO-8601);nullunder the absent-field rule in the class descriptionserialNumber- timestamp token serial number (decimal);nullunder the same rulepolicyOid- TSA policy OID (dotted-decimal);nullunder the same rule
-
-
Method Details
-
from
Maps a generated OpenAPIQualifiedTimestampto this public view.- Parameters:
src- the generated wire model; may benull- Returns:
- the mapped view, or
nullwhensrcisnull
-
isPresent
public boolean isPresent()- Returns:
trueif a qualified timestamp was present in the JWS
-
getTrustStatus
- Returns:
- typed TSA trust outcome, independent of the signature verdict:
one of
VALID,SIGNATURE_INVALID,IMPRINT_MISMATCH,UNTRUSTED,REVOKED,EXPIRED, orTRUST_STATUS_UNKNOWNfor an outcome this SDK release does not know; may benull
-
getGenTime
- Returns:
- TSA-asserted generation time (ISO-8601);
nullunless the token is authenticated and covers the verified signature
-
getSerialNumber
- Returns:
- timestamp token serial number (decimal);
nullunder the same rule asgetGenTime()
-
getPolicyOid
- Returns:
- TSA policy OID (dotted-decimal);
nullunder the same rule asgetGenTime()
-
toString
-
equals
-
hashCode
public int hashCode()
-