updating vendored gotuf with updating signing error messages

Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
David Lawrence 2015-07-21 14:04:05 -07:00
parent 8b2888d122
commit 1f53e171bc
2 changed files with 5 additions and 4 deletions

2
Godeps/Godeps.json generated
View File

@ -63,7 +63,7 @@
}, },
{ {
"ImportPath": "github.com/endophage/gotuf", "ImportPath": "github.com/endophage/gotuf",
"Rev": "a0303e9689b5bf4cccb92b5ebb172f23159fcfbb" "Rev": "5be7693587dc2f3c6b35fd1394fcc4e098b4f643"
}, },
{ {
"ImportPath": "github.com/go-sql-driver/mysql", "ImportPath": "github.com/go-sql-driver/mysql",

View File

@ -1,10 +1,11 @@
package signed package signed
import ( import (
"fmt"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/endophage/gotuf/data" "github.com/endophage/gotuf/data"
"github.com/endophage/gotuf/errors" "github.com/endophage/gotuf/errors"
"fmt" "strings"
) )
// Sign takes a data.Signed and a key, calculated and adds the signature // Sign takes a data.Signed and a key, calculated and adds the signature
@ -19,7 +20,7 @@ func Sign(service CryptoService, s *data.Signed, keys ...data.PublicKey) error {
keyIDMemb[key.ID()] = struct{}{} keyIDMemb[key.ID()] = struct{}{}
keyIDs = append(keyIDs, key.ID()) keyIDs = append(keyIDs, key.ID())
} }
logrus.Debugf("Generated list of signing IDs: %v", keyIDs) logrus.Debugf("Generated list of signing IDs: %s", strings.Join(keyIDs, ", "))
for _, sig := range s.Signatures { for _, sig := range s.Signatures {
if _, ok := keyIDMemb[sig.KeyID]; ok { if _, ok := keyIDMemb[sig.KeyID]; ok {
continue continue
@ -32,7 +33,7 @@ func Sign(service CryptoService, s *data.Signed, keys ...data.PublicKey) error {
} }
if len(newSigs) < 1 { if len(newSigs) < 1 {
return errors.ErrInsufficientSignatures{ return errors.ErrInsufficientSignatures{
Name: fmt.Sprint("Cryptoservice failed to produce any signatures for keys %v", keyIDs), Name: fmt.Sprint("Cryptoservice failed to produce any signatures for keys with IDs: %s", strings.Join(keyIDs, ", ")),
Err: nil, Err: nil,
} }
} }