aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tlsv1_client.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-09-25 14:11:52 (GMT)
committerJouni Malinen <j@w1.fi>2011-09-25 14:11:52 (GMT)
commit3bff59f8571cd2ef63a18e0b4c43a0bbb5baf564 (patch)
tree4fe1ae3dc63d9799fdb3373822f7ba63167d47ee /src/tls/tlsv1_client.c
parent85b7187ffc086a4e034d0cc0f1db5b1e051e43b1 (diff)
downloadhostap-3bff59f8571cd2ef63a18e0b4c43a0bbb5baf564.zip
hostap-3bff59f8571cd2ef63a18e0b4c43a0bbb5baf564.tar.gz
hostap-3bff59f8571cd2ef63a18e0b4c43a0bbb5baf564.tar.bz2
TLS: Do not enforce in-place processing in tlsv1_record_send()
In preparation for record layer format changes, modify tlsv1_record_send() to use separate buffers for payload and the output message.
Diffstat (limited to 'src/tls/tlsv1_client.c')
-rw-r--r--src/tls/tlsv1_client.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tls/tlsv1_client.c b/src/tls/tlsv1_client.c
index 8b7e26f..d87ea4f 100644
--- a/src/tls/tlsv1_client.c
+++ b/src/tls/tlsv1_client.c
@@ -227,10 +227,8 @@ int tlsv1_client_encrypt(struct tlsv1_client *conn,
wpa_hexdump_key(MSG_MSGDUMP, "TLSv1: Plaintext AppData",
in_data, in_len);
- os_memcpy(out_data + TLS_RECORD_HEADER_LEN, in_data, in_len);
-
if (tlsv1_record_send(&conn->rl, TLS_CONTENT_TYPE_APPLICATION_DATA,
- out_data, out_len, in_len, &rlen) < 0) {
+ out_data, out_len, in_data, in_len, &rlen) < 0) {
wpa_printf(MSG_DEBUG, "TLSv1: Failed to create a record");
tls_alert(conn, TLS_ALERT_LEVEL_FATAL,
TLS_ALERT_INTERNAL_ERROR);