gsk_secure_socket_misc()

Performs miscellaneous secure connection functions.

Format

   #include <gskssl.h>

   gsk_status gsk_secure_socket_misc (
                                       gsk_handle      soc_handle,
                                       GSK_MISC_ID     misc_id)

Parameters

soc_handle
Specifies the connection handle returned by the gsk_secure_socket_open() routine.
misc_id
Miscellaneous function identifier.

Results

The function return value will be 0 (GSK_OK) if no error is detected. Otherwise, it will be one of the return codes listed in the gskssl.h include file. These are some possible errors:
[GSK_ERR_CONNECTION_CLOSED]
A close notification alert has been sent for the connection.
[GSK_ERR_IO]
I/O error communicating with peer application.
[GSK_ERR_NO_NEGOTIATION]
An attempt was made to renegotiate a session when renegotiation is disabled.
[GSK_ERR_NOT_SSLV3]
The session is not using the SSL V3, TLS V1.0, or higher protocol.
[GSK_ERR_SOCKET_CLOSED]
Socket connection closed by peer application.
[GSK_INVALID_HANDLE]
The connection handle is not valid.
GSK_INVALID_STATE
The connection is not in the initialized state.
[GSK_MISC_INVALID_ID]
The miscellaneous identifier is not valid.

Usage

The gsk_secure_socket_misc() routine performs miscellaneous function for an initialized secure connection.

These miscellaneous functions are provided:
GSK_RESET_CIPHER
This function generates new session keys for the connection. A full SSL handshake will be performed if the session has expired or has been reset by the GSK_RESET_SESSION function. Otherwise, a short SSL handshake will be performed. The GSK_RESET_CIPHER function can be performed only for a session using the SSL V3, TLS V1.0, or higher protocol. The GSK_RESET_CIPHER function initiates the SSL handshake, but does not wait for it to complete. Any pending handshake messages will be processed when the gsk_secure_socket_read() routine is called to process incoming data.
GSK_RESET_SESSION
This function resets the session associated with the connection. A full SSL handshake will be performed for the next connection using the session. The current connection is not affected unless the GSK_RESET_CIPHER function is performed after the GSK_RESET_SESSION function has completed. If using session ID caching, specifying GSK_RESET_SESSION causes the cache entry to be deleted for this session.
Note: Caution should be taken when specifying GSK_RESET_SESSION and reusing cached sessions.
  • Specifying GSK_RESET_CIPHER causes a new cache entry to be created from the session if one did not already exist.
  • For a client application with multiple connections reusing a cached session entry, the connection using gsk_secure_socket_misc() as well as current reused connections will continue to function properly. However, a new connection requiring the use of the cached entry will fail if cache reuse is required and the cache entry no longer exists. A new connection not requiring the use of the cached entry will result in a full handshake.
  • For a server application with multiple connections reusing a cached session entry, the connection utilizing gsk_secure_socket_misc() as well as current reused connections will continue to function properly. However, a new connection requiring the use of the cached entry will fail if cache reuse is required and the cache entry no longer exists.
  • For a server application, specify GSK_RENEGOTIATION_ABBREVIATED to ensure successful GSK_RESET_CIPHER when GSK_SID_VALUE is specified.

Related topics