mirror of
https://github.com/torvalds/linux.git
synced 2026-04-29 20:12:38 -04:00
s390/zcrypt: extend cca_findcard function and helper
Rework and extension of the cca_findcard function to be prepared for other types of secure key blobs. Split the function and extract an internal function which has no awareness of key blobs any more. Improve this function and the helper code around to be able to check for a minimal crypto card hardware level (Background: the newer AES cipher keys need to match to the master key verification pattern and need to have a crypto card CEX6 or higher). No API change, neither for the in-kernel API nor the ioctl interface. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
committed by
Vasily Gorbik
parent
183cb46954
commit
4da57a2fea
@@ -88,10 +88,11 @@ int cca_query_crypto_facility(u16 cardnr, u16 domain,
|
||||
* Returns < 0 on failure, 0 if CURRENT MKVP matches and
|
||||
* 1 if OLD MKVP matches.
|
||||
*/
|
||||
int cca_findcard(const u8 *seckey, u16 *pcardnr, u16 *pdomain, int verify);
|
||||
int cca_findcard(const u8 *key, u16 *pcardnr, u16 *pdomain, int verify);
|
||||
|
||||
/* struct to hold info for each CCA queue */
|
||||
struct cca_info {
|
||||
int hwtype; /* one of the defined AP_DEVICE_TYPE_* */
|
||||
char new_mk_state; /* '1' empty, '2' partially full, '3' full */
|
||||
char cur_mk_state; /* '1' invalid, '2' valid */
|
||||
char old_mk_state; /* '1' invalid, '2' valid */
|
||||
|
||||
Reference in New Issue
Block a user