commit 9055b2295753d7aaa61a2333e3091b5845d20c8d
parent bfc93c161a971ddc80e3ed3af90691353ecd7392
Author: parazyd <parazyd@dyne.org>
Date: Wed, 10 Jul 2019 02:10:42 +0200
Remove checks for certificate existence.
These explode anyway since they return errors.
Diffstat:
1 file changed, 0 insertions(+), 18 deletions(-)
diff --git a/tlstun.go b/tlstun.go
@@ -29,7 +29,6 @@ import (
"io/ioutil"
"log"
"net"
- "os"
)
var (
@@ -120,23 +119,6 @@ func server() (net.Listener, error) {
func main() {
flag.Parse()
- if len(os.Args) < 2 {
- flag.Usage()
- }
-
- if *client {
- if _, err := os.Stat(*cacert); os.IsNotExist(err) {
- log.Fatal("Cannot find CA certificate.")
- }
- }
-
- if _, err := os.Stat(*cert); os.IsNotExist(err) {
- log.Fatal("Cannot find certificate.")
- }
- if _, err := os.Stat(*key); os.IsNotExist(err) {
- log.Fatal("Cannot find certificate key.")
- }
-
tcpsock, err := server()
if err != nil {
log.Fatal(err)