Class SignatureValidationAlerter
java.lang.Object
eu.europa.esig.dss.spi.validation.SignatureValidationAlerter
- All Implemented Interfaces:
ValidationAlerter
This class used
eu.europa.esig.dss.spi.validation.SignatureValidationContext to perform validation and
executes alerts based on the validation result.
The configuration of the alerts and their behavior is defined within
eu.europa.esig.dss.spi.validation.CertificateVerifier.
If alert is not defined, the execution of the corresponding check is being skipped.-
Constructor Summary
ConstructorsConstructorDescriptionSignatureValidationAlerter(SignatureValidationContext validationContext) Default constructor to instantiate alerter -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method verifies if all POE (timestamp tokens) are covered by a revocation data.voidThis method verifies if all processed certificates have a revocation data.voidThis method verifies whether for all signature's certificate chain certificates there is a fresh revocation data, after the earliest available timestamp token production time.voidThis method verifies recursively whether none of the signature's certificate chain certificates are revoked.voidThis method verifies whether all signatures added to the ValidationContext have been produced with yet valid certificates.voidThis method verifies whether all signatures added to the ValidationContext are not yet expired.voidThis method verifies if all processed timestamps are valid and intact.voidassertCertificateIsYetValid(CertificateToken certificateToken) This method verifies whether the certificate token is yet valid.voidassertCertificateNotExpired(CertificateToken certificateToken) This method verifies whether the certificate token is not yet expired.voidassertCertificateNotRevoked(CertificateToken certificateToken) This method verifies if the certificate is not revoked.protected voidpopulateMessage(MessageStatus status) This method augments the validation message with the information about currently performing operation kindvoidsetSigningOperation(SigningOperation signingOperation) (Optional) Sets the current operation kind to provide a user-friendly error message
-
Constructor Details
-
SignatureValidationAlerter
Default constructor to instantiate alerter- Parameters:
validationContext-SignatureValidationContext
-
-
Method Details
-
setSigningOperation
(Optional) Sets the current operation kind to provide a user-friendly error message- Parameters:
signingOperation-SigningOperation
-
assertAllRequiredRevocationDataPresent
public void assertAllRequiredRevocationDataPresent()Description copied from interface:ValidationAlerterThis method verifies if all processed certificates have a revocation data. The behavior of the method is configured withCertificateVerifier.setAlertOnMissingRevocationData(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertAllRequiredRevocationDataPresentin interfaceValidationAlerter
-
assertAllPOECoveredByRevocationData
public void assertAllPOECoveredByRevocationData()Description copied from interface:ValidationAlerterThis method verifies if all POE (timestamp tokens) are covered by a revocation data. The behavior of the method is configured withCertificateVerifier.setAlertOnUncoveredPOE(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertAllPOECoveredByRevocationDatain interfaceValidationAlerter
-
assertAllTimestampsValid
public void assertAllTimestampsValid()Description copied from interface:ValidationAlerterThis method verifies if all processed timestamps are valid and intact. The behavior of the method is configured withCertificateVerifier.setAlertOnInvalidTimestamp(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertAllTimestampsValidin interfaceValidationAlerter
-
assertCertificateNotRevoked
Description copied from interface:ValidationAlerterThis method verifies if the certificate is not revoked. The behavior of the method is configured withCertificateVerifier.setAlertOnRevokedCertificate(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertCertificateNotRevokedin interfaceValidationAlerter- Parameters:
certificateToken-CertificateTokencertificate to be checked
-
assertAllSignatureCertificatesNotRevoked
public void assertAllSignatureCertificatesNotRevoked()Description copied from interface:ValidationAlerterThis method verifies recursively whether none of the signature's certificate chain certificates are revoked. The behavior of the method is configured withCertificateVerifier.setAlertOnRevokedCertificate(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertAllSignatureCertificatesNotRevokedin interfaceValidationAlerter
-
assertAllSignatureCertificateHaveFreshRevocationData
public void assertAllSignatureCertificateHaveFreshRevocationData()Description copied from interface:ValidationAlerterThis method verifies whether for all signature's certificate chain certificates there is a fresh revocation data, after the earliest available timestamp token production time. The behavior of the method is configured withCertificateVerifier.setAlertOnNoRevocationAfterBestSignatureTime(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertAllSignatureCertificateHaveFreshRevocationDatain interfaceValidationAlerter
-
assertAllSignaturesNotExpired
public void assertAllSignaturesNotExpired()Description copied from interface:ValidationAlerterThis method verifies whether all signatures added to the ValidationContext are not yet expired. The behavior of the method is configured withCertificateVerifier.setAlertOnExpiredCertificate(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertAllSignaturesNotExpiredin interfaceValidationAlerter
-
assertCertificateNotExpired
Description copied from interface:ValidationAlerterThis method verifies whether the certificate token is not yet expired. The behavior of the method is configured withCertificateVerifier.setAlertOnExpiredCertificate(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertCertificateNotExpiredin interfaceValidationAlerter- Parameters:
certificateToken-CertificateTokento be validated
-
assertAllSignaturesAreYetValid
public void assertAllSignaturesAreYetValid()Description copied from interface:ValidationAlerterThis method verifies whether all signatures added to the ValidationContext have been produced with yet valid certificates. The behavior of the method is configured withCertificateVerifier.setAlertOnNotYetValidCertificate(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertAllSignaturesAreYetValidin interfaceValidationAlerter
-
assertCertificateIsYetValid
Description copied from interface:ValidationAlerterThis method verifies whether the certificate token is yet valid. The behavior of the method is configured withCertificateVerifier.setAlertOnNotYetValidCertificate(eu.europa.esig.dss.alert.StatusAlert)- Specified by:
assertCertificateIsYetValidin interfaceValidationAlerter- Parameters:
certificateToken-CertificateTokento be validated
-
populateMessage
This method augments the validation message with the information about currently performing operation kind- Parameters:
status-MessageStatusto augment
-