Add the secure access with HTTPS

Signed-off-by: Li Yi <denverdino@gmail.com>
This commit is contained in:
Li Yi
2015-05-12 11:56:00 +08:00
committed by tgic
parent b8a276f2db
commit c3b42db014
2 changed files with 13 additions and 7 deletions

View File

@@ -125,7 +125,7 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) {
if ok {
internalBool, ok = internal.(bool)
if !ok {
return nil, fmt.Errorf("The encrypt parameter should be a boolean")
return nil, fmt.Errorf("The internal parameter should be a boolean")
}
}
@@ -194,7 +194,7 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) {
// bucketName
func New(params DriverParameters) (*Driver, error) {
client := oss.NewOSSClient(params.Region, params.Internal, params.AccessKeyID, params.AccessKeySecret)
client := oss.NewOSSClient(params.Region, params.Internal, params.AccessKeyID, params.AccessKeySecret, params.Secure)
bucket := client.Bucket(params.Bucket)
// Validate that the given credentials have at least read permissions in the