mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-07 12:06:27 +00:00
added struct to store extensions
This commit is contained in:
parent
1a7113a0ec
commit
5d804ef1a4
3 changed files with 11 additions and 3 deletions
|
@ -2481,7 +2481,7 @@ static int decode_extension_extended_master_secret(ssl,dir,seg,data)
|
||||||
{
|
{
|
||||||
int l,r,*ems;
|
int l,r,*ems;
|
||||||
|
|
||||||
ems=&ssl->decoder->extended_master_secret;
|
ems=&ssl->extensions->extended_master_secret;
|
||||||
|
|
||||||
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
|
SSL_DECODE_UINT16(ssl,"extension length",0,data,&l);
|
||||||
data->len-=l;
|
data->len-=l;
|
||||||
|
|
|
@ -266,6 +266,9 @@ static int create_ssl_analyzer(handle,ctx,conn,objp,i_addr,i_port,r_addr,r_port,
|
||||||
if(r=ssl_decoder_create(&obj->decoder,obj->ssl_ctx))
|
if(r=ssl_decoder_create(&obj->decoder,obj->ssl_ctx))
|
||||||
ABORT(r);
|
ABORT(r);
|
||||||
|
|
||||||
|
if (!(obj->extensions=malloc(sizeof(ssl_extensions))))
|
||||||
|
ABORT(R_NO_MEMORY);
|
||||||
|
|
||||||
*objp=(proto_obj *)obj;
|
*objp=(proto_obj *)obj;
|
||||||
|
|
||||||
_status=0;
|
_status=0;
|
||||||
|
@ -292,6 +295,7 @@ static int destroy_ssl_analyzer(objp)
|
||||||
ssl_decoder_destroy(&obj->decoder);
|
ssl_decoder_destroy(&obj->decoder);
|
||||||
free(obj->client_name);
|
free(obj->client_name);
|
||||||
free(obj->server_name);
|
free(obj->server_name);
|
||||||
|
free(obj->extensions);
|
||||||
free(*objp);
|
free(*objp);
|
||||||
*objp=0;
|
*objp=0;
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,10 @@ typedef struct d_queue_ {
|
||||||
int offset; /*How far into the first segment this record starts*/
|
int offset; /*How far into the first segment this record starts*/
|
||||||
} r_queue;
|
} r_queue;
|
||||||
|
|
||||||
|
typedef struct ssl_extensions_ {
|
||||||
|
int extended_master_secret;
|
||||||
|
} ssl_extensions;
|
||||||
|
|
||||||
typedef struct ssl_obj_ {
|
typedef struct ssl_obj_ {
|
||||||
tcp_conn *conn;
|
tcp_conn *conn;
|
||||||
int r_state;
|
int r_state;
|
||||||
|
@ -86,7 +90,7 @@ typedef struct ssl_obj_ {
|
||||||
struct timeval time_last;
|
struct timeval time_last;
|
||||||
ssl_decode_ctx *ssl_ctx;
|
ssl_decode_ctx *ssl_ctx;
|
||||||
ssl_decoder *decoder;
|
ssl_decoder *decoder;
|
||||||
ssl_extensions extensions;
|
ssl_extensions *extensions;
|
||||||
|
|
||||||
int process_ciphertext;
|
int process_ciphertext;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue