gsk_environment_close()--Close an SSL environment


  Syntax

 #include <gskssl.h>

 int gsk_environment_close(gsk_handle *my_env_handle);  
 
  Service Program Name: QSYS/QSOSSLSR

  Default Public Authority: *USE

  Threadsafe: Yes

The gsk_environment_close() function is used to close the SSL environment and release all storage associated with the environment.


Parameters

my_env_handle (Input) 
A pointer to the handle for the SSL environment to be closed.

Authorities

No authorization is required.


Return Value

gsk_environment_close() returns an integer. Possible values are:

[GSK_OK]

gsk_environment_close() was successful.

[GSK_CLOSE_FAILED]

An error occurred during close processing.

[GSK_INVALID_HANDLE]

The handle specified was not valid.

[GSK_AS400_ERROR_INVALID_POINTER]

my_env_handle pointer is not valid.

[GSK_ERROR_IO]

An error occurred in SSL processing, check the errno value.


Error Conditions

When the gsk_environment_close() API fails with return code [GSK_ERROR_IO], errno can be set to:

[EINTR]
Interrupted function call.

[EDEADLK]
Resource deadlock avoided.

[ETERM]
Operation terminated.

If an errno is returned that is not in this list, look in Errno Values for UNIX®-Type Functions for a description of the errno.


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. You should close all secure sessions using the SSL environment prior to doing the gsk_environment_close().

  2. If gsk_environment_close() is issued prior to all secure sessions being closed, the active secure sessions will continue to work. The resources for the SSL environment will not be freed up until after the last secure session closes. No new secure sessions will be allowed to start using the closed SSL environment.

Related Information



API introduced: V5R1

[ Back to top | UNIX-Type APIs | APIs by category ]