File tree Expand file tree Collapse file tree 3 files changed +26
-8
lines changed Expand file tree Collapse file tree 3 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 22CC = clang++
33# CC = g++
44
5- CFLAGS = -O0 -std=c++11 -DGTEST_USE_OWN_TR1_TUPLE -I.. -I. -Wall -Wextra
5+ CFLAGS = -ggdb - O0 -std=c++11 -DGTEST_USE_OWN_TR1_TUPLE -I.. -I. -Wall -Wextra
66OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib -lssl -lcrypto
77ZLIB_SUPPORT = -DCPPHTTPLIB_ZLIB_SUPPORT -lz
88
99all : test
1010 ./test
1111
12- test : test.cc ../httplib.h Makefile
12+ test : test.cc ../httplib.h Makefile cert.pem
1313 $(CC ) -o test $(CFLAGS ) test.cc gtest/gtest-all.cc gtest/gtest_main.cc $(OPENSSL_SUPPORT ) $(ZLIB_SUPPORT ) -lpthread
1414
15- pem :
15+ cert. pem :
1616 openssl genrsa 2048 > key.pem
17- openssl req -new -key key.pem | openssl x509 -days 3650 -req -signkey key.pem > cert.pem
17+ openssl req -new -batch -config test.conf - key key.pem | openssl x509 -days 3650 -req -signkey key.pem > cert.pem
1818
1919clean :
20- rm test * .pem
20+ rm -f test * .pem
Original file line number Diff line number Diff line change @@ -363,7 +363,7 @@ class ServerTest : public ::testing::Test {
363363 persons_[" john" ] = " programmer" ;
364364
365365 t_ = thread ([&](){
366- svr_.listen (HOST, PORT);
366+ ASSERT_TRUE ( svr_.listen (HOST, PORT) );
367367 });
368368
369369 while (!svr_.is_running ()) {
@@ -890,7 +890,7 @@ class ServerTestWithAI_PASSIVE : public ::testing::Test {
890890 });
891891
892892 t_ = thread ([&]() {
893- svr_.listen (nullptr , PORT, AI_PASSIVE);
893+ ASSERT_TRUE ( svr_.listen (nullptr , PORT, AI_PASSIVE) );
894894 });
895895
896896 while (!svr_.is_running ()) {
@@ -932,7 +932,7 @@ class ServerUpDownTest : public ::testing::Test {
932932 t_ = thread ([&](){
933933 svr_.bind_to_any_port (HOST);
934934 msleep (500 );
935- svr_.listen_after_bind ();
935+ ASSERT_TRUE ( svr_.listen_after_bind () );
936936 });
937937
938938 while (!svr_.is_running ()) {
Original file line number Diff line number Diff line change 1+ [req]
2+ default_bits = 2048
3+ distinguished_name = req_distinguished_name
4+ attributes = req_attributes
5+ prompt = no
6+ output_password = mypass
7+
8+ [req_distinguished_name]
9+ C = US
10+ ST = Test State or Province
11+ L = Test Locality
12+ O = Organization Name
13+ OU = Organizational Unit Name
14+ CN = Common Name
15+ 16+
17+ [req_attributes]
18+ challengePassword = 1234
You can’t perform that action at this time.
0 commit comments