-
Notifications
You must be signed in to change notification settings - Fork 36
support for dynamic link to libwolfssl and add test case #349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| name: Build with installed wolfSSL (WOLFSSL_LIB) | ||
|
|
||
| # Exercises the WOLFSSL_LIB=1 build mode, which links wolfHSM against an | ||
| # installed libwolfssl rather than compiling the wolfSSL sources in-tree. | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ 'master', 'main', 'release/**' ] | ||
| pull_request: | ||
| branches: [ '*' ] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Checkout wolfssl | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: wolfssl/wolfssl | ||
|
JacobBarthelmeh marked this conversation as resolved.
|
||
| path: wolfssl | ||
|
|
||
| - name: Build and install wolfssl | ||
| # HAVE_ANONYMOUS_INLINE_AGGREGATES toggles the layout of wc_CryptoInfo | ||
| # (anonymous union vs named .u member). wolfHSM requires the anonymous | ||
| # form. | ||
| run: | | ||
| cd wolfssl | ||
| ./autogen.sh | ||
| ./configure \ | ||
| --disable-benchmark \ | ||
| --disable-crypttests \ | ||
| --disable-examples \ | ||
| --enable-all \ | ||
| --enable-cryptocb \ | ||
| --prefix=$HOME/wolfssl-install \ | ||
| CFLAGS="-DWOLFSSL_PUBLIC_MP -DWOLFSSL_SHA512_HASHTYPE -DWOLFSSL_PUBLIC_ASN -DHAVE_ANONYMOUS_INLINE_AGGREGATES=1 -DNO_MAIN_DRIVER" | ||
| make -j | ||
| make install | ||
|
|
||
| - name: Build test (WOLFSSL_LIB=1) | ||
| run: | | ||
| cd test | ||
| make clean | ||
| make -j WOLFSSL_LIB=1 \ | ||
| WOLFSSL_DIR=$HOME/wolfssl-install/include \ | ||
| WOLFSSL_LIBDIR=$HOME/wolfssl-install/lib | ||
|
|
||
| - name: Build test (WOLFSSL_LIB=1 DMA=1 ASAN=1) | ||
| run: | | ||
| cd test | ||
| make clean | ||
| make -j WOLFSSL_LIB=1 DMA=1 ASAN=1 \ | ||
| WOLFSSL_DIR=$HOME/wolfssl-install/include \ | ||
| WOLFSSL_LIBDIR=$HOME/wolfssl-install/lib | ||
|
|
||
| - name: Build test (WOLFSSL_LIB=1 SHE=1) | ||
| run: | | ||
| cd test | ||
| make clean | ||
| make -j WOLFSSL_LIB=1 SHE=1 \ | ||
| WOLFSSL_DIR=$HOME/wolfssl-install/include \ | ||
| WOLFSSL_LIBDIR=$HOME/wolfssl-install/lib | ||
|
|
||
| - name: Build test (WOLFSSL_LIB=1 AUTH=1) | ||
| run: | | ||
| cd test | ||
| make clean | ||
| make -j WOLFSSL_LIB=1 AUTH=1 \ | ||
| WOLFSSL_DIR=$HOME/wolfssl-install/include \ | ||
| WOLFSSL_LIBDIR=$HOME/wolfssl-install/lib | ||
|
|
||
| # NOCRYPTO short-circuits the wolfssl source compile entirely, but we | ||
| # still want to make sure WOLFSSL_LIB=1 doesn't break that path. | ||
| - name: Build test (WOLFSSL_LIB=1 NOCRYPTO=1) | ||
| run: | | ||
| cd test | ||
| make clean | ||
| make -j WOLFSSL_LIB=1 NOCRYPTO=1 \ | ||
| WOLFSSL_DIR=$HOME/wolfssl-install/include \ | ||
| WOLFSSL_LIBDIR=$HOME/wolfssl-install/lib | ||
|
|
||
| - name: Build benchmark (WOLFSSL_LIB=1) | ||
| run: | | ||
| cd benchmark | ||
| make clean | ||
| make -j WOLFSSL_LIB=1 \ | ||
| WOLFSSL_DIR=$HOME/wolfssl-install/include \ | ||
| WOLFSSL_LIBDIR=$HOME/wolfssl-install/lib | ||
|
|
||
| - name: Build POSIX server example (WOLFSSL_LIB=1) | ||
| run: | | ||
| cd examples/posix/wh_posix_server | ||
| make clean | ||
| make -j WOLFSSL_LIB=1 \ | ||
| WOLFSSL_DIR=$HOME/wolfssl-install/include \ | ||
| WOLFSSL_LIBDIR=$HOME/wolfssl-install/lib | ||
|
|
||
| - name: Build POSIX client example (WOLFSSL_LIB=1) | ||
| run: | | ||
| cd examples/posix/wh_posix_client | ||
| make clean | ||
| make -j WOLFSSL_LIB=1 \ | ||
| WOLFSSL_DIR=$HOME/wolfssl-install/include \ | ||
| WOLFSSL_LIBDIR=$HOME/wolfssl-install/lib | ||
|
|
||
| - name: Build whnvmtool (WOLFSSL_LIB=1) | ||
| run: | | ||
| cd tools/whnvmtool | ||
| make clean | ||
| make WOLFSSL_LIB=1 \ | ||
| WOLFSSL_DIR=$HOME/wolfssl-install/include \ | ||
| WOLFSSL_LIBDIR=$HOME/wolfssl-install/lib | ||
|
|
||
| - name: Run POSIX server/client smoke test (WOLFSSL_LIB=1) | ||
| run: | | ||
| export LD_LIBRARY_PATH=$HOME/wolfssl-install/lib:$LD_LIBRARY_PATH | ||
| cd examples/posix/wh_posix_server | ||
| ./Build/wh_posix_server.elf --type tcp & | ||
| SERVER_PID=$! | ||
| sleep 1 | ||
| cd ../wh_posix_client | ||
| ./Build/wh_posix_client.elf --type tcp | ||
|
JacobBarthelmeh marked this conversation as resolved.
|
||
| kill $SERVER_PID || true | ||
|
JacobBarthelmeh marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.