make both golang and python option for ssl ca file as ssl_ca_certs

This commit is contained in:
Qiu Jian
2019-02-11 21:05:36 +08:00
parent cd61e90012
commit fa7bce7853
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -33,9 +33,9 @@ func ServeForever(app *appsrv.Application, options *CommonOptions) {
log.Infof("Start listen on %s://%s", proto, addr)
if options.EnableSsl {
certfile := options.SslCertfile
if len(options.SslCafile) > 0 {
if len(options.SslCaCerts) > 0 {
var err error
certfile, err = seclib2.MergeCaCertFiles(options.SslCafile, options.SslCertfile)
certfile, err = seclib2.MergeCaCertFiles(options.SslCaCerts, options.SslCertfile)
if err != nil {
log.Fatalf("fail to merge ca+cert content: %s", err)
}
+1 -1
View File
@@ -39,7 +39,7 @@ type CommonOptions struct {
NotifyAdminUser string `default:"sysadmin" help:"System administrator user ID or name to notify"`
EnableSsl bool `help:"Enable https"`
SslCafile string `help:"ssl certificate ca root file, separating ca and cert file is not encouraged" alias:"ca-file"`
SslCaCerts string `help:"ssl certificate ca root file, separating ca and cert file is not encouraged" alias:"ca-file"`
SslCertfile string `help:"ssl certification file, normally combines all the certificates in the chain" alias:"cert-file"`
SslKeyfile string `help:"ssl certification private key file" alias:"key-file"`