From 7a806308d37cecff6ca692b9316dae2198bc2cac Mon Sep 17 00:00:00 2001 From: Zi Lin Date: Fri, 19 Feb 2016 10:08:23 -0800 Subject: [PATCH] Access structure should be invalide when Minimum == 0 with non-nil Names --- cryptor/cryptor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptor/cryptor.go b/cryptor/cryptor.go index 86db588..f598069 100644 --- a/cryptor/cryptor.go +++ b/cryptor/cryptor.go @@ -270,7 +270,7 @@ func (encrypted *EncryptedData) wrapKey(records *passvault.Records, clearKey []b return } - if len(access.Names) > 0 { + if len(access.Names) > 0 && access.Minimum > 0 { // Generate a random AES key for each user and RSA/ECIES encrypt it encrypted.KeySetRSA = make(map[string]SingleWrappedKey)