pkg/sign: use local readKeyRing function instead of opengpg's, to handle armored key rings. (#1612)

This commit is contained in:
featherbutt 2022-06-14 05:42:50 -07:00 committed by GitHub
parent d605f86c82
commit 4133763b62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -84,9 +84,9 @@ func (fe *FileEntityFetcher) FetchEntity(fingerprint string) (*openpgp.Entity, e
return nil, fmt.Errorf("jsonsign: FetchEntity: %v", err)
}
defer f.Close()
el, err := openpgp.ReadKeyRing(f)
el, err := readKeyRing(f)
if err != nil {
return nil, fmt.Errorf("jsonsign: openpgp.ReadKeyRing of %q: %v", fe.File, err)
return nil, fmt.Errorf("jsonsign: readKeyRing of %q: %v", fe.File, err)
}
for _, e := range el {
pubk := &e.PrivateKey.PublicKey