You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/11/27 08:07:33 UTC

[GitHub] [dubbo-go] zhaoyunxing92 commented on a diff in pull request #2117: feat: tls support for protocol dubbo/dubbo3

zhaoyunxing92 commented on code in PR #2117:
URL: https://github.com/apache/dubbo-go/pull/2117#discussion_r1021008059


##########
config/tls_config.go:
##########
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package config
+
+import (
+	"crypto/tls"
+	"crypto/x509"
+	"io/ioutil"
+)
+
+// TLSConfig tls config
+type TLSConfig struct {
+	CACertFile    string `yaml:"ca_cert_file" json:"ca_cert_file" property:"ca_cert_file"`
+	TLSCertFile   string `yaml:"tls_cert_file" json:"tls_cert_file" property:"tls_cert_file"`
+	TLSKeyFile    string `yaml:"tls_key_file" json:"tls_key_file" property:"tls_key_file"`

Review Comment:
   `ca_cert_file` 改成`ca-cert-file`会好点,前面的配置都是横线



##########
go.mod:
##########
@@ -54,3 +54,8 @@ require (
 	google.golang.org/protobuf v1.28.1
 	gopkg.in/yaml.v2 v2.4.0
 )
+
+replace (
+	github.com/apache/dubbo-getty v1.4.9-0.20220825024508-3da63c3257fa => github.com/apache/dubbo-getty v1.4.9-0.20221022181821-4dc6252ce98c

Review Comment:
   这个地方不用 replace,直接去替换



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org