Class DecryptVerifyIntegrityException

All Implemented Interfaces:
Serializable

public final class DecryptVerifyIntegrityException extends StreamIntegrityException
The fail-closed outcome of a streaming decrypt-then-verify whose two-verdict trailing part is INVALID: the decrypted plaintext was discarded and no file exists at the destination.

The streaming route commits its 200 before the inner signers are known, so a signer that does not verify — or that the caller holds no grant on — surfaces here rather than as the 400/403 the buffered route returns. This exception carries what the server reported, so the caller learns which signer failed exactly as it would from a DecryptVerifyResult: getSignatureResults() lists every inner signature in token order with its kid, algorithm, materialVersion and verified outcome, and getGcmTagVerdict() / getSignatureVerdict() say which of the two integrity dimensions failed.

Being a StreamIntegrityException, it is caught by every handler of that type; StreamIntegrityException.getVerdict() is INVALID.

See Also:
  • Constructor Details

    • DecryptVerifyIntegrityException

      public DecryptVerifyIntegrityException(String message, String operation, String verdict, String reason, String correlationId, String gcmTagVerdict, String signatureVerdict, List<co.ankatech.secure.client.model.SignatureResult> signatureResults)
      Constructs the exception for an INVALID two-verdict decrypt-verify part.
      Parameters:
      message - the detail message (oracle-safe; must not embed plaintext / key material)
      operation - the operation whose verdict failed (may be null)
      verdict - the overall verdict, INVALID
      reason - the server's oracle-safe reason (may be null)
      correlationId - the request correlation id (may be null)
      gcmTagVerdict - the outer AES-GCM tag outcome (may be null)
      signatureVerdict - the inner JWS signature outcome (may be null)
      signatureResults - the per-signature detail, in token order (null when the server reported none)
  • Method Details

    • getGcmTagVerdict

      public String getGcmTagVerdict()
      Returns the outer AES-GCM tag outcome.
      Returns:
      VALID or INVALID, or null when the server did not report it
    • getSignatureVerdict

      public String getSignatureVerdict()
      Returns the inner JWS signature outcome.
      Returns:
      VALID or INVALID, or null when the server did not report it
    • getSignatureResults

      public List<co.ankatech.secure.client.model.SignatureResult> getSignatureResults()
      Returns the server's per-signature detail of the inner JWS, one entry per signature in token order; an entry with verified == false names a signer that did not verify or was refused.
      Returns:
      an unmodifiable list, empty when the server reported no entries; each call returns fresh copies of the entries, so changing one changes nothing in this exception