mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 05:03:36 +08:00
Fix KeyMaterial nil bug (#5848)
This commit is contained in:
@@ -180,8 +180,11 @@ func runS3(cmd *Command, args []string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetCertificateWithUpdate Auto refreshing TSL certificate
|
// GetCertificateWithUpdate Auto refreshing TSL certificate
|
||||||
func (S3opt *S3Options) GetCertificateWithUpdate(*tls.ClientHelloInfo) (*tls.Certificate, error) {
|
func (s3opt *S3Options) GetCertificateWithUpdate(*tls.ClientHelloInfo) (*tls.Certificate, error) {
|
||||||
certs, err := S3opt.certProvider.KeyMaterial(context.Background())
|
certs, err := s3opt.certProvider.KeyMaterial(context.Background())
|
||||||
|
if certs == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
return &certs.Certs[0], err
|
return &certs.Certs[0], err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user