Parcourir la source

Modify test order in unit test

There seems to be some strange behavior on MacOS with OpenSSL1.1 on the Travis build server, that cannot be observed on another operating system or using OpenSSL1.0. Change the test order to see if connection without client certificate is possible (would be a severe bug in the OpenSSL implementation), of if it just does not return any error message (annoying, but not a security issue).
Other Systems (Linux, Windows) are not affected.
bel2125 il y a 5 ans
Parent
commit
14c9df87d3
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      unittest/public_server.c

+ 2 - 1
unittest/public_server.c

@@ -785,8 +785,9 @@ START_TEST(test_mg_server_and_client_tls)
 	client_conn =
 	    mg_connect_client("127.0.0.1", 8443, 1, client_err, sizeof(client_err));
 
-	ck_assert_str_ne(client_err, "");
+	/* cannot connect without client certificate */
 	ck_assert(client_conn == NULL);
+	ck_assert_str_ne(client_err, "");
 
 	memset(client_err, 0, sizeof(client_err));
 	memset(&client_options, 0, sizeof(client_options));