mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Enhance error message about missing CCA library
Make the error message when the CCA library is missing more user friendly. Also display an URL where the CCA package can be downloaded. The CCA library is used for the REENCIPHER commands of zkey and zkey-cryptsetup and must be installed separately as part of the IBM CCA Host Libraries and Tools package. This packages is not provided by the distributors, but must be downloaded from an IBM web page and installed separately. 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
428d41034e
commit
5a10aa73a9
13
zkey/pkey.c
13
zkey/pkey.c
@@ -48,6 +48,7 @@
|
||||
* Definitions for the CCA library
|
||||
*/
|
||||
#define CCA_LIBRARY_NAME "libcsulcca.so"
|
||||
#define CCA_WEB_PAGE "http://www.ibm.com/security/cryptocards"
|
||||
|
||||
#define DEFAULT_KEYBITS 256
|
||||
|
||||
@@ -71,16 +72,20 @@ int load_cca_library(void **lib_csulcca, t_CSNBKTC *dll_CSNBKTC, bool verbose)
|
||||
/* Load the CCA library */
|
||||
*lib_csulcca = dlopen(CCA_LIBRARY_NAME, RTLD_GLOBAL | RTLD_NOW);
|
||||
if (*lib_csulcca == NULL) {
|
||||
warnx("%s\nEnsure that the IBM CCA Host Libraries and "
|
||||
"Tools are installed properly", dlerror());
|
||||
pr_verbose(verbose, "%s", dlerror());
|
||||
warnx("The command requires the IBM CCA Host Libraries and "
|
||||
"Tools.\nFor the supported environments and downloads, "
|
||||
"see:\n%s", CCA_WEB_PAGE);
|
||||
return -ELIBACC;
|
||||
}
|
||||
|
||||
/* Get the Key Token Change function */
|
||||
*dll_CSNBKTC = (t_CSNBKTC)dlsym(*lib_csulcca, "CSNBKTC");
|
||||
if (*dll_CSNBKTC == NULL) {
|
||||
warnx("%s\nEnsure that the IBM CCA Host Libraries and "
|
||||
"Tools are installed properly", dlerror());
|
||||
pr_verbose(verbose, "%s", dlerror());
|
||||
warnx("The command requires the IBM CCA Host Libraries and "
|
||||
"Tools.\nFor the supported environments and downloads, "
|
||||
"see:\n%s", CCA_WEB_PAGE);
|
||||
dlclose(*lib_csulcca);
|
||||
*lib_csulcca = NULL;
|
||||
return -ELIBACC;
|
||||
|
||||
@@ -182,7 +182,8 @@ behave in the same way as with \fBcryptsetup\fP.
|
||||
.PP
|
||||
.B Note:
|
||||
The \fBreencipher\fP command requires the CCA host library (libcsulcca.so)
|
||||
to be installed.
|
||||
to be installed. For the supported environments and downloads, see:
|
||||
\fIhttp://www.ibm.com/security/cryptocards\fP
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
@@ -282,7 +282,8 @@ a staged re-enciphering for the \fBOLD\fP to \fBCURRENT\fP case.
|
||||
.PP
|
||||
.B Note:
|
||||
The \fBreencipher\fP command requires the CCA host library (libcsulcca.so)
|
||||
to be installed.
|
||||
to be installed. For the supported environments and downloads, see:
|
||||
\fIhttp://www.ibm.com/security/cryptocards\fP
|
||||
.
|
||||
.SS "Import existing AES secure keys into the secure key repository"
|
||||
.
|
||||
|
||||
Reference in New Issue
Block a user