forked from wolfSSL/wolfssl
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request wolfSSL#8255 from julek-wolfssl/nss-interop
Add nss interop
- Loading branch information
Showing
3 changed files
with
118 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
|
||
# Setup nss cert db | ||
mkdir nssdb | ||
./dist/Debug/bin/certutil -d nssdb -N --empty-password | ||
./dist/Debug/bin/certutil -d nssdb -A -a -i wolfssl/certs/test/server-localhost.pem \ | ||
-t TCP -n 'wolf localhost' | ||
|
||
# App data for nss | ||
echo Hello from nss > /tmp/in | ||
|
||
# TLS 1.3 test | ||
env -C wolfssl ./examples/server/server -v 4 -p 4433 \ | ||
-c certs/test/server-localhost.pem -d -w > /tmp/server.log 2>&1 & | ||
sleep 0.1 | ||
./dist/Debug/bin/tstclnt -V tls1.3: -h localhost -p 4433 -d nssdb -C -4 -A /tmp/in -v | ||
sleep 0.1 | ||
|
||
# DTLS 1.3 test | ||
env -C wolfssl ./examples/server/server -v 4 -p 4433 -u \ | ||
-c certs/test/server-localhost.pem -d -w > /tmp/server.log 2>&1 & | ||
sleep 0.1 | ||
./dist/Debug/bin/tstclnt -V tls1.3: -P client -h localhost -p 4433 -d nssdb -C -4 -A /tmp/in -v | ||
sleep 0.1 |
This file contains 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,89 @@ | ||
name: nss interop Tests | ||
|
||
### TODO uncomment stuff | ||
|
||
# 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 | ||
|
||
env: | ||
NSS_REF: NSS_3_107_RTM | ||
|
||
jobs: | ||
build_nss: | ||
name: Build nss | ||
if: github.repository_owner == 'wolfssl' | ||
runs-on: ubuntu-latest | ||
# This should be a safe limit for the tests to run. | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checking if we have nss in cache | ||
uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: dist | ||
key: nss-${{ env.NSS_REF }} | ||
lookup-only: true | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
# Don't prompt for anything | ||
export DEBIAN_FRONTEND=noninteractive | ||
sudo apt-get update | ||
# hostap dependencies | ||
sudo apt-get install -y gyp ninja-build | ||
- name: Checkout nss | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: nss-dev/nss | ||
ref: ${{ env.NSS_REF }} | ||
path: nss | ||
|
||
- name: Compile nss | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
hg clone https://hg.mozilla.org/projects/nspr | ||
cd nss | ||
./build.sh | ||
nss_test: | ||
name: Test interop with nss | ||
runs-on: ubuntu-latest | ||
needs: build_nss | ||
timeout-minutes: 10 | ||
if: github.repository_owner == 'wolfssl' | ||
steps: | ||
- name: Checking if we have nss in cache | ||
uses: actions/cache/restore@v4 | ||
id: cache | ||
with: | ||
path: dist | ||
key: nss-${{ env.NSS_REF }} | ||
fail-on-cache-miss: true | ||
|
||
- name: Build wolfSSL | ||
uses: wolfSSL/actions-build-autotools-project@v1 | ||
with: | ||
path: wolfssl | ||
configure: --enable-dtls --enable-dtls13 | ||
install: false | ||
check: false | ||
|
||
- name: Test interop | ||
run: bash wolfssl/.github/workflows/nss.sh | ||
|
||
- name: print server logs | ||
if: ${{ failure() }} | ||
run: | | ||
cat /tmp/server.log |