From b78cdd8e8cf04a6b267d245d40ccd03fcf20f5fc Mon Sep 17 00:00:00 2001
From: Jono <jono@privategrity.com>
Date: Fri, 19 Jul 2019 16:11:46 -0700
Subject: [PATCH] Fix NDF flag

---
 README.md   |  2 +-
 cmd/root.go | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index c89b714f0..7759d94a2 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ Optional args:
 |--nick| |Nickname to register for User Discovery (default "Default")||
 |--ndfPubKey|-p|Path to the public key for the network definition JSON file|
 |--ndf|-n|Path to the network definition JSON file|
-|--ndfVerifySignature| |Specifies if the NDF should be loaded without the signature. defaults to true|
+|--skipNDFVerification| |Specifies if the NDF should be loaded without the signature (default false)|
 |--ndfRegistration| |Overwrite the Registration values for the NDF|
 |--ndfUDB| |Overwrite the UDB values for the NDF|
 
diff --git a/cmd/root.go b/cmd/root.go
index 0e009b221..dd978211c 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -53,7 +53,7 @@ var end2end bool
 var keyParams []string
 var client *api.Client
 var ndfPath string
-var ndfVerifySignature bool
+var skipNDFVerification bool
 var ndfRegistration []string
 var ndfUDB []string
 var ndfPubKey string
@@ -79,7 +79,7 @@ func sessionInitialization() *id.User {
 	}
 
 	// Check if the NDF verify flag is set
-	if !ndfVerifySignature {
+	if skipNDFVerification {
 		ndfPubKey = ""
 		globals.Log.WARN.Println("Skipping NDF verification")
 	} else if ndfPubKey == "" {
@@ -534,9 +534,9 @@ func init() {
 		"ndf.json",
 		"Path to the network definition JSON file")
 
-	rootCmd.PersistentFlags().BoolVar(&ndfVerifySignature,
-		"ndfVerifySignature",
-		true,
+	rootCmd.PersistentFlags().BoolVar(&skipNDFVerification,
+		"skipNDFVerification",
+		false,
 		"Specifies if the NDF should be loaded without the signature")
 
 	rootCmd.PersistentFlags().StringSliceVar(&ndfRegistration,
-- 
GitLab