提交 bdd53508 编写于 作者: D Dr. Stephen Henson

PR: 1833

Submitted By: Robin Seggelmann <seggelmann@fh-muenster.de>

Fix other cases not covered by original patch.
上级 7b3a9b00
...@@ -1392,7 +1392,7 @@ int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p, ...@@ -1392,7 +1392,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 /* If p == q, no ciphers and caller indicates an error. Otherwise
* add SCSV if not renegotiating. * add SCSV if not renegotiating.
*/ */
if (p != q && !s->new_session) if (p != q && !s->renegotiate)
{ {
static SSL_CIPHER scsv = static SSL_CIPHER scsv =
{ {
...@@ -1439,7 +1439,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, ...@@ -1439,7 +1439,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
(p[n-1] == (SSL3_CK_SCSV & 0xff))) (p[n-1] == (SSL3_CK_SCSV & 0xff)))
{ {
/* SCSV fatal if renegotiating */ /* 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); 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); ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_HANDSHAKE_FAILURE);
......
...@@ -317,7 +317,7 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha ...@@ -317,7 +317,7 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha
} }
/* Add RI if renegotiating */ /* Add RI if renegotiating */
if (s->new_session) if (s->renegotiate)
{ {
int el; int el;
...@@ -1028,7 +1028,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in ...@@ -1028,7 +1028,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in
/* Need RI if renegotiating */ /* Need RI if renegotiating */
if (!renegotiate_seen && s->new_session && if (!renegotiate_seen && s->renegotiate &&
!(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)) !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION))
{ {
*al = SSL_AD_HANDSHAKE_FAILURE; *al = SSL_AD_HANDSHAKE_FAILURE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册