22.10.2013 Views

System i: Programming Secure Sockets APIs - IBM

System i: Programming Secure Sockets APIs - IBM

System i: Programming Secure Sockets APIs - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gsk_attribute_set_enum()—Set enumerated information for a secure<br />

session or an SSL environment<br />

Syntax<br />

#include <br />

int gsk_attribute_set_enum(gsk_handle my_gsk_handle,<br />

GSK_ENUM_ID enumID,<br />

GSK_ENUM_VALUE enumValue);<br />

Service Program Name: QSYS/QSOSSLSR<br />

Default Public Authority: *USE<br />

Threadsafe: Yes<br />

The gsk_attribute_set_enum() function is used to set a specified enumerated type attribute to an<br />

enumerated value in the secure session or SSL environment.<br />

Parameters<br />

my_gsk_handle (Input)<br />

Indicates one of the following handles:<br />

v The handle for the secure session. (my_session_handle)<br />

v The handle for the SSL environment. (my_env_handle)<br />

enumID (Input)<br />

Indicates one of the following operations:<br />

v GSK_PROTOCOL_SSLV2 (403) - Enables or disables the SSL Version 2 protocol. enumValue<br />

must specify one of the following:<br />

– GSK_PROTOCOL_SSLV2_ON (510) - Enable SSL Version 2 ciphers.<br />

– GSK_PROTOCOL_SSLV2_OFF (511) - Disable SSL Version 2 ciphers.<br />

v GSK_PROTOCOL_SSLV3 (404) - Enables or disables the SSL Version 3 protocol. enumValue<br />

must specify one of the following:<br />

– GSK_PROTOCOL_SSLV3_ON (512) - Enable SSL Version 3 ciphers.<br />

– GSK_PROTOCOL_SSLV3_OFF (513) - Disable SSL Version 3 ciphers.<br />

v GSK_PROTOCOL_TLSV1 (407) - Enables or disables the TLS Version 1 protocol. enumValue<br />

must specify one of the following:<br />

– GSK_PROTOCOL_TLSV1_ON (518) - Enable TLS Version 1 ciphers.<br />

– GSK_PROTOCOL_TLSV1_OFF (519) - Disable TLS Version 1 ciphers.<br />

v GSK_SESSION_TYPE (402) - Type of handshake to be used for this secure session or SSL<br />

environment. enumValue must specify one of the following operations:<br />

– GSK_CLIENT_SESSION (507) - <strong>Secure</strong> sessions act as clients.<br />

– GSK_SERVER_SESSION (508) - <strong>Secure</strong> sessions act as a server with no client<br />

authentication. The client is not asked for a certificate.<br />

– GSK_SERVER_SESSION_WITH_CL_AUTH (509) - <strong>Secure</strong> sessions act as a server that<br />

requests the client to send a certificate. The value for GSK_CLIENT_AUTH_TYPE will<br />

determine what happens if the client certificate is not valid or not provided.<br />

v GSK_CLIENT_AUTH_TYPE (401) - Type of client authentication to use for this session.<br />

enumValue must specify one of the following:<br />

– GSK_CLIENT_AUTH_FULL (503) - All received certificates are validated. If an invalid<br />

certificate is received, the secure session does not start, and an error code is returned from<br />

gsk_secure_soc_init().<br />

24 <strong>System</strong> i: <strong>Programming</strong> <strong>Secure</strong> <strong>Sockets</strong> <strong>APIs</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!