Class KeyStoreSignatureProvider.X509SignatureState

  • Enclosing class:

    public class KeyStoreSignatureProvider.X509SignatureState
    extends SignatureProvider.SignatureState
    A subclass of SignatureState that references an X.509 Certificate. This class is used internally by the KeyStoreSignatureProvider and there's no need to reference it directly unless you're extending it.
    • Constructor Detail

      • X509SignatureState

        public X509SignatureState​(FormSignature sig,
                                  Boolean validity,
                                  String reason,
                                  boolean alteredsince,
                                  Exception exception,
                                  X509Certificate signingcert,
                                  X509Certificate invalidcert)
        Create a new X509SignatureState
        sig - the signature
        validity - Boolean.TRUE, Boolean.FALSE or null to indicate the signature is valid, invalid or hasn't be validated
        reason - the reason for signing
        alteredsince - whether the PDF has been altered since the signature was applied
        exception - the exception encountered during verification, or null if it succeeded
        signingcert - the X.509 Certificate from the signature used to sign
        invalidcert - the X.509 Certificate from the signature that failed to verify
    • Method Detail

      • getUnverifiableCertificate

        public X509Certificate getUnverifiableCertificate()
        If the certificate chain could not be verified up to a trusted root in the KeyStore, Return the Certificate that failed to verify. Otherwise, if everything was perfect, return null.
      • getSigningCertificate

        public X509Certificate getSigningCertificate()
        Return the signing certificate from the signature.