Skip to content

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.

Fix KeyMaterial nil bug (#5849)

qinguoyibf2366ba3aba
diff --git a/weed/command/filer.go b/weed/command/filer.go
index 77e3126462..b7f67ea3ba 100644
--- a/weed/command/filer.go
+++ b/weed/command/filer.go
@@ -240,6 +240,9 @@ func runFiler(cmd *Command, args []string) bool {
// GetCertificateWithUpdate Auto refreshing TSL certificate
func (fo *FilerOptions) GetCertificateWithUpdate(*tls.ClientHelloInfo) (*tls.Certificate, error) {
certs, err := fo.certProvider.KeyMaterial(context.Background())
+ if certs == nil {
+ return nil, err
+ }
return &certs.Certs[0], err
}