This commit is contained in:
2023-07-06 13:21:25 -04:00
parent 29fe0123d5
commit 915d6abfbb
3 changed files with 8 additions and 6 deletions

2
ezconf

Submodule ezconf updated: 50f3ea10db...59d788f042

View File

@@ -14,10 +14,7 @@ var Config *ezconf.Configuration
var Connection *tls.Conn var Connection *tls.Conn
func main() { func main() {
Config.Load() Config = ezconf.NewConfiguration("./config.ini")
//Config = ezconf.NewConfiguration("./config.ini")
Config.SetValue("Blah.blah.string", "asdfasdf")
//var err error //var err error
//Connection, err = NewSFSConnection(Config.GetAsString("General.server"), Config.GetAsInt("General.port")) //Connection, err = NewSFSConnection(Config.GetAsString("General.server"), Config.GetAsInt("General.port"))

View File

@@ -65,7 +65,12 @@ func getPublicKey() {
} }
defer out.Close() defer out.Close()
resp, err := http.Get(Config.GetAsString("General.http-server") + "/public.cer") serverAddr, err := Config.GetKey("General.http-server")
if err != nil {
fmt.Printf("Error getting key in config: %v", err)
os.Exit(1)
}
resp, err := http.Get(serverAddr.String() + "/public.cer")
if err != nil { if err != nil {
fmt.Printf("Error fetching public key: %v", err) fmt.Printf("Error fetching public key: %v", err)
os.Exit(1) os.Exit(1)