Access structure should be invalide when Minimum == 0 with non-nil Names

This commit is contained in:
Zi Lin
2016-02-19 10:08:23 -08:00
parent 080ee17d75
commit 7a806308d3

View File

@@ -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)