summaryrefslogtreecommitdiff
path: root/pkg/web
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-01-29 12:46:23 -0600
committerkali kaneko (leap communications) <kali@leap.se>2020-01-29 12:46:23 -0600
commit6ba23c4e3de16181857d5703198d2e817928f1ba (patch)
tree05e4fab5dcfeaf45e4fbe9db1437ee7fcd86cdcb /pkg/web
parent0c15f2abae7bddbf3311d83aca33aca1aa5761c8 (diff)
fixes after review
Diffstat (limited to 'pkg/web')
-rw-r--r--pkg/web/certs.go2
-rw-r--r--pkg/web/handlers.go6
2 files changed, 7 insertions, 1 deletions
diff --git a/pkg/web/certs.go b/pkg/web/certs.go
index 8c5d423..9cccc65 100644
--- a/pkg/web/certs.go
+++ b/pkg/web/certs.go
@@ -31,7 +31,7 @@ type caInfo struct {
cacrt, cakey string
}
-func NewCaInfo(cacrt string, cakey string) caInfo {
+func newCaInfo(cacrt string, cakey string) caInfo {
return caInfo{cacrt, cakey}
}
diff --git a/pkg/web/handlers.go b/pkg/web/handlers.go
index c4f2e9a..b7675f5 100644
--- a/pkg/web/handlers.go
+++ b/pkg/web/handlers.go
@@ -8,6 +8,12 @@ type CertHandler struct {
Cainfo caInfo
}
+func NewCertHandler(caCrt, caKey string) CertHandler {
+ ci := newCaInfo(caCrt, caKey)
+ ch := CertHandler{ci}
+ return ch
+}
+
func (ch *CertHandler) CertResponder(w http.ResponseWriter, r *http.Request) {
ch.Cainfo.CertWriter(w)
}