You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2021/08/12 08:56:19 UTC

[servicecomb-kie] branch ssl created (now 557b09e)

This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a change to branch ssl
in repository https://gitbox.apache.org/repos/asf/servicecomb-kie.git.


      at 557b09e  Fix: log print without error message

This branch includes the following new commits:

     new 557b09e  Fix: log print without error message

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[servicecomb-kie] 01/01: Fix: log print without error message

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a commit to branch ssl
in repository https://gitbox.apache.org/repos/asf/servicecomb-kie.git

commit 557b09e191a0ae02d4938bbf5b117af5f650fb9c
Author: little-cui <su...@qq.com>
AuthorDate: Thu Aug 12 16:51:07 2021 +0800

    Fix: log print without error message
---
 server/config/struct.go  | 17 ++++++++++-------
 server/datasource/dao.go | 13 ++++++++-----
 2 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/server/config/struct.go b/server/config/struct.go
index 1a0a05d..357a84b 100644
--- a/server/config/struct.go
+++ b/server/config/struct.go
@@ -31,13 +31,16 @@ type Config struct {
 
 //DB is yaml file struct to set persistent config
 type DB struct {
-	URI        string `yaml:"uri"`
-	Kind       string `yaml:"kind"`
-	PoolSize   int    `yaml:"poolSize"`
-	SSLEnabled bool   `yaml:"sslEnabled"`
-	RootCA     string `yaml:"rootCAFile"`
-	Timeout    string `yaml:"timeout"`
-	VerifyPeer bool   `yaml:"verifyPeer"`
+	URI         string `yaml:"uri"`
+	Kind        string `yaml:"kind"`
+	PoolSize    int    `yaml:"poolSize"`
+	SSLEnabled  bool   `yaml:"sslEnabled"`
+	RootCA      string `yaml:"rootCAFile"`
+	CertFile    string `yaml:"certFile"`
+	KeyFile     string `yaml:"keyFile"`
+	CertPwdFile string `yaml:"certPwdFile"`
+	Timeout     string `yaml:"timeout"`
+	VerifyPeer  bool   `yaml:"verifyPeer"`
 }
 
 //RBAC is rbac config
diff --git a/server/datasource/dao.go b/server/datasource/dao.go
index bb91425..b181100 100644
--- a/server/datasource/dao.go
+++ b/server/datasource/dao.go
@@ -135,11 +135,14 @@ func Init(c config.DB) error {
 		timeout = DefaultTimeout
 	}
 	dbc := &Config{
-		URI:        c.URI,
-		PoolSize:   c.PoolSize,
-		SSLEnabled: c.SSLEnabled,
-		RootCA:     c.RootCA,
-		Timeout:    timeout,
+		URI:         c.URI,
+		PoolSize:    c.PoolSize,
+		SSLEnabled:  c.SSLEnabled,
+		RootCA:      c.RootCA,
+		CertFile:    c.CertFile,
+		CertPwdFile: c.CertPwdFile,
+		KeyFile:     c.KeyFile,
+		Timeout:     timeout,
 	}
 	if b, err = f(dbc); err != nil {
 		return err