mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 12:21:08 +01:00
The key store now keeps a generation for each plug-in folder next to the grants key, and grants.json carries its generation inside the MAC. Every signed write puts the file at the next generation and then keeps it; removing the file, or taking an entry out of a file VectorCraft didn't sign, raises the generation first. A file at any other generation grants nothing, so a signed copy put back after a grant was revoked no longer brings the grant back, and a write whose generation the key store couldn't keep leaves the file granting nothing. A key store that holds a key and no generation counts as generation 0.