--- a/src/java.base/share/classes/sun/security/ssl/SSLCipher.java Tue Nov 27 08:51:20 2018 +0800
+++ b/src/java.base/share/classes/sun/security/ssl/SSLCipher.java Mon Nov 26 20:50:21 2018 -0800
@@ -530,22 +530,22 @@
ProtocolVersion protocolVersion,
SecretKey key, IvParameterSpec iv,
SecureRandom random) throws GeneralSecurityException {
- if (readCipherGenerators.length == 0) {
+ if (writeCipherGenerators.length == 0) {
return null;
}
- WriteCipherGenerator rcg = null;
+ WriteCipherGenerator wcg = null;
for (Map.Entry<WriteCipherGenerator,
ProtocolVersion[]> me : writeCipherGenerators) {
for (ProtocolVersion pv : me.getValue()) {
if (protocolVersion == pv) {
- rcg = me.getKey();
+ wcg = me.getKey();
}
}
}
- if (rcg != null) {
- return rcg.createCipher(this, authenticator,
+ if (wcg != null) {
+ return wcg.createCipher(this, authenticator,
protocolVersion, transformation, key, iv, random);
}
return null;