Revert cipher requirement in parse cipher.

There is several specification that violate this (chacha20 etc).
Just use the old way...
This commit is contained in:
Milan Broz
2018-01-18 22:33:16 +01:00
parent c6a8b6471a
commit f6e613a76f
7 changed files with 18 additions and 28 deletions

View File

@@ -579,9 +579,9 @@ static int backup_luks_headers(struct reenc_ctx *rc)
params2.sector_size = crypt_get_sector_size(cd);
if (opt_cipher) {
r = crypt_parse_name_and_mode(opt_cipher, cipher, NULL, cipher_mode, 1);
r = crypt_parse_name_and_mode(opt_cipher, cipher, NULL, cipher_mode);
if (r < 0) {
log_err(_("No known cipher specification pattern (cipher-mode-iv) detected.\n"));
log_err(_("No known cipher specification pattern detected.\n"));
goto out;
}
}
@@ -647,9 +647,9 @@ static int backup_fake_header(struct reenc_ctx *rc)
opt_key_size = DEFAULT_LUKS1_KEYBITS;
if (opt_cipher) {
r = crypt_parse_name_and_mode(opt_cipher, cipher, NULL, cipher_mode, 1);
r = crypt_parse_name_and_mode(opt_cipher, cipher, NULL, cipher_mode);
if (r < 0) {
log_err(_("No known cipher specification pattern (cipher-mode-iv) detected.\n"));
log_err(_("No known cipher specification pattern detected.\n"));
goto out;
}
}