System i: Programming Secure Sockets APIs - IBM
System i: Programming Secure Sockets APIs - IBM
System i: Programming Secure Sockets APIs - IBM
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
#include <br />
int gsk_environment_open(gsk_handle *my_env_handle);<br />
Service Program Name: QSYS/QSOSSLSR<br />
Default Public Authority: *USE<br />
Threadsafe: Yes<br />
The gsk_environment_open() function is used to get storage for the SSL environment. This function call<br />
must be issued before any other gsk function calls are issued. This call returns an SSL environment<br />
handle that must be saved and used on subsequent gsk calls.<br />
Parameters<br />
my_env_handle (Output)<br />
A pointer to the SSL environment handle to be used for subsequent gsk function calls.<br />
Authorities<br />
No authorization is required.<br />
Return Value<br />
gsk_environment_open() returns an integer. Possible values are:<br />
[GSK_OK]<br />
gsk_environment_open() was successful.<br />
[GSK_API_NOT_AVAILABLE]<br />
Digital Certificate Manager (DCM), 57xx-SS1 - OS400 Option 34 is not installed.<br />
[GSK_INSUFFICIENT_STORAGE]<br />
Not able to allocate storage for the requested operation.<br />
[GSK_INTERNAL_ERROR]<br />
An internal error occured during system processing.<br />
[GSK_AS400_ERROR_INVALID_POINTER]<br />
The my_env_handle pointer is not valid.<br />
Error Messages<br />
Message ID Error Message Text<br />
CPE3418 E Possible APAR condition or hardware failure.<br />
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.<br />
CPFA081 E Unable to set return value or error code.<br />
Usage Notes<br />
1. After gsk_environment_open() returns with a GSK_OK return value, attributes for the SSL<br />
environment have been set and can be retrieved using any of the get function calls. The following is a<br />
list of the defaulted values:<br />
v GSK_V2_SESSION_TIMEOUT set to 100 seconds.<br />
v GSK_V3_SESSION_TIMEOUT set to 86400 seconds (24 hours).<br />
v GSK_HANDSHAKE_TIMEOUT set to 0 (wait forever).<br />
v GSK_OS400_RECEIVE_TIMEOUT set to 0 (wait forever).<br />
<strong>Secure</strong> <strong>Sockets</strong> <strong>APIs</strong> 35