diff options
author | Mae Kasza <git@badat.dev> | 2024-08-15 22:50:16 -0400 |
---|---|---|
committer | Jérôme Poulin <jeromepoulin@gmail.com> | 2024-09-07 21:46:32 -0400 |
commit | 45468a9a6f866a81f51782e3f91e24732576f5c9 (patch) | |
tree | f3a5b8a814ce9f672569f8cbb9076d9f9670af81 /c_src/crypto.h | |
parent | cd35891eb95ee8b1d7512eda06d1218eacae3842 (diff) |
Fix set-passphrase on --no_passphrase FS
This also fixes a bug where the set-passphrase
command failed to derive the key for disks initially
formatted with --encrypted and --no_passphrase, due to
bch_sb_crypt_init not configuring the KDF params if
the passphrase wasn't specified during formatting.
Signed-off-by: Mae Kasza <git@badat.dev>
Tested-by: Jérôme Poulin <jeromepoulin@gmail.com>
Diffstat (limited to 'c_src/crypto.h')
-rw-r--r-- | c_src/crypto.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/c_src/crypto.h b/c_src/crypto.h index baea6d86..cd3baac8 100644 --- a/c_src/crypto.h +++ b/c_src/crypto.h @@ -19,4 +19,7 @@ void bch2_add_key(struct bch_sb *, const char *, const char *, const char *); void bch_sb_crypt_init(struct bch_sb *sb, struct bch_sb_field_crypt *, const char *); +void bch_crypt_update_passphrase(struct bch_sb *sb, struct bch_sb_field_crypt *crypt, + struct bch_key *key, const char *new_passphrase); + #endif /* _CRYPTO_H */ |