mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libekmfweb: Add function to validate a certificate against the identity key
Function ekmf_validate_cert() checks if the public key contained in a x509 certificate matches the public key of the identity key. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Finn Callies <fcallies@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
8be51ad454
commit
deb61b5cd9
@@ -379,6 +379,25 @@ int ekmf_generate_ss_cert(const struct ekmf_config *config,
|
||||
const char *cert_pem_filename,
|
||||
const struct ekmf_ext_lib *ext_lib, bool verbose);
|
||||
|
||||
/**
|
||||
* Validates that a certificate has the same public key as the secure identity
|
||||
* key (field identity_secure_key in config structure) .
|
||||
*
|
||||
* @param config the configuration structure. Only field
|
||||
* identity_secure_key must be specified, all others
|
||||
* are optional.
|
||||
* @param x509_cert the X509 certificate object to validate
|
||||
* @param ext_lib External secure key crypto library to use
|
||||
* @param verbose if true, verbose messages are printed
|
||||
*
|
||||
* @returns a negative errno in case of an error, 0 if success.
|
||||
* -EINVAL: invalid parameter, or certificate is not valid
|
||||
* -ENOMEM: Failed to allocate memory
|
||||
* any other errno from file I/O routines
|
||||
*/
|
||||
int ekmf_validate_cert(const struct ekmf_config *config, const X509 *x509_cert,
|
||||
const struct ekmf_ext_lib *ext_lib, bool verbose);
|
||||
|
||||
/**
|
||||
* Retrieves settings from the EKMFWeb server, such as the template names for
|
||||
* generating keys in EKMFWeb.
|
||||
|
||||
Reference in New Issue
Block a user