JDK-8214321 : Misleading code in SSLCipher
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 11
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-11-26
  • Updated: 2020-11-20
  • Resolved: 2018-11-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12 JDK 8 Other
11.0.6-oracleFixed 12 b22Fixed 8u261Fixed openjdk8u272Fixed
Description
One potential code issue in SSLCipher.java:

    SSLWriteCipher createWriteCipher(Authenticator authenticator,
            ProtocolVersion protocolVersion,
            SecretKey key, IvParameterSpec iv,
            SecureRandom random) throws GeneralSecurityException {
- if (readCipherGenerators.length == 0) {
+ if (writeCipherGenerators.length == 0) {
            return null;
        }

The code should have no impact, but it is nice to make an update for readability. 
Comments
Fix request (11u) I want to downport this for parity with 11.0.6-oracle. Applies clean.
15-11-2019

no new regression test. Just code cleanup, no behavior changes.
27-11-2018