Class DefaultClientCertificateValidator
java.lang.Object
org.eclipse.milo.opcua.stack.core.security.DefaultClientCertificateValidator
- All Implemented Interfaces:
CertificateValidator
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.milo.opcua.stack.core.security.CertificateValidator
CertificateValidator.InsecureCertificateValidator -
Constructor Summary
ConstructorsConstructorDescriptionDefaultClientCertificateValidator(TrustListManager trustListManager, Set<ValidationCheck> validationChecks, CertificateQuarantine certificateQuarantine) Create aCertificateValidatorthat performs a given set of optional validation checks.DefaultClientCertificateValidator(TrustListManager trustListManager, CertificateQuarantine certificateQuarantine) Create aCertificateValidatorthat performs no optional validation checks. -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateCertificateChain(List<X509Certificate> certificateChain, String applicationUri, String[] validHostNames) Check that trust can be established using the provided certificate chain and then validate every certificate in the chain.
-
Constructor Details
-
DefaultClientCertificateValidator
public DefaultClientCertificateValidator(TrustListManager trustListManager, CertificateQuarantine certificateQuarantine) Create aCertificateValidatorthat performs no optional validation checks.- Parameters:
trustListManager- the configuredTrustListManager.certificateQuarantine- theCertificateQuarantineto use.
-
DefaultClientCertificateValidator
public DefaultClientCertificateValidator(TrustListManager trustListManager, Set<ValidationCheck> validationChecks, CertificateQuarantine certificateQuarantine) Create aCertificateValidatorthat performs a given set of optional validation checks.- Parameters:
trustListManager- the configuredTrustListManager.validationChecks- the set of optionalValidationChecks to perform.certificateQuarantine- theCertificateQuarantineto use.
-
-
Method Details
-
validateCertificateChain
public void validateCertificateChain(List<X509Certificate> certificateChain, String applicationUri, String[] validHostNames) throws UaException Description copied from interface:CertificateValidatorCheck that trust can be established using the provided certificate chain and then validate every certificate in the chain.The chain must begin with the end-entity certificate at index 0 followed by the remaining certificates in the chain, if any, in the correct order.
- Specified by:
validateCertificateChainin interfaceCertificateValidator- Parameters:
certificateChain- the certificate chain to validate.applicationUri- the applicationUri of the remote endpoint. Ignored ifnull.validHostNames- the valid hostnames for the remote endpoint. Ignored ifnull.- Throws:
UaException- ifcertificateChainis not trusted or validation fails.
-