diff --git a/docker/docker_image_dest.go b/docker/docker_image_dest.go index 782a048cec..4efd32e1c8 100644 --- a/docker/docker_image_dest.go +++ b/docker/docker_image_dest.go @@ -71,10 +71,10 @@ func (d *dockerImageDestination) SupportsSignatures(ctx context.Context) error { return err } switch { - case d.c.signatureBase != nil: - return nil case d.c.supportsSignatures: return nil + case d.c.signatureBase != nil: + return nil default: return errors.Errorf("X-Registry-Supports-Signatures extension not supported, and lookaside is not configured") } @@ -276,10 +276,10 @@ func (d *dockerImageDestination) PutSignatures(ctx context.Context, signatures [ return err } switch { - case d.c.signatureBase != nil: - return d.putSignaturesToLookaside(signatures) case d.c.supportsSignatures: return d.putSignaturesToAPIExtension(ctx, signatures) + case d.c.signatureBase != nil: + return d.putSignaturesToLookaside(signatures) default: return errors.Errorf("X-Registry-Supports-Signatures extension not supported, and lookaside is not configured") } diff --git a/docker/docker_image_src.go b/docker/docker_image_src.go index 98f6067e1e..89fbd62563 100644 --- a/docker/docker_image_src.go +++ b/docker/docker_image_src.go @@ -189,10 +189,10 @@ func (s *dockerImageSource) GetSignatures(ctx context.Context, instanceDigest *d return nil, err } switch { - case s.c.signatureBase != nil: - return s.getSignaturesFromLookaside(ctx, instanceDigest) case s.c.supportsSignatures: return s.getSignaturesFromAPIExtension(ctx, instanceDigest) + case s.c.signatureBase != nil: + return s.getSignaturesFromLookaside(ctx, instanceDigest) default: return [][]byte{}, nil }