mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-09 03:41:41 +03:00
Client version number comes from client hello and not the record layer. This was causing issues in Chrome
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@229 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
parent
df4606a991
commit
f74c9cafca
@ -660,7 +660,7 @@ static void add_hmac_digest(SSL *ssl, int mode, uint8_t *hmac_header,
|
||||
ssl->cipher_info->digest_size, hmac_buf);
|
||||
|
||||
#if 0
|
||||
print_blob("record", ssl->hmac_tx, SSL_RECORD_SIZE);
|
||||
print_blob("record", hmac_header, SSL_RECORD_SIZE);
|
||||
print_blob("buf", buf, buf_len);
|
||||
if (mode == SSL_SERVER_WRITE || mode == SSL_CLIENT_WRITE)
|
||||
{
|
||||
@ -1071,7 +1071,6 @@ int send_packet(SSL *ssl, uint8_t protocol, const uint8_t *in, int length)
|
||||
/* add the explicit IV for TLS1.1 */
|
||||
if (ssl->version >= SSL_PROTOCOL_VERSION1_1 &&
|
||||
ssl->cipher_info->iv_size)
|
||||
|
||||
{
|
||||
uint8_t iv_size = ssl->cipher_info->iv_size;
|
||||
uint8_t *t_buf = alloca(msg_length + iv_size);
|
||||
@ -1131,7 +1130,7 @@ static int set_key_block(SSL *ssl, int is_write)
|
||||
ssl->dc->master_secret, ssl->dc->key_block,
|
||||
ciph_info->key_block_size);
|
||||
#if 0
|
||||
print_blob("keyblock", ssl->key_block, ciph_info->key_block_size);
|
||||
print_blob("keyblock", ssl->dc->key_block, ciph_info->key_block_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ static int process_client_hello(SSL *ssl)
|
||||
int i, j, cs_len, id_len, offset = 6 + SSL_RANDOM_SIZE;
|
||||
int ret = SSL_OK;
|
||||
|
||||
uint8_t version = (record_buf[1] << 4) + record_buf[2];
|
||||
uint8_t version = (buf[4] << 4) + buf[5];
|
||||
ssl->version = ssl->client_version = version;
|
||||
|
||||
if (version > SSL_PROTOCOL_VERSION_MAX)
|
||||
|
Loading…
x
Reference in New Issue
Block a user