Sets an enumerated value.
#include <gskssl.h>
gsk_status gsk_attribute_set_enum (
gsk_handle ssl_handle,
GSK_ENUM_ID enum_id,
GSK_ENUM_VALUE enum_value)
The gsk_attribute_set_enum() routine sets an enumerated value for an SSL environment or an SSL connection. The environment or connection must be in the open state and not in the initialized state (that is, gsk_environment_init() or gsk_secure_socket_init() has not been called).
The values set using this service are treated as independent values. They are not validated with other values set using gsk_attribute_set_buffer(), gsk_attribute_set_enum(), or gsk_attribute_set_tls_extensions() APIs until used together to perform a SSL/TLS handshake by calling gsk_secure_socket_init().
Specify GSK_AIA_CDP_PRIORITY_ON to indicate that the AIA extension is processed prior to the CDP extension during certificate revocation checking. This means that any OCSP responders specified in the AIA extension or the OCSP responder specified in GSK_OCSP_URL are contacted before attempting to contact the HTTP servers specified in the URI values in the CDP extension. This is the default setting.
Specify GSK_AIA_CDP_PRIORITY_OFF to indicate that the CDP extension is queried prior to the AIA extension. This means that HTTP servers in the URI values in the CDP extension are contacted before attempting to contact the OCSP responders in the AIA extension or the OCSP responder specified in GSK_OCSP_URL.
GSK_AIA_CDP_PRIORITY can be specified only for an SSL environment.
GSK_CERT_VALIDATE_KEYRING_ROOT can be specified only for an SSL environment.
Specify GSK_CERT_VALIDATION_MODE_ANY if certificate validation can use any supported X.509 certificate validation method.
GSK_CERT_VALIDATION_MODE can be specified only for an SSL environment.
Specify GSK_CRL_CACHE_EXTENDED_OFF to indicate that LDAP
basic CRL cache support is enabled. When LDAP basic CRL cache support
is enabled, retrieved LDAP CRLs are only cached if GSK_CRL_CACHE_TIMEOUT
is greater than 0 and GSK_CRL_CACHE_SIZE is set to a non-zero number. LDAP basic CRL cache support is the default.
GSK_CRL_CACHE_EXTENDED can be specified only for an SSL environment.
Specify GSK_CRL_CACHE_TEMP_CRL_ON if a temporary CRL cache entry is be added to the LDAP CRL cache.
Specify GSK_CRL_CACHE_TEMP_CRL_OFF if a temporary CRL cache entry is not to be added to the LDAP CRL cache.
If a temporary CRL is cached, it will prevent continual attempts to contact the LDAP server and will allow connections to be successful.
GSK_CRL_CACHE_TEMP_CRL can be specified only for an SSL environment.
GSK_CRL_SECURITY_LEVEL can be specified only for an SSL environment.
GSK_CLIENT_AUTH_ALERT can be specified only for an SSL environment and is only applicable for server sessions with client authentication active.
When a client's certificate is being requested, the client can be required to provide a certificate by setting GSK_CLIENT_AUTH_ALERT to GSK_CLIENT_NOCERT_ALERT_ON. If no certificate is received, the requested handshake fails. See gsk_attribute_set_enum() for more information about the GSK_CLIENT_AUTH_ALERT setting.
Specify GSK_CLIENT_AUTH_PASSTHRU_TYPE to bypass client certificate validation. The application can retrieve the certificate by calling the gsk_attribute_get_cert_info() routine.
GSK_CLIENT_AUTH_TYPE can be specified only for an SSL environment and is only applicable for server sessions with client authentication active.
GSK_ENABLE_CLIENT_SET_PEERID_ON limits the number of full client handshakes that can be cached over the lifetime of the SSL environment to a maximum number of 4.29 billion. If this maximum number is reached, all new SSL connections that are not using a cached GSK_PEER_ID will result in full handshakes and will not add entries into the session cache. Also, if the maximum number is reached, reusing a cached GSK_PEER_ID is allowed as long as the GSK_PEER_ID can still be located in the cache.
Specify GSK_EXTENDED_RENEGOTIATION_INDICATOR_CLIENT to allow the client initial handshake to proceed only if the server indicates support for RFC 5746 Renegotiation.
Specify GSK_EXTENDED_RENEGOTIATION_INDICATOR_SERVER to allow the server initial handshake to proceed only if the client indicates support for RFC 5746 Renegotiation.
Specify GSK_EXTENDED_RENEGOTIATION_INDICATOR_BOTH to allow the server and client initial handshakes to proceed only if partner indicates support for RFC 5746 Renegotiation.
GSK_EXTENDED_RENEGOTIATION_INDICATOR can be specified only for an SSL environment.
Specify GSK_HTTP_CDP_ENABLE_OFF to indicate that certificate revocation checking with the HTTP URI values in the CDP is not enabled. This is the default.
Specify GSK_HTTP_CDP_ENABLE_ON to indicate that certificate revocation checking with the HTTP URI values in the CDP extension is enabled.
GSK_HTTP_CDP_ENABLE can be specified only for an SSL environment.
Specify GSK_OCSP_ENABLE_ON to activate certificate revocation checking using the HTTP URI values in the certificate's AIA extension.
Specify GSK_OCSP_ENABLE_OFF to disable use of the AIA extension. This is the default.
If GSK_OSCP_URL is specified, GSK_OCSP_ENABLE is set to ON, and GSK_OCSP_URL_PRIORITY is set to ON, then the order the responders are used is GSK_OCSP_URL defined responder first and then the responders identified in the AIA extension. If GSK_OCSP_URL is specified, GSK_OCSP_ENABLE is set to ON and GSK_OCSP_URL_PRIORITY is set to OFF, then the order that responders are used is the responders identified in the AIA extension first and then the GSK_OCSP_URL defined responder.
GSK_OCSP_ENABLE can be specified only for an SSL environment.
Specify GSK_OCSP_NONCE_CHECK_ENABLE_ON to have the nonce in the OCSP response verified to ensure it matches the nonce sent in the OCSP request.
Specify GSK_OCSP_NONCE_CHECK_ENABLE_OFF to disable checking of the nonce in the OCSP response. This is the default.
GSK_OCSP_NONCE_CHECK_ENABLE can be specified only for an SSL environment.
Specify GSK_OCSP_NONCE_GENERATION_ENABLE_ON to enable nonce generation.
Specify GSK_OCSP_NONCE_GENERATION_ENABLE_OFF to disable OCSP nonce generation. This is the default.
GSK_OCSP_NONCE_GENERATION_ENABLE can be specified only for an SSL environment.
Specify GSK_OCSP_RETRIEVE_VIA_GET_ON to indicate that the HTTP GET method should be used when sending an OCSP request whose total request size after Base64 encoding is less than 255 bytes. This option allows HTTP caching on the OCSP responder when the responder has been enabled for caching.
Specify GSK_OCSP_RETRIEVE_VIA_GET_OFF to indicate the HTTP request should always be sent via an HTTP Post method. This is the default.
GSK_OCSP_RETRIEVE_VIA_GET can be specified only for an SSL environment.
Specify GSK_OCSP_URL_PRIORITY_ON to indicate that the GSK_OCSP_URL defined responder will be used first and then the responders identified in the AIA extension. This is the default.
Specify GSK_OCSP_URL_PRIORITY_OFF to indicate that the responder identified in the AIA extension will be used first and then the GSK_OCSP_URL defined responder.
GSK_OCSP_URL_PRIORITY can be specified only for an SSL environment.
GSK_PROTOCOL_SSLV2 can be specified for an SSL environment or an SSL connection.
When operating in FIPS mode, the SSL Version 2 protocol is not used. Enabling this protocol has no effect.
When TLS extensions are defined for the client and any of the TLS protocols are enabled for the connection, the SSL Version 2 protocol is not used. Enabling this protocol has no effect.
GSK_PROTOCOL_SSLV3 can be specified for an SSL environment or an SSL connection.
When operating in FIPS mode, the SSL Version 3 protocol is not used. Enabling this protocol has no effect.
GSK_PROTOCOL_TLSV1 can be specified for an SSL environment or an SSL connection.
GSK_PROTOCOL_TLSV1_1 can be specified for an SSL environment or an SSL connection.
GSK_PROTOCOL_TLSV1_2 can be specified for an SSL environment or an SSL connection.
Specify GSK_RENEGOTIATION_DISABLED to disable SSL V3 and TLS handshake renegotiation as a server and also disable RFC 5746 renegotiation.
Specify GSK_RENEGOTIATION_ALL to allow SSL V3 and TLS handshake renegotiation as a server while also allowing RFC 5746 renegotiation.
Specify GSK_RENEGOTIATION_ABBREVIATED to allow SSL V3 and TLS abbreviated handshake renegotiation as a server for resuming the current session only, while disabling SSL V3 and TLS full handshake renegotiation as a server. With this enumeration value set, the System SSL session ID cache is not checked when resuming the current session. RFC 5746 renegotiation is allowed.
GSK_RENEGOTIATION can be specified only for an SSL environment.
Specify GSK_RENEGOTIATION_PEER_CERT_CHECK_ON to perform a comparison against the peer's certificate to ensure that certificate does not change during renegotiation.
GSK_RENEGOTIATION_PEER_CERT_CHECK can be specified only for an SSL environment.
GSK_REQ_CACHED_SESSION_OFF is the default setting.
GSK_REQ_CACHED_SESSION can be specified only for an SSL environment and is only applicable for client connections.
GSK_REVOCATION_SECURITY_LEVEL can be specified only for an SSL environment.
GSK_SESSION_TYPE can be specified for an SSL environment or an SSL connection.
Because this setting affects the cipher suites that are allowed, this also has an implicit effect on the Elliptic Curves and Certificates that can be used. Suite B Cryptography requires that key establishment and authentication algorithms that are used in TLS sessions be based on Elliptic Curve Cryptography, and that the encryption algorithm be AES.
For more information about the cipher suites, elliptic curves, and certificates that are allowed by Suite B, see Suite B cryptography support.
Specify GSK_TLS_CBC_PROTECTION_METHOD_NONE to indicate that no CBC protection is enabled. This is the default.
Specify GSK_TLS_CBC_PROTECTION_METHOD_ZEROBYTEFRAGMENT to indicate that zero byte record fragmenting is enabled. When specified, a zero byte record fragment is sent before the application data records are sent.
1 byte, 63 bytes, 64 bytes, 64 bytes, 64 bytes
GSK_TLS_CBC_PROTECTION_METHOD can only be specified for an SSL environment.