Package io.grpc.netty

Class GrpcSslContexts


  • @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1784")
    public class GrpcSslContexts
    extends java.lang.Object
    Utility for configuring SslContext for gRPC.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.netty.handler.ssl.SslContextBuilder configure​(io.netty.handler.ssl.SslContextBuilder builder)
      Set ciphers and APN appropriate for gRPC.
      static io.netty.handler.ssl.SslContextBuilder configure​(io.netty.handler.ssl.SslContextBuilder builder, io.netty.handler.ssl.SslProvider provider)
      Set ciphers and APN appropriate for gRPC.
      static io.netty.handler.ssl.SslContextBuilder configure​(io.netty.handler.ssl.SslContextBuilder builder, java.security.Provider jdkProvider)
      Set ciphers and APN appropriate for gRPC.
      static io.netty.handler.ssl.SslContextBuilder forClient()
      Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
      static io.netty.handler.ssl.SslContextBuilder forServer​(java.io.File keyCertChainFile, java.io.File keyFile)
      Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
      static io.netty.handler.ssl.SslContextBuilder forServer​(java.io.File keyCertChainFile, java.io.File keyFile, java.lang.String keyPassword)
      Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
      static io.netty.handler.ssl.SslContextBuilder forServer​(java.io.InputStream keyCertChain, java.io.InputStream key)
      Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
      static io.netty.handler.ssl.SslContextBuilder forServer​(java.io.InputStream keyCertChain, java.io.InputStream key, java.lang.String keyPassword)
      Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • forClient

        public static io.netty.handler.ssl.SslContextBuilder forClient()
        Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
        See Also:
        SslContextBuilder.forClient(), configure(SslContextBuilder)
      • forServer

        public static io.netty.handler.ssl.SslContextBuilder forServer​(java.io.File keyCertChainFile,
                                                                       java.io.File keyFile)
        Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
        See Also:
        SslContextBuilder.forServer(File, File), configure(SslContextBuilder)
      • forServer

        public static io.netty.handler.ssl.SslContextBuilder forServer​(java.io.File keyCertChainFile,
                                                                       java.io.File keyFile,
                                                                       java.lang.String keyPassword)
        Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
        See Also:
        SslContextBuilder.forServer(File, File, String), configure(SslContextBuilder)
      • forServer

        public static io.netty.handler.ssl.SslContextBuilder forServer​(java.io.InputStream keyCertChain,
                                                                       java.io.InputStream key)
        Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
        See Also:
        SslContextBuilder.forServer(InputStream, InputStream), configure(SslContextBuilder)
      • forServer

        public static io.netty.handler.ssl.SslContextBuilder forServer​(java.io.InputStream keyCertChain,
                                                                       java.io.InputStream key,
                                                                       java.lang.String keyPassword)
        Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
        See Also:
        SslContextBuilder.forServer(InputStream, InputStream, String), configure(SslContextBuilder)
      • configure

        @CanIgnoreReturnValue
        public static io.netty.handler.ssl.SslContextBuilder configure​(io.netty.handler.ssl.SslContextBuilder builder)
        Set ciphers and APN appropriate for gRPC. Precisely what is set is permitted to change, so if an application requires particular settings it should override the options set here.
      • configure

        @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1784")
        @CanIgnoreReturnValue
        public static io.netty.handler.ssl.SslContextBuilder configure​(io.netty.handler.ssl.SslContextBuilder builder,
                                                                       io.netty.handler.ssl.SslProvider provider)
        Set ciphers and APN appropriate for gRPC. Precisely what is set is permitted to change, so if an application requires particular settings it should override the options set here.
      • configure

        @CanIgnoreReturnValue
        public static io.netty.handler.ssl.SslContextBuilder configure​(io.netty.handler.ssl.SslContextBuilder builder,
                                                                       java.security.Provider jdkProvider)
        Set ciphers and APN appropriate for gRPC. Precisely what is set is permitted to change, so if an application requires particular settings it should override the options set here.