Skip to content
Snippets Groups Projects
Commit e49f0f29 authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Use sprintf %H

parent 10fca373
No related branches found
No related tags found
No related merge requests found
...@@ -133,7 +133,7 @@ Packet handshake_packet(int type, string data) ...@@ -133,7 +133,7 @@ Packet handshake_packet(int type, string data)
/* Perhaps one need to split large packages? */ /* Perhaps one need to split large packages? */
Packet packet = Packet(); Packet packet = Packet();
packet->content_type = PACKET_handshake; packet->content_type = PACKET_handshake;
packet->fragment = sprintf("%c%3c%s", type, sizeof(data), data); packet->fragment = sprintf("%c%3H", type, [string(0..255)]data);
handshake_messages += packet->fragment; handshake_messages += packet->fragment;
return packet; return packet;
} }
...@@ -350,7 +350,7 @@ Packet client_key_exchange_packet() ...@@ -350,7 +350,7 @@ Packet client_key_exchange_packet()
data = (temp_key || session->rsa)->encrypt(premaster_secret); data = (temp_key || session->rsa)->encrypt(premaster_secret);
if(version[1] >= PROTOCOL_TLS_1_0) if(version[1] >= PROTOCOL_TLS_1_0)
data=sprintf("%2c",sizeof(data))+data; data=sprintf("%2H", [string(0..255)]data);
break; break;
case KE_dhe_dss: case KE_dhe_dss:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment