gsk_strerror()

Return a text string for an SSL error code

Format

   #include <gskssl.h>

   const char * gsk_strerror ( 
                               gsk_status         error_code)

Parameters

error_code
Specifies an error code returned by a Secure Sockets layer (SSL) routine or by a Certificate Management Services (CMS) routine.

Results

The function return value is the address of the text string. The return value is always a valid text string address even when the error code is not recognized (the return value is the string "N/A" in this case).

Usage

The gsk_strerror() routine returns a text string describing an error code returned by an SSL (Secure Sockets layer) or CMS (Certificate Management Services) routine. The gsk_strerror() routine cannot be used to return a text string for an error code returned by one of the deprecated SSL routines. The text string must not be modified or released by the application program.

If gsk_strerror() routine is called with an error code that is not recognized to be a valid value from either the SSL or CMS routines, one of the following messages is displayed to stderr:
  • Message xxx not found in catalog gskmsgs.cat.
  • Message identifier xxx is not defined.
Notes:
  • Error codes from the CMS routines are defined to be in the range '03353001' through '03353FFF' and '014CE001' through '014CEFFF'.
  • SSL error codes are defined internally to be '134CCxxx', where xxx is the hexadecimal representation of the SSL error code. The range is '134CC001' through '134CCFFF'. For example, SSL error code 414 would be '134CC19E'.
If the error code is within the recognized ranges, but not a currently defined error code, 'Message xxx not found in catalog gskmsgs.cat' is display indicating that the error code message in not in the catalog. If the error code is not within the recognized ranges, 'Message identifier xxx is not defined' is displayed.
If the System SSL message catalog cannot be opened or found, the following message is displayed to stderr:
  • Unable to open message catalog gskmsgs.cat.