pike.git / lib / modules / SSL.pmod / Connection.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Connection.pike:1240:    COND_FATAL(expect_change_cipher && (version < PROTOCOL_TLS_1_3),    ALERT_unexpected_message, "Expected change cipher.\n");       int(-1..1) err;    handshake_buffer->add( packet->fragment );       while (sizeof(handshake_buffer) >= 4)    {    Stdio.Buffer.RewindKey key = handshake_buffer->rewind_key();    int type = handshake_buffer->read_int8(); +  if (dtls) { +  // Strip fragmentation info. +  handshake_buffer->read(2 + 3 + 3); +  }    Buffer input = Buffer(handshake_buffer->read_hbuffer(3));    if(!input)    {    // Not enough data.    key->rewind();    break;    }       int len = 1+3+sizeof(input);    if (dtls) len += 2 + 3 + 3; // Fragmentation info.    key->rewind();    Stdio.Buffer raw = handshake_buffer->read_buffer(len);       SSL3_DEBUG_MSG("Connection: %s(%O)...\n",    fmt_constant(type, "HANDSHAKE"),    input);    -  if (dtls) { -  // Strip fragmentation info. -  input->read(2 + 3 + 3); -  } -  +     mixed exception = catch {    err = handle_handshake(type, input, raw);    COND_FATAL(err>=0 && sizeof(input), ALERT_record_overflow,    sprintf("Extraneous handshake packet data (%O).\n",    type));    };    if( exception )    {    if( objectp(exception) && ([object]exception)->buffer_error )    {