summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-12-27 22:59:09 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-12-27 22:59:09 +0000
commitf88e0acb0e71b9295f0be35655ce3197809885ae (patch)
treeb57d19cd4124ff0954b61d4c925d4d259229621d /ssl/ssl_lib.c
parentaed461b43138ba6667216664a7ec7a012e96a61d (diff)
Update RI to match latest spec.
MCSV is now called SCSV. Don't send SCSV if renegotiating. Also note if RI is empty in debug messages.
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 9552333920..f5ea6b6293 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1370,18 +1370,18 @@ 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 MCSV
+ * add SCSV if not renegotiating
*/
- if (p != q)
+ if (p != q && !s->new_session)
{
static SSL_CIPHER msvc =
{
- 0, NULL, SSL3_CK_MCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
j = put_cb ? put_cb(&msvc,p) : ssl_put_cipher_by_char(s,&msvc,p);
p+=j;
#ifdef OPENSSL_RI_DEBUG
- fprintf(stderr, "MCSV sent by client\n");
+ fprintf(stderr, "SCSV sent by client\n");
#endif
}
@@ -1413,15 +1413,15 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
for (i=0; i<num; i+=n)
{
- /* Check for MCSV */
+ /* Check for SCSV */
if (s->s3 && (n != 3 || !p[0]) &&
- (p[n-2] == ((SSL3_CK_MCSV >> 8) & 0xff)) &&
- (p[n-1] == (SSL3_CK_MCSV & 0xff)))
+ (p[n-2] == ((SSL3_CK_SCSV >> 8) & 0xff)) &&
+ (p[n-1] == (SSL3_CK_SCSV & 0xff)))
{
s->s3->send_connection_binding = 1;
p += n;
#ifdef OPENSSL_RI_DEBUG
- fprintf(stderr, "MCSV received by server\n");
+ fprintf(stderr, "SCSV received by server\n");
#endif
continue;
}