pub fn reencrypt_private_config(
data_dir: &Path,
private_config: &ServerConfigPrivate,
new_password: &str,
) -> Result<()>
Expand description
Re-encrypts the private config with a new password.
Note that we assume that the in-memory secret config equals the on-disk
secret config. If the process is interrupted,
recover_interrupted_password_change
will fix it on startup.
As an additional safetynet this function creates backup copies of all files
being overwritten. These will be deleted by finalize_password_change
after the config has been read successfully for the first time after a
password change.