gsk_secure_soc_open()--Get a handle for a secure session
Syntax
#include <gskssl.h> int gsk_secure_soc_open(gsk_handle my_env_handle, gsk_handle *my_session_handle);Service Program Name: QSYS/QSOSSLSR
Default Public Authority: *USE
Threadsafe: Yes
The gsk_secure_soc_open() function is used to get storage for a secure session, set default values for attributes, and return a handle that must be saved and used on secure session-related function calls.
Parameters
- my_env_handle (Input)
- The handle for the SSL environment obtained from
gsk_environment_open().
- my_session_handle (Output)
- Pointer to the secure session handle.
Authorities
No authorization is required.
Return Value
gsk_secure_soc_open() returns an integer. Possible values are:
- [GSK_OK]
-
gsk_secure_soc_open() was successful.
- [GSK_INVALID_HANDLE]
-
The environment handle specified was not valid.
- [GSK_INSUFFICIENT_STORAGE]
-
Not able to allocate storage for the requested operation.
- [GSK_IBMI_ERROR_INVALID_POINTER]
-
The my_env_handle pointer is not valid.
- [GSK_INTERNAL_ERROR]
-
An internal error occured during system processing.
- [GSK_ERROR_IO]
-
An error occurred in SSL processing, check the errno value.
Error Conditions
When the gsk_secure_soc_open() 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, see Errno Values for UNIX®-Type Functions for a description of the errno.
Usage Notes
- After gsk_secure_soc_open() returns with a GSK_OK return value, attributes from the SSL environment will be used as the defaults for the subsequent gsk_secure_soc_init(). The defaults can be changed using the gsk_attribute_set_buffer(), gsk_attribute_set_enum(), or gsk_attribute_set_numeric_value() APIs after calling gsk_secure_soc_open() and before calling gsk_secure_soc_init().
Error Messages
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. |
Related Information
- gsk_attribute_set_buffer()--Set
character string information for a secure session or a SSL environment.
- gsk_attribute_set_enum()--Set
enumerated information for a secure session or a SSL environment.
- gsk_attribute_set_numeric_value()--Set
numeric information for a secure session or a SSL environment
- gsk_environment_open()--Get a handle for
a SSL environment
- gsk_secure_soc_close()--Close a secure
session
- gsk_secure_soc_init()--Negotiate a secure
session
- gsk_secure_soc_misc()--Perform
miscellaneous functions for a secure session
- gsk_strerror()--Retrieve GSK runtime error message
API introduced: V5R1
Top | UNIX-Type APIs | APIs by category |