From: Dr. Stephen Henson Date: Fri, 27 Aug 2010 12:12:07 +0000 (+0000) Subject: PR: 1833 X-Git-Tag: OpenSSL_1_0_1-beta1~467 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=36778eb231fb7c0fba2925a370a60271475a0e95;p=oweals%2Fopenssl.git PR: 1833 Submitted By: Robin Seggelmann Fix other cases not covered by original patch. (correct patch this time!) --- diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index d4fc4aa1b3..dfbba42948 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1383,7 +1383,7 @@ int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p, /* If p == q, no ciphers and caller indicates an error. Otherwise * add SCSV if not renegotiating. */ - if (p != q && !s->new_session) + if (p != q && !s->renegotiate) { static SSL_CIPHER scsv = { @@ -1430,7 +1430,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, (p[n-1] == (SSL3_CK_SCSV & 0xff))) { /* SCSV fatal if renegotiating */ - if (s->new_session) + if (s->renegotiate) { SSLerr(SSL_F_SSL_BYTES_TO_CIPHER_LIST,SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING); ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_HANDSHAKE_FAILURE); diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index ef40e5e6f8..521a419781 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -317,7 +317,7 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha } /* Add RI if renegotiating */ - if (s->new_session) + if (s->renegotiate) { int el; @@ -969,7 +969,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in /* Need RI if renegotiating */ - if (!renegotiate_seen && s->new_session && + if (!renegotiate_seen && s->renegotiate && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)) { *al = SSL_AD_HANDSHAKE_FAILURE;