Package io.deephaven.ssl.config
Class TrustCustom
java.lang.Object
io.deephaven.ssl.config.TrustBase
io.deephaven.ssl.config.TrustCustom
- All Implemented Interfaces:
Trust
A custom trust configuration provided via
Certificate
. This is not currently deserializable via JSON.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.ssl.config.Trust
Trust.Visitor<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TrustCustom.Builder
builder()
abstract List<Certificate>
static TrustCustom
of
(CertificateFactory factory, byte[] in, int offset, int length) Creates a trust from the givenfactory
andin
.static TrustCustom
of
(CertificateFactory factory, InputStream in) Creates a trust from the givenfactory
andin
.static TrustCustom
of
(CertificateFactory factory, Path path) Creates a trust from the givenfactory
andpath
.static TrustCustom
ofX509
(byte[] in, int offset, int length) Creates an X509 trust from the givenin
.static TrustCustom
ofX509
(InputStream in) Creates an X509 trust from the givenin
.static TrustCustom
Creates an X509 trust from the givenpath
.final <T> T
walk
(Trust.Visitor<T> visitor)
-
Constructor Details
-
TrustCustom
public TrustCustom()
-
-
Method Details
-
builder
-
of
public static TrustCustom of(CertificateFactory factory, InputStream in) throws IOException, CertificateException Creates a trust from the givenfactory
andin
. Equivalent tobuilder().addAllCertificates(factory.generateCertificates(in)).build()
.- Parameters:
factory
- the certificate factoryin
- the input stream- Returns:
- the trust
- Throws:
IOException
- if an IO exception occursCertificateException
- on parsing errors
-
of
public static TrustCustom of(CertificateFactory factory, Path path) throws IOException, CertificateException Creates a trust from the givenfactory
andpath
.- Parameters:
factory
- the certificate factorypath
- the path- Returns:
- the trust
- Throws:
IOException
- if an IO exception occursCertificateException
- on parsing errors
-
of
public static TrustCustom of(CertificateFactory factory, byte[] in, int offset, int length) throws IOException, CertificateException Creates a trust from the givenfactory
andin
. Equivalent toof(factory, new ByteArrayInputStream(in, offset, length))
.- Parameters:
factory
- the certificate factoryin
- the input bytesoffset
- the input offsetlength
- the input length- Returns:
- the trust
- Throws:
IOException
- if an IO exception occursCertificateException
- on parsing errors- See Also:
-
ofX509
Creates an X509 trust from the givenin
. Equivalent toof(CertificateFactory.getInstance("X.509"), in)
.- Parameters:
in
- the input stream- Returns:
- the trust
- Throws:
IOException
- if an IO exception occursCertificateException
- on parsing errors- See Also:
-
ofX509
Creates an X509 trust from the givenpath
. Equivalent toof(CertificateFactory.getInstance("X.509"), path)
.- Parameters:
path
- the path- Returns:
- the trust
- Throws:
IOException
- if an IO exception occursCertificateException
- on parsing errors- See Also:
-
ofX509
public static TrustCustom ofX509(byte[] in, int offset, int length) throws CertificateException, IOException Creates an X509 trust from the givenin
. Equivalent toof(CertificateFactory.getInstance("X.509"), in, offset, length)
.- Parameters:
in
- the input bytesoffset
- the input offsetlength
- the input length- Returns:
- the trust
- Throws:
IOException
- if an IO exception occursCertificateException
- on parsing errors- See Also:
-
certificates
-
walk
-