diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h index ef1316473..b4a70856f 100644 --- a/include/polarssl/ssl.h +++ b/include/polarssl/ssl.h @@ -368,7 +368,7 @@ * Signaling ciphersuite values (SCSV) */ #define SSL_EMPTY_RENEGOTIATION_INFO 0xFF /**< renegotiation info ext */ -#define SSL_FALLBACK_SCSV 0x5600 /**< draft-ietf-tls-downgrade-scsv-00 */ +#define SSL_FALLBACK_SCSV_VALUE 0x5600 /**< draft-ietf-tls-downgrade-scsv-00 */ /* * Supported Signature and Hash algorithms (For TLS 1.2) diff --git a/library/ssl_cli.c b/library/ssl_cli.c index ab9eeed87..95618726d 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -736,8 +736,8 @@ static int ssl_write_client_hello( ssl_context *ssl ) if( ssl->fallback == SSL_IS_FALLBACK ) { SSL_DEBUG_MSG( 3, ( "adding FALLBACK_SCSV" ) ); - *p++ = (unsigned char)( SSL_FALLBACK_SCSV >> 8 ); - *p++ = (unsigned char)( SSL_FALLBACK_SCSV ); + *p++ = (unsigned char)( SSL_FALLBACK_SCSV_VALUE >> 8 ); + *p++ = (unsigned char)( SSL_FALLBACK_SCSV_VALUE ); n++; } #endif diff --git a/library/ssl_srv.c b/library/ssl_srv.c index 499fe06e2..ebae2724f 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -1209,8 +1209,8 @@ static int ssl_parse_client_hello_v2( ssl_context *ssl ) for( i = 0, p = buf + 6; i < ciph_len; i += 3, p += 3 ) { if( p[0] == 0 && - p[1] == (unsigned char)( ( SSL_FALLBACK_SCSV >> 8 ) & 0xff ) && - p[2] == (unsigned char)( ( SSL_FALLBACK_SCSV ) & 0xff ) ) + p[1] == (unsigned char)( ( SSL_FALLBACK_SCSV_VALUE >> 8 ) & 0xff ) && + p[2] == (unsigned char)( ( SSL_FALLBACK_SCSV_VALUE ) & 0xff ) ) { SSL_DEBUG_MSG( 3, ( "received FALLBACK_SCSV" ) ); @@ -1913,8 +1913,8 @@ read_record_header: #if defined(POLARSSL_SSL_FALLBACK_SCSV) for( i = 0, p = buf + 41 + sess_len; i < ciph_len; i += 2, p += 2 ) { - if( p[0] == (unsigned char)( ( SSL_FALLBACK_SCSV >> 8 ) & 0xff ) && - p[1] == (unsigned char)( ( SSL_FALLBACK_SCSV ) & 0xff ) ) + if( p[0] == (unsigned char)( ( SSL_FALLBACK_SCSV_VALUE >> 8 ) & 0xff ) && + p[1] == (unsigned char)( ( SSL_FALLBACK_SCSV_VALUE ) & 0xff ) ) { SSL_DEBUG_MSG( 0, ( "received FALLBACK_SCSV" ) );