gsk_get_all_cipher_suites()

Returns the available SSL cipher suites.

Format

   #include <gskssl.h>

   gsk_status gsk_get_all_cipher_suites (
                                           gsk_all_cipher_suites *     cipher_suites)

Parameters

cipher_suites
Returns the runtime version, release, security level, and cipher suites.

Results

The function return value will be 0 (GSK_OK) if no error is detected. Otherwise, it is one of the return codes listed in the gskssl.h include file. This is a possible error:
[GSK_ERR_STRUCTURE_TOO_SMALL]
Size that is specified for supplied structure is too small.

Usage

The gsk_get_all_cipher_suites() routine returns the System SSL runtime version, release, security level, and available cipher suites.

See Table 1 for the version and release identifiers that represent the level of the System SSL runtime. The release value is the release for that version. The current System SSL runtime is Version 4 Release 3.
Table 1. Version and release
Version Release
1 OS/390 Version 1
2 OS/390 Version 2
3 z/OS Version 1
4 z/OS Version 2

The security level equates to the GSK_SECURITY_LEVEL and determines whether strong cryptographic ciphers are supported. When set to GSK_SECURITY_LEVEL_EXPORT (1001), ciphers 56-bits and weaker are supported. When set to GSK_SECURITY_LEVEL_US (1000), all ciphers that are provided by System SSL are supported. See Cipher suite definitions for more information about supported ciphers.

The cipher suites are static null-terminated character strings that must not be modified or freed by the application. The available cipher suites for protocols SSL V3.0, TLS V1.0, and higher are returned in both 2-character and 4-character formats.

The cipher lists include all supported ciphers for the returned security level. As new ciphers are added, the lists are modified to contain the newly added ciphers. The adding of ciphers may cause cipher selection to be modified as new ciphers are added, and different ciphers to be selected if the lists are being used as the cipher list strings.

If executing in FIPS mode, the cipher suites are those that meet FIPS 140-2 criteria. For more information about the FIPS cipher suites, see gsk_environment_open().

The application must initialize the size field in the gsk_all_cipher_suites structure to the size of the gsk_all_ciphers_suites structure before using this function.