diff --git a/ssl/tls1.c b/ssl/tls1.c index 407798d59..428c9ea56 100755 --- a/ssl/tls1.c +++ b/ssl/tls1.c @@ -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 } diff --git a/ssl/tls1_svr.c b/ssl/tls1_svr.c index f374928f1..51c9d76e8 100644 --- a/ssl/tls1_svr.c +++ b/ssl/tls1_svr.c @@ -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)