diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLEngine.java b/src/java/com/wolfssl/provider/jsse/WolfSSLEngine.java index 9642aaaa..6291a0d3 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLEngine.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLEngine.java @@ -600,7 +600,7 @@ public synchronized SSLEngineResult wrap(ByteBuffer[] in, int ofst, int len, "==========================================================="); } - /* Set wolfSSL I/O callbacks and contextx for read/write operations */ + /* Set wolfSSL I/O callbacks and context for read/write operations */ try { setSSLCallbacks(); } catch (WolfSSLJNIException e) { @@ -975,7 +975,7 @@ public synchronized SSLEngineResult unwrap(ByteBuffer in, ByteBuffer[] out, "==========================================================="); } - /* Set wolfSSL I/O callbacks and contextx for read/write operations */ + /* Set wolfSSL I/O callbacks and context for read/write operations */ try { setSSLCallbacks(); } catch (WolfSSLJNIException e) { @@ -1091,6 +1091,9 @@ else if (hs == SSLEngineResult.HandshakeStatus.NEED_WRAP && (err != WolfSSL.SSL_ERROR_WANT_READ) && (err != WolfSSL.SSL_ERROR_WANT_WRITE)) { if (err == WolfSSL.UNKNOWN_ALPN_PROTOCOL_NAME_E) { + /* Native wolfSSL could not negotiate a common ALPN + * protocol */ + this.inBoundOpen = false; throw new SSLHandshakeException( "Unrecognized protocol name error, ret:err = " + ret + " : " + err);