gsk_strerror()--Retrieve GSKit runtime error message


  Syntax
 #include <gskssl.h>

 const char *gsk_strerror(int gsk_return_value);  
 
  Service Program Name: QSYS/QSOSSLSR

  Default Public Authority: *USE

  Threadsafe: Yes

The gsk_strerror() function is used to retrieve an error message and associated text string that describes a return value that was returned from calling a GSKit API.


Parameters

gsk_return_value (Input) 
The return value received from a GSKit API.

Authorities

No authorization is required.


Return Value

gsk_strerror() returns a pointer to the return value text.


Usage Notes

  1. gsk_strerror() returns a pointer to the string. The null-terminated string is stored in the CCSID of the job.

  2. If a gsk_return_value is specified for which there is no corresponding description, an Unknown Error string is returned.

Related Information


Example

See Code disclaimer information for information pertaining to code examples.

The following example shows how gsk_strerror() is used:

#include <stdio.h>
#include <sys/types.h>
#include <gskssl.h>     

void main()
{
  int rc = GSK_OK; 
  gsk_handle env_handle = NULL;

  rc = gsk_environment_open(&env_handle);
  if (rc != GSK_OK)
  {
    printf("gsk_environment_open() failed with rc = %d %s\n",
            rc,gsk_strerror(rc));
    break;
  }                          

  ...

}


API introduced: V5R1
Top | UNIX-Type APIs | APIs by category