fix: keyrings must return keys with entities/identities

This commit is contained in:
Steve Moyer 2022-12-30 17:08:25 -05:00
parent 7c4a3b12c1
commit de6f5404e4
No known key found for this signature in database
GPG Key ID: D8D464C9D22FB8E0

View File

@ -373,6 +373,13 @@ func (pk PGPKeyring) KeysById(id uint64) []openpgp.Key {
result = append(result, openpgp.Key{
PublicKey: key.Public(),
PrivateKey: key.Private(),
Entity: &openpgp.Entity{
PrimaryKey: key.Public(),
PrivateKey: key.Private(),
Identities: map[string]*openpgp.Identity{
"": {},
},
},
SelfSignature: &packet.Signature{
IsPrimaryId: func() *bool { b := true; return &b }(),
},