Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
comms
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xx network
comms
Commits
fd9629d8
Commit
fd9629d8
authored
Dec 29, 2022
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
Web hosts still need cert
parent
7db5c9f7
No related branches found
No related tags found
2 merge requests
!60
Web hosts still need cert
,
!39
Merge release into master
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
connect/connection_test.go
+1
-1
1 addition, 1 deletion
connect/connection_test.go
connect/host.go
+5
-5
5 additions, 5 deletions
connect/host.go
connect/webConn.go
+3
-3
3 additions, 3 deletions
connect/webConn.go
with
9 additions
and
9 deletions
connect/connection_test.go
+
1
−
1
View file @
fd9629d8
...
@@ -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
)
}
}
...
...
This diff is collapsed.
Click to expand it.
connect/host.go
+
5
−
5
View file @
fd9629d8
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
connect/webConn.go
+
3
−
3
View file @
fd9629d8
...
@@ -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
()}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment