This commit is contained in:
parent
f195b46f49
commit
3aac196573
1 changed files with 8 additions and 4 deletions
8
main.go
8
main.go
|
@ -15,19 +15,23 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
hostname string
|
||||||
fileSrvHost string
|
fileSrvHost string
|
||||||
fileSrvPort string
|
fileSrvPort string
|
||||||
|
certificatePath string
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
flag.StringVar(&hostname, "hostname", "", "capsule hostname")
|
||||||
|
flag.StringVar(&certificatePath, "certificatePath", "", "capsule certificate path")
|
||||||
flag.StringVar(&fileSrvHost, "fileSrvHost", "", "file push server host")
|
flag.StringVar(&fileSrvHost, "fileSrvHost", "", "file push server host")
|
||||||
flag.StringVar(&fileSrvPort, "fileSrvPort", "", "file push server port")
|
flag.StringVar(&fileSrvPort, "fileSrvPort", "", "file push server port")
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
certificates := &certificate.Store{}
|
certificates := &certificate.Store{}
|
||||||
certificates.Register("localhost")
|
certificates.Register(hostname)
|
||||||
if err := certificates.Load("/home/arnas/out/gemcert/a"); err != nil {
|
if err := certificates.Load(certificatePath); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue