Browse Source
Revert "[filer] void panic if s3opt.tlsCACertificate is nill" (#6694)
Revert "[filer] void panic if s3opt.tlsCACertificate is nill (#6685)"
This reverts commit 4dca59ed27
.
pull/6698/head
Konstantin Lebedev
3 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
1 additions and
2 deletions
-
weed/command/filer.go
-
weed/command/s3.go
|
|
@ -114,7 +114,6 @@ func init() { |
|
|
|
filerS3Options.dataCenter = cmdFiler.Flag.String("s3.dataCenter", "", "prefer to read and write to volumes in this data center") |
|
|
|
filerS3Options.tlsPrivateKey = cmdFiler.Flag.String("s3.key.file", "", "path to the TLS private key file") |
|
|
|
filerS3Options.tlsCertificate = cmdFiler.Flag.String("s3.cert.file", "", "path to the TLS certificate file") |
|
|
|
filerS3Options.tlsCACertificate = cmdFiler.Flag.String("s3.cacert.file", "", "path to the TLS CA certificate file") |
|
|
|
filerS3Options.config = cmdFiler.Flag.String("s3.config", "", "path to the config file") |
|
|
|
filerS3Options.auditLogConfig = cmdFiler.Flag.String("s3.auditLogConfig", "", "path to the audit log config file") |
|
|
|
filerS3Options.allowEmptyFolder = cmdFiler.Flag.Bool("s3.allowEmptyFolder", true, "allow empty folders") |
|
|
|
|
|
@ -312,7 +312,7 @@ func (s3opt *S3Options) startS3Server() bool { |
|
|
|
} |
|
|
|
|
|
|
|
caCertPool := x509.NewCertPool() |
|
|
|
if s3opt.tlsCACertificate != nil && *s3opt.tlsCACertificate != "" { |
|
|
|
if *s3opt.tlsCACertificate != "" { |
|
|
|
// load CA certificate file and add it to list of client CAs
|
|
|
|
caCertFile, err := ioutil.ReadFile(*s3opt.tlsCACertificate) |
|
|
|
if err != nil { |
|
|
|