SecureBlackbox 2020 Java Edition

Questions / Feedback?

AfterCertificateValidation Event

Marks the end of a single certificate validation step.

Syntax

public class DefaultCertificatevalidatorEventListener implements CertificatevalidatorEventListener {
  ...
  public void afterCertificateValidation(CertificatevalidatorAfterCertificateValidationEvent e) {}
  ...
}

public class CertificatevalidatorAfterCertificateValidationEvent {
  public String cert;
  public String CACert;
  public int validity;
  public int validationDetails;
}

Remarks

This event is fired when the class has finished validation of Cert with CACert, and returns its Validity status and ValidationDetails.

'Validation', in this context, means a single validation of a certificate with its CA certificate. For certificates with multiple CAs, validations are grouped into 'processings.' Each processing, therefore, is a set of validations of the same certificate with all its CAs.

You can influence the validation process by altering the provided validation outcome, such as changing the invalid status to valid. This can be done via InterimValidationResult and InterimValidationDetails properties.

Validity status:

cvtValid0The chain is valid

cvtValidButUntrusted1The chain is valid, but the root certificate is not trusted

cvtInvalid2The chain is not valid (some of certificates are revoked, expired, or contain an invalid signature)

cvtCantBeEstablished3The validity of the chain cannot be established because of missing or unavailable validation information (certificates, CRLs, or OCSP responses)

Validation details:

cvrBadData0x0001One or more certificates in the validation path are malformed

cvrRevoked0x0002One or more certificates are revoked

cvrNotYetValid0x0004One or more certificates are not yet valid

cvrExpired0x0008One or more certificates are expired

cvrInvalidSignature0x0010A certificate contains a non-valid digital signature

cvrUnknownCA0x0020A CA certificate for one or more certificates has not been found (chain incomplete)

cvrCAUnauthorized0x0040One of the CA certificates are not authorized to act as CA

cvrCRLNotVerified0x0080One or more CRLs could not be verified

cvrOCSPNotVerified0x0100One or more OCSP responses could not be verified

cvrIdentityMismatch0x0200The identity protected by the certificate (a TLS endpoint or an e-mail addressee) does not match what is recorded in the certificate

cvrNoKeyUsage0x0400A mandatory key usage is not enabled in one of the chain certificates

cvrBlocked0x0800One or more certificates are blocked

cvrFailure0x1000General validation failure

cvrChainLoop0x2000Chain loop: one of the CA certificates recursively signs itself

cvrWeakAlgorithm0x4000A weak algorithm is used in one of certificates or revocation elements

cvrUserEnforced0x8000The chain was considered invalid following intervention from a user code

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 Java Edition - Version 20.0 [Build 8156]