diff --git a/compy.go b/compy.go index 38943ee..56dc26f 100644 --- a/compy.go +++ b/compy.go @@ -29,6 +29,14 @@ func main() { p := proxy.New() + if (*ca == "") != (*caKey == "") { + log.Fatalln("must specify both CA certificate and key") + } + + if (*cert == "") != (*key == "") { + log.Fatalln("must specify both certificate and key") + } + if *ca != "" { if err := p.EnableMitm(*ca, *caKey); err != nil { fmt.Println("not using mitm:", err)