- java.lang.Object
-
- io.helidon.grpc.core.GrpcTlsDescriptor
-
public class GrpcTlsDescriptor extends Object
GrpcTlsDescriptor contains details about configuring TLS of aChannel
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GrpcTlsDescriptor.Builder
Builder to build a new instance ofGrpcTlsDescriptor
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GrpcTlsDescriptor.Builder
builder()
Return a new instance ofGrpcTlsDescriptor.Builder
.static GrpcTlsDescriptor.Builder
builder(Config config)
Return an instance of builder based on the specified external config.static GrpcTlsDescriptor
create(Config config)
Create an instance of a TLS configuration from external configuration source.boolean
isEnabled()
Check if TLS is enabled.boolean
isJdkSSL()
Check if JDK SSL has be used.Resource
tlsCaCert()
Get the CA (certificate authority) certificate path.Resource
tlsCert()
Get the tlsCert path.Resource
tlsKey()
Get the client private key path.
-
-
-
Method Detail
-
builder
public static GrpcTlsDescriptor.Builder builder()
Return a new instance ofGrpcTlsDescriptor.Builder
.- Returns:
- a new instance of
GrpcTlsDescriptor.Builder
-
builder
public static GrpcTlsDescriptor.Builder builder(Config config)
Return an instance of builder based on the specified external config.- Parameters:
config
- external config- Returns:
- an instance of builder
-
create
public static GrpcTlsDescriptor create(Config config)
Create an instance of a TLS configuration from external configuration source.- Parameters:
config
- external config- Returns:
- an instance of a TLS configuration
-
isEnabled
public boolean isEnabled()
Check if TLS is enabled. If this is false, then none of the other configuration values are used.- Returns:
- true if TLS is enabled; false otherwise
-
isJdkSSL
public boolean isJdkSSL()
Check if JDK SSL has be used. Only used for TLS enabled server channels.A Ignored by client channel.- Returns:
- true if JDK ssl has to be used; false otherwise
-
tlsCert
public Resource tlsCert()
Get the tlsCert path. Can be either client or server cert.- Returns:
- the path to tls certificate
-
tlsKey
public Resource tlsKey()
Get the client private key path. Can be either client or server private key.- Returns:
- the path to tls private key
-
tlsCaCert
public Resource tlsCaCert()
Get the CA (certificate authority) certificate path.- Returns:
- the path to CA certificate
-
-