9595 matrix :
9696 alice : [rage, age]
9797 bob : [rage, age]
98- recipient : [x25519, ssh-rsa, ssh-ed25519]
98+ recipient : [x25519, p256tag, ssh-rsa, ssh-ed25519]
99+ include :
100+ - identity : true
101+ - recipient : p256tag
102+ identity : false
99103 fail-fast : false
100104
101105 steps :
@@ -131,6 +135,12 @@ jobs:
131135 - name : Set the corresponding age x25519 recipient
132136 if : matrix.recipient == 'x25519'
133137 run : echo "AGE_PUBKEY=-r age1y8m84r6pwd4da5d45zzk03rlgv2xr7fn9px80suw3psrahul44ashl0usm" >> $GITHUB_ENV
138+ - name : Save the age p256tag recipient
139+ if : matrix.recipient == 'p256tag'
140+ run : echo "age1tag1qt8lw0ual6avlwmwatk888yqnmdamm7xfd0wak53ut6elz5c4swx2yqdj4e" >key.txt.pub
141+ - name : Set the age p256tag recipient
142+ if : matrix.recipient == 'p256tag'
143+ run : echo "AGE_PUBKEY=-r age1tag1qt8lw0ual6avlwmwatk888yqnmdamm7xfd0wak53ut6elz5c4swx2yqdj4e" >> $GITHUB_ENV
134144 - name : Generate an ssh-rsa key
135145 if : matrix.recipient == 'ssh-rsa'
136146 run : ssh-keygen -t rsa -N "" -f key.txt
@@ -151,6 +161,7 @@ jobs:
151161 run : echo "Test string" | ./${{ matrix.alice }} -o test.age $AGE_PUBKEY
152162 - name : Decrypt from file
153163 run : ./${{ matrix.bob }} -d -i key.txt test.age | grep -q "^Test string$"
164+ if : matrix.identity
154165 - name : Store test.age
155166 uses : actions/upload-artifact@v4
156167 if : failure()
@@ -163,6 +174,7 @@ jobs:
163174 - name : Encrypt to ASCII-armored file
164175 run : ./${{ matrix.alice }} -a -o test2.age $AGE_PUBKEY test2.txt
165176 - name : Decrypt from ASCII-armored file
177+ if : matrix.identity
166178 run : ./${{ matrix.bob }} -d -i key.txt test2.age | grep -q "^2 test 2 string$"
167179 - name : Store test2.age
168180 uses : actions/upload-artifact@v4
@@ -174,6 +186,7 @@ jobs:
174186 - name : Convert file to CRLF
175187 run : unix2dos test2.age
176188 - name : Decrypt from ASCII-armored CRLF file
189+ if : matrix.identity
177190 run : ./${{ matrix.bob }} -d -i key.txt test2.age | grep -q "^2 test 2 string$"
178191 - name : Store CRLF-ed test2.age
179192 uses : actions/upload-artifact@v4
@@ -183,6 +196,7 @@ jobs:
183196 path : test2.age
184197
185198 - name : Pipes!
199+ if : matrix.identity
186200 run : echo "Test string 3 - ASCII Drift" | ./${{ matrix.alice }} $AGE_PUBKEY | tee --output-error=warn test3.age | ./${{ matrix.bob }} -d -i key.txt | grep -q "^Test string 3 - ASCII Drift$"
187201 - name : Store test3.age
188202 uses : actions/upload-artifact@v4
@@ -194,6 +208,7 @@ jobs:
194208 - name : Explicit stdout during encryption
195209 run : ./${{ matrix.alice }} -a -o - $AGE_PUBKEY test2.txt >test4.age
196210 - name : Explicit stdin during decryption
211+ if : matrix.identity
197212 run : cat test4.age | ./${{ matrix.bob }} -d -i key.txt - | grep -q "^2 test 2 string$"
198213 - name : Store test4.age
199214 uses : actions/upload-artifact@v4
@@ -205,8 +220,10 @@ jobs:
205220 - name : Generate a file to encrypt
206221 run : echo "Test 5" > test5.txt
207222 - name : Encrypt to identity in a named pipe
223+ if : matrix.identity
208224 run : ./${{ matrix.alice }} -e -i <(cat key.txt) -o test5.age test5.txt
209225 - name : Decrypt with identity in a named pipe
226+ if : matrix.identity
210227 run : ./${{ matrix.bob }} -d -i <(cat key.txt) test5.age | grep -q "^Test 5$"
211228 - name : Store test5.age
212229 uses : actions/upload-artifact@v4
@@ -218,6 +235,7 @@ jobs:
218235 - name : Encrypt to recipient in standard input
219236 run : cat key.txt.pub | ./${{ matrix.alice }} -e -R - -o test6.age test5.txt
220237 - name : Decrypt with identity in standard input
238+ if : matrix.identity
221239 run : cat key.txt | ./${{ matrix.bob }} -d -i - test6.age | grep -q "^Test 5$"
222240 - name : Store test6.age
223241 uses : actions/upload-artifact@v4
@@ -227,6 +245,7 @@ jobs:
227245 path : test6.age
228246
229247 - name : Keygen prevents overwriting an existing file
248+ if : matrix.identity
230249 run : |
231250 touch do_not_overwrite_key.txt
232251 if $(./${{ matrix.alice }}-keygen -o do_not_overwrite_key.txt); then
@@ -236,6 +255,7 @@ jobs:
236255 fi
237256
238257 - name : Keygen supports conversion from stdin
258+ if : matrix.identity
239259 run : ./${{ matrix.alice }}-keygen | ./${{ matrix.bob }}-keygen -y
240260
241261 - name : Keygen supports conversion from file
0 commit comments