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

version» Context lines:

pike.git/lib/modules/SSL.pmod/Connection.pike:269:    if(result->verified)    {    // This data isn't actually used internally.    session->cert_data = result;    return 1;    }       return 0;   }    + //! Generate new pending cipher states. + void new_cipher_states(); +  + //! Derive the master secret from the premaster_secret + //! and the random seeds, and configure the keys. + void derive_master_secret(string(8bit) premaster_secret) + { +  SSL3_DEBUG_MSG("%O: derive_master_secret: %s (%s)\n", +  this, fmt_constant(handshake_state, "HANDSHAKE"), +  fmt_version(version)); +  +  session->master_secret = +  session->cipher_spec->prf(premaster_secret, "master secret", +  client_random + server_random, 48); +  +  new_cipher_states(); + } +  +    //! Do handshake processing. Type is one of HANDSHAKE_*, data is the   //! contents of the packet, and raw is the raw packet received (needed   //! for supporting SSLv2 hello messages).   //!   //! This function returns 0 if handshake is in progress, 1 if handshake   //! is finished, and -1 if a fatal error occurred. It uses the   //! send_packet() function to transmit packets.   int(-1..1) handle_handshake(int type, string(8bit) data, string(8bit) raw);      //! Initialize the connection state.