mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Some operations require the CCA host library to be used, such as re-enciphering a secure key. The CCA host library uses a different approach to select the APQN it operates with. To ensure that the desired APQN is used for an operation, a utility function is added to select a specific APQN for usage with the CCA host library. The CCA host library allows to set environment variables to override the default CCA APQN selection. The environment variables are inspected during CCA host library initialization only. To select a specific domain for CCA, the CSU_DEFAULT_DOMAIN environment variable is set, and then the CCA host library is un-loaded and re-loaded again. Furthermore, the 'Cryptographic Resource Allocate' verb of the CCA host library is used together with the 'Cryptographic Facility Query function' verb to iterate over the crypto cards known by the CCA host library, and to identify the desired crypto card based on its serial number. That way, a specific APQN can be selected for use with subsequent CCA verbs. 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>