Merge pull request #12973 from reasonerjt/content-trust-check-tag-2.1

Check the tag in isArtifactSigned func -- cherrypick to 2.1
This commit is contained in:
Daniel Jiang 2020-09-06 13:38:48 +08:00 committed by GitHub
commit 7bcfb502d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,9 @@ var (
if err != nil {
return false, err
}
if len(art.Tag) > 0 {
return checker.IsTagSigned(art.Tag, art.Digest), nil
}
return checker.IsArtifactSigned(art.Digest), nil
}
)