mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Implement TLS server
$ ./minio --tls --cert <your_cert> --key <your_private_key> This patchset also provides crypto/x509 - which is a wrapper package to generate X509 certificates. This is necessary to provide certificates later through management console
This commit is contained in:
38
main.go
38
main.go
@@ -1,7 +1,41 @@
|
||||
package main
|
||||
|
||||
import "github.com/minio-io/minio/pkg/server"
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/minio-io/minio/pkg/server"
|
||||
)
|
||||
|
||||
func parseInput(c *cli.Context) {
|
||||
tls := c.Bool("tls")
|
||||
certFile := c.String("cert")
|
||||
keyFile := c.String("key")
|
||||
server.Start(":8080", tls, certFile, keyFile)
|
||||
}
|
||||
|
||||
func main() {
|
||||
server.Start()
|
||||
app := cli.NewApp()
|
||||
app.Name = "minio"
|
||||
app.Usage = "Minio Server"
|
||||
var flags = []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "tls",
|
||||
Usage: "Enable tls",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "cert",
|
||||
Value: "",
|
||||
Usage: "cert file path",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "key",
|
||||
Value: "",
|
||||
Usage: "key file path",
|
||||
},
|
||||
}
|
||||
app.Flags = flags
|
||||
app.Action = parseInput
|
||||
app.Author = "Minio"
|
||||
app.Run(os.Args)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user