Syntax
#include <gskssl.h> int gsk_environment_init(gsk_handle my_env_handle);Service Program Name: QSYS/QSOSSLSR
The gsk_environment_init() function is used to initialize the SSL environment after any required attributes are set. The certificate store file is opened and other operations such as accessing information in the registration facility are performed to set up this environment. After this function call is issued, SSL is ready to process secure session requests.
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_environment_init() returns an integer. Possible values are:
gsk_environment_init() was successful.
The handle specified was not valid.
A gsk_environment_init() has already been issued with this handle.
Certificate store file could not be opened.
No permission to access the certificate store file.
An SSLV3 or TLSV1 cipher suite was specified that is not valid.
An SSLV2 cipher suite was specified that is not valid.
The certificate is bad.
There is no private key associated with the certificate.
The validity time period of the certificate store file password has expired.
The specified certificate store's certificate label is not valid or does not exist.
The specified certificate store password is not valid.
No certificate store password was specified.
The application identifier has not been registered.
my_env_handle pointer is not valid.
The certificate was created with a key length that cannot be exported.
Not able to allocate storage for the requested operation.
An unexpected error occurred during SSL processing.
Operation is not supported by SSL.
None of the specified protocol or cipher values are supported by System SSL.
An error occurred in SSL processing, check errno value.
When the gsk_environment_init() API fails with return code [GSK_ERROR_IO], errno can be set to:
If an errno is returned that is not in this list, look in 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. |
When GSK_OS400_APPLICATION_ID is used several of the
attribute settings may have changed after this call completes. The Application
ID definition configured using Digital Certificate Manager (DCM) can be used to
override the settings without requiring the code to be changed.
gsk_attribute_get_enum() and gsk_attribute_get_buffer() can be used
to determine if a specific
attribute setting changed.
| Top | UNIX-Type APIs | APIs by category |