forked from TrueCloudLab/distribution
Merge pull request #407 from stevvooe/log-canonical-digest
log canonical digest on verification error
This commit is contained in:
commit
5f7693da80
1 changed files with 2 additions and 0 deletions
|
@ -345,6 +345,8 @@ func (lw *layerWriter) validateLayer(dgst digest.Digest) (digest.Digest, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !verified {
|
if !verified {
|
||||||
|
ctxu.GetLoggerWithField(lw.layerStore.repository.ctx, "canonical", dgst).
|
||||||
|
Errorf("canonical digest does match provided digest")
|
||||||
return "", distribution.ErrLayerInvalidDigest{
|
return "", distribution.ErrLayerInvalidDigest{
|
||||||
Digest: dgst,
|
Digest: dgst,
|
||||||
Reason: fmt.Errorf("content does not match digest"),
|
Reason: fmt.Errorf("content does not match digest"),
|
||||||
|
|
Loading…
Reference in a new issue