Merge pull request #8971 from SparkiDev/psk_build_fix

API test ASN: must not have NO_ASN defined
This commit is contained in:
David Garske
2025-07-09 16:30:22 -07:00
committed by GitHub
2 changed files with 55 additions and 0 deletions

51
.github/workflows/psk.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: PSK Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_check:
strategy:
matrix:
config: [
# Add new configs here
'--enable-psk C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-rsa --disable-ecc --disable-dh',
'--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'
'--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'
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test wolfSSL
run: |
./autogen.sh
./configure ${{ matrix.config }}
make -j 4
make check
- name: Print errors
if: ${{ failure() }}
run: |
for file in scripts/*.log
do
if [ -f "$file" ]; then
echo "${file}:"
cat "$file"
echo "========================================================================"
fi
done

View File

@@ -23,6 +23,7 @@
#include <tests/api/test_asn.h>
#ifndef NO_ASN
static int test_SetShortInt_once(word32 val, byte* valDer, word32 valDerSz)
{
EXPECT_DECLS;
@@ -52,11 +53,13 @@ static int test_SetShortInt_once(word32 val, byte* valDer, word32 valDerSz)
return EXPECT_RESULT();
}
#endif
int test_SetShortInt(void)
{
EXPECT_DECLS;
#ifndef NO_ASN
byte valDer[MAX_SHORT_SZ] = {0};
/* Corner tests for input size */
@@ -170,6 +173,7 @@ int test_SetShortInt(void)
valDer[0] = 0x01;
EXPECT_TEST(test_SetShortInt_once(0x01, valDer, 1));
}
#endif
return EXPECT_RESULT();
}