z/OS Cryptographic Services ICSF Application Programmer's Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


Retrieving ICSF Error Information

z/OS Cryptographic Services ICSF Application Programmer's Guide
SA22-7522-16

When using the ICSF and Cryptographic Coprocessor Feature, Init, Update, and Final calls can result in BSAFE returning a status of BE_HARDWARE (0x020B). When this occurs, you can derive the ICSF return and reason codes by using a new BSAFE operation, B_GetExtendedErrorInfo. For an explanation of the return codes and reason codes, see Appendix A. ICSF and TSS Return and Reason Codes.

A coding example follows.

     .
     .
 #include "balg.h"
 #include "algobj.h"
 #include "cca.h"
     .
     .
 {
     .
     .
     .
   B_ALGORITHM_OBJECT * aop;
   ITEM * errp;
   unsigned char * algorithmMethod;
   CCA_ERROR_DATA * edp;
   unsigned int CCAreturnCode=0;
   unsigned int CCAreasonCode=0;
   unsigned char algorithmName[40]={0x00};
     .
     .
     .
   if (status==BE_HARDWARE) {
     B_GetExtendedErrorInfo(aop,errp,algorithmMethod);
     edp = errp->data;
     CCAreturnCode = (unsigned int) edp->returnCode;
     CCAreasonCode = (unsigned int) edp->reasonCode;
   }
     .
     .
  }

The prototype for B_GetExtendedErrorInfo is in balg.h, as shown in the example that follows.

 B_GetExtendedErrorInfo (
 B_ALGORITHM_OBJ algorithmObject,  /* in--algorithm object  */
 ITEM * errorData,                 /* out--address and length of error data */
 POINTER algorithmMethod           /* out--address of faulting AM  */
 );                               

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014