/** * Creates a new instance * * @param sslCtx an OpenSSL {@code SSL_CTX} object * @param bufPool the {@link SslBufferPool} that will be used by this engine */ public OpenSslEngine(long sslCtx, SslBufferPool bufPool, String fallbackApplicationProtocol) { OpenSsl.ensureAvailability(); if (sslCtx == 0) { throw new NullPointerException("sslContext"); } if (bufPool == null) { throw new NullPointerException("bufPool"); } this.bufPool = bufPool; ssl = SSL.newSSL(sslCtx, true); networkBIO = SSL.makeNetworkBIO(ssl); this.fallbackApplicationProtocol = fallbackApplicationProtocol; }
OpenSsl.ensureAvailability();