gsk_attribute_set_callback()--Set callback pointers to routines in the user application


  Syntax

 #include <gskssl.h>

 int gsk_attribute_set_callback(gsk_handle my_gsk_handle,
                                GSK_CALLBACK_ID callBackID,
                                void *callBackAreaPtr);
  Service Program Name: QSYS/QSOSSLSR

  Default Public Authority: *USE

  Threadsafe: Yes

The gsk_attribute_set_callback() function is used to set callback pointers to routines in the user application. These routines may be used for special purposes by the application.


Parameters

my_gsk_handle  (Input) 
Indicates one of the following handles:
callBackID  (Input) 
Indicates one of the following operations:


callBackAreaPtr  (Input) 
Address of a callback routine or address of a structure containing pointers to callback routines appropriate to the callBackID. The following indicate what should be pointed to by the callBackAreaPtr based on the value of the callBackID.

Authorities

No authorization is required.


Return Value

gsk_attribute_set_callback() returns an integer. Possible values are:

[GSK_OK]
gsk_attribute_set_callback() was successful.

[GSK_ATTRIBUTE_INVALID_ID]
The callBackID specified was not valid.

[GSK_ATTRIBUTE_INVALID_ENUMERATION]
An enumeration referenced by the callBackAreaPtr was not valid.

[GSK_CONFLICTING_VALIDATION_SETTING]
The value for the validationCallBack.validateRequired field for GSK_CERT_VALIDATION_CALLBACK conflicts with the setting for either GSK_SERVER_AUTH_TYPE or GSK_CLIENT_AUTH_TYPE set by gsk_attribute_set_enum().

[GSK_INVALID_STATE]
The callBackID cannot be set after a gsk_environment_init() has been issued.

[GSK_INVALID_HANDLE]
The handle specified was not valid.

[GSK_ERROR_UNSUPPORTED]
The callBackID is currently not supported.

[GSK_ERROR_IO]
An error occurred in SSL processing, check the errno value.

Error Conditions

When the gsk_attribute_set_callback() API fails with return code [GSK_ERROR_IO], errno can be set to:

[EINTR]
Interrupted function call.

[EDEADLK]
Resource deadlock avoided.

[ETERM]
Operation terminated.

If an errno is returned that is not in this list, look in Errno Values for UNIX®-Type Functions for a description of the errno.


Usage Notes

  1. The following GSK_CALLBACK_ID values may be set in the SSL environment after gsk_environment_open() and before gsk_environment_init(). They are used as defaults for subsequent secure sessions:


  2. The following GSK_CALLBACK_ID values currently are not supported in the IBM® i implementation:



Related Information



API introduced: V5R3

[ Back to top | UNIX-Type APIs | APIs by category ]