aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_ccamisc.h
diff options
context:
space:
mode:
authorHarald Freudenberger <freude@linux.ibm.com>2019-06-18 15:53:12 +0200
committerVasily Gorbik <gor@linux.ibm.com>2019-08-21 12:58:54 +0200
commit4da57a2fea064f662c29e77da043baebb8d6cdc8 (patch)
treedb03651f0faa192a910569d59a0f86d404956522 /drivers/s390/crypto/zcrypt_ccamisc.h
parents390/pkey: pkey cleanup: narrow in-kernel API, fix some variable types (diff)
downloadlinux-dev-4da57a2fea064f662c29e77da043baebb8d6cdc8.tar.xz
linux-dev-4da57a2fea064f662c29e77da043baebb8d6cdc8.zip
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>
Diffstat (limited to '')
-rw-r--r--drivers/s390/crypto/zcrypt_ccamisc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/crypto/zcrypt_ccamisc.h b/drivers/s390/crypto/zcrypt_ccamisc.h
index d92fb731602a..e6f41e5baf18 100644
--- a/drivers/s390/crypto/zcrypt_ccamisc.h
+++ b/drivers/s390/crypto/zcrypt_ccamisc.h
@@ -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 */