Refactor to get Keys from Changes. #71

This commit is contained in:
Andrey Smirnov
2015-03-19 01:36:39 +03:00
parent 813b9593fa
commit c573746896
3 changed files with 15 additions and 12 deletions
+4 -1
View File
@@ -22,6 +22,7 @@ type Changes struct {
Binary []string
Architectures []string
Stanza Stanza
SignatureKeys []utils.GpgKey
}
// NewChanges moves .changes file into temporary directory and creates Changes structure
@@ -67,11 +68,13 @@ func (c *Changes) VerifyAndParse(acceptUnsigned, ignoreSignature bool, verifier
}
if isClearSigned && !ignoreSignature {
_, err = verifier.VerifyClearsigned(input, false)
keyInfo, err := verifier.VerifyClearsigned(input, false)
if err != nil {
return err
}
input.Seek(0, 0)
c.SignatureKeys = keyInfo.GoodKeys
}
var text *os.File