correctly handle case where server hello does not request extension specified by client

This commit is contained in:
mathewmarcus 2018-07-02 09:31:54 -05:00
parent c36c411547
commit 0a6dada0f1
3 changed files with 4 additions and 4 deletions

View file

@ -2498,7 +2498,7 @@ static int decode_extension_encrypt_then_mac(ssl,dir,seg,data)
data->len-=l; data->len-=l;
data->data+=l; data->data+=l;
*etm=dir==DIR_I2R?1:*etm==1; *etm=dir==DIR_I2R?1:*etm+1;
return(0); return(0);
} }
static int decode_extension_extended_master_secret(ssl,dir,seg,data) static int decode_extension_extended_master_secret(ssl,dir,seg,data)
@ -2515,7 +2515,7 @@ static int decode_extension_extended_master_secret(ssl,dir,seg,data)
data->len-=l; data->len-=l;
data->data+=l; data->data+=l;
*ems=dir==DIR_I2R?1:*ems==1; *ems=dir==DIR_I2R?1:*ems+1;
return(0); return(0);
} }
static int decode_extension(ssl,dir,seg,data) static int decode_extension(ssl,dir,seg,data)

View file

@ -180,7 +180,7 @@ int ssl_decode_rec_data(ssl,d,ct,version,in,inl,out,outl)
CRDUMP("Ciphertext",in,inl); CRDUMP("Ciphertext",in,inl);
if(ssl->extensions->encrypt_then_mac){ if(ssl->extensions->encrypt_then_mac==2){
*outl=inl; *outl=inl;
/* First strip off the MAC */ /* First strip off the MAC */

View file

@ -857,7 +857,7 @@ static int ssl_generate_keying_material(ssl,d)
if(r=r_data_alloc(&d->MS,48)) if(r=r_data_alloc(&d->MS,48))
ABORT(r); ABORT(r);
if (ssl->extensions->extended_master_secret) { if (ssl->extensions->extended_master_secret==2) {
if(r=ssl_generate_session_hash(ssl,d)) if(r=ssl_generate_session_hash(ssl,d))
ABORT(r); ABORT(r);