get recipient in a non-dumb way
This commit is contained in:
parent
52a87a41da
commit
67ab59ec48
|
@ -242,15 +242,9 @@ func action(ctx *cli.Context) error {
|
||||||
|
|
||||||
// get recipients from specified identities
|
// get recipients from specified identities
|
||||||
for _, id := range identities {
|
for _, id := range identities {
|
||||||
// TODO: figure out how age actually intends for
|
if actual_id, ok := id.(*age.X25519Identity); ok {
|
||||||
// TODO: a recpient to be retrieved from an age.Identity
|
recipients = append(recipients, actual_id.Recipient())
|
||||||
// TODO: beccause this is stupid and I hate it
|
|
||||||
actual_id, err := age.ParseX25519Identity(fmt.Sprint(id))
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("couldn't get recipient? %v", err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
recipients = append(recipients, actual_id.Recipient())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to decrypt the file
|
// try to decrypt the file
|
||||||
|
|
Loading…
Reference in a new issue