z/OS Cryptographic Services System SSL Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


gsk_srb_initialize()

z/OS Cryptographic Services System SSL Programming
SC14-7495-00

Initializes SRB support.

Format

   #include <gskssl.h>

   gsk_status gsk_srb_initialize ( 
                                   int     num_tasks)

Parameters

num_tasks
Specifies the maximum number of service tasks and must be greater than 0.

Results

The function return value will be 0 (GSK_OK) if no error is detected. Otherwise, it will be one of the return codes listed in the gskssl.h include file. These are some possible errors:
[GSK_ERR_INIT_PARM_NOT_VALID]
The number of tasks parameter is not valid.
[GSK_ERROR_BAD_STATE]
The SSL environment is not initialized.
[GSK_SRB_INIT_ESTAEX]
Unable to establish ESTAE exit.
[GSK_SRB_INIT_NOT_APF]
The application is not APF-authorized.
[GSK_SRB_INIT_THREAD_CREATE]
Unable to create a thread.

Usage

The gsk_srb_initialize() routine will initialize the SRB (Service Request Block) support. The application must be APF-authorized in order to use SRB mode. The gsk_srb_initialize() routine must be called after the gsk_initialize() routine and before any calls to the GSKSRBRD and GSKSRBWT routines.

The SRB support provided by System SSL is a mode converter which allows an SSL read or write operation to be initiated in SRB mode but processed in TASK mode. This is necessary because SRB mode is not supported by many of the functions invoked by System SSL while processing a read or write request.

The gsk_srb_initialize() routine creates a monitor thread and the first service thread. Additional threads are created as needed up to the maximum number of threads specified by the num_tasks parameter. The threads run in FIPS mode if FIPS mode was set by a call to gsk_fips_state_set(). These threads will be destroyed and SRB mode support will be terminated when the gsk_uninitialize() routine is called.

See z/OS MVS Programming: Authorized Assembler Services Guide for more information about service request blocks.

Related Topics

GSKSRBRD

GSKSRBWT

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014