If you want to use TLS client certificates or the server's certificate
isn't trusted by the default root (i.e.., it is self signed or you've made
your own certificate authority), then yes. But most of the time you don't
need to specify an sslContext on client-side and just let gRPC use its
default.

On Tue, Apr 25, 2017 at 4:43 PM, Ran Bi <[email protected]> wrote:

> Does client need the same ssl context?
>
> On Tue, Apr 25, 2017 at 1:52 PM Eric Anderson <[email protected]> wrote:
>
>> Make a KeyManagerFactory for the JKS and then pass it to gRPC with
>> something like this:
>>
>> NettyChannelBuilder.forPort(0)
>>     .sslContext(GrpcSslContexts.configure(SslContextBuilder.
>> forServer(keyManagerFactory)).build())
>>     .build();
>>
>> SslContextBuilder is from Netty.
>>
>> On Tue, Apr 25, 2017 at 11:55 AM, ran.bi via grpc.io <
>> [email protected]> wrote:
>>
>>> Hi
>>>
>>> Does anyone know how to use  JKS (Java KeyStore) file rather than key +
>>> cert for grpc-java ssl encryption?
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "grpc.io" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/grpc-io.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/grpc-io/6445ec80-4098-488a-8459-956b55a72fe0%40googlegroups.com
>>> <https://groups.google.com/d/msgid/grpc-io/6445ec80-4098-488a-8459-956b55a72fe0%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oPNms3dp3jpFrRGGneNGGMHtdGts1DHP9f4BfZQ_u-AWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to