Class CertificateValidity

    • Constructor Detail

      • CertificateValidity

        public CertificateValidity​(CertificateToken certificateToken)
        This constructor create an object containing all information concerning the validity of a candidate for the signing certificate.
        Parameters:
        certificateToken - the candidate for the signing certificate
      • CertificateValidity

        public CertificateValidity​(PublicKey publicKey)
        This constructor create an object containing all information concerning the validity of a candidate for the signing certificate which is based only on the PublicKey. To be used in case of a non AdES signature.
        Parameters:
        publicKey - the PublicKey associated to the signing certificate.
    • Method Detail

      • getPublicKey

        public PublicKey getPublicKey()
        If the certificateToken is not null then the associated PublicKey will be returned otherwise the provided publicKey is returned.
        Returns:
        the public key associated with this instance.
      • isSignerIdMatch

        public boolean isSignerIdMatch()
      • setSignerIdMatch

        public void setSignerIdMatch​(boolean signerIdMatch)
      • isDigestPresent

        public boolean isDigestPresent()
      • setDigestPresent

        public void setDigestPresent​(boolean digestPresent)
      • isDigestEqual

        public boolean isDigestEqual()
      • setDigestEqual

        public void setDigestEqual​(boolean digestEqual)
      • isAttributePresent

        public boolean isAttributePresent()
        Indicates if the IssuerSerial (issuerAndSerialNumber) is present in the signature.
        Returns:
      • setAttributePresent

        public void setAttributePresent​(boolean attributePresent)
      • isSerialNumberEqual

        public boolean isSerialNumberEqual()
      • setSerialNumberEqual

        public void setSerialNumberEqual​(boolean serialNumberEqual)
      • setDistinguishedNameEqual

        public void setDistinguishedNameEqual​(boolean distinguishedNameEqual)
      • isDistinguishedNameEqual

        public boolean isDistinguishedNameEqual()
      • isValid

        public boolean isValid()
        This method returns true if the certificate digest or IssuerSerial/issuerAndSerialNumber match or the certificate is signed.
        Returns:
        true if the certificate digest matches.