diff --git a/docker/docker_image_dest.go b/docker/docker_image_dest.go index 85d5689952..5f24529beb 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") } @@ -283,10 +283,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 }