mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Reject re-enciphering of PVSECRET-AES keys
Keys of type PVSECRET-AES can not be reenciphered using 'zkey reencipher' or 'zkey-cryptsetup reencipher'. Reject that with a proper error message. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Jorg Schmidbauer <jschmidb@de.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
5276d408fd
commit
a8eb2bd4e7
@@ -3567,6 +3567,15 @@ static int _keystore_process_reencipher(struct keystore *keystore,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!is_secure_key(secure_key, secure_key_size)) {
|
||||
warnx("Key '%s' is of type %s and can not be re-enciphered, "
|
||||
"skipping", name, get_key_type(secure_key,
|
||||
secure_key_size));
|
||||
info->num_skipped++;
|
||||
rc = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
apqns = properties_get(properties, PROP_NAME_APQNS);
|
||||
if (apqns != NULL)
|
||||
apqn_list = str_list_split(apqns);
|
||||
|
||||
Reference in New Issue
Block a user