Files
wolfssl/.github/workflows/symbol-prefixes.yml
Daniel Pouzzner f767bd2851 .github/workflows/symbol-prefixes.yml: add PQC, --enable-acert, and --with-sys-crypto-policy to configuration;
wolfssl/ssl.h: make sure WOLFSSL_NO_TLS12 is defined in the TLS layer when NO_TLS.
2025-10-09 17:33:14 -05:00

71 lines
2.3 KiB
YAML

name: WOLFSSL_API_PREFIX_MAP
# 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_and_analyze:
strategy:
matrix:
config: [
'--enable-all --enable-mlkem --enable-mldsa --enable-xmss --enable-lms --enable-acert --with-sys-crypto-policy CFLAGS=-DWOLFSSL_API_PREFIX_MAP'
]
name: make and analyze
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 --enable-opensslcoexist and TEST_OPENSSL_COEXIST
run: |
./autogen.sh || $(exit 2)
./configure ${{ matrix.config }} || $(exit 3)
make -j 4 || $(exit 4)
# ignore properly prefixed symbols, and symbols associated with asm implementations (all internal) regardless of prefix:
readelf --symbols --wide src/.libs/libwolfssl.so | \
awk '
BEGIN {
total_public_symbols = 0;
unprefixed_public_symbols = 0;
}
{
if (($5 == "GLOBAL") && ($6 != "HIDDEN") && ($7 ~ /^[0-9]+$/)) {
++total_public_symbols;
}
}
{
if (($7 !~ /^[0-9]+$/) ||
($8 ~ /^(wc_|wolf|WOLF|__pfx|fe_|sp_[a-zA-Z090-0_]*[0-9])/) ||
($8 ~ /(_avx[12]|_AVX[12]|_sse[12]|_SSE[12]|_aesni|_AESNI|_bmi2|_x64$)/))
{
next;
}
}
{
if (($4 == "FUNC") && ($5 == "GLOBAL") && ($6 == "DEFAULT")) {
++unprefixed_public_symbols;
print;
}
}
END {
if (unprefixed_public_symbols) {
print unprefixed_public_symbols " unprefixed public symbols found, of " total_public_symbols " total." >"/dev/stderr";
exit(1);
} else {
print total_public_symbols " public symbols found in libwolfssl, all OK.";
exit(0);
}
}' || $(exit 5)