src/java.base/share/classes/sun/security/ssl/DHClientKeyExchange.java
branchJDK-8145252-TLS13-branch
changeset 56806 32a737f51e37
parent 56605 afb358e14f29
equal deleted inserted replaced
56805:985a8862b6bf 56806:32a737f51e37
   195             // Output the handshake message.
   195             // Output the handshake message.
   196             ckem.write(chc.handshakeOutput);
   196             ckem.write(chc.handshakeOutput);
   197             chc.handshakeOutput.flush();
   197             chc.handshakeOutput.flush();
   198 
   198 
   199             // update the states
   199             // update the states
   200             SSLKeyExchange ke =
   200             SSLKeyExchange ke = SSLKeyExchange.valueOf(
   201                 SSLKeyExchange.valueOf(chc.negotiatedCipherSuite.keyExchange);
   201                     chc.negotiatedCipherSuite.keyExchange,
       
   202                     chc.negotiatedProtocol);
   202             if (ke == null) {
   203             if (ke == null) {
   203                 // unlikely
   204                 // unlikely
   204                 chc.conContext.fatal(Alert.INTERNAL_ERROR,
   205                 chc.conContext.fatal(Alert.INTERNAL_ERROR,
   205                         "Not supported key exchange type");
   206                         "Not supported key exchange type");
   206             } else {
   207             } else {
   256                 shc.conContext.fatal(Alert.HANDSHAKE_FAILURE,
   257                 shc.conContext.fatal(Alert.HANDSHAKE_FAILURE,
   257                     "No expected DHE possessions for client key exchange");
   258                     "No expected DHE possessions for client key exchange");
   258             }
   259             }
   259 
   260 
   260             SSLKeyExchange ke = SSLKeyExchange.valueOf(
   261             SSLKeyExchange ke = SSLKeyExchange.valueOf(
   261                     shc.negotiatedCipherSuite.keyExchange);
   262                     shc.negotiatedCipherSuite.keyExchange,
       
   263                     shc.negotiatedProtocol);
   262             if (ke == null) {
   264             if (ke == null) {
   263                 // unlikely
   265                 // unlikely
   264                 shc.conContext.fatal(Alert.INTERNAL_ERROR,
   266                 shc.conContext.fatal(Alert.INTERNAL_ERROR,
   265                         "Not supported key exchange type");
   267                         "Not supported key exchange type");
   266             }
   268             }