Expand description
The vault side of a rotation attempt: the pre-flight dry run and the cipher write (including the 409 re-check), plus fetching, checking and re-encrypting the cipher. The stage fixes how a rejection is reported.
Macros§
- stage_
reason 🔒 - Picks the stage’s
'staticreason string for$suffix.
Enums§
- Stage 🔒
- Where a cipher is checked, which fixes the sync state and the reason strings.
Constants§
- PRE_
FLIGHT_ 🔒PLACEHOLDER_ PASSWORD - Stands in for the new password in the pre-flight dry run.
Functions§
- cipher_
halt 🔒 - Maps a cipher error to the stage’s halt, with a fixed, content-free reason. A write-invalid
error only gets its own reason at pre-flight; at pre-write it is
CipherEncryptFailed. - cipher_
write_ 🔒landed - Whether the vault’s cipher already holds
new_password, so a rejected write did land. Any failure to tell counts as not landed; only an abort is an error. - fetch_
checked_ 🔒cipher - Fetches the cipher and checks that it is the claim’s.
- fetch_
cipher 🔒 - Fetches the cipher with retries. Callers handle failure, since the sync state differs.
- rotate_
cipher 🔒 - Re-encrypts
cipherwithnew_password, mapping a failure to the stage’s halt.