]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/govpn/cmd/govpn-server/conf.go
Initial encryptionless mode support
[govpn.git] / src / govpn / cmd / govpn-server / conf.go
index 76d56cd8ae9f5185e954ff2dbc729b28a40c15f0..67ee695bcf753fa59a069418ce0949d7f5be3a4b 100644 (file)
@@ -1,6 +1,6 @@
 /*
 GoVPN -- simple secure free software virtual private network daemon
-Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -53,6 +53,9 @@ func confRead() map[govpn.PeerId]*govpn.PeerConf {
                if err != nil {
                        log.Fatalln("Unable to decode the key:", err.Error(), pc.VerifierRaw)
                }
+               if pc.EncLess {
+                       pc.Noise = true
+               }
                conf := govpn.PeerConf{
                        Verifier: verifier,
                        Id:       verifier.Id,
@@ -61,6 +64,7 @@ func confRead() map[govpn.PeerId]*govpn.PeerConf {
                        Down:     pc.Down,
                        Noise:    pc.Noise,
                        CPR:      pc.CPR,
+                       EncLess:  pc.EncLess,
                }
                if pc.TimeoutInt <= 0 {
                        pc.TimeoutInt = govpn.TimeoutDefault