mirror of
https://github.com/adulau/ssldump.git
synced 2024-12-22 16:05:58 +00:00
Fix for type casting related warnings
This commit is contained in:
parent
11564b1264
commit
f2da9fa2d5
5 changed files with 29 additions and 24 deletions
|
@ -2521,8 +2521,8 @@ static int decode_extension_server_name(ssl,dir,seg,data)
|
|||
segment *seg;
|
||||
Data *data;
|
||||
{
|
||||
UINT4 t;
|
||||
int l,r,p;
|
||||
UINT4 t,l;
|
||||
int r,p;
|
||||
|
||||
extern decoder server_name_type_decoder[];
|
||||
|
||||
|
@ -2557,7 +2557,8 @@ static int decode_extension_encrypt_then_mac(ssl,dir,seg,data)
|
|||
segment *seg;
|
||||
Data *data;
|
||||
{
|
||||
int l,r,*etm;
|
||||
int r,*etm;
|
||||
UINT4 l;
|
||||
|
||||
etm=&ssl->extensions->encrypt_then_mac;
|
||||
|
||||
|
@ -2574,7 +2575,8 @@ static int decode_extension_extended_master_secret(ssl,dir,seg,data)
|
|||
segment *seg;
|
||||
Data *data;
|
||||
{
|
||||
int l,r,*ems;
|
||||
int r,*ems;
|
||||
UINT4 l;
|
||||
|
||||
ems=&ssl->extensions->extended_master_secret;
|
||||
|
||||
|
@ -2591,7 +2593,8 @@ static int decode_extension(ssl,dir,seg,data)
|
|||
segment *seg;
|
||||
Data *data;
|
||||
{
|
||||
int l,r;
|
||||
int r;
|
||||
UINT4 l;
|
||||
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
|
||||
data->len-=l;
|
||||
data->data+=l;
|
||||
|
@ -2670,7 +2673,8 @@ static int decode_server_name_type_host_name(ssl,dir,seg,data)
|
|||
segment *seg;
|
||||
Data *data;
|
||||
{
|
||||
int l,r;
|
||||
int r;
|
||||
UINT4 l;
|
||||
SSL_DECODE_UINT16(ssl,"server name length",0,data,&l);
|
||||
printf(": %.*s",l,data->data);
|
||||
|
||||
|
@ -2697,7 +2701,8 @@ static int decode_server_name(ssl,dir,seg,data)
|
|||
segment *seg;
|
||||
Data *data;
|
||||
{
|
||||
int l,r;
|
||||
int r;
|
||||
UINT4 l;
|
||||
SSL_DECODE_UINT16(ssl,"server name length",0,data,&l);
|
||||
data->len-=l;
|
||||
data->data+=l;
|
||||
|
|
|
@ -77,7 +77,7 @@ typedef struct ssl_obj_ {
|
|||
int r_state;
|
||||
int i_state;
|
||||
int version;
|
||||
int cipher_suite;
|
||||
UINT4 cipher_suite;
|
||||
|
||||
char *client_name;
|
||||
int client_port;
|
||||
|
|
|
@ -490,7 +490,7 @@ static int ssl_create_session_lookup_key(ssl,id,idlen,keyp,keyl)
|
|||
key+=idlen;
|
||||
|
||||
snprintf((char *)key,l,"%s:%d",ssl->server_name,ssl->server_port);
|
||||
*keyl+=strlen(key);
|
||||
*keyl+=strlen((char *)key);
|
||||
|
||||
_status=0;
|
||||
abort:
|
||||
|
@ -885,10 +885,10 @@ static int ssl3_prf(ssl,secret,usage,r1,r2,out)
|
|||
|
||||
MD5_Update(&md5,secret->data,secret->len);
|
||||
MD5_Update(&md5,buf,20);
|
||||
MD5_Final(outbuf,&md5);
|
||||
MD5_Final((unsigned char *)outbuf,&md5);
|
||||
tocpy=MIN(out->len-off,16);
|
||||
memcpy(out->data+off,outbuf,tocpy);
|
||||
CRDUMP("MD5 out",outbuf,16);
|
||||
CRDUMP("MD5 out",(UCHAR *)outbuf,16);
|
||||
|
||||
MD5_Init(&md5);
|
||||
}
|
||||
|
@ -1084,7 +1084,7 @@ static int ssl_generate_session_hash(ssl,d)
|
|||
|
||||
EVP_DigestInit(dgictx,md);
|
||||
EVP_DigestUpdate(dgictx,d->handshake_messages->data,d->handshake_messages->len);
|
||||
EVP_DigestFinal(dgictx,d->session_hash->data,&d->session_hash->len);
|
||||
EVP_DigestFinal(dgictx,d->session_hash->data,(unsigned int *) &d->session_hash->len);
|
||||
|
||||
break;
|
||||
case SSLV3_VERSION:
|
||||
|
@ -1092,7 +1092,7 @@ static int ssl_generate_session_hash(ssl,d)
|
|||
case TLSV11_VERSION:
|
||||
EVP_DigestInit(dgictx,EVP_get_digestbyname("MD5"));
|
||||
EVP_DigestUpdate(dgictx,d->handshake_messages->data,d->handshake_messages->len);
|
||||
EVP_DigestFinal_ex(dgictx,d->session_hash->data,&d->session_hash->len);
|
||||
EVP_DigestFinal_ex(dgictx,d->session_hash->data,(unsigned int *) &d->session_hash->len);
|
||||
|
||||
EVP_DigestInit(dgictx,EVP_get_digestbyname("SHA1"));
|
||||
EVP_DigestUpdate(dgictx,d->handshake_messages->data,d->handshake_messages->len);
|
||||
|
|
|
@ -93,13 +93,13 @@ int process_v2_hello(ssl,seg)
|
|||
{
|
||||
int r;
|
||||
int rec_len;
|
||||
int cs_len;
|
||||
int sid_len;
|
||||
int chall_len;
|
||||
int ver;
|
||||
UINT4 cs_len;
|
||||
UINT4 sid_len;
|
||||
UINT4 chall_len;
|
||||
UINT4 ver;
|
||||
Data d;
|
||||
Data chall;
|
||||
char random[32];
|
||||
UCHAR random[32];
|
||||
|
||||
if(seg->len==0)
|
||||
return(SSL_NO_DATA);
|
||||
|
@ -472,7 +472,7 @@ int combodump(ssl,name,data)
|
|||
char *name;
|
||||
Data *data;
|
||||
{
|
||||
char *ptr=data->data;
|
||||
UCHAR *ptr=data->data;
|
||||
int len=data->len;
|
||||
|
||||
if(name){
|
||||
|
|
|
@ -81,7 +81,7 @@ int sslx_print_certificate(ssl,data,pf)
|
|||
|
||||
d=data->data;
|
||||
|
||||
if(!(x=d2i_X509(0,&d,data->len))){
|
||||
if(!(x=d2i_X509(0,(const unsigned char **) &d,data->len))){
|
||||
explain(ssl,"Bad certificate");
|
||||
ABORT(R_BAD_DATA);
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ int sslx_print_certificate(ssl,data,pf)
|
|||
|
||||
ex=X509_get_ext(x,i);
|
||||
obj=X509_EXTENSION_get_object(ex);
|
||||
i2t_ASN1_OBJECT(buf,sizeof(buf),obj);
|
||||
i2t_ASN1_OBJECT((char *)buf,sizeof(buf),obj);
|
||||
|
||||
explain(ssl,"Extension: %s\n",buf);
|
||||
j=X509_EXTENSION_get_critical(ex);
|
||||
|
@ -173,10 +173,10 @@ int sslx_print_dn(ssl,data,pf)
|
|||
P_(pf){
|
||||
#ifdef OPENSSL
|
||||
P_(P_ASN){
|
||||
if(!(n=d2i_X509_NAME(0,&d,data->len)))
|
||||
if(!(n=d2i_X509_NAME(0,(const unsigned char **) &d,data->len)))
|
||||
ABORT(R_BAD_DATA);
|
||||
X509_NAME_oneline(n,buf,BUFSIZE);
|
||||
sslx__print_dn(ssl,buf);
|
||||
X509_NAME_oneline(n,(char *)buf,BUFSIZE);
|
||||
sslx__print_dn(ssl,(char *)buf);
|
||||
}
|
||||
else{
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue