tls_available support#1127
Merged
Merged
Conversation
scottf
commented
Apr 22, 2024
| if (tlsFirst && sslContext == null) { | ||
| throw new IllegalStateException("SSL context required for tls handshake first"); | ||
| } | ||
|
|
Contributor
Author
There was a problem hiding this comment.
I did not used to check this before, but if there is no SSL Context, we can't do any tls anyway, so it's a fast fail essentially.
scottf
commented
Apr 22, 2024
| */ | ||
| public boolean isTLSRequired() { | ||
| return tlsFirst || this.sslContext != null; | ||
| return sslContext != null; |
Contributor
Author
There was a problem hiding this comment.
reflects checking tls first and ssl context in the builder
scottf
commented
Apr 22, 2024
| nonce = readBytes(jv, NONCE); | ||
| tlsRequired = readBoolean(jv, TLS); | ||
| tlsRequired = readBoolean(jv, TLS_REQUIRED); | ||
| tlsAvailable = readBoolean(jv, TLS_AVAILABLE); |
Contributor
Author
There was a problem hiding this comment.
71: Better variable name
72: read the value from the json
scottf
commented
Apr 22, 2024
| } | ||
| } | ||
| } | ||
|
|
Contributor
Author
There was a problem hiding this comment.
This whole block is simplified.
- getOptions returns the options variable, just use the variable directly. There is no lazy loading or anything.
- No need to check 2.9.19 because websocket never does upgrade, it was just extraneous
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for server setting of
tls_available