mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
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:
committed by
Jan Höppner
parent
5c8bd68f6f
commit
71503c0e7d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user