List of usage examples for io.netty.handler.ssl SslContext newServerContext
@Deprecated public static SslContext newServerContext(SslProvider provider, File certChainFile, File keyFile, String keyPassword) throws SSLException
From source file:com.caricah.iotracah.server.netty.SSLHandler.java
License:Apache License
public SslContext getSslContext() throws UnRetriableException { try {/*from w ww.java 2 s . co m*/ File certificateChainFile = getCertificateChainFile(); File certificateKeyFile = getCertificateKeyFile(); String keyPassword = getKeyPassword(); SslProvider sslProvider; if (OpenSsl.isAvailable()) { sslProvider = SslProvider.OPENSSL; } else { sslProvider = SslProvider.JDK; } return SslContext.newServerContext(sslProvider, certificateChainFile, certificateKeyFile, keyPassword); } catch (Exception e) { log.error(" getSSLEngine : problems when trying to initiate secure protocals", e); throw new UnRetriableException(e); } }