public class CertificateValidity extends Object implements Serializable
| Constructor and Description |
|---|
CertificateValidity(CertificateToken certificateToken)
This constructor create an object containing all information concerning the validity of a candidate for the
signing certificate.
|
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. |
| Modifier and Type | Method and Description |
|---|---|
CertificateToken |
getCertificateToken() |
String |
getDigest() |
DigestAlgorithm |
getDigestAlgorithm() |
PublicKey |
getPublicKey()
If the
certificateToken is not null then the associated PublicKey will be returned otherwise the
provided publicKey is returned. |
String |
getSigned() |
boolean |
isAttributePresent()
Indicates if the IssuerSerial (issuerAndSerialNumber) is present in the signature.
|
boolean |
isDigestEqual() |
boolean |
isDigestPresent() |
boolean |
isDistinguishedNameEqual() |
boolean |
isSerialNumberEqual() |
boolean |
isSignerIdMatch() |
boolean |
isValid()
This method returns
true if the certificate digest or IssuerSerial/issuerAndSerialNumber match or the
certificate is signed. |
void |
setAttributePresent(boolean attributePresent) |
void |
setDigest(String digest) |
void |
setDigestAlgorithm(DigestAlgorithm digestAlgorithm) |
void |
setDigestEqual(boolean digestEqual) |
void |
setDigestPresent(boolean digestPresent) |
void |
setDistinguishedNameEqual(boolean distinguishedNameEqual) |
void |
setSerialNumberEqual(boolean serialNumberEqual) |
void |
setSigned(String signed)
Allows to set the signed element: X509Certificate, X509Data or KeyInfo
|
void |
setSignerIdMatch(boolean signerIdMatch) |
public CertificateValidity(CertificateToken certificateToken)
certificateToken - the candidate for the signing certificatepublic CertificateValidity(PublicKey publicKey)
PublicKey. To be used in case of a non AdES signature.publicKey - the PublicKey associated to the signing certificate.public PublicKey getPublicKey()
certificateToken is not null then the associated PublicKey will be returned otherwise the
provided publicKey is returned.public CertificateToken getCertificateToken()
public boolean isSignerIdMatch()
public void setSignerIdMatch(boolean signerIdMatch)
public boolean isDigestPresent()
public void setDigestPresent(boolean digestPresent)
public boolean isDigestEqual()
public void setDigestEqual(boolean digestEqual)
public boolean isAttributePresent()
public void setAttributePresent(boolean attributePresent)
public boolean isSerialNumberEqual()
public void setSerialNumberEqual(boolean serialNumberEqual)
public void setDistinguishedNameEqual(boolean distinguishedNameEqual)
public boolean isDistinguishedNameEqual()
public String getSigned()
null if there is no signed
elementpublic void setSigned(String signed)
signed - indicates the element which was signedpublic boolean isValid()
true if the certificate digest or IssuerSerial/issuerAndSerialNumber match or the
certificate is signed. The signed reference is checked
following the validation policy.true if the certificate digest matches.public void setDigest(String digest)
public String getDigest()
public DigestAlgorithm getDigestAlgorithm()
public void setDigestAlgorithm(DigestAlgorithm digestAlgorithm)
Copyright © 2018. All rights reserved.