cwbCO_UseSecureSockets

Purpose

Specify that all communication to the iSeries™ system that uses the specified system object either must use secure sockets or must not use secure sockets.

Syntax

 
UINT CWB_ENTRY cwbCO_UseSecureSockets(
                             cwbCO_SysHandle    system,
                             cwb_Boolean        useSecureSockets );

Parameters

cwbCO_SysHandle system - input
Handle that previously was returned from cwbCO_CreateSystem or cwbCO_CreateSystemLike. It identifies the iServer system.
cwb_Boolean useSecureSockets - input
Specifies whether to require secure sockets use when communicating with the iSeries system that the specified system object handle represents. Use the appropriate value:
CWB_TRUE
Require secure sockets use for communication
CWB_FALSE
Do not use secure sockets for communication
CWB_USER_TIMEOUT
The connect timeout value associated with the system object expired before the connection verification attempt completed, so we stopped waiting.

Return Codes

The following list shows common return values:

CWB_OK
Successful completion.
CWB_INVALID_API_HANDLE
Invalid system handle.
CWB_SECURE_SOCKETS_NOTAVAIL
Secure sockets is not available. It may not be installed on the PC, prohibited for this user, or not available on the iServer system.
CWB_RESTRICTED_BY_POLICY
A policy exists that prohibits the user from changing this value.
CWB_INV_AFTER_SIGNON
Signon has successfully occurred by using the specified system object, so this setting no longer may be changed.

Usage

Even if a connection to the specified service already exists for the given system object, a new connection is attempted. The attributes of the given system object, such as whether to use secure sockets, are used for this connection attempt. It is therefore possible that connection verification may fail given the passed system object, but might succeed to the same system given a system object whose attributes are set differently. The most obvious example of this is where secure sockets use is concerned, since the non-secure-sockets version of the service may be running on the iSeries system, while the secure-sockets version of the service might not be running, or vice-versa.

iSeries Access for Windows® may or may not be able to detect at the time this API is called if Secure Sockets will be available for use at connect time for this iSeries system. Even if CWB_SECURE_SOCKETS_NOTAVAIL is NOT returned, it may be determined at a later time that secure sockets is not available.

Start of changeAlthough with limitations, iSeries Access for Windows enforces Federal Information Processing Standards (FIPS) compliance when SSL is used, this API does not return an indication of whether FIPS compliance is on or off. The only way to verify that FIPS-compliance is on or off is to visually inspect the FIPS compliance checkbox in iSeries Access for Windows Properties. For more information about FIPS and its use, see the User's Guide installed with iSeries Access for Windows. End of change