Skip to content

Commit 805eaa9

Browse files
authored
Merge pull request #7797 from julek-wolfssl/softhsm
Init SoftHSMv2 support
2 parents b535d9f + 901384e commit 805eaa9

19 files changed

Lines changed: 569 additions & 73 deletions

File tree

.github/workflows/softhsm.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: SoftHSMv2 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+
build_wolfssl:
17+
name: Build wolfSSL
18+
if: github.repository_owner == 'wolfssl'
19+
# Just to keep it the same as the testing target
20+
runs-on: ubuntu-latest
21+
# This should be a safe limit for the tests to run.
22+
timeout-minutes: 10
23+
steps:
24+
- name: Build wolfSSL
25+
uses: wolfSSL/actions-build-autotools-project@v1
26+
with:
27+
path: wolfssl
28+
configure: --enable-all CFLAGS=-DRSA_MIN_SIZE=1024
29+
install: true
30+
check: false
31+
32+
- name: tar build-dir
33+
run: tar -zcf build-dir.tgz build-dir
34+
35+
- name: Upload built lib
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: wolf-install-softhsm
39+
path: build-dir.tgz
40+
retention-days: 5
41+
42+
softhsm_check:
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
# List of releases to test
47+
ref: [ 2.6.1 ]
48+
name: ${{ matrix.ref }}
49+
if: github.repository_owner == 'wolfssl'
50+
runs-on: ubuntu-latest
51+
# This should be a safe limit for the tests to run.
52+
timeout-minutes: 20
53+
needs: build_wolfssl
54+
steps:
55+
- name: Install dependencies
56+
run: |
57+
# Don't prompt for anything
58+
export DEBIAN_FRONTEND=noninteractive
59+
sudo apt-get update
60+
sudo apt-get install -y libcppunit-dev
61+
62+
- name: Download lib
63+
uses: actions/download-artifact@v4
64+
with:
65+
name: wolf-install-softhsm
66+
67+
- name: untar build-dir
68+
run: tar -xf build-dir.tgz
69+
70+
- name: Checkout OSP
71+
uses: actions/checkout@v4
72+
with:
73+
repository: wolfssl/osp
74+
path: osp
75+
76+
- name: Checkout SoftHSMv2
77+
uses: actions/checkout@v4
78+
with:
79+
repository: opendnssec/SoftHSMv2
80+
path: softhsm
81+
ref: ${{ matrix.ref }}
82+
83+
# Not using wolfSSL/actions-build-autotools-project@v1 because autogen.sh doesn't work
84+
- name: Build softhsm
85+
working-directory: softhsm
86+
run: |
87+
patch -p1 < $GITHUB_WORKSPACE/osp/softhsm/${{ matrix.ref }}.patch
88+
autoreconf -if
89+
./configure --with-crypto-backend=wolfssl WOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir
90+
make -j
91+
92+
- name: Test softhsm
93+
working-directory: softhsm
94+
run: make -j check

0 commit comments

Comments
 (0)