mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Check crypto card level during APQN cross checking
Secure keys of type CCA-AESCIPHER require a CEX6C or newer crypto card. Also check for the minimum required card level during cross checking of APQNs. Also display the card level in the APQN report. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Harald Freudenberger <freude@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
560b672bfa
commit
b7bb90c552
+7
-2
@@ -1122,7 +1122,9 @@ static int command_generate(void)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
rc = cross_check_apqns(NULL, 0, true, g.verbose);
|
||||
rc = cross_check_apqns(NULL, 0,
|
||||
get_min_card_level_for_keytype(g.key_type),
|
||||
true, g.verbose);
|
||||
if (rc == -EINVAL)
|
||||
return EXIT_FAILURE;
|
||||
if (rc != 0 && rc != -ENOTSUP) {
|
||||
@@ -1447,7 +1449,10 @@ static int command_validate_file(void)
|
||||
printf(" %.*s\n", VERIFICATION_PATTERN_LEN / 2,
|
||||
&vp[VERIFICATION_PATTERN_LEN / 2]);
|
||||
|
||||
rc = cross_check_apqns(NULL, mkvp, true, g.verbose);
|
||||
rc = cross_check_apqns(NULL, mkvp,
|
||||
get_min_card_level_for_keytype(
|
||||
get_key_type(secure_key, secure_key_size)),
|
||||
true, g.verbose);
|
||||
if (rc == -EINVAL)
|
||||
return EXIT_FAILURE;
|
||||
if (rc != 0 && rc != -ENOTSUP) {
|
||||
|
||||
Reference in New Issue
Block a user