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.
v “gsk_secure_soc_init()—Negotiate a secure session” on page 38—Negotiate a secure session<br />
v “gsk_secure_soc_open()—Get a handle for a secure session” on page 44—Get a handle for a secure<br />
session<br />
v “gsk_strerror()—Retrieve GSKit runtime error message” on page 62—Retrieve GSK runtime error<br />
message<br />
API introduced: V5R1<br />
Top | UNIX-Type <strong>APIs</strong> | <strong>APIs</strong> by category<br />
gsk_environment_init()—Initialize an SSL environment<br />
Syntax<br />
#include <br />
int gsk_environment_init(gsk_handle my_env_handle);<br />
Service Program Name: QSYS/QSOSSLSR<br />
Default Public Authority: *USE<br />
Threadsafe: Yes<br />
The gsk_environment_init() function is used to initialize the SSL environment after any required<br />
attributes are set. The certificate store file is opened and other operations such as accessing information in<br />
the registration facility are performed to set up this environment. After this function call is issued, SSL is<br />
ready to process secure session requests.<br />
Parameters<br />
my_env_handle (Input)<br />
The handle identifying the SSL environment that will be initialized.<br />
Authorities<br />
Authorization of *R (allow access to the object) to the certificate store file and its associated files is<br />
required. Authorization of *X (allow use of the object) to each directory of the path name of the certificate<br />
store file and its associated files is required.<br />
Return Value<br />
gsk_environment_init() returns an integer. Possible values are:<br />
[GSK_OK]<br />
gsk_environment_init() was successful.<br />
[GSK_INVALID_HANDLE]<br />
The handle specified was not valid.<br />
[GSK_INVALID_STATE]<br />
A gsk_environment_init() has already been issued with this handle.<br />
[GSK_KEYRING_OPEN_ERROR]<br />
Certificate store file could not be opened.<br />
[GSK_AS400_ERROR_NO_ACCESS]<br />
No permission to access the certificate store file.<br />
32 <strong>System</strong> i: <strong>Programming</strong> <strong>Secure</strong> <strong>Sockets</strong> <strong>APIs</strong>