mirror of
https://github.com/minio/minio.git
synced 2026-11-22 15:13:48 +00:00
Fix SSL support, pointer indirection caused nil buffers
This commit is contained in:
1 parent
f737c0540e
commit
2413a110e6
3 files changed
+4
-9
No files matched your search
@@ -39,14 +39,10 @@ func getAPIServer(conf api.Config, apiHandler http.Handler) (*http.Server, error
|
||||
}
|
||||
|
||||
if conf.TLS {
|
||||
config := &tls.Config{}
|
||||
if httpServer.TLSConfig != nil {
|
||||
*config = *httpServer.TLSConfig
|
||||
}
|
||||
|
||||
var err error
|
||||
config.Certificates = make([]tls.Certificate, 1)
|
||||
config.Certificates[0], err = tls.LoadX509KeyPair(conf.CertFile, conf.KeyFile)
|
||||
httpServer.TLSConfig = &tls.Config{}
|
||||
httpServer.TLSConfig.Certificates = make([]tls.Certificate, 1)
|
||||
httpServer.TLSConfig.Certificates[0], err = tls.LoadX509KeyPair(conf.CertFile, conf.KeyFile)
|
||||
if err != nil {
|
||||
return nil, iodine.New(err, nil)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user