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.
unsigned protocol; /* SSL protocol version */<br />
unsigned timeout; /* Timeout value in seconds */<br />
unsigned char cipherKind[3]; /* Current 2.0 cipher suite*/<br />
unsigned short int cipherSuite; /* Current 3.0 cipher suite */<br />
unsigned short int* cipherSuiteList; /* List of cipher suites */<br />
unsigned int cipherSuiteListLen; /* Number of entries in<br />
the cipher suites list */<br />
unsigned char* peerCert; /* Peer certificate */<br />
unsigned peerCertLen; /* Peer certificate length */<br />
int peerCertValidateRc; /* Return code from<br />
validation of certficate */<br />
int (*exitPgm)(struct SSLHandleStr* sslh);<br />
/* Authentication exit<br />
program called when a<br />
certificate is received<br />
during SSL handshake */<br />
};<br />
Note: A full explanation of each of the members of the above structure are defined in the SSL_Handshake()<br />
API description.<br />
The SSLHandle structure returned will be initialized to hexadecimal zeros with the exception of the fd<br />
field, which will be initialized to the socket_descriptor input parameter and the createFlags field, which will<br />
be initialized to the flags input parameter.<br />
Error Conditions<br />
When the SSL_Create() API fails, errno can be set to:<br />
[EALREADY]<br />
[EBADF]<br />
[EFAULT]<br />
[EINVAL]<br />
[EIO]<br />
[ENOBUFS]<br />
[ENOTSOCK]<br />
[EPIPE]<br />
[EUNATCH]<br />
Operation already in progress.<br />
Descriptor not valid.<br />
Bad address.<br />
Parameter not valid.<br />
This error code indicates one of the following:<br />
v The socket_descriptor type is not SOCK_STREAM or address family is not AF_INET or<br />
AF_INET6.<br />
v One of the parameters passed is not valid or is NULL.<br />
Input/output error.<br />
There is not enough buffer space for the requested operation.<br />
The specified descriptor does not reference a socket.<br />
Broken pipe.<br />
70 <strong>System</strong> i: <strong>Programming</strong> <strong>Secure</strong> <strong>Sockets</strong> <strong>APIs</strong>