diff options
Diffstat (limited to 'src/ssl')
-rw-r--r-- | src/ssl/rec_wri.cpp | 4 | ||||
-rw-r--r-- | src/ssl/s_kex.cpp | 2 | ||||
-rw-r--r-- | src/ssl/tls_client.cpp | 6 | ||||
-rw-r--r-- | src/ssl/tls_server.cpp | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/ssl/rec_wri.cpp b/src/ssl/rec_wri.cpp index d983fd363..607fe7b01 100644 --- a/src/ssl/rec_wri.cpp +++ b/src/ssl/rec_wri.cpp @@ -140,7 +140,7 @@ void Record_Writer::send(byte type, const byte input[], u32bit length) buffer.copy(buf_pos, input, length); if(buf_pos + length >= BUFFER_SIZE) { - send_record(buf_type, buffer, length); + send_record(buf_type, &buffer[0], length); input += (BUFFER_SIZE - buf_pos); length -= (BUFFER_SIZE - buf_pos); while(length >= BUFFER_SIZE) @@ -237,7 +237,7 @@ void Record_Writer::send_record(byte type, const byte buf[], u32bit length) SecureVector<byte> output = cipher.read_all(Pipe::LAST_MESSAGE); - send_record(type, major, minor, output, output.size()); + send_record(type, major, minor, &output[0], output.size()); seq_no++; } diff --git a/src/ssl/s_kex.cpp b/src/ssl/s_kex.cpp index 9fe37d490..220ef2e0b 100644 --- a/src/ssl/s_kex.cpp +++ b/src/ssl/s_kex.cpp @@ -118,7 +118,7 @@ void Server_Key_Exchange::deserialize(const MemoryRegion<byte>& buf) if(len + so_far > buf.size()) throw Decoding_Error("Server_Key_Exchange: Packet corrupted"); - values[j].set(buf + so_far, len); + values[j].set(&buf[so_far], len); so_far += len; if(j == 2 && so_far == buf.size()) diff --git a/src/ssl/tls_client.cpp b/src/ssl/tls_client.cpp index 3b63b2119..79ca842d9 100644 --- a/src/ssl/tls_client.cpp +++ b/src/ssl/tls_client.cpp @@ -276,7 +276,7 @@ void TLS_Client::state_machine() else if(rec_type == APPLICATION_DATA) { if(active) - read_buf.write(record, record.size()); + read_buf.write(&record[0], record.size()); else throw Unexpected_Message("Application data before handshake done"); } @@ -312,7 +312,7 @@ void TLS_Client::read_handshake(byte rec_type, const MemoryRegion<byte>& rec_buf) { if(rec_type == HANDSHAKE) - state->queue.write(rec_buf, rec_buf.size()); + state->queue.write(&rec_buf[0], rec_buf.size()); while(true) { @@ -333,7 +333,7 @@ void TLS_Client::read_handshake(byte rec_type, type = static_cast<Handshake_Type>(head[0]); contents.resize(length); state->queue.read(head, 4); - state->queue.read(contents, contents.size()); + state->queue.read(&contents[0], contents.size()); } } } diff --git a/src/ssl/tls_server.cpp b/src/ssl/tls_server.cpp index 2a84fa063..8d9cc1b43 100644 --- a/src/ssl/tls_server.cpp +++ b/src/ssl/tls_server.cpp @@ -239,7 +239,7 @@ void TLS_Server::state_machine() else if(rec_type == APPLICATION_DATA) { if(active) - read_buf.write(record, record.size()); + read_buf.write(&record[0], record.size()); else throw Unexpected_Message("Application data before handshake done"); } @@ -273,7 +273,7 @@ void TLS_Server::read_handshake(byte rec_type, { if(!state) state = new Handshake_State; - state->queue.write(rec_buf, rec_buf.size()); + state->queue.write(&rec_buf[0], rec_buf.size()); } while(true) @@ -295,7 +295,7 @@ void TLS_Server::read_handshake(byte rec_type, type = static_cast<Handshake_Type>(head[0]); contents.resize(length); state->queue.read(head, 4); - state->queue.read(contents, contents.size()); + state->queue.read(&contents[0], contents.size()); } } } |