158 lines
10 KiB
HTML
158 lines
10 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="SSL_ APIs" />
|
|
<meta name="abstract" content="The SSL_ APIs allow programmers to create secure socket applications on iSeries." />
|
|
<meta name="description" content="The SSL_ APIs allow programmers to create secure socket applications on iSeries." />
|
|
<meta name="DC.Relation" scheme="URI" content="cssl.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/socket.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/listen.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/bind.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/connec.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/accept.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/close.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/sslcreat.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/ssldest.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/sslhands.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/sslinit.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/sslinita.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/sslread.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/sslwrite.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/sslstrer.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/sslperr.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="x1sslserver.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="x1sslclient.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="cssl2" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>SSL_ APIs</title>
|
|
</head>
|
|
<body id="cssl2"><a name="cssl2"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">SSL_ APIs</h1>
|
|
<div><p>The SSL_ APIs allow programmers to create secure socket applications
|
|
on iSeries™. </p>
|
|
<div class="p">Unlike GSKit APIs, SSL_ APIs only exist in the i5/OS™ operating
|
|
system. The following table describes the SSL_ APIs that are supported in
|
|
the i5/OS implementation.
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><caption>Table 1. SSL_ APIs</caption><thead align="left"><tr><th valign="top" width="50%" id="d0e34">Function</th>
|
|
<th valign="top" width="50%" id="d0e36">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td align="left" valign="top" width="50%" headers="d0e34 "><span class="apiname">SSL_Create()</span></td>
|
|
<td align="left" valign="top" width="50%" headers="d0e36 ">Enable SSL support for the specified socket
|
|
descriptor.</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="50%" headers="d0e34 "><span class="apiname">SSL_Destroy()</span></td>
|
|
<td align="left" valign="top" width="50%" headers="d0e36 ">End SSL support for the specified SSL session
|
|
and socket.</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="50%" headers="d0e34 "><span class="apiname">SSL_Handshake()</span></td>
|
|
<td align="left" valign="top" width="50%" headers="d0e36 ">Initiate the SSL handshake protocol.</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="50%" headers="d0e34 "><span class="apiname">SSL_Init()</span></td>
|
|
<td align="left" valign="top" width="50%" headers="d0e36 ">Initialize the current job for SSL and establish
|
|
the SSL security information for the current job. <div class="note"><span class="notetitle">Note:</span> Either an <span class="apiname">SSL_Init()</span> or <span class="apiname">SSL_Init_Application()</span> API
|
|
must be processed before SSL can be used.</div>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e34 "><span class="apiname">SSL_Init_Application()</span></td>
|
|
<td valign="top" width="50%" headers="d0e36 ">Initialize the current job for SSL and establish
|
|
the SSL security information for the current job. <div class="note"><span class="notetitle">Note:</span> Either an <span class="apiname">SSL_Init()</span> or <span class="apiname">SSL_Init_Application()</span> API
|
|
must be processed before SSL can be used.</div>
|
|
</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="50%" headers="d0e34 "><span class="apiname">SSL_Read()</span></td>
|
|
<td align="left" valign="top" width="50%" headers="d0e36 ">Receive data from an SSL-enabled socket descriptor.</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="50%" headers="d0e34 "><span class="apiname">SSL_Write()</span></td>
|
|
<td align="left" valign="top" width="50%" headers="d0e36 ">Write data to an SSL-enabled socket descriptor.</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e34 "><span class="apiname">SSL_Strerror()</span></td>
|
|
<td valign="top" width="50%" headers="d0e36 ">Retrieve SSL runtime error message. </td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e34 "><span class="apiname">SSL_Perror()</span></td>
|
|
<td valign="top" width="50%" headers="d0e36 ">Print SSL error message.</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e34 "><span class="apiname">QlgSSL_Init()</span></td>
|
|
<td valign="top" width="50%" headers="d0e36 ">Initialize the current job for SSL and establish
|
|
the SSL security information for the current job using NLS-enabled path name.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="p">An application that uses the sockets and SSL_ APIs contains the following
|
|
elements: <ul><li>A call to <span class="apiname">socket()</span> to obtain a socket descriptor.</li>
|
|
<li>Either call <span class="apiname">SSL_Init()</span> or <span class="apiname">SSL_Init_Application()</span> to
|
|
initialize the job environment for SSL processing and to establish the SSL
|
|
security information for all SSL sessions that run in the current job. Only
|
|
one of these APIs should be used. It is preferred that you use the <span class="apiname">SSL_Init_Application()</span> API.</li>
|
|
<li>Socket calls to activate a connection. It calls <span class="apiname">connect()</span> to
|
|
activate a connection for a client program, or it calls <span class="apiname">bind()</span>, <span class="apiname">listen()</span>,
|
|
and <span class="apiname">accept()</span> to enable a server to accept incoming connection
|
|
requests.</li>
|
|
<li>A call to <span class="apiname">SSL_Create()</span> to enable SSL support for the
|
|
connected socket.</li>
|
|
<li>A call to <span class="apiname">SSL_Handshake()</span> to initiate the SSL handshake
|
|
negotiation of the cryptographic parameters. <div class="note"><span class="notetitle">Note:</span> Typically, a server program
|
|
must provide a certificate for an SSL handshake to succeed. A server must
|
|
also have access to the private key that is associated with the server certificate
|
|
and the key database file where the certificate is stored. In some cases,
|
|
a client must also provide a certificate during the SSL handshake processing.
|
|
This occurs if the server which the client is connecting to has enabled client
|
|
authentication. The <span class="apiname">SSL_Init()</span> or <span class="apiname">SSL_Init_Application()</span> APIs
|
|
identify (though in dissimilar ways) the key database file from which the
|
|
certificate and private key that are used during the handshake are obtained. </div>
|
|
</li>
|
|
<li>Calls to <span class="apiname">SSL_Read()</span> and <span class="apiname">SSL_Write()</span> to
|
|
receive and send data.</li>
|
|
<li>A call to <span class="apiname">SSL_Destroy()</span> to disable SSL support for
|
|
the socket.</li>
|
|
<li>A call to <span class="apiname">close()</span> to destroy the connected sockets.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="cssl.htm" title="Currently, i5/OS supports two methods of creating secure socket applications on the iSeries. The SSL_ APIs and Global Secure Toolkit (GSKit) APIs provide communications privacy over an open communications network, which in most cases is the Internet.">Secure sockets</a></div>
|
|
</div>
|
|
<div class="relref"><strong>Related reference</strong><br />
|
|
<div><a href="x1sslserver.htm" title="In addition to creating secure applications using the GSKit APIs, you can also use the SSL_ APIs. SSL_ APIs only exist in the i5/OS operating system.">Example: Establish a secure server with SSL_ APIs</a></div>
|
|
<div><a href="x1sslclient.htm" title="This example enables a client application using the SSL_ APIs to communicate with a server application that uses the SSL_APIs.">Example: Establish a secure client with SSL_ APIs</a></div>
|
|
</div>
|
|
<div class="relinfo"><strong>Related information</strong><br />
|
|
<div><a href="../apis/socket.htm">socket()</a></div>
|
|
<div><a href="../apis/listen.htm">listen()</a></div>
|
|
<div><a href="../apis/bind.htm">bind()</a></div>
|
|
<div><a href="../apis/connec.htm">connect()</a></div>
|
|
<div><a href="../apis/accept.htm">accept()</a></div>
|
|
<div><a href="../apis/close.htm">close()</a></div>
|
|
<div><a href="../apis/sslcreat.htm">SSL_Create()</a></div>
|
|
<div><a href="../apis/ssldest.htm">SSL_Destroy()</a></div>
|
|
<div><a href="../apis/sslhands.htm">SSL_Handshake()</a></div>
|
|
<div><a href="../apis/sslinit.htm">SSL_Init()</a></div>
|
|
<div><a href="../apis/sslinita.htm">SSL_Init_Application()</a></div>
|
|
<div><a href="../apis/sslread.htm">SSL_Read()</a></div>
|
|
<div><a href="../apis/sslwrite.htm">SSL_Write()</a></div>
|
|
<div><a href="../apis/sslstrer.htm">SSL_Strerror()</a></div>
|
|
<div><a href="../apis/sslperr.htm">SSL_Perror()</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |