mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey_kmip: Setup ext-lib once the APQNs have been configured
During plugin initialization, the external libraries such as the EP11 or CCA host libraries are set up, if the configuration is appropriate. A secure identity key may be generated once the APQNs are configured, but before the server connection is configured. Trying to re-encipher the plugin's secure keys to a new HSM master key at that stage fails with 'ERROR: Invalid ext lib type: 0' because the external libraries have not been setup yet. Change the code to setup the libraries once the APQNs have been configured, and not only after the server connection has been configured. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
80e54ac888
commit
f7c048d0eb
@@ -670,13 +670,16 @@ static int _get_kmip_config(struct plugin_handle *ph)
|
||||
char *tmp;
|
||||
int rc;
|
||||
|
||||
if (ph->server == NULL || ph->profile == NULL)
|
||||
if (!ph->apqns_configured)
|
||||
return 0;
|
||||
|
||||
rc = _setup_ext_lib(ph);
|
||||
if (rc != 0)
|
||||
return rc;
|
||||
|
||||
if (ph->server == NULL || ph->profile == NULL)
|
||||
return 0;
|
||||
|
||||
rc = _get_client_key(ph, &ph->kmip_config.tls_client_key);
|
||||
if (rc != 0)
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user