Skip to content

Commit b58c68d

Browse files
Refactor cipher suite testing workflow by removing hash algorithm input and updating matrix configurations for improved clarity and maintainability
1 parent c3666ca commit b58c68d

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

.github/workflows/cipher-suite-test.yml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,19 @@ on:
1111
workflow_dispatch:
1212
inputs:
1313
aead:
14-
description: "AEAD algorithm to test (optional)"
15-
required: false
16-
type: string
17-
hash:
18-
description: "Hash algorithm to test (optional)"
14+
description: 'AEAD algorithm to test (optional)'
1915
required: false
2016
type: string
2117
verify:
22-
description: "Verify algorithm to test (optional)"
18+
description: 'Verify algorithm to test (optional)'
2319
required: false
2420
type: string
2521
sign:
26-
description: "Sign algorithm to test (optional)"
22+
description: 'Sign algorithm to test (optional)'
2723
required: false
2824
type: string
2925
kx:
30-
description: "Key exchange algorithm to test (optional)"
26+
description: 'Key exchange algorithm to test (optional)'
3127
required: false
3228
type: string
3329

@@ -40,14 +36,24 @@ env:
4036
jobs:
4137
test-cipher-suite-matrix:
4238
runs-on: ubuntu-latest
43-
name: Test ${{ matrix.aead }}-${{ matrix.hash }}-${{ matrix.kx }}
39+
name: Test ${{ matrix.aead }}-${{ matrix.kx }}
4440
strategy:
4541
matrix:
4642
# Complete Cartesian product of all cipher suite components
4743
aead: ["aead-aes-gcm", "aead-aes-ccm", "aead-chacha20poly1305"]
48-
hash: ["hash-sha224", "hash-sha256", "hash-sha384", "hash-sha512"]
49-
verify: ["verify-ecdsa-p256-sha256"]
50-
sign: ["sign-ecdsa-p256"]
44+
verify: [
45+
"verify-ecdsa-p256-sha256",
46+
"verify-ecdsa-p384-sha384",
47+
"verify-ecdsa-p521-sha512",
48+
"verify-eddsa-ed25519",
49+
"verify-rsa-pkcs1-sha256", "verify-rsa-pkcs1-sha384", "verify-rsa-pkcs1-sha512",
50+
"verify-rsa-pss-sha256", "verify-rsa-pss-sha384", "verify-rsa-pss-sha512"
51+
]
52+
sign: [
53+
"sign-ecdsa-p256", "sign-ecdsa-p384", "sign-ecdsa-p521",
54+
"sign-eddsa-ed25519",
55+
"sign-rsa-pkcs1", "sign-rsa-pss"
56+
]
5157
kx: ["kx-p256", "kx-p384", "kx-p521", "kx-x25519", "kx-x448"]
5258
# Allow failures for incompatible combinations
5359
fail-fast: false
@@ -66,14 +72,13 @@ jobs:
6672
run: |
6773
echo "Testing cipher suite combination:"
6874
echo " AEAD: ${{ matrix.aead }}"
69-
echo " Hash: ${{ matrix.hash }}"
7075
echo " Verify: ${{ matrix.verify }}"
7176
echo " Sign: ${{ matrix.sign }}"
7277
echo " KX: ${{ matrix.kx }}"
7378
echo ""
7479
7580
# Build the feature string
76-
FEATURES="tls12,${{ matrix.aead }},${{ matrix.hash }},${{ matrix.verify }},${{ matrix.sign }},${{ matrix.kx }}"
81+
FEATURES="tls12,${{ matrix.aead }},${{ matrix.verify }},${{ matrix.sign }},${{ matrix.kx }}"
7782
echo "Features: $FEATURES"
7883
7984
# Test the combination (allow failures for incompatible combinations)
@@ -88,7 +93,7 @@ jobs:
8893

8994
- name: Build verification (optional)
9095
run: |
91-
FEATURES="tls12,${{ matrix.aead }},${{ matrix.hash }},${{ matrix.verify }},${{ matrix.sign }},${{ matrix.kx }}"
96+
FEATURES="tls12,${{ matrix.aead }},${{ matrix.verify }},${{ matrix.sign }},${{ matrix.kx }}"
9297
if cargo build --features "$FEATURES" 2>/dev/null; then
9398
echo "✅ BUILD OK: $FEATURES"
9499
else
@@ -100,7 +105,7 @@ jobs:
100105
continue-on-error: true
101106

102107
test-specific-combination:
103-
if: github.event_name == 'workflow_dispatch' && (github.event.inputs.aead != '' || github.event.inputs.hash != '' || github.event.inputs.verify != '' || github.event.inputs.sign != '' || github.event.inputs.kx != '')
108+
if: github.event_name == 'workflow_dispatch' && (github.event.inputs.aead != '' || github.event.inputs.verify != '' || github.event.inputs.sign != '' || github.event.inputs.kx != '')
104109
runs-on: ubuntu-latest
105110
steps:
106111
- uses: actions/checkout@v4
@@ -116,26 +121,23 @@ jobs:
116121
run: |
117122
# Use provided inputs or defaults
118123
AEAD="${{ github.event.inputs.aead }}"
119-
HASH="${{ github.event.inputs.hash }}"
120124
VERIFY="${{ github.event.inputs.verify }}"
121125
SIGN="${{ github.event.inputs.sign }}"
122126
KX="${{ github.event.inputs.kx }}"
123127
124128
# Set defaults if not provided
125129
[ -z "$AEAD" ] && AEAD="aead-aes-gcm"
126-
[ -z "$HASH" ] && HASH="hash-sha256"
127130
[ -z "$VERIFY" ] && VERIFY="verify-rsa-pkcs1-sha256"
128131
[ -z "$SIGN" ] && SIGN="sign-rsa-pkcs1"
129132
[ -z "$KX" ] && KX="kx-p256"
130133
131134
echo "Testing specific combination:"
132135
echo " AEAD: $AEAD"
133-
echo " Hash: $HASH"
134136
echo " Verify: $VERIFY"
135137
echo " Sign: $SIGN"
136138
echo " KX: $KX"
137139
138-
FEATURES="tls12,$AEAD,$HASH,$VERIFY,$SIGN,$KX"
140+
FEATURES="tls12,$AEAD,$VERIFY,$SIGN,$KX"
139141
echo "Features: $FEATURES"
140142
141143
cargo test --features "$FEATURES"

0 commit comments

Comments
 (0)