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

version» Context lines:

pike.git/lib/modules/SSL.pmod/Session.pike:711:    write_state->salt = keys[4] || "";    } else if (cipher_spec->iv_size) {    if (version >= PROTOCOL_TLS_1_1) {    // TLS 1.1 and later have an explicit IV.    read_state->tls_iv = write_state->tls_iv = cipher_spec->iv_size;    }    read_state->crypt->set_iv(keys[5]);    write_state->crypt->set_iv(keys[4]);    }    } +  +  switch(compression_algorithm) { +  case COMPRESSION_deflate: + #if constant(Gz) +  read_state->compress = Gz.inflate()->inflate; +  write_state->compress = +  class(function(string(8bit), int:string(8bit)) _deflate) { +  string(8bit) deflate(string(8bit) s) { +  // RFC 3749 2: +  // All data that was submitted for compression MUST be +  // included in the compressed output, with no data +  // retained to be included in a later output payload. +  // Flushing ensures that each compressed packet payload +  // can be decompressed completely. +  return _deflate(s, Gz.SYNC_FLUSH); +  } +  }(Gz.deflate()->deflate)->deflate; + #endif +  break; +  }    return ({ read_state, write_state });   }      //! Returns true if this session object can be used in place of the   //! session object @[other].   int(0..1) reusable_as(Session other)   {    // SSL3 5.6.1.2:    // If the session_id field is not empty (implying a session    // resumption request) this vector [cipher_suites] must