Merge pull request #127 from cloudflare/zi/fix-minimum

Access structure should be invalide when Minimum == 0 with non-nil Names
This commit is contained in:
Kyle Isom
2016-02-19 11:53:09 -08:00

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)