-
Notifications
You must be signed in to change notification settings - Fork 7
101 lines (90 loc) · 2.81 KB
/
Copy pathmake-test.yml
File metadata and controls
101 lines (90 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: wolfKeyMgr Reusable Build Workflow
on:
workflow_call:
inputs:
config-args:
required: false
type: string
make-args:
required: false
type: string
wolfssl-ref:
required: false
default: master
type: string
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Install libevent and libpcap
run: |
sudo apt update
sudo apt install -y libevent-dev libpcap-dev
# pull wolfKeyMgr
- uses: actions/checkout@master
# wolfSSL build, check and install
- uses: actions/checkout@master
with:
repository: wolfssl/wolfssl
ref: ${{ inputs.wolfssl-ref }}
path: wolfssl
- name: wolfssl build
working-directory: ./wolfssl
run: |
./autogen.sh
./configure --enable-sniffer --enable-curve25519 --enable-curve448 --enable-enckeys --enable-opensslextra CFLAGS="-DWOLFSSL_DH_EXTRA"
make
make check
make dist
sudo make install
# wolfKeyMgr build, check and install
- name: wolfKeyMgr build
run: |
./autogen.sh
./configure ${{inputs.config-args}}
make ${{inputs.make-args}}
- name: wolfKeyMgr make check
run: make check
- name: wolfKeyMgr make install
run: sudo make install
- name: wolfKeyMgr make dist
run: make dist
- name: verify release credential generation
run: |
mkdir dist-test
tar xzf wolfkeymanager-*.tar.gz -C dist-test --strip-components=1
cd dist-test
./certs/gen-certs.sh
test -s certs/ca-key.pem
test -s certs/ca-cert.pem
test -s certs/client-key.pem
test -s certs/client-cert.pem
test -s certs/server-key.pem
test -s certs/server-cert.pem
test -s certs/server-rsa-key.pem
test -s certs/server-rsa-cert.pem
test -s certs/demo-password.txt
# wolfKeyMgr examples
- name: generate demo credentials
run: ./certs/gen-certs.sh
- name: start key manager service
run: |
sudo ./src/wolfkeymgr \
-k ./certs/server-rsa-key.pem -W ./certs/demo-password.txt \
-c ./certs/server-rsa-cert.pem -A ./certs/ca-cert.pem &
- name: run https server
run: sudo ./examples/https/server &
- name: run the middle box decryptor
run: sudo NOSTDIN=1 ./examples/middlebox/decrypt &
- name: run the https client
run: ./examples/https/client
# capture logs on failure
- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: wolfKeyMgr-logs
path: |
test-suite.log
retention-days: 5