log canonical digest on verification error
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
4686b3c0f4
commit
56b18134fa
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