Skip to content

Commit

Permalink
Simplify RI+SCSV logic:
Browse files Browse the repository at this point in the history
1. Send SCSV is not renegotiating, never empty RI.
2. Send RI if renegotiating.
  • Loading branch information
snhenson committed Jan 7, 2010
1 parent 0d8ffc2 commit 73ff97a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions ssl/ssl_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,10 +1370,9 @@ int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p,
p+=j;
}
/* If p == q, no ciphers and caller indicates an error. Otherwise
* add SCSV if no extensions (i.e. SSL3 is client_version)
* since spec RECOMMENDS not sending both RI and SCSV.
* add SCSV if not renegotiating.
*/
if (p != q && !s->new_session && s->client_version == SSL3_VERSION)
if (p != q && !s->new_session)
{
static SSL_CIPHER scsv =
{
Expand Down
5 changes: 3 additions & 2 deletions ssl/t1_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha
ret+=size_str;
}

/* Add the renegotiation option: TODOEKR switch */
{
/* Add RI if renegotiating */
if (s->new_session)
{
int el;

if(!ssl_add_clienthello_renegotiate_ext(s, 0, &el, 0))
Expand Down

0 comments on commit 73ff97a

Please sign in to comment.