certificate params
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Arnas Udovicius 2022-08-18 00:40:05 +03:00
parent f195b46f49
commit 3aac196573

View file

@ -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)
} }