Branch: Tag:

2015-01-11

2015-01-11 18:04:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

SSL.Connection: hash_messages() now takes a length argument.

In TLS 1.3 hash_messages() will be used to generate the various
master keys, which are longer than 12 bytes.

136:    return Packet(version, PACKET_change_cipher_spec, "\001");   }    - string(8bit) hash_messages(string(8bit) sender) + string(8bit) hash_messages(string(8bit) sender, int|void len)   {    string(8bit) hash;    if(version == PROTOCOL_SSL_3_0) {
151:    } else if(version >= PROTOCOL_TLS_1_2) {    hash = session->cipher_spec->prf(session->master_secret, sender,    session->cipher_spec->hash -  ->hash(handshake_messages), 12); +  ->hash(handshake_messages), +  len || 12);    }       return hash;