@@ -688,6 +688,8 @@ int main(int argc, char **argv)
688688
689689 EXPECT_NOT_NULL (server_config = s2n_config_new ());
690690 EXPECT_SUCCESS (s2n_config_add_cert_chain_and_key_to_store (server_config , chain_and_key ));
691+ /* Security policy must support SSLv2 */
692+ EXPECT_SUCCESS (s2n_config_set_cipher_preferences (server_config , "test_all" ));
691693 EXPECT_SUCCESS (s2n_connection_set_config (server_conn , server_config ));
692694
693695 /* Send the client hello message */
@@ -697,7 +699,7 @@ int main(int argc, char **argv)
697699 /* Verify that the sent client hello message is accepted */
698700 s2n_negotiate (server_conn , & server_blocked );
699701 EXPECT_TRUE (s2n_conn_get_current_message_type (server_conn ) > CLIENT_HELLO );
700- EXPECT_EQUAL ( server_conn -> handshake . handshake_type , NEGOTIATED | FULL_HANDSHAKE );
702+ EXPECT_TRUE ( IS_NEGOTIATED ( server_conn ) );
701703
702704 struct s2n_client_hello * client_hello = s2n_connection_get_client_hello (server_conn );
703705
@@ -858,6 +860,8 @@ int main(int argc, char **argv)
858860 server_conn -> actual_protocol_version = S2N_TLS12 ;
859861 server_conn -> server_protocol_version = S2N_TLS12 ;
860862 server_conn -> client_protocol_version = S2N_TLS12 ;
863+ /* Security policy must allow cipher suite hard coded into client hello */
864+ EXPECT_SUCCESS (s2n_connection_set_cipher_preferences (server_conn , "test_all" ));
861865 EXPECT_SUCCESS (s2n_connection_set_io_pair (server_conn , & io_pair ));
862866
863867 EXPECT_NOT_NULL (server_config = s2n_config_new ());
@@ -1072,6 +1076,8 @@ int main(int argc, char **argv)
10721076 server_conn -> actual_protocol_version = S2N_TLS12 ;
10731077 server_conn -> server_protocol_version = S2N_TLS12 ;
10741078 server_conn -> client_protocol_version = S2N_TLS12 ;
1079+ /* Security policy must allow cipher suite hard coded into client hello */
1080+ EXPECT_SUCCESS (s2n_connection_set_cipher_preferences (server_conn , "test_all" ));
10751081 EXPECT_SUCCESS (s2n_connection_set_io_pair (server_conn , & io_pair ));
10761082
10771083 /* Recreate config */
@@ -1201,6 +1207,8 @@ int main(int argc, char **argv)
12011207 EXPECT_SUCCESS (s2n_io_pair_init_non_blocking (& io_pair ));
12021208
12031209 EXPECT_NOT_NULL (server_conn = s2n_connection_new (S2N_SERVER ));
1210+ /* Security policy must allow cipher suite hard coded into client hello */
1211+ EXPECT_SUCCESS (s2n_connection_set_cipher_preferences (server_conn , "test_all" ));
12041212 EXPECT_SUCCESS (s2n_connection_set_io_pair (server_conn , & io_pair ));
12051213
12061214 EXPECT_NOT_NULL (server_config = s2n_config_new ());
0 commit comments