mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-21 17:07:04 +00:00
Merge pull request #25 from microolap-technologies/sni_2_srv_name
use sni in server_name
This commit is contained in:
commit
36496e31db
1 changed files with 11 additions and 0 deletions
|
@ -2669,6 +2669,17 @@ static int decode_server_name_type_host_name(ssl,dir,seg,data)
|
|||
printf(": %.*s",l,data->data);
|
||||
|
||||
/* Possibly use data->data to set/modify ssl->server_name */
|
||||
if (l!=0)
|
||||
{
|
||||
char* server_name;
|
||||
server_name = calloc(l+1,sizeof(char));
|
||||
if (server_name != NULL)
|
||||
{
|
||||
if (ssl->server_name) free(ssl->server_name);
|
||||
memcpy(server_name,data->data,l);
|
||||
ssl->server_name = server_name;
|
||||
}
|
||||
}
|
||||
|
||||
data->len-=l;
|
||||
data->data+=l;
|
||||
|
|
Loading…
Reference in a new issue