public class BridgeCertificateVerifier extends Object implements NewAdvancedCertificateVerifier
CertificateVerifier
and TrustedRpkStore.| Modifier and Type | Class and Description |
|---|---|
static class |
BridgeCertificateVerifier.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
LOGGER |
| Modifier | Constructor and Description |
|---|---|
protected |
BridgeCertificateVerifier(CertificateVerifier x509verifier,
TrustedRpkStore rpkVerifier,
List<CertificateType> supportedCertificateTypes)
Create delegating certificate verifier for x509 and RPK.
|
| Modifier and Type | Method and Description |
|---|---|
static BridgeCertificateVerifier.Builder |
builder() |
List<X500Principal> |
getAcceptedIssuers()
Return an list of certificate authorities which are trusted
for authenticating peers.
|
List<CertificateType> |
getSupportedCertificateType()
Get the list of supported certificate types in order of preference.
|
void |
setResultHandler(HandshakeResultHandler resultHandler)
Set the handler for asynchronous handshake results.
|
CertificateVerificationResult |
verifyCertificate(ConnectionId cid,
ServerNames serverName,
Boolean clientUsage,
boolean truncateCertificatePath,
CertificateMessage message,
DTLSSession session)
Validates the X.509 certificate chain provided by the the peer as part of
the certificate message.
|
protected BridgeCertificateVerifier(CertificateVerifier x509verifier, TrustedRpkStore rpkVerifier, List<CertificateType> supportedCertificateTypes)
x509verifier - x509 certificate verifier to delegate verification.rpkVerifier - RPK certificate verifier to delegate verification.supportedCertificateTypes - list of supported certificate type in
order of preference.IllegalArgumentException - if both verifier are null.NullPointerException - if the list of supported certificate types
is nullpublic List<CertificateType> getSupportedCertificateType()
NewAdvancedCertificateVerifiergetSupportedCertificateType in interface NewAdvancedCertificateVerifierpublic CertificateVerificationResult verifyCertificate(ConnectionId cid, ServerNames serverName, Boolean clientUsage, boolean truncateCertificatePath, CertificateMessage message, DTLSSession session)
NewAdvancedCertificateVerifierverifyCertificate in interface NewAdvancedCertificateVerifiercid - connection IDserverName - indicated server names.clientUsage - indicator to check certificate usage. null
don't check key usage, true, check key usage for
client, false for server.truncateCertificatePath - true truncate certificate path at
a trusted certificate before validation.message - certificate message to be validatedsession - dtls session to be used for validationnull, if result is
provided asynchronous.public List<X500Principal> getAcceptedIssuers()
NewAdvancedCertificateVerifiergetAcceptedIssuers in interface NewAdvancedCertificateVerifierpublic void setResultHandler(HandshakeResultHandler resultHandler)
NewAdvancedCertificateVerifierDTLSConnector. Synchronous
implementations may just ignore this using an empty implementation.setResultHandler in interface NewAdvancedCertificateVerifierresultHandler - handler for asynchronous master secret results. This
handler MUST NOT be called from the thread calling
NewAdvancedCertificateVerifier.verifyCertificate(ConnectionId, ServerNames, Boolean, boolean, CertificateMessage, DTLSSession),
instead just return the result there.public static BridgeCertificateVerifier.Builder builder()
Copyright © 2023 Eclipse Foundation. All rights reserved.