Browse Source

Fix KeyMaterial nil bug (#5848)

pull/5855/head
qinguoyi 5 months ago
committed by GitHub
parent
commit
e88da0be1b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      weed/command/s3.go

7
weed/command/s3.go

@ -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) {
certs, err := S3opt.certProvider.KeyMaterial(context.Background())
func (s3opt *S3Options) GetCertificateWithUpdate(*tls.ClientHelloInfo) (*tls.Certificate, error) {
certs, err := s3opt.certProvider.KeyMaterial(context.Background())
if certs == nil {
return nil, err
}
return &certs.Certs[0], err return &certs.Certs[0], err
} }

Loading…
Cancel
Save