diff --git a/backend/utils/mysql/client/info.go b/backend/utils/mysql/client/info.go
index d4f20e90a..58455adcc 100644
--- a/backend/utils/mysql/client/info.go
+++ b/backend/utils/mysql/client/info.go
@@ -149,8 +149,10 @@ func ConnWithSSL(ssl, skipVerify bool, clientKey, clientCert, rootCert string) (
return "", nil
}
pool := x509.NewCertPool()
- if ok := pool.AppendCertsFromPEM([]byte(rootCert)); !ok {
- return "", errors.New("unable to append root cert to pool")
+ if len(rootCert) != 0 {
+ if ok := pool.AppendCertsFromPEM([]byte(rootCert)); !ok {
+ return "", errors.New("unable to append root cert to pool")
+ }
}
cert, err := tls.X509KeyPair([]byte(clientCert), []byte(clientKey))
if err != nil {
diff --git a/frontend/src/api/interface/database.ts b/frontend/src/api/interface/database.ts
index 0e6138b3a..6e3a77e19 100644
--- a/frontend/src/api/interface/database.ts
+++ b/frontend/src/api/interface/database.ts
@@ -215,6 +215,7 @@ export namespace Database {
password: string;
ssl: boolean;
+ hasCA: boolean;
rootCert: string;
clientKey: string;
clientCert: string;
diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts
index fc8e559df..562aaf1de 100644
--- a/frontend/src/lang/modules/en.ts
+++ b/frontend/src/lang/modules/en.ts
@@ -396,6 +396,7 @@ const message = {
clientKey: 'Client Private Key',
clientCert: 'Client Certificate',
caCert: 'CA Certificate',
+ hasCA: 'Has CA Certificate',
skipVerify: 'Ignore Certificate Validity Check',
formatHelper:
diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts
index 98ada819d..62b20514e 100644
--- a/frontend/src/lang/modules/tw.ts
+++ b/frontend/src/lang/modules/tw.ts
@@ -388,6 +388,7 @@ const message = {
clientKey: '客户端私钥',
clientCert: '客户端证书',
caCert: 'CA 证书',
+ hasCA: '擁有 CA 證書',
skipVerify: '忽略校验证书可用性检测',
formatHelper: '當前資料庫字符集為 {0},字符集不一致可能導致恢復失敗',
diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts
index cd6562917..8dd121de8 100644
--- a/frontend/src/lang/modules/zh.ts
+++ b/frontend/src/lang/modules/zh.ts
@@ -387,6 +387,7 @@ const message = {
ssl: '使用 SSL',
clientKey: '客户端私钥',
clientCert: '客户端证书',
+ hasCA: '拥有 CA 证书',
caCert: 'CA 证书',
skipVerify: '忽略校验证书可用性检测',
diff --git a/frontend/src/views/container/container/operate/index.vue b/frontend/src/views/container/container/operate/index.vue
index d26585c8a..32fbe88d4 100644
--- a/frontend/src/views/container/container/operate/index.vue
+++ b/frontend/src/views/container/container/operate/index.vue
@@ -184,9 +184,9 @@
{{ $t('container.autoRemove') }}
-