Skip to content

Commit c3518e4

Browse files
authored
Merge pull request #8971 from SparkiDev/psk_build_fix
API test ASN: must not have NO_ASN defined
2 parents b0a5d2f + e649e10 commit c3518e4

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/psk.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PSK Tests
2+
3+
# START OF COMMON SECTION
4+
on:
5+
push:
6+
branches: [ 'master', 'main', 'release/**' ]
7+
pull_request:
8+
branches: [ '*' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
# END OF COMMON SECTION
14+
15+
jobs:
16+
make_check:
17+
strategy:
18+
matrix:
19+
config: [
20+
# Add new configs here
21+
'--enable-psk C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-rsa --disable-ecc --disable-dh',
22+
'--disable-oldtls --disable-tls13 --enable-psk -disable-rsa --disable-dh -disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --enable-lowresource --enable-singlethreaded --disable-asm --disable-errorstrings --disable-pkcs12 --disable-sha3 --disable-sha224 --disable-sha384 --disable-sha512 --disable-sha --disable-md5 -disable-aescbc --disable-chacha --disable-poly1305 --disable-coding --disable-sp-math-all'
23+
'--disable-oldtls --disable-tlsv12 --enable-tls13 --enable-psk -disable-rsa --disable-dh -disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --enable-lowresource --enable-singlethreaded --disable-asm --disable-errorstrings --disable-pkcs12 --disable-sha3 --disable-sha224 --disable-sha384 --disable-sha512 --disable-sha --disable-md5 -disable-aescbc --disable-chacha --disable-poly1305 --disable-coding --disable-sp-math-all'
24+
]
25+
name: make check
26+
if: github.repository_owner == 'wolfssl'
27+
runs-on: ubuntu-22.04
28+
# This should be a safe limit for the tests to run.
29+
timeout-minutes: 6
30+
steps:
31+
- uses: actions/checkout@v4
32+
name: Checkout wolfSSL
33+
34+
- name: Test wolfSSL
35+
run: |
36+
./autogen.sh
37+
./configure ${{ matrix.config }}
38+
make -j 4
39+
make check
40+
41+
- name: Print errors
42+
if: ${{ failure() }}
43+
run: |
44+
for file in scripts/*.log
45+
do
46+
if [ -f "$file" ]; then
47+
echo "${file}:"
48+
cat "$file"
49+
echo "========================================================================"
50+
fi
51+
done

tests/api/test_asn.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include <tests/api/test_asn.h>
2525

26+
#ifndef NO_ASN
2627
static int test_SetShortInt_once(word32 val, byte* valDer, word32 valDerSz)
2728
{
2829
EXPECT_DECLS;
@@ -52,11 +53,13 @@ static int test_SetShortInt_once(word32 val, byte* valDer, word32 valDerSz)
5253

5354
return EXPECT_RESULT();
5455
}
56+
#endif
5557

5658
int test_SetShortInt(void)
5759
{
5860
EXPECT_DECLS;
5961

62+
#ifndef NO_ASN
6063
byte valDer[MAX_SHORT_SZ] = {0};
6164

6265
/* Corner tests for input size */
@@ -170,6 +173,7 @@ int test_SetShortInt(void)
170173
valDer[0] = 0x01;
171174
EXPECT_TEST(test_SetShortInt_once(0x01, valDer, 1));
172175
}
176+
#endif
173177

174178
return EXPECT_RESULT();
175179
}

0 commit comments

Comments
 (0)