gsk_environment_open()--Get a handle for an SSL environment


  Syntax

 #include <gskssl.h>

 int gsk_environment_open(gsk_handle *my_env_handle);

  Service Program Name: QSYS/QSOSSLSR

  Default Public Authority: *USE

  Threadsafe: Yes

The gsk_environment_open() function is used to get storage for the SSL environment. This function call must be issued before any other gsk function calls are issued. This call returns an SSL environment handle that must be saved and used on subsequent gsk calls.


Parameters

my_env_handle (Output) 
A pointer to the SSL environment handle to be used for subsequent gsk function calls.

Authorities

No authorization is required.


Return Value

gsk_environment_open() returns an integer. Possible values are:

[GSK_OK]

gsk_environment_open() was successful.

[GSK_API_NOT_AVAILABLE]

Digital Certificate Manager (DCM), 57xx-SS1 - IBM i Option 34 is not installed.

[GSK_INSUFFICIENT_STORAGE]

Not able to allocate storage for the requested operation.

[GSK_INTERNAL_ERROR]

An internal error occured during system processing.

[GSK_OS400_ERROR_INVALID_POINTER]

The my_env_handle pointer is not valid.


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.

Usage Notes

  1. After gsk_environment_open() returns with a GSK_OK return value, attributes for the SSL environment have been set and can be retrieved using any of the get function calls. The following is a list of the defaulted values:
  2. The default cipher suite list in preference order as shipped is as follows:
  3. Start of changeThe default values for GSK_PROTOCOL_TLSV12, GSK_PROTOCOL_TLSV11, GSK_PROTOCOL_TLSV10, GSK_PROTOCOL_TLSV1 and GSK_PROTOCOL_SSLV3 can be altered by changing the QSSLPCL (SSL protocols) system value via the Change System Value (CHGSYSVAL) command. When a protocol is removed from the SSL protocols system value it results in the protocol being set to off rather than on by default as that protocol is now disabled for the entire system. Start of changeA protocol value removed from the eligible default protocol list using System Service Tools (SST) Advanced Analysis Command SSLCONFIG will also be removed as a default here. For additional information see the help text for SSLCONFIG.End of change gsk_attribute_get_enum() for each of those values can be called to determine the current default protocols enabled.
    End of change

  4. The Display System Value (DSPSYSVAL) command or the Retrieve System Values (QWCRSVAL) API can be used to determine the current settings of the supported ciphers and protocols for system SSL.

  5. Change System Value (CHGSYSVAL) allows an administrator to disable protocols or ciphers from being used by the GSKit APIs. For backwards compatibility, GSKit support will silently ignore attempts by applications to use disabled protocols or ciphers unless only disabled values are used.

Related Information



API introduced: V5R1
Top | UNIX-Type APIs | APIs by category