mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Support for non-armored detached signatures
This commit is contained in:
+8
-1
@@ -367,7 +367,14 @@ func (g *GoVerifier) printLog(signers []signatureResult) {
|
||||
|
||||
// VerifyDetachedSignature verifies combination of signature and cleartext using gpgv
|
||||
func (g *GoVerifier) VerifyDetachedSignature(signature, cleartext io.Reader, showKeyTip bool) error {
|
||||
signers, missingKeys, err := checkArmoredDetachedSignature(g.trustedKeyring, cleartext, signature)
|
||||
var signatureBuf bytes.Buffer
|
||||
|
||||
signers, missingKeys, err := checkArmoredDetachedSignature(g.trustedKeyring, cleartext, io.TeeReader(signature, &signatureBuf))
|
||||
|
||||
if err == io.EOF {
|
||||
// most probably not armored signature
|
||||
signers, missingKeys, err = checkDetachedSignature(g.trustedKeyring, cleartext, &signatureBuf)
|
||||
}
|
||||
|
||||
g.printLog(signers)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user