mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Fix display of clear key size for CCA-AESCIPHER keys
Fixes: ddde3f354f ("zkey: Introduce the CCA-AESCIPHER key type")
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
304c3d8086
commit
49cbaba302
@@ -1649,9 +1649,9 @@ int get_key_bit_size(const u8 *key, size_t key_size, size_t *bitsize)
|
||||
*bitsize = cipherkey->pl - 384;
|
||||
else
|
||||
*bitsize = 0; /* Unknown */
|
||||
if (key_size > cipherkey->length) {
|
||||
if (key_size == 2 * AESCIPHER_KEY_SIZE) {
|
||||
cipherkey = (struct aescipherkeytoken *)(key +
|
||||
cipherkey->length);
|
||||
AESCIPHER_KEY_SIZE);
|
||||
if (cipherkey->pfv == 0x00) /* V0 payload */
|
||||
*bitsize += cipherkey->pl - 384;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user