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.

struct SSLInitAppStr { /* SSLInitAppStr */<br />

char* applicationID; /* application id value */<br />

unsigned int applicationIDLen; /* length of application id */<br />

char* localCertificate; /* local certificate */<br />

unsigned int localCertificateLen; /* ength of local certificate */<br />

unsigned short int* cipherSuiteList; /* List of cipher suites */<br />

unsigned int cipherSuiteListLen; /* number of entries in<br />

the cipher suites list */<br />

unsigned int sessionType; /* the type of application as<br />

registered */<br />

unsigned int reserved1; /* reserved - must be 0 */<br />

unsigned int protocol; /* SSL protocol version */<br />

unsigned int timeout; /* cache timeout (seconds) */<br />

char reserved[12]; /* reserved - must be NULL (0s)*/<br />

};<br />

The fields within the SSLInitApp structure as pointed to by init_app are defined as follows:<br />

char *applicationID (input)<br />

A pointer to a null terminated character string identifying the application identifier value that<br />

was used to register the application using the Register Application for Certificate Use, (OPM,<br />

QSYRGAP; ILE, QsyRegisterAppForCertUse) API. See the Register Application for Certificate Use<br />

API for information about the format and values allowed for the application identifier.<br />

char *applicationIDLen (input)<br />

The number of characters in the application identifier string as specified by the applicationID<br />

parameter.<br />

char *localCertificate (input)<br />

On input, the localCertificate pointer must be set to point to storage that has been allocated by<br />

the calling application that will be used on output to contain the application’s registered local<br />

certificate. If a certificate is not to be returned then set this pointer’s value to NULL and the<br />

localCertificateLen value to zero (0). The storage should be large enough to accomodate the size<br />

of the certificate. Most certificates are less than 2K in length. On output, the localCertificate<br />

pointer will not be changed, though the storage it points to will contain the registered<br />

application’s certificate. The certificate will be the one registered for that application by the<br />

Register Application for Certificate Use (OPM, QSYRGAP; ILE, QsyRegisterAppForCertUse) API.<br />

See the Register Application for Certificate Use API for information about the format and values<br />

allowed for the application identifier.<br />

unsigned int localCertificateLen (input)<br />

On input, this value must equal the number of characters available in the storage pointed to by<br />

the localCertificate pointer. Set this value to 0 if you do not want a certificate returned by this<br />

API. On output, this value is equal to the length of the certificate. If the certificate will not fit into<br />

the storage provided, then this value will be set to the length required to contain the certificate.<br />

unsigned short int* cipherSuiteList (input)<br />

A pointer to the cipher specification list to be used during the SSL handshake protocol for this<br />

job. This list is a string of concatenated cipher specification values. A cipher specification value is<br />

an unsigned short integer. Any value provided will override any values provided by a previous<br />

SSL_Init_Application() API or SSL_Init() API or the system default cipher specification list if the<br />

previous SSL_Init_Application() API or SSL_Init() API did not provide a cipher specification list. A<br />

value of NULL for this parameter indicates one of the following:<br />

v Use the cipher specification list provided by a previous SSL_Init_Application() API or SSL_Init()<br />

API<br />

<strong>Secure</strong> <strong>Sockets</strong> <strong>APIs</strong> 85

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!