Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close inbound on UNKNOWN_ALPN_PROTOCOL_NAME_E #208

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/java/com/wolfssl/provider/jsse/WolfSSLEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down