Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
gsk_generate_random_bytes() z/OS Cryptographic Services System SSL Programming SC14-7495-00 |
|
Generates a random byte stream.
Format
Parameters
ResultsThe function return value will be
0 if no error is detected. Otherwise, it will be one of the return
codes listed in the gskcms.h include file. These are some
possible errors:
UsageThe gsk_generate_random_bytes() routine will return a random byte stream. The application provides the buffer for the byte stream. The length value determines how many bytes will be generated. System SSL attempts to use the ICSF PKCS #11 pseudo-random callable service (CSFPPRF) to generate a random byte stream. If ICSF is unavailable or returns an error and System SSL is in non-FIPS mode, an internal RNG will be used to generate the random data. If System SSL is in FIPS mode, the API call will fail. The contents of the generated byte stream can be modified by setting the GSK_RNG_ALLOW_ZERO_BYTES environment variable. A GSK_RNG_ALLOW_ZERO_BYTES setting of “TRUE”, “ON” or “1” will retain bytes with a zero value in the random byte stream. A setting of “FALSE”, “OFF” or “0” will remove bytes with a zero value from the random byte stream. The default setting is "TRUE". Note: The GSK_RNG_ALLOW_ZERO_BYTES
environment variable is processed during System SSL initialization
and is not checked afterward.
|
Copyright IBM Corporation 1990, 2014
|