Merge pull request #1150 from harshavardhana/signature

signV4: Move pkg/signature to pkg/s3/signature4
This commit is contained in:
Anand Babu (AB) Periasamy
2016-02-23 12:39:28 +05:30
16 changed files with 210 additions and 190 deletions

View File

@@ -34,7 +34,7 @@ import (
"github.com/minio/minio/pkg/ioutils"
"github.com/minio/minio/pkg/mimedb"
"github.com/minio/minio/pkg/probe"
signV4 "github.com/minio/minio/pkg/signature"
"github.com/minio/minio/pkg/s3/signature4"
)
/// Object Operations
@@ -199,7 +199,7 @@ func isMD5SumEqual(expectedMD5Sum, actualMD5Sum string) bool {
}
// CreateObject - create an object.
func (fs Filesystem) CreateObject(bucket, object, expectedMD5Sum string, size int64, data io.Reader, sig *signV4.Signature) (ObjectMetadata, *probe.Error) {
func (fs Filesystem) CreateObject(bucket, object, expectedMD5Sum string, size int64, data io.Reader, sig *signature4.Sign) (ObjectMetadata, *probe.Error) {
di, e := disk.GetInfo(fs.path)
if e != nil {
return ObjectMetadata{}, probe.NewError(e)
@@ -294,7 +294,7 @@ func (fs Filesystem) CreateObject(bucket, object, expectedMD5Sum string, size in
}
if !ok {
file.CloseAndPurge()
return ObjectMetadata{}, signV4.ErrSignDoesNotMath("Signature does not match")
return ObjectMetadata{}, probe.NewError(SignDoesNotMatch{})
}
}
file.Close()