1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-16 00:00:05 +01:00

only support signed certificates

This commit is contained in:
Chapuis Bertil 2015-09-07 16:41:08 +02:00
parent ee076ffa77
commit e07607106c
2 changed files with 2 additions and 4 deletions

View file

@ -2,7 +2,6 @@ package rest
import (
"bytes"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
@ -93,9 +92,7 @@ func Open(url *url.URL) (*Rest, error) {
for i := 0; i < connLimit; i++ {
connChan <- struct{}{}
}
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
tr := &http.Transport{}
client := http.Client{Transport: tr}
return &Rest{url: url, connChan: connChan, client: &client}, nil
}

View file

@ -195,6 +195,7 @@ func create(u string) (backend.Backend, error) {
if url.Scheme == "s3" {
return s3.Open(url.Host, url.Path[1:])
} else if url.Scheme == "http" || url.Scheme == "https" {
return rest.Open(url)
}