Require TLS

This commit is contained in:
Aditya Kulkarni 2019-10-14 12:52:44 -07:00
parent 0fcf593bb6
commit 769db4945f
1 changed files with 6 additions and 0 deletions

View File

@ -104,6 +104,12 @@ func main() {
os.Exit(1)
}
if opts.tlsCertPath == "" || opts.tlsKeyPath == "" {
println("Please specify a TLS certificate/key to use. You can use a self-signed certificate.")
println("See 'https://github.com/adityapk00/lightwalletd/blob/master/README.md#running-your-own-zeclite-lightwalletd'")
os.Exit(1)
}
if opts.logPath != "" {
// instead write parsable logs for logstash/splunk/etc
output, err := os.OpenFile(opts.logPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)