distribution/digest
Stephen J Day 8c254edb9a Correctly close pipe after error in tarsum verification
This addresses a subtle deadlock where an error during a copy prevented pipe
closure to propagate correctly. By closing down the read end of the pipe rather
than the write end, the waiting writer is properly signaled. A nice side-effect
of this change is that errors encountered by io.Copy are no propagated to the
verifier's Write method.

A test to ensure validation errors for unsupported digest types has been added,
as well.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-03-18 18:26:09 -07:00
..
digest.go Correctly close pipe after error in tarsum verification 2015-03-18 18:26:09 -07:00
digest_test.go supplement of digest refactoring 2015-03-11 14:13:29 +08:00
digester.go fixing up tests to work with for non-tarsum future 2015-03-06 14:54:23 -08:00
doc.go Various adjustments to digest package for govet/golint 2014-11-19 14:59:05 -08:00
tarsum.go digest: Minor refactoring 2015-03-10 16:44:19 -07:00
tarsum_test.go digest: Minor refactoring 2015-03-10 16:44:19 -07:00
verifiers.go Correctly close pipe after error in tarsum verification 2015-03-18 18:26:09 -07:00
verifiers_test.go Correctly close pipe after error in tarsum verification 2015-03-18 18:26:09 -07:00