From efccbcd23e319491243b09b24bc0fad788b54d98 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 25 Aug 2015 09:46:33 -0700 Subject: [PATCH] Don't store the given public keys in the seal config --- command/init_test.go | 5 ----- vault/core.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/command/init_test.go b/command/init_test.go index e2afcba1fb..23c891bcd7 100644 --- a/command/init_test.go +++ b/command/init_test.go @@ -206,11 +206,6 @@ func TestInit_PGP(t *testing.T) { expected := &vault.SealConfig{ SecretShares: 3, SecretThreshold: 2, - SecretPGPKeys: []string{ - strings.Replace(pubKey1, "\n", "", -1), - strings.Replace(pubKey2, "\n", "", -1), - strings.Replace(pubKey3, "\n", "", -1), - }, } if !reflect.DeepEqual(expected, sealConf) { t.Fatalf("bad:\nexpected: %#v\ngot: %#v", expected, sealConf) diff --git a/vault/core.go b/vault/core.go index d29bd332a5..46b7bb2ea3 100644 --- a/vault/core.go +++ b/vault/core.go @@ -89,7 +89,7 @@ type SealConfig struct { // if requested, to encrypt the output unseal tokens. If // provided, it sets the value of SecretShares. Ordering // is important. - SecretPGPKeys []string `json:"secret_pgp_keys"` + SecretPGPKeys []string `json:"-"` // SecretThreshold is the number of parts required // to open the vault. This is the T value of Shamir