Skip to content
Snippets Groups Projects
Commit fd9629d8 authored by Jonah Husson's avatar Jonah Husson
Browse files

Web hosts still need cert

parent 7db5c9f7
No related branches found
No related tags found
2 merge requests!60Web hosts still need cert,!39Merge release into master
...@@ -151,7 +151,7 @@ func TestWebConnection_TLS(t *testing.T) { ...@@ -151,7 +151,7 @@ func TestWebConnection_TLS(t *testing.T) {
hostParams := GetDefaultHostParams() hostParams := GetDefaultHostParams()
hostParams.ConnectionType = Web hostParams.ConnectionType = Web
h, err := newHost(hostId, addr, nil, hostParams) h, err := newHost(hostId, addr, httpsCertBytes, hostParams)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
......
...@@ -118,12 +118,12 @@ func newHost(id *id.ID, address string, cert []byte, params HostParams) (host *H ...@@ -118,12 +118,12 @@ func newHost(id *id.ID, address string, cert []byte, params HostParams) (host *H
host.UpdateAddress(address) host.UpdateAddress(address)
// Configure the transport credentials for GRPC hosts // Configure the transport credentials for GRPC hosts
if !host.IsWeb() { //if !host.IsWeb() {
err = host.setCredentials() err = host.setCredentials()
if err != nil { if err != nil {
return return
} }
} //}
// Connect immediately if configured to do so // Connect immediately if configured to do so
if params.DisableLazyConnection { if params.DisableLazyConnection {
......
...@@ -79,9 +79,9 @@ func (wc *webConn) connectWebHelper() (err error) { ...@@ -79,9 +79,9 @@ func (wc *webConn) connectWebHelper() (err error) {
// Configure TLS options // Configure TLS options
var securityDial []grpcweb.DialOption var securityDial []grpcweb.DialOption
if wc.h.credentials != nil { //if wc.h.credentials != nil {
return errors.New("Web hosts should not have credentials specified") // return errors.New("Web hosts should not have credentials specified")
} //}
if !TestingOnlyDisableTLS { if !TestingOnlyDisableTLS {
securityDial = []grpcweb.DialOption{grpcweb.WithSecure()} securityDial = []grpcweb.DialOption{grpcweb.WithSecure()}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment