rename functions

This commit is contained in:
mathewmarcus 2018-06-20 08:27:53 -05:00
parent 1086c102d6
commit 919684d5ae
2 changed files with 17 additions and 113 deletions

View file

@ -184,7 +184,7 @@ static int decode_HandshakeType_ClientHello(ssl,dir,seg,data)
extern decoder extension_decoder[]; extern decoder extension_decoder[];
printf("\n"); printf("\n");
ssl_update_session_hash(ssl,data); ssl_update_handshake_messages(ssl,data);
SSL_DECODE_UINT8(ssl,0,0,data,&vj); SSL_DECODE_UINT8(ssl,0,0,data,&vj);
SSL_DECODE_UINT8(ssl,0,0,data,&vn); SSL_DECODE_UINT8(ssl,0,0,data,&vn);
@ -263,7 +263,7 @@ static int decode_HandshakeType_ServerHello(ssl,dir,seg,data)
extern decoder extension_decoder[]; extern decoder extension_decoder[];
printf("\n"); printf("\n");
ssl_update_session_hash(ssl,data); ssl_update_handshake_messages(ssl,data);
SSL_DECODE_UINT8(ssl,0,0,data,&vj); SSL_DECODE_UINT8(ssl,0,0,data,&vj);
SSL_DECODE_UINT8(ssl,0,0,data,&vn); SSL_DECODE_UINT8(ssl,0,0,data,&vn);
@ -324,7 +324,7 @@ static int decode_HandshakeType_Certificate(ssl,dir,seg,data)
int r; int r;
printf("\n"); printf("\n");
ssl_update_session_hash(ssl,data); ssl_update_handshake_messages(ssl,data);
SSL_DECODE_UINT24(ssl,"certificates len",0,data,&len); SSL_DECODE_UINT24(ssl,"certificates len",0,data,&len);
while(len){ while(len){
@ -348,7 +348,7 @@ static int decode_HandshakeType_ServerKeyExchange(ssl,dir,seg,data)
int r; int r;
printf("\n"); printf("\n");
ssl_update_session_hash(ssl,data); ssl_update_handshake_messages(ssl,data);
if(ssl->cs){ if(ssl->cs){
P_(P_ND){ P_(P_ND){
explain(ssl,"params\n"); explain(ssl,"params\n");
@ -386,7 +386,7 @@ static int decode_HandshakeType_CertificateRequest(ssl,dir,seg,data)
int r; int r;
printf("\n"); printf("\n");
ssl_update_session_hash(ssl,data); ssl_update_handshake_messages(ssl,data);
SSL_DECODE_UINT8(ssl,"certificate_types len",0,data,&len); SSL_DECODE_UINT8(ssl,"certificate_types len",0,data,&len);
for(;len;len--){ for(;len;len--){
SSL_DECODE_ENUM(ssl,"certificate_types",1, SSL_DECODE_ENUM(ssl,"certificate_types",1,
@ -418,7 +418,7 @@ static int decode_HandshakeType_ServerHelloDone(ssl,dir,seg,data)
printf("\n"); printf("\n");
ssl_update_session_hash(ssl,data); ssl_update_handshake_messages(ssl,data);
return(0); return(0);
} }
@ -432,7 +432,7 @@ static int decode_HandshakeType_CertificateVerify(ssl,dir,seg,data)
int r; int r;
printf("\n"); printf("\n");
ssl_update_session_hash(ssl,data); ssl_update_handshake_messages(ssl,data);
SSL_DECODE_OPAQUE_ARRAY(ssl,"Signature",-(1<<15-1),P_HL,data,0); SSL_DECODE_OPAQUE_ARRAY(ssl,"Signature",-(1<<15-1),P_HL,data,0);
return(0); return(0);
@ -449,7 +449,7 @@ static int decode_HandshakeType_ClientKeyExchange(ssl,dir,seg,data)
Data pms; Data pms;
printf("\n"); printf("\n");
ssl_update_session_hash(ssl,data); ssl_update_handshake_messages(ssl,data);
if(ssl->cs){ if(ssl->cs){
switch(ssl->cs->kex){ switch(ssl->cs->kex){
@ -2461,90 +2461,6 @@ static int decode_extension_server_name(ssl,dir,seg,data)
data->data+=l; data->data+=l;
return(0); return(0);
} }
static int decode_extension_max_fragment_length(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
{
int l,r;
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
data->len-=l;
data->data+=l;
return(0);
}
static int decode_extension_client_certificate_url(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
{
int l,r;
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
data->len-=l;
data->data+=l;
return(0);
}
static int decode_extension_trusted_ca_keys(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
{
int l,r;
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
data->len-=l;
data->data+=l;
return(0);
}
static int decode_extension_truncated_hmac(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
{
int l,r;
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
data->len-=l;
data->data+=l;
return(0);
}
static int decode_extension_status_request(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
{
int l,r;
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
data->len-=l;
data->data+=l;
return(0);
}
static int decode_extension_signature_algorithms(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
{
int l,r;
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
data->len-=l;
data->data+=l;
return(0);
}
static int decode_extension_application_layer_protocol_negotiation(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
{
int l,r;
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
data->len-=l;
data->data+=l;
return(0);
}
static int decode_extension_encrypt_then_mac(ssl,dir,seg,data) static int decode_extension_encrypt_then_mac(ssl,dir,seg,data)
ssl_obj *ssl; ssl_obj *ssl;
int dir; int dir;
@ -2569,18 +2485,6 @@ static int decode_extension_extended_master_secret(ssl,dir,seg,data)
data->data+=l; data->data+=l;
return(0); return(0);
} }
static int decode_extension_next_protocol_negotiation(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
{
int l,r;
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
data->len-=l;
data->data+=l;
return(0);
}
static int decode_extension(ssl,dir,seg,data) static int decode_extension(ssl,dir,seg,data)
ssl_obj *ssl; ssl_obj *ssl;
int dir; int dir;
@ -2604,37 +2508,37 @@ decoder extension_decoder[] = {
{ {
1, 1,
"max_fragment_length", "max_fragment_length",
decode_extension_max_fragment_length decode_extension
}, },
{ {
2, 2,
"client_certificate_url", "client_certificate_url",
decode_extension_client_certificate_url decode_extension
}, },
{ {
3, 3,
"trusted_ca_keys", "trusted_ca_keys",
decode_extension_trusted_ca_keys decode_extension
}, },
{ {
4, 4,
"truncated_hmac", "truncated_hmac",
decode_extension_truncated_hmac decode_extension
}, },
{ {
5, 5,
"status_request", "status_request",
decode_extension_status_request decode_extension
}, },
{ {
13, 13,
"signature_algorithms", "signature_algorithms",
decode_extension_signature_algorithms decode_extension
}, },
{ {
16, 16,
"application_layer_protocol_negotiation", "application_layer_protocol_negotiation",
decode_extension_application_layer_protocol_negotiation decode_extension
}, },
{ {
22, 22,
@ -2649,7 +2553,7 @@ decoder extension_decoder[] = {
{ {
13172, 13172,
"next_protocol_negotiation", "next_protocol_negotiation",
decode_extension_next_protocol_negotiation decode_extension
}, },
{-1} {-1}

View file

@ -568,7 +568,7 @@ int ssl_process_client_key_exchange(ssl,d,msg,len)
int ssl_update_session_hash(ssl,data) int ssl_update_handshake_messages(ssl,data)
ssl_obj *ssl; ssl_obj *ssl;
Data *data; Data *data;
{ {