mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Enhance APQN cross check to check for firmware version
EP11 secure keys require a certain firmware version. Enhance the APQN cross check to not only check for a minimum card level, but also for a minimum firmware version. 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
a7e47685e0
commit
88e6a18f96
15
zkey/pkey.c
15
zkey/pkey.c
@@ -26,6 +26,7 @@
|
||||
#include "lib/util_panic.h"
|
||||
|
||||
#include "pkey.h"
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef AF_ALG
|
||||
#define AF_ALG 38
|
||||
@@ -1708,6 +1709,20 @@ int get_min_card_level_for_keytype(const char *key_type)
|
||||
return -1;
|
||||
}
|
||||
|
||||
const struct fw_version *get_min_fw_version_for_keytype(const char *key_type)
|
||||
{
|
||||
static const struct fw_version ep11_fw_version = {
|
||||
.major = 0, .minor = 0, .api_ordinal = 4, };
|
||||
|
||||
if (key_type == NULL)
|
||||
return NULL;
|
||||
|
||||
if (strcasecmp(key_type, KEY_TYPE_EP11_AES) == 0)
|
||||
return &ep11_fw_version;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the card type required for a specific key type
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user