Skip to content

Add custom sslcontext support in fili#943

Open
Chandrasekar-Rajasekar wants to merge 5 commits intoyahoo:masterfrom
Chandrasekar-Rajasekar:add_ssl_support
Open

Add custom sslcontext support in fili#943
Chandrasekar-Rajasekar wants to merge 5 commits intoyahoo:masterfrom
Chandrasekar-Rajasekar:add_ssl_support

Conversation

@Chandrasekar-Rajasekar
Copy link
Collaborator

@Chandrasekar-Rajasekar Chandrasekar-Rajasekar commented Jul 25, 2019

User must override getSSLContext method to give their own sslContext. The function should return the object of io.netty.handler.ssl.SslContext.

protected SslContext getSSLContext() {
        //create SSL Context here
       if(sslContext.instanceOf(io.netty.handler.ssl.SslContext.class)) 
              return sslContext;
       if(sslContext.instanceOf(javax.net.ssl.SSLContext.class))
              return new JdkSslContext(sslContext, true, ClientAuth.REQUIRE)
      .
      .
      .
      return null
}

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@michael-mclawhorn
Copy link
Contributor

definitely need a change to CHANGELOG, and you should probably create an issue to link to in the changelog ticket.

Should also add a test to config that this code gets excercised.


/**
* Get a custom configured ssl context.
* @return SSL context
Copy link
Contributor

@michael-mclawhorn michael-mclawhorn Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add to comment:

If null, the system default SSL Context will be applied

Copy link
Contributor

@michael-mclawhorn michael-mclawhorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had one small documentation change. Otherwise feel free to update in preparation for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants