Implement server certificate store

This commit is contained in:
adnano
2020-10-11 23:48:18 -04:00
parent 3b5cc23d28
commit 065ed828fb
7 changed files with 58 additions and 25 deletions

View File

@@ -52,9 +52,8 @@ func main() {
handler.HandleFunc("/admin", admin)
handler.HandleFunc("/logout", logout)
server := &gmi.Server{
Certificate: cert,
}
server := &gmi.Server{}
server.CertificateStore.Add("localhost", cert)
server.Handle("localhost", handler)
if err := server.ListenAndServe(); err != nil {