SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
[filer] void panic if s3opt.tlsCACertificate is nill (#6685)
Konstantin Lebedev4dca59ed276f
diff --git a/weed/command/filer.go b/weed/command/filer.goindex 55ea1169d7..1a341ac69e 100644--- a/weed/command/filer.go+++ b/weed/command/filer.go@@ -114,6 +114,7 @@ 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")diff --git a/weed/command/s3.go b/weed/command/s3.goindex 84042b3e02..06eb5529b7 100644--- a/weed/command/s3.go+++ b/weed/command/s3.go@@ -312,7 +312,7 @@ func (s3opt *S3Options) startS3Server() bool {}caCertPool := x509.NewCertPool()- if *s3opt.tlsCACertificate != "" {+ if s3opt.tlsCACertificate != nil && *s3opt.tlsCACertificate != "" {// load CA certificate file and add it to list of client CAscaCertFile, err := ioutil.ReadFile(*s3opt.tlsCACertificate)if err != nil {