dispatch/server/tls.go
Ken-Håvard Lieng 37c8e780bc Add HTTP/2 push
2017-04-15 04:48:24 +02:00

26 lines
347 B
Go

package server
import (
"os"
"github.com/spf13/viper"
)
func certExists() bool {
cert := viper.GetString("https.cert")
key := viper.GetString("https.key")
if cert == "" || key == "" {
return false
}
if _, err := os.Stat(cert); err != nil {
return false
}
if _, err := os.Stat(key); err != nil {
return false
}
return true
}