libseckey: Fix wrong RSA public exponent value 257 assignment

Array element key_value_structure.public_exponent[0] is written twice,
but key_value_structure.public_exponent[1] is not set, leading to a
wrong public exponent value (i.e. 0x01) in the key value structure.

CCA key generation will fail is this case.

Assisted-by: IBM Bob:2.0.0
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Finn Callies <fcallies@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Ingo Franzki
2026-06-30 14:51:55 +02:00
committed by Jan Höppner
parent 5c8bd68f6f
commit 71503c0e7d

View File

@@ -463,7 +463,7 @@ int SK_CCA_generate_rsa_key_pair(const struct sk_ext_cca_lib *cca_lib,
case 257:
key_value_structure.public_exp_length = 2;
key_value_structure.public_exponent[0] = 0x01;
key_value_structure.public_exponent[0] = 0x01;
key_value_structure.public_exponent[1] = 0x01;
break;
case 65537:
key_value_structure.public_exp_length = 3;