Skip to content

fix: do not set InsecureSkipVerify on TLS config#237

Merged
bestbeforetoday merged 1 commit intohyperledger:mainfrom
bestbeforetoday:insecure-skip-verify
Mar 11, 2026
Merged

fix: do not set InsecureSkipVerify on TLS config#237
bestbeforetoday merged 1 commit intohyperledger:mainfrom
bestbeforetoday:insecure-skip-verify

Conversation

@bestbeforetoday
Copy link
Member

The network.DialConnection function explicitly set InsecureSkipVerify to true on the tls.Config used to create gRPC connections. This change removes that behaviour, leaving TLS certificate verification enabled by default.

The network.DialConnection function explicitly set InsecureSkipVerify to
true on the tls.Config used to create gRPC connections. This change
removes that behaviour, leaving TLS certificate verification enabled by
default.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
@bestbeforetoday bestbeforetoday marked this pull request as ready for review March 11, 2026 18:39
@bestbeforetoday bestbeforetoday enabled auto-merge (squash) March 11, 2026 18:39
@ryjones ryjones requested a review from a team March 11, 2026 19:15
var conn *grpc.ClientConn
for i := 1; i <= 3; i++ {
conn, connError = gRPCClient.NewConnection(node.Addr, func(tlsConfig *tls.Config) {
tlsConfig.InsecureSkipVerify = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make it as a configurable value?

Copy link
Contributor

@SamYuan1990 SamYuan1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I want it can be configurable.

@bestbeforetoday bestbeforetoday merged commit 78c76f9 into hyperledger:main Mar 11, 2026
16 checks passed
@bestbeforetoday bestbeforetoday deleted the insecure-skip-verify branch March 12, 2026 09:33
@bestbeforetoday
Copy link
Member Author

Client code can configure whatever gRPC connection options they want by using the gRPC APIs directly instead of the helper code in network.DialConnection (and related functions). See #238 for an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants