src/java.base/share/classes/sun/security/ssl/PskKeyExchangeModesExtension.java
branchJDK-8145252-TLS13-branch
changeset 56704 c3ee22c3a0f6
parent 56702 75527e40bdfd
child 56708 25178bb3e8f5
equal deleted inserted replaced
56702:75527e40bdfd 56704:c3ee22c3a0f6
   174 
   174 
   175         @Override
   175         @Override
   176         public void consume(ConnectionContext context,
   176         public void consume(ConnectionContext context,
   177             HandshakeMessage message, ByteBuffer buffer) throws IOException {
   177             HandshakeMessage message, ByteBuffer buffer) throws IOException {
   178 
   178 
   179             // The comsuming happens in server side only.
   179             // The consuming happens in server side only.
   180             ServerHandshakeContext shc = (ServerHandshakeContext)context;
   180             ServerHandshakeContext shc = (ServerHandshakeContext)context;
   181 
   181 
   182             // Is it a supported and enabled extension?
   182             // Is it a supported and enabled extension?
   183             if (!shc.sslConfig.isAvailable(
   183             if (!shc.sslConfig.isAvailable(
   184                     SSLExtension.PSK_KEY_EXCHANGE_MODES)) {
   184                     SSLExtension.PSK_KEY_EXCHANGE_MODES)) {
   281         }
   281         }
   282 
   282 
   283         @Override
   283         @Override
   284         public void absent(ConnectionContext context,
   284         public void absent(ConnectionContext context,
   285                 HandshakeMessage message) throws IOException {
   285                 HandshakeMessage message) throws IOException {
   286             // The comsuming happens in server side only.
   286             // The consuming happens in server side only.
   287             ServerHandshakeContext shc = (ServerHandshakeContext)context;
   287             ServerHandshakeContext shc = (ServerHandshakeContext)context;
   288 
   288 
   289             // No session resumptio is allowed.
   289             // No session resumptio is allowed.
   290             if (shc.isResumption) {     // resumingSession may not be set
   290             if (shc.isResumption) {     // resumingSession may not be set
   291                 shc.isResumption = false;
   291                 shc.isResumption = false;
   312         }
   312         }
   313 
   313 
   314         @Override
   314         @Override
   315         public void absent(ConnectionContext context,
   315         public void absent(ConnectionContext context,
   316                 HandshakeMessage message) throws IOException {
   316                 HandshakeMessage message) throws IOException {
   317             // The comsuming happens in server side only.
   317             // The consuming happens in server side only.
   318             ServerHandshakeContext shc = (ServerHandshakeContext)context;
   318             ServerHandshakeContext shc = (ServerHandshakeContext)context;
   319 
   319 
   320             // A client MUST provide a "psk_key_exchange_modes" extension if
   320             // A client MUST provide a "psk_key_exchange_modes" extension if
   321             // it offers a "pre_shared_key" extension.  If clients offer
   321             // it offers a "pre_shared_key" extension.  If clients offer
   322             // "pre_shared_key" without a "psk_key_exchange_modes" extension,
   322             // "pre_shared_key" without a "psk_key_exchange_modes" extension,