Преглед на файлове

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 преди 5 години
родител
ревизия
14c9df87d3
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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));