mirror of
https://github.com/minio/minio.git
synced 2026-02-11 05:10:16 -05:00
sha256: Verify sha256 along with md5sum, signature is verified on the request early. (#2813)
This commit is contained in:
committed by
Harshavardhana
parent
b5a6dd1395
commit
61a18ed48f
@@ -73,6 +73,8 @@ func toObjectErr(err error, params ...string) error {
|
||||
err = InsufficientWriteQuorum{}
|
||||
case io.ErrUnexpectedEOF, io.ErrShortWrite:
|
||||
err = IncompleteBody{}
|
||||
case errContentSHA256Mismatch:
|
||||
err = SHA256Mismatch{}
|
||||
}
|
||||
if ok {
|
||||
e.e = err
|
||||
@@ -81,6 +83,13 @@ func toObjectErr(err error, params ...string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// SHA256Mismatch - when content sha256 does not match with what was sent from client.
|
||||
type SHA256Mismatch struct{}
|
||||
|
||||
func (e SHA256Mismatch) Error() string {
|
||||
return "sha256 computed does not match with what is expected"
|
||||
}
|
||||
|
||||
// StorageFull storage ran out of space.
|
||||
type StorageFull struct{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user