Skip to content

Commit

Permalink
verify identity against user input
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed Jan 25, 2017
1 parent b73ce56 commit 85b5b00
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/cmd/admin/image/verify-signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ func (o *VerifyImageSignatureOptions) verifySignatureContent(content []byte) (st
if o.InputImage != m.Critical.Image.Digest {
return "", "", fmt.Errorf("signature is valid for digest %q not for %q", m.Critical.Image.Digest, o.InputImage)
}
fmt.Printf("critical=%#+v\n", m.Critical)
return m.Critical.Image.Digest, m.Critical.Identity.DockerReference, nil
}

Expand All @@ -168,7 +167,7 @@ func (o *VerifyImageSignatureOptions) verifyImageIdentity(reference, digest stri
return err
}

if tag.Image.Name != digest {
if tag.Image.Name != o.InputImage {
return fmt.Errorf("signature identity %q does not match image %q", reference, tag.Image.Name)
}

Expand Down

0 comments on commit 85b5b00

Please sign in to comment.