mirror of
https://github.com/Darkrock-Studios/hammer-editor.git
synced 2026-08-23 00:13:15 +00:00
After a rotation + convergence, old content key generations linger in the keyring as dead weight, and deleting the wrong one by hand destroys data. prune-key reads the keyring (provider or --in), checks the database for which content generations still protect rows, and drops every non-active generation with zero rows on it; the active generation is never removed. A generation still referenced is kept and reported (skip + report), so the sweep never half-strands data. An explicit --key that is active or still referenced fails instead of silently no-opping. The tokenHmac role needs no database: only the active token key verifies tokens, so every non-active generation is already dead. KeyPruner holds the pure logic; the command resolves in-use key ids from new distinctCiphers queries via AesGcmContentEncryptor.keyIdForTag. A parity test pins all convergence queries to fold the legacy tag identically. |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle.kts | ||