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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Authorities<br />

No authorization is required.<br />

Return Value<br />

The SSL_Strerror() API returns a pointer to the string. The null-terminated string is stored in the CCSID of<br />

the job. If the serrmsgp is provided, the SSLErrorMsg struct will be updated to reflect the message<br />

information corresponding to the string returned.<br />

Error Conditions<br />

If the sslreturnvalue is unrecognized, then an Unknown error message will be stored at the location<br />

pointed to by the return value. Other error conditions will be handled as described under Error<br />

Messages.<br />

Error Messages<br />

This API calls the Retrieve Message (QMHRTVM) API in order to perform its task. It inherits all error<br />

conditions from this function. If errors are encountered while using the Retrieve Message API, they will<br />

be reflected in the SSLErrorMsg fields (if provided) and any associated message replacement text will be<br />

stored at the location pointed to by the return value.<br />

Related Information<br />

v “SSL_Perror()—Print SSL Error Message” on page 89—Print SSL Error Message<br />

v “SSL_Create()—Enable SSL Support for the Specified Socket Descriptor” on page 69—Enable SSL<br />

Support for the Specified Socket Descriptor<br />

v “SSL_Destroy()—End SSL Support for the Specified SSL Session” on page 71—End SSL Support for the<br />

Specified SSL Session<br />

v “SSL_Handshake()—Initiate the SSL Handshake Protocol” on page 74—Initiate the SSL Handshake<br />

Protocol<br />

v “SSL_Init()—Initialize the Current Job for SSL” on page 80—Initialize the Current Job for SSL<br />

v “SSL_Init_Application()—Initialize the Current Job for SSL Processing Based on the Application<br />

Identifier” on page 84—Initialize the Current Job for SSL Processing Based on the Application Identifier<br />

v “SSL_Read()—Receive Data from an SSL-Enabled Socket Descriptor” on page 91)—Receive Data from<br />

an SSL-Enabled Socket Descriptor<br />

v “SSL_Write()—Write Data to an SSL-Enabled Socket Descriptor” on page 97—Write Data to an<br />

SSL-Enabled Socket Descriptor<br />

Example<br />

The following example shows how SSL_Strerror() is used.<br />

Note: By using the code examples, you agree to the terms of the “Code license and disclaimer<br />

information” on page 111.<br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

/* bufferLen is 250 bytes */<br />

#define bufferLen 250<br />

void main()<br />

{<br />

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