#include <gskssl.h> #include <qsoasync.h> int gsk_secure_soc_startInit(gsk_handle my_session_handle, int IOCompletionPort, Qso_OverlappedIO_t * communicationsArea)Service Program Name: QSYS/QSOSSLSR
The gsk_secure_soc_startInit() function is used to initiate an asynchronous negotiation of a secure session, using the attributes set for the SSL environment and the secure session. This API starts the SSL handshake to the remote peer and upon successful completion of QsoWaitForIOCompletion() a secure session is established.
descriptorHandle | (Input) - The descriptor handle is application specific and is never used by the system. This field is intended to make it easier for the application to keep track of information regarding a given socket connection. |
buffer | Not used. |
bufferLength | Not used. |
postFlag | Not used. |
postFlagResult | Not used. |
fillBuffer | Not used. |
returnValue | (Output) - When the negotiate operation completes asynchronously, this field contains indication of success or failure. |
errnoValue | (Output) - When the negotiate operation completes asynchronously and returnValue is GSK_ERROR_IO, this field will contain an errno further defining the failure. |
operationCompleted | (Output) - If the operation is posted to the I/O completion port, this field is updated to indicate that the operation was a GSKSECURESOCSTARTINIT. |
secureDataTransferSize | Not used. |
bytesAvailable | Not used. |
operationWaitTime | Not used. |
postedDescriptor | Not used - Must be set to zero. |
reserved1 | (Output) - Must be set to hexadecimal zeroes. |
reserved2 | (Input) - Must be set to hexadecimal zeroes. |
Authorization of *R (allow access to the object) to the certificate store file and its associated files is required. Authorization of *X (allow use of the object) to each directory of the path name of the certificate store file and its associated files is required.
gsk_secure_soc_startInit() returns an integer. Possible values are:
The handle specified was not valid.
A successful gsk_environment_init() was not previously called with this handle.
The socket descriptor type is not SOCK_STREAM or the address family is not AF_INET or AF_INET6.
The socket descriptor is already in use by another secure session.
The my_session_handle pointer is not valid.
An unexpected error occurred during SSL processing.
The Qso_OverLappedIO_t specified was not valid.
The I/O completion port specified was not valid.
The socket descriptor specified within the gsk_handle was not valid.
An error occured in SSL processing; check the errno value.
When gsk_secure_soc_startInit() API fails with return code [GSK_ERROR_IO], errno can be set to:
If an errno is returned that is not in this list, see Errno Values for UNIX-Type Functions for a description of the errno.
Message ID | Error Message Text |
---|---|
CPE3418 E | Possible APAR condition or hardware failure. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
CPFA081 E | Unable to set return value or error code. |
Usage Notes
Top | UNIX-Type APIs | APIs by category |