From 6f2257a7968873e87167728df727a2505657c0b4 Mon Sep 17 00:00:00 2001 From: Jono <jono@privategrity.com> Date: Wed, 17 Jul 2019 16:18:56 -0700 Subject: [PATCH] Change NDF public key to be grabbed frrom the yaml file or command line --- cmd/root.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 4ace2c77a..d0004157f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -56,11 +56,7 @@ var ndfPath string var ndfVerifySignature bool var ndfRegistration []string var ndfUDB []string -var ndfPubKey = `-----BEGIN RSA PUBLIC KEY----- -MGgCYQCsQxKjqNmoTNCu5RfMzsS01xv9h/ZYHD27s5uwzbS2pb5ZGQ2KuvyEwMh0 -O9YfmS1hCb7d2ZFqfVPwcY7o4iMuGf1BB7GjyqyeyDD41vZAl04bfyqCqh//ea6z -OG8EimMCAwEAAQ== ------END RSA PUBLIC KEY-----` +var ndfPubKey string // Execute adds all child commands to the root command and sets flags // appropriately. This is called by main.main(). It only needs to @@ -516,6 +512,12 @@ func init() { "ndf.json", "Path to the network definition JSON file") + rootCmd.PersistentFlags().StringVarP(&ndfPubKey, + "ndfPubKey", + "p", + "", + "Path to the public key for the network definition JSON file") + rootCmd.PersistentFlags().BoolVar(&ndfVerifySignature, "ndfVerifySignature", true, -- GitLab