简体   繁体   中英

SSL Certificates for io.netty HTTP server

I am using org.glassfish.jersey and io.netty to create HTTP servers

For security reasons I want to protect my servers with SSL certificate.

This is my snippet code to create HTTP server:

ResourceConfig resourceConfig = new ResourceConfig(RestController.class);
Channel server=NettyHttpContainerProvider.createHttp2Server(URI.create(uri),
resourceConfig,null);

How can I add SSL certificate to my HTTP server ?

There are 2 variations of createServer method. One with SslContext and another without SslContext . You can create SslContext and pass in the method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM