mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-01 14:02:40 +07:00
misc fixes
This commit is contained in:
@@ -170,7 +170,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ssl: ["", -DMG_TLS=MG_TLS_BUILTIN]
|
||||
ssl: [-DMG_TLS=MG_TLS_NONE, -DMG_TLS=MG_TLS_BUILTIN]
|
||||
name: examples ${{ matrix.ssl }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -517,7 +517,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with: { fetch-depth: 2 }
|
||||
- run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi
|
||||
- run: make -C examples/zephyr init REPO=zephyrprojectrtos/ci:v.0.26.14 # "no space left on device" with newers
|
||||
- run: make -C examples/zephyr init REPO=zephyrprojectrtos/ci:v0.26.14 # "no space left on device" with newers
|
||||
- name: minify manifest
|
||||
uses: mikefarah/yq@master
|
||||
with:
|
||||
|
||||
+3
-3
@@ -346,10 +346,10 @@ static void test_tls(struct mg_mgr *mgr) {
|
||||
char buf[FETCH_BUF_SIZE]; // make sure it can hold Makefile
|
||||
struct mg_str data = mg_unpacked("/Makefile");
|
||||
if (host_ip == NULL) {
|
||||
MG_INFO(("No HOST_IP provided, skipping tests"));
|
||||
printf("\nNo HOST_IP provided, skipping TLS tests\n");
|
||||
return;
|
||||
}
|
||||
MG_DEBUG(("HOST_IP: %s", host_ip));
|
||||
printf("HOST_IP: %s\n", host_ip);
|
||||
// - POST a large file, make sure we drain TLS buffers and read all: done at
|
||||
// server test, using curl as POSTing client
|
||||
// - Fire patched server, test multiple TLS records per TCP segment handling
|
||||
@@ -358,7 +358,7 @@ static void test_tls(struct mg_mgr *mgr) {
|
||||
sleep(1);
|
||||
ASSERT(fetch(mgr, buf, url, "GET /thefile HTTP/1.0\n\n") == 200);
|
||||
ASSERT(cmpbody(buf, data.buf) == 0); // "thefile" links to Makefile
|
||||
ASSERT(system("killall tls_multirec/server"));
|
||||
ASSERT(system("killall tls_multirec/server") == 0);
|
||||
free(url);
|
||||
#else
|
||||
(void) cmpbody("", "");
|
||||
|
||||
@@ -1327,7 +1327,9 @@ static void test_tls(void) {
|
||||
"Content-Length: %lu\n\n"
|
||||
"%s",
|
||||
data.len, data.buf) == 200);
|
||||
#if MG_TLS == MG_TLS_BUILTIN
|
||||
// fire patched server, test multiple TLS records per TCP segment handling
|
||||
// skip other TLS stacks to avoid "bad client hello", we are 1.3 only
|
||||
{
|
||||
ASSERT(system("tls_multirec/server -d tls_multirec &") == 0);
|
||||
sleep(1);
|
||||
@@ -1338,6 +1340,12 @@ static void test_tls(void) {
|
||||
ASSERT(cmpbody(buf, data.buf) == 0); // "thefile" links to Makefile
|
||||
ASSERT(system("killall tls_multirec/server") == 0);
|
||||
}
|
||||
#else
|
||||
printf(
|
||||
"\n Skipping multiple TLS records per TCP segment handling test, server "
|
||||
"is 1.3 only; re-enable when other stacks can be easily configured for "
|
||||
"1.3\n");
|
||||
#endif
|
||||
mg_mgr_free(&mgr);
|
||||
ASSERT(mgr.conns == NULL);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user