Added a check in case there's no openssl cipher that matches cipher #139
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.
I neglected to fill out a description.
As an organization trying to stay on top of IT Security, we disable insecure ciphers and networking protocols for our organization. When using pyspark, spark calls out to the CipherSuiteConverter to attempt conversion of the requested cipher from openssl to a java name. When there's no match found in the openssl stack, it causes an NPE in spark. The actual fix is probably to configure java.security to disable the offending cipher, but the NPE shades the root cause so this pull request tries to provide more useful information to the developer by reporting the root cause rather than an NPE.
Additionally, it's pretty clear from this class and the lack of support for null being returned from the conversion reoutine, that only these ciphers are used with tls 1.3, but there seem to be situations where other ciphers are being used with 1.3.
For now, I will try setting the protocol and ciphers in spark to force the use of 1.3 with an AES cipher, but it seems like wildfly probably needs additional support for ciphers to work in situations where the information security office has disabled certain protocols and ciphers in the stack. Minimally, it would be helpful to produce useful error messages when an NPE is encountered. Thus, the simple P.R. but there's probably more work to be done regarding the cipher mappings.