You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/10/22 12:42:20 UTC

[GitHub] [rocketmq-client-go] github-code-scanning[bot] commented on a diff in pull request #951: [ISSUE #950] support tls connection

github-code-scanning[bot] commented on code in PR #951:
URL: https://github.com/apache/rocketmq-client-go/pull/951#discussion_r1002459723


##########
internal/remote/tcp_conn.go:
##########
@@ -34,11 +35,23 @@
 
 func initConn(ctx context.Context, addr string, config *RemotingClientConfig) (*tcpConnWrapper, error) {
 	var d net.Dialer
-
 	d.KeepAlive = config.KeepAliveDuration
 	d.Deadline = time.Now().Add(config.ConnectionTimeout)
 
-	conn, err := d.DialContext(ctx, "tcp", addr)
+	var conn net.Conn
+	var err error
+	if config.UseTls {
+		tlsDialer := tls.Dialer{
+			NetDialer: &d,
+			Config: &tls.Config{
+				InsecureSkipVerify: true,

Review Comment:
   ## Disabled TLS certificate check
   
   InsecureSkipVerify should not be used in production code.
   
   [Show more details](https://github.com/apache/rocketmq-client-go/security/code-scanning/5)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org