File tree 2 files changed +40
-4
lines changed
cmd/age-plugin-fido2-hmac/testdata
2 files changed +40
-4
lines changed Original file line number Diff line number Diff line change
1
+ # fido key must have pin 1234
2
+
3
+ exec age-keygen
4
+ cp stdout identity0.txt
5
+
6
+ ttyin -stdin yes-pin-no-identity
7
+ exec age-plugin-fido2-hmac -g
8
+ cp stdout identity1.txt
9
+
10
+ ttyin -stdin no-pin-yes-identity
11
+ exec age-plugin-fido2-hmac -g
12
+ cp stdout identity2.txt
13
+
14
+ exec bash -c 'cat identity0.txt identity1.txt identity2.txt | grep -oP "age1.*" > recipients.txt'
15
+
16
+ exec age -R recipients.txt -o ciphertext plaintext
17
+
18
+ ttyin -stdin pin
19
+ exec age -d -o plaintext1 -i identity1.txt ciphertext
20
+ cmp plaintext plaintext1
21
+
22
+ exec age -d -o plaintext2 -i identity2.txt ciphertext
23
+ cmp plaintext plaintext2
24
+
25
+ -- pin --
26
+ 1234
27
+ -- yes-pin-no-identity --
28
+ 1234
29
+ y
30
+ n
31
+
32
+ -- no-pin-yes-identity --
33
+ 1234
34
+ n
35
+ y
36
+
37
+ -- magic.txt --
38
+ AGE-PLUGIN-FIDO2-HMAC-1VE5KGMEJ945X6CTRM2TF76
39
+ -- plaintext --
40
+ this is the plaintext
Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ func IdentityV1() error {
37
37
return false , nil
38
38
}
39
39
40
- if stanzas != nil {
41
- return false , errors .New ("Decrypting multiple stanzas not supported" )
42
- }
43
-
44
40
stanzas = append (stanzas , & age.Stanza {
45
41
Type : args [1 ],
46
42
Args : args [2 :],
You can’t perform that action at this time.
0 commit comments