gsk_attribute_set_enum()--Set enumerated information for a secure session or an SSL environment


  Syntax
 #include <gskssl.h>

 int gsk_attribute_set_enum(gsk_handle my_gsk_handle,  
                            GSK_ENUM_ID enumID,
                            GSK_ENUM_VALUE enumValue);  

  Service Program Name: QSYS/QSOSSLSR

  Default Public Authority: *USE

  Threadsafe: Yes

The gsk_attribute_set_enum() function is used to set a specified enumerated type attribute to an enumerated value in the secure session or SSL environment.


Parameters

my_gsk_handle  (Input) 
Indicates one of the following handles:
enumID  (Input) 
Indicates one of the following operations:


enumValue  (Input) 
An enumerated type appropiate to the enumID.

Authorities

No authorization is required.


Return Value

gsk_attribute_set_enum() returns an integer. Possible values are:

[GSK_OK]
gsk_attribute_set_enum() was successful.

[GSK_ATTRIBUTE_INVALID_ENUMERATION]
The enumeration specified for the enumValue was not valid.

[GSK_ATTRIBUTE_INVALID_ID]
The enumID specified was not valid.

[GSK_CONFLICTING_VALIDATION_SETTING]
The value for GSK_SERVER_AUTH_TYPE or GSK_CLIENT_AUTH_TYPE conflicts with the setting for the validationCallBack.validateRequired field for GSK_CERT_VALIDATION_CALLBACK set by gsk_attribute_set_callback().

[GSK_INVALID_STATE]
One of the following occurred:
[GSK_INVALID_HANDLE]
The handle specified was not valid.

[GSK_ERROR_UNSUPPORTED]
The enumID is currently not supported.

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

Error Conditions

When the gsk_attribute_set_enum() 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.


Usage Notes

  1. The following GSK_ENUM_ID values may be set in the SSL environment after gsk_environment_open() and before gsk_environment_init(). They are used as defaults for subsequent secure sessions:


  2. The following GSK_ENUM_ID values may be set for each individual secure session after gsk_secure_soc_open() and before gsk_secure_soc_init(). These values will override values set in the SSL environment:


  3. Start of change When GSK_OS400_APPLICATION_ID is set, the settings of some of the SSL environment attributes will be determined by the corresponding value in the Application ID definition in Digital Certificate Manager (DCM). These are the enum attributes that can be overwritten by DCM during the call to gsk_environment_init():
  4. There are two ways to enable OCSP that can be used either separately or together:


    When both attributes are set the GSK_OCSP_ENABLE functionality will only be used if GSK_OCSP_URL functionality results in an undetermined revocation status. The definition of undetermined revocation status is located in the Secure Sockets Layer topic.

    Note: Using OCSP results in a performance impact to System SSL.
    End of change


Related Information



API introduced: V5R1
Top | UNIX-Type APIs | APIs by category