internal/plugin,cmd/age: add support for encrypting to plugin identities

This commit is contained in:
Filippo Valsorda
2022-05-24 15:56:22 +02:00
parent 7bad9c2ad8
commit 384d0393e0
3 changed files with 26 additions and 3 deletions
+3
View File
@@ -19,6 +19,7 @@ import (
"filippo.io/age"
"filippo.io/age/agessh"
"filippo.io/age/armor"
"filippo.io/age/internal/plugin"
"golang.org/x/term"
)
@@ -402,6 +403,8 @@ func identitiesToRecipients(ids []age.Identity) ([]age.Recipient, error) {
switch id := id.(type) {
case *age.X25519Identity:
recipients = append(recipients, id.Recipient())
case *plugin.Identity:
recipients = append(recipients, id.Recipient())
case *agessh.RSAIdentity:
recipients = append(recipients, id.Recipient())
case *agessh.Ed25519Identity: