From 2413a110e68736b7d53bf48427245a49753c709f Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 7 Jul 2015 20:02:56 -0700 Subject: [PATCH] Fix SSL support, pointer indirection caused nil buffers --- .gitattributes | 1 - Dockerfile | 2 +- pkg/server/server.go | 10 +++------- 3 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 9423adc96..000000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -main.go ident \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d003f4717..987ab8ec1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,4 +31,4 @@ RUN apt-get remove -y build-essential curl git && \ EXPOSE 9000 9001 -CMD ["sh", "-c", "${GOPATH}/bin/minio mode memory 2G"] +CMD ["sh", "-c", "${GOPATH}/bin/minio server"] diff --git a/pkg/server/server.go b/pkg/server/server.go index 692129fe4..352e70f4a 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -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) }