package com.asksunny.netty.openssl;

import java.io.File;

import io.netty.handler.ssl.SslProvider;

import io.netty.handler.ssl.SslContext;



public class NettyOpenSSLServer {

	public NettyOpenSSLServer() {
		// TODO Auto-generated constructor stub
	}

	public static void main(String[] args) throws Exception {
		  SslContext sslCtx = SslContext.newServerContext(SslProvider.OPENSSL, new File("Path_to_Pem"), new File("path_to_key"), "password");
		
	}
}

@@ -41,22 +41,46 @@
 ort 
-java.io.File;%0A
+io.netty.channel.socket.SocketChannel;
 %0Aimp
@@ -111,18 +111,16 @@
 .Ssl
-Provider;%0A
+Context;
 %0Aimp
@@ -151,18 +151,39 @@
 .Ssl
-Context;%0A%0A
+Provider;%0A%0Aimport java.io.File;
 %0A%0Apu
@@ -357,10 +357,8 @@
 %7B%0A%09%09
-  
 SslC
@@ -421,17 +421,21 @@
 OPENSSL,
- 
+%0A%09%09%09%09
 new File
@@ -440,63 +440,152 @@
 le(%22
-Path_to_Pem%22), new File(%22path_to_key%22), %22password%22);%0A%09%09
+D:/temp/server.crt%22), new File(%22D:/temp/server_private_key.PEM%22), null);%0A%09%09SocketChannel ch = null; //fix here;%0A%09%09sslCtx.newHandler(ch.alloc());
 %0A%09%7D%0A

add code