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.

secure session does not start, and an error code is returned from gsk_secure_soc_init().<br />

Applications can detect the situation where the secure session started but validation failed<br />

by checking the GSK_CERTIFICATE_VALIDATION_CODE enumId via<br />

gsk_attribute_get_numeric value(). The numValue will indicate the certificate validation<br />

return code for server’s certificate. In this situation, the application is responsible for the<br />

authentication of the server.<br />

It is highly recommended that this option only be used if an alternate authentication method<br />

is used.<br />

v GSK_ENVIRONMENT_CLOSE_OPTIONS (411) - Type of special close options to use for this<br />

environment. If gsk_environment_close() is issued prior to all secure sessions being closed, the<br />

active secure sessions will continue to work and the environment close will effectively be<br />

delayed. The resources for the SSL environment will not be freed up until after the last secure<br />

session closes. No new secure sessions will be allowed to start using the closed SSL<br />

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

– GSK_DELAYED_ENVIRONMENT_CLOSE (536) - Enable the environment close callback<br />

routine support.<br />

– GSK_NORMAL_ENVIRONMENT_CLOSE (537) - Field is ignored.<br />

enumValue (Output)<br />

Specifies a pointer to an integer in which to place the value of the requested information.<br />

Authorities<br />

No authorization is required.<br />

Return Value<br />

gsk_attribute_get_enum() returns an integer. Possible values are:<br />

[GSK_OK]<br />

gsk_attribute_get_enum() was successful.<br />

[GSK_ATTRIBUTE_INVALID_ID]<br />

The specified enumID was not valid.<br />

[GSK_INVALID_HANDLE]<br />

The specified handle was not valid.<br />

[GSK_AS400_ERROR_INVALID_POINTER]<br />

The enumValue pointer is not valid.<br />

[GSK_ERROR_UNSUPPORTED]<br />

The enumID is currently not supported.<br />

[GSK_ERROR_IO]<br />

An error occurred in SSL processing, check the errno value.<br />

Error Conditions<br />

When the gsk_attribute_get_enum() API fails with return code [GSK_ERROR_IO], errno can be set to:<br />

[EINTR]<br />

Interrupted function call.<br />

[EDEADLK]<br />

Resource deadlock avoided.<br />

[ETERM]<br />

Operation terminated.<br />

12 <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!