This commit is contained in:
TsMask
2023-08-21 11:02:58 +08:00
parent 788f01674a
commit 4a3e6d7d67
26 changed files with 664 additions and 50 deletions

View File

@@ -30,6 +30,14 @@ type Config struct {
HeartbeatMax int `json:"heartbeat_max"`
LogDir string `json:"log_dir"`
LogFile string `json:"log_file"`
//证书配置
CA struct {
RootCert string `json:"root_cert"` //root CA证书存放路径
Cert string `json:"cert"` // 服务端CA证书存放路径
PrivateKey string `json:"private_key"` // 服务端私钥存放路径
Check bool `json:"check"` // 是否开启服务端证书检查功能
} `json:"ca"`
}
var OmcConf Config

View File

@@ -18,5 +18,11 @@
"mame":"nbi north alarm agent",
"heartbeat_max": 180,
"log_dir": "./nbi_alarm",
"log_file":"nbi_alarm.log"
"log_file":"nbi_alarm.log",
"ca":{
"root_cert":"ca/CA/demoCA/cacert.pem",
"cert":"/ca/CA/certs/test1.crt",
"private_key":"ca/CA/data/test1.key",
"check":true
}
}