mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8213782: NullPointerException in sun.security.ssl.OutputRecord.changeWriteCiphers
Reviewed-by: ascarpino
This commit is contained in:
parent
516a3b3ec1
commit
e44207a9f6
4 changed files with 140 additions and 29 deletions
|
@ -223,6 +223,16 @@ final class KeyUpdate {
|
|||
Authenticator.valueOf(hc.conContext.protocolVersion),
|
||||
hc.conContext.protocolVersion, key, ivSpec,
|
||||
hc.sslContext.getSecureRandom());
|
||||
|
||||
if (rc == null) {
|
||||
hc.conContext.fatal(Alert.ILLEGAL_PARAMETER,
|
||||
"Illegal cipher suite (" + hc.negotiatedCipherSuite +
|
||||
") and protocol version (" + hc.negotiatedProtocol +
|
||||
")");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
rc.baseSecret = nplus1;
|
||||
hc.conContext.inputRecord.changeReadCiphers(rc);
|
||||
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
|
||||
|
@ -303,6 +313,14 @@ final class KeyUpdate {
|
|||
return null;
|
||||
}
|
||||
|
||||
if (wc == null) {
|
||||
hc.conContext.fatal(Alert.ILLEGAL_PARAMETER,
|
||||
"Illegal cipher suite (" + hc.negotiatedCipherSuite +
|
||||
") and protocol version (" + hc.negotiatedProtocol + ")");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Output the handshake message and change the write cipher.
|
||||
//
|
||||
// The KeyUpdate handshake message SHALL be delivered in the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue