mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-07 12:06:27 +00:00
Enable compiling without std c99 when OPENSSL is defined
This commit is contained in:
parent
49525791b4
commit
667f6d2b08
1 changed files with 3 additions and 3 deletions
|
@ -1071,7 +1071,7 @@ static int ssl_generate_session_hash(ssl,d)
|
||||||
static int ssl_read_key_log_file(d)
|
static int ssl_read_key_log_file(d)
|
||||||
ssl_decoder *d;
|
ssl_decoder *d;
|
||||||
{
|
{
|
||||||
int r,_status,dgi,n;
|
int r,_status,dgi,n,i;
|
||||||
unsigned int t;
|
unsigned int t;
|
||||||
size_t l=0;
|
size_t l=0;
|
||||||
char *line,*label_data;
|
char *line,*label_data;
|
||||||
|
@ -1083,7 +1083,7 @@ static int ssl_read_key_log_file(d)
|
||||||
if(!(label_data=malloc((d->client_random->len*2)+1)))
|
if(!(label_data=malloc((d->client_random->len*2)+1)))
|
||||||
ABORT(r);
|
ABORT(r);
|
||||||
|
|
||||||
for(int i=0;i<d->client_random->len;i++)
|
for(i=0;i<d->client_random->len;i++)
|
||||||
if(snprintf(label_data+(i*2),3,"%02x",d->client_random->data[i])!=2)
|
if(snprintf(label_data+(i*2),3,"%02x",d->client_random->data[i])!=2)
|
||||||
ABORT(r);
|
ABORT(r);
|
||||||
|
|
||||||
|
@ -1093,7 +1093,7 @@ static int ssl_read_key_log_file(d)
|
||||||
if(r=r_data_alloc(&d->MS,48))
|
if(r=r_data_alloc(&d->MS,48))
|
||||||
ABORT(r);
|
ABORT(r);
|
||||||
|
|
||||||
for(int i=0; i < d->MS->len; i++) {
|
for(i=0; i < d->MS->len; i++) {
|
||||||
if(sscanf(line+14+65+(i*2),"%2x",&t)!=1)
|
if(sscanf(line+14+65+(i*2),"%2x",&t)!=1)
|
||||||
ABORT(r);
|
ABORT(r);
|
||||||
*(d->MS->data+i)=(char)t;
|
*(d->MS->data+i)=(char)t;
|
||||||
|
|
Loading…
Reference in a new issue