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.

if validation fails because the certificate is expired or does not have a trusted root the<br />

certificate validation callback will still be called.<br />

- GSK_VALIDATION_REQUIRED (901) - User application would like SSL to validate and<br />

authenticate the certificate first before calling the certificate validation callback.<br />

-<br />

NOTE: If Authentication PassThru is set, and the application set the certificate callback to<br />

GSK_VALIDATION_REQUIRED, SSL will reject the call with an error code<br />

GSK_CONFLICTING_VALIDATION_SETTING. If a certificate validation callback has<br />

been set to GSK_VALIDATION_REQUIRED, and application set authentication to<br />

PassThru, SSL will also reject the call with an error code<br />

GSK_CONFLICTING_VALIDATION_SETTING.<br />

– validationCallBack.certificateNeeded - Provides certificate chain flag which informs SSL what<br />

certificate chain should be passed to the certificate validation callback. The following values<br />

can be used:<br />

- GSK_COMPLETED_CERTIFICATE_CHAIN (951) - To pass the callback routine the<br />

complete certificate chain built by SSL during certificate validation and authentication.<br />

- GSK_CERTIFICATE_CHAIN_SENT_VIA_SSL (950) - To pass the callback routine the<br />

complete certificate chain built by SSL during certificate validation and authentication.<br />

- GSK_END_ENTITY_CERTIFICATE (952) - To pass the callback routine the EE certificate<br />

only. Note: This value will be ignored when the user set certificate validation flag to<br />

GSK_NO_VALIDATION. In other words, SSL will set it to<br />

GSK_CERTIFICATE_CHAIN_SENT_VIA_SSL.<br />

Authorities<br />

No authorization is required.<br />

Return Value<br />

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

[GSK_OK]<br />

gsk_attribute_set_callback() was successful.<br />

[GSK_ATTRIBUTE_INVALID_ID]<br />

The callBackID specified was not valid.<br />

[GSK_ATTRIBUTE_INVALID_ENUMERATION]<br />

An enumeration referenced by the callBackAreaPtr was not valid.<br />

[GSK_CONFLICTING_VALIDATION_SETTING]<br />

The value for the validationCallBack.validateRequired field for<br />

GSK_CERT_VALIDATION_CALLBACK conflicts with the setting for either<br />

GSK_SERVER_AUTH_TYPE or GSK_CLIENT_AUTH_TYPE set by gsk_attribute_set_enum().<br />

[GSK_INVALID_STATE]<br />

The callBackID cannot be set after a gsk_environment_init() has been issued.<br />

[GSK_INVALID_HANDLE]<br />

The handle specified was not valid.<br />

[GSK_ERROR_UNSUPPORTED]<br />

The callBackID is currently not supported.<br />

[GSK_ERROR_IO]<br />

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

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