@ -407,9 +407,9 @@ static bool CheckHandshakeProperties(SSL *ssl, bool is_resume,
}
}
if ( config - > expect_version ! = 0 & &
if ( config - > expect_version ! = 0 & &
SSL_version ( ssl ) ! = config - > expect_version ) {
SSL_version ( ssl ) ! = int { config - > expect_version } ) {
fprintf ( stderr , " want version %04x, got %04x \n " , config - > expect_version ,
fprintf ( stderr , " want version %04x, got %04x \n " , config - > expect_version ,
SSL_version ( ssl ) ) ;
static_cast < uint16_t > ( SSL_version ( ssl ) ) ) ;
return false ;
return false ;
}
}
@ -575,9 +575,9 @@ static bool CheckHandshakeProperties(SSL *ssl, bool is_resume,
if ( config - > expect_curve_id ! = 0 ) {
if ( config - > expect_curve_id ! = 0 ) {
uint16_t curve_id = SSL_get_curve_id ( ssl ) ;
uint16_t curve_id = SSL_get_curve_id ( ssl ) ;
if ( static_cast < uint16_t > ( config - > expect_curve_id ) ! = curve_id ) {
if ( config - > expect_curve_id ! = curve_id ) {
fprintf ( stderr , " curve_id was %04x, wanted %04x \n " , curve_id ,
fprintf ( stderr , " curve_id was %04x, wanted %04x \n " , curve_id ,
static_cast < uint16_t > ( config - > expect_curve_id ) ) ;
config - > expect_curve_id ) ;
return false ;
return false ;
}
}
}
}
@ -585,24 +585,24 @@ static bool CheckHandshakeProperties(SSL *ssl, bool is_resume,
uint16_t cipher_id = SSL_CIPHER_get_protocol_id ( SSL_get_current_cipher ( ssl ) ) ;
uint16_t cipher_id = SSL_CIPHER_get_protocol_id ( SSL_get_current_cipher ( ssl ) ) ;
if ( config - > expect_cipher_aes ! = 0 & &
if ( config - > expect_cipher_aes ! = 0 & &
EVP_has_aes_hardware ( ) & &
EVP_has_aes_hardware ( ) & &
static_cast < uint16_t > ( config - > expect_cipher_aes ) ! = cipher_id ) {
config - > expect_cipher_aes ! = cipher_id ) {
fprintf ( stderr , " Cipher ID was %04x, wanted %04x (has AES hardware) \n " ,
fprintf ( stderr , " Cipher ID was %04x, wanted %04x (has AES hardware) \n " ,
cipher_id , static_cast < uint16_t > ( config - > expect_cipher_aes ) ) ;
cipher_id , config - > expect_cipher_aes ) ;
return false ;
return false ;
}
}
if ( config - > expect_cipher_no_aes ! = 0 & &
if ( config - > expect_cipher_no_aes ! = 0 & &
! EVP_has_aes_hardware ( ) & &
! EVP_has_aes_hardware ( ) & &
static_cast < uint16_t > ( config - > expect_cipher_no_aes ) ! = cipher_id ) {
config - > expect_cipher_no_aes ! = cipher_id ) {
fprintf ( stderr , " Cipher ID was %04x, wanted %04x (no AES hardware) \n " ,
fprintf ( stderr , " Cipher ID was %04x, wanted %04x (no AES hardware) \n " ,
cipher_id , static_cast < uint16_t > ( config - > expect_cipher_no_aes ) ) ;
cipher_id , config - > expect_cipher_no_aes ) ;
return false ;
return false ;
}
}
if ( config - > expect_cipher ! = 0 & &
if ( config - > expect_cipher ! = 0 & &
static_cast < uint16_t > ( config - > expect_cipher ) ! = cipher_id ) {
config - > expect_cipher ! = cipher_id ) {
fprintf ( stderr , " Cipher ID was %04x, wanted %04x \n " , cipher_id ,
fprintf ( stderr , " Cipher ID was %04x, wanted %04x \n " , cipher_id ,
static_cast < uint16_t > ( config - > expect_cipher ) ) ;
config - > expect_cipher ) ;
return false ;
return false ;
}
}