mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
make both golang and python option for ssl ca file as ssl_ca_certs
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user