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 ClassesNested classes/interfaces inherited from interface io.deephaven.ssl.config.Trust
Trust.Visitor<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TrustCustom.Builderbuilder()abstract List<Certificate>static TrustCustomof(CertificateFactory factory, byte[] in, int offset, int length) Creates a trust from the givenfactoryandin.static TrustCustomof(CertificateFactory factory, InputStream in) Creates a trust from the givenfactoryandin.static TrustCustomof(CertificateFactory factory, Path path) Creates a trust from the givenfactoryandpath.static TrustCustomofX509(byte[] in, int offset, int length) Creates an X509 trust from the givenin.static TrustCustomofX509(InputStream in) Creates an X509 trust from the givenin.static TrustCustomCreates an X509 trust from the givenpath.final <T> Twalk(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 givenfactoryandin. 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 givenfactoryandpath.- 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 givenfactoryandin. 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
-