mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Fix auto-detection of clear key bitsize for XTS keys
When 'zkey generate' is used with options '--clearkey <file>' and '--xts', but without the '--keybits <bitsize>' option, then the auto-detection of the bitsize of the specified clear key fails. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
784ac7d190
commit
99ab2db6ad
@@ -267,7 +267,7 @@ static u8 *read_clear_key(const char *keyfile, size_t keybits, bool xts,
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
keybits = DOUBLE_KEYSIZE_FOR_XTS(size * 8, xts);
|
||||
keybits = HALF_KEYSIZE_FOR_XTS(size * 8, xts);
|
||||
}
|
||||
|
||||
switch (keybits) {
|
||||
|
||||
Reference in New Issue
Block a user