Branch: Tag:

2014-05-15

2014-05-15 23:20:23 by Martin Nilsson <nilsson@opera.com>

0..255 -> 8bit

24:   #endif /* SSL3_DEBUG */      //! Identifies the session to the server - string(0..255) identity; + string(8bit) identity;      //! Always COMPRESSION_null.   int compression_algorithm;
45:      //! 48 byte secret shared between the client and the server. Used for   //! deriving the actual keys. - string(0..255) master_secret; + string(8bit) master_secret;      //! information about the certificate in use by the peer, such as issuing authority, and verification status.   mapping cert_data;
77:    */      //! RFC 4366 3.1 (SNI) - array(string(0..255)) server_names; + array(string(8bit)) server_names;      //! The set of <hash, signature> combinations supported by the other end.   //!
444:    compression_algorithm = compr;   }    - protected string(0..255) generate_key_block(string(0..255) client_random, -  string(0..255) server_random, + protected string(8bit) generate_key_block(string(8bit) client_random, +  string(8bit) server_random,    ProtocolVersion version)   {    int required = 2 * (
455:    cipher_spec->hash_size +    cipher_spec->iv_size)    ); -  string(0..255) key = ""; +  string(8bit) key = "";       key = cipher_spec->prf(master_secret, "key expansion",    server_random + client_random, required);
498:   //! @elem string 5   //! Server write IV   //! @endarray - array(string(0..255)) generate_keys(string(0..255) client_random, -  string(0..255) server_random, + array(string(8bit)) generate_keys(string(8bit) client_random, +  string(8bit) server_random,    ProtocolVersion version)   {    Struct key_data = Struct(generate_key_block(client_random, server_random,    version)); -  array(string(0..255)) keys = allocate(6); +  array(string(8bit)) keys = allocate(6);      #ifdef SSL3_DEBUG    werror("client_random: %s\nserver_random: %s\nversion: %d.%d\n",
538:       } else if(version >= PROTOCOL_TLS_1_0) {    // TLS 1.0 or later. -  string(0..255) client_wkey = key_data->get_fix_string(5); -  string(0..255) server_wkey = key_data->get_fix_string(5); +  string(8bit) client_wkey = key_data->get_fix_string(5); +  string(8bit) server_wkey = key_data->get_fix_string(5);    keys[2] = cipher_spec->prf(client_wkey, "client write key",    client_random + server_random,    cipher_spec->key_material);
547:    client_random + server_random,    cipher_spec->key_material);    if(cipher_spec->iv_size) { -  string(0..255) iv_block = +  string(8bit) iv_block =    cipher_spec->prf("", "IV block",    client_random + server_random,    2 * cipher_spec->iv_size);
601:   //! Write state   //! @endarray   array(State) new_server_states(.Connection con, -  string(0..255) client_random, -  string(0..255) server_random, +  string(8bit) client_random, +  string(8bit) server_random,    ProtocolVersion version)   {    State write_state = State(con);
670:   //! Write state   //! @endarray   array(State) new_client_states(.Connection con, -  string(0..255) client_random, -  string(0..255) server_random, +  string(8bit) client_random, +  string(8bit) server_random,    ProtocolVersion version)   {    State write_state = State(con);