System i: Programming Secure Sockets APIs - IBM
System i: Programming Secure Sockets APIs - IBM
System i: Programming Secure Sockets APIs - IBM
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
matched sets. If a client application writes 100 bytes of data using one or more of the socket send()<br />
calls, then the server application must read exactly 100 bytes of data using one or more of the socket<br />
recv() calls. This is also true for gsk_secure_soc_read() API.<br />
3. Since SSL is a record-oriented protocol, SSL must receive an entire record before it can be decrypted<br />
and any data returned to the application. Thus, a select() may indicate that data is available to be<br />
read, but a subsequent gsk_secure_soc_read() may hang waiting for the remainder of the SSL record<br />
to be received when using blocking I/O.<br />
4. A FIONREAD ioctl() cannot be used to determine the amount of data available for reading by using<br />
gsk_secure_soc_read().<br />
5. SSL will ignore the out-of-band (OOB) data indicator. OOB will not affect the SSL application. OOB<br />
will just be data to the SSL protocol.<br />
6. For an SSL enabled socket, which must use a connection-oriented transport service (that is, TCP), a<br />
returned value of zero in the amtRead field indicates one of the following:<br />
v The partner program has issued a close() for the socket.<br />
v The partner program has issued a secure close for the secure session. For example, if the partner<br />
program was coded using the GSKit <strong>APIs</strong>, the partner issued gsk_secure_soc_close().<br />
v The partner program has issued a shutdown() to disable writing to the socket.<br />
v The connection is broken and the error was returned on a previously issued socket function.<br />
v A shutdown() to disable reading was previously done on the socket.<br />
7. When the secure session uses a blocking socket and GSK_OS400_READ_TIMEOUT was set,<br />
GSK_OS400_ERROR_TIMED_OUT will be the return value if no data arrives before the timeout<br />
expires.<br />
Error Messages<br />
Message ID Error Message Text<br />
CPE3418 E Possible APAR condition or hardware failure.<br />
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.<br />
CPFA081 E Unable to set return value or error code.<br />
Related Information<br />
v “gsk_secure_soc_close()—Close a secure session” on page 37—Close a secure session<br />
v “gsk_secure_soc_init()—Negotiate a secure session” on page 38—Negotiate a a secure session<br />
v “gsk_secure_soc_misc()—Perform miscellaneous functions for a secure session” on page 41—Perform<br />
miscellaneous functions for a secure session<br />
v “gsk_secure_soc_open()—Get a handle for a secure session” on page 44—Get a handle for a secure<br />
session<br />
v “gsk_secure_soc_write()—Send data on a secure session” on page 60—Send data on a secure session<br />
v “gsk_strerror()—Retrieve GSKit runtime error message” on page 62—Retrieve GSK runtime error<br />
message<br />
API introduced: V5R1<br />
Top | UNIX-Type <strong>APIs</strong> | <strong>APIs</strong> by category<br />
gsk_secure_soc_startInit()—Start asynchronous operation to negotiate<br />
a secure session<br />
Syntax<br />
48 <strong>System</strong> i: <strong>Programming</strong> <strong>Secure</strong> <strong>Sockets</strong> <strong>APIs</strong>