mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/theupdateframework/notary v0.7.0
update the dependency to v0.7.0 to be closer to what docker/cli uses; https://github.com/theupdateframework/notary/compare/v0.6.1...v0.7.0 Note that docker/cli is slightly ahead of v0.7.0, and uses bf96a202a09a; https://github.com/theupdateframework/notary/compare/v0.7.0...bf96a202a09a Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
9
vendor/github.com/theupdateframework/notary/tuf/data/keys.go
generated
vendored
9
vendor/github.com/theupdateframework/notary/tuf/data/keys.go
generated
vendored
@ -12,9 +12,9 @@ import (
|
||||
"io"
|
||||
"math/big"
|
||||
|
||||
"github.com/agl/ed25519"
|
||||
"github.com/docker/go/canonical/json"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/crypto/ed25519"
|
||||
)
|
||||
|
||||
// PublicKey is the necessary interface for public keys
|
||||
@ -484,9 +484,10 @@ func (k RSAPrivateKey) Sign(rand io.Reader, msg []byte, opts crypto.SignerOpts)
|
||||
|
||||
// Sign creates an ed25519 signature
|
||||
func (k ED25519PrivateKey) Sign(rand io.Reader, msg []byte, opts crypto.SignerOpts) (signature []byte, err error) {
|
||||
priv := [ed25519.PrivateKeySize]byte{}
|
||||
copy(priv[:], k.private[ed25519.PublicKeySize:])
|
||||
return ed25519.Sign(&priv, msg)[:], nil
|
||||
priv := make([]byte, ed25519.PrivateKeySize)
|
||||
// The ed25519 key is serialized as public key then private key, so just use private key here.
|
||||
copy(priv, k.private[ed25519.PublicKeySize:])
|
||||
return ed25519.Sign(ed25519.PrivateKey(priv), msg)[:], nil
|
||||
}
|
||||
|
||||
// Sign on an UnknownPrivateKey raises an error because the client does not
|
||||
|
2
vendor/github.com/theupdateframework/notary/tuf/data/roles.go
generated
vendored
2
vendor/github.com/theupdateframework/notary/tuf/data/roles.go
generated
vendored
@ -55,7 +55,7 @@ func (e ErrInvalidRole) Error() string {
|
||||
|
||||
// ValidRole only determines the name is semantically
|
||||
// correct. For target delegated roles, it does NOT check
|
||||
// the the appropriate parent roles exist.
|
||||
// the appropriate parent roles exist.
|
||||
func ValidRole(name RoleName) bool {
|
||||
if IsDelegation(name) {
|
||||
return true
|
||||
|
2
vendor/github.com/theupdateframework/notary/tuf/data/snapshot.go
generated
vendored
2
vendor/github.com/theupdateframework/notary/tuf/data/snapshot.go
generated
vendored
@ -59,7 +59,7 @@ func IsValidSnapshotStructure(s Snapshot) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewSnapshot initilizes a SignedSnapshot with a given top level root
|
||||
// NewSnapshot initializes a SignedSnapshot with a given top level root
|
||||
// and targets objects
|
||||
func NewSnapshot(root *Signed, targets *Signed) (*SignedSnapshot, error) {
|
||||
logrus.Debug("generating new snapshot...")
|
||||
|
2
vendor/github.com/theupdateframework/notary/tuf/data/targets.go
generated
vendored
2
vendor/github.com/theupdateframework/notary/tuf/data/targets.go
generated
vendored
@ -54,7 +54,7 @@ func isValidTargetsStructure(t Targets, roleName RoleName) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewTargets intiializes a new empty SignedTargets object
|
||||
// NewTargets initializes a new empty SignedTargets object
|
||||
func NewTargets() *SignedTargets {
|
||||
return &SignedTargets{
|
||||
Signatures: make([]Signature, 0),
|
||||
|
2
vendor/github.com/theupdateframework/notary/tuf/data/types.go
generated
vendored
2
vendor/github.com/theupdateframework/notary/tuf/data/types.go
generated
vendored
@ -186,7 +186,7 @@ type FileMeta struct {
|
||||
|
||||
// Equals returns true if the other FileMeta object is equivalent to this one
|
||||
func (f FileMeta) Equals(o FileMeta) bool {
|
||||
if o.Length != f.Length || len(f.Hashes) != len(f.Hashes) {
|
||||
if o.Length != f.Length || len(o.Hashes) != len(f.Hashes) {
|
||||
return false
|
||||
}
|
||||
if f.Custom == nil && o.Custom != nil || f.Custom != nil && o.Custom == nil {
|
||||
|
Reference in New Issue
Block a user