瀏覽代碼

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));