Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ChannelPipeline cp = ch.pipeline();
- SelfSignedCertificate cert = new SelfSignedCertificate();
- SslContext cont = SslContext.newServerContext(
- cert.certificate(), cert.privateKey());
- cp.addLast("ssl", cont.newHandler(ch.alloc()));
- ChannelPipeline pipeline = ch.pipeline();
- SslContext cont = SslContext
- .newClientContext(InsecureTrustManagerFactory.INSTANCE);
- pipeline.addLast(cont.newHandler(ch.alloc(),
- HOST, SERVER_SECURE_PORT));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement