/** * Returns a new server-side {@link SSLEngine} with the current configuration. */ @Override public SSLEngine newEngine() { if (nextProtocols.isEmpty()) { return new OpenSslEngine(ctx, bufferPool(), null); } else { return new OpenSslEngine( ctx, bufferPool(), nextProtocols.get(nextProtocols.size() - 1)); } }
@Override @SuppressWarnings("FinalizeDeclaration") protected void finalize() throws Throwable { super.finalize(); synchronized (OpenSslServerContext.class) { if (ctx != 0) { SSLContext.free(ctx); } } destroyPools(); }
ciphers, nextProtocols, sessionCacheSize, sessionTimeout); case OPENSSL: return new OpenSslServerContext( bufPool, certChainFile, keyFile, keyPassword, ciphers, nextProtocols, sessionCacheSize, sessionTimeout);
} finally { if (!success) { destroyPools();