257 lines
6.3 KiB
HTML
257 lines
6.3 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
||
|
<title>gsk_environment_open()--Get a handle for an SSL environment</title>
|
||
|
<!-- Begin Header Records -->
|
||
|
<!-- 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. -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- Created for V5R1 -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<!-- End Header Records -->
|
||
|
<!--Java sync-link-->
|
||
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
||
|
</script>
|
||
|
|
||
|
<a name="Top_Of_Page"></a>
|
||
|
|
||
|
<h2>gsk_environment_open()--Get a handle for an SSL environment</h2>
|
||
|
|
||
|
<div class="box" style="width: 80%;">
|
||
|
<br>
|
||
|
<p> Syntax</p>
|
||
|
|
||
|
<pre>
|
||
|
#include <gskssl.h>
|
||
|
|
||
|
int gsk_environment_open(gsk_handle *<em>my_env_handle</em>);
|
||
|
|
||
|
</pre>
|
||
|
|
||
|
Service Program Name: QSYS/QSOSSLSR<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Default Public Authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: Yes<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The <strong>gsk_environment_open()</strong> function is used to get storage
|
||
|
for the SSL environment. This function call must be issued before any other gsk
|
||
|
function calls are issued. This call returns an SSL environment handle that
|
||
|
must be saved and used on subsequent gsk calls.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Parameters</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>my_env_handle</strong> (Output) </dt>
|
||
|
|
||
|
<dd>A pointer to the SSL environment handle to be used for subsequent gsk
|
||
|
function calls.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Authorities</h3>
|
||
|
|
||
|
<p>No authorization is required.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Return Value</h3>
|
||
|
|
||
|
<p><strong>gsk_environment_open()</strong> returns an integer. Possible values
|
||
|
are:</p>
|
||
|
|
||
|
<dl>
|
||
|
<dt><em>[GSK_OK]</em></dt>
|
||
|
|
||
|
<dd><p><strong>gsk_environment_open()</strong> was successful.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><em>[GSK_API_NOT_AVAILABLE]</em></dt>
|
||
|
<dd>
|
||
|
<img src="delta.gif" alt="Start of change">
|
||
|
<p>Digital Certificate Manager (DCM), 57xx-SS1 - OS400 Option 34 is not installed.</p>
|
||
|
<img src="deltaend.gif" alt="End of change">
|
||
|
</dd>
|
||
|
|
||
|
<dt><em>[GSK_INSUFFICIENT_STORAGE]</em></dt>
|
||
|
|
||
|
<dd><p>Not able to allocate storage for the requested operation.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><em>[GSK_INTERNAL_ERROR]</em></dt>
|
||
|
|
||
|
<dd><p>An internal error occured during system processing.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><em>[GSK_AS400_ERROR_INVALID_POINTER]</em></dt>
|
||
|
|
||
|
<dd><p>The <strong>my_env_handle</strong> pointer is not valid.</p></dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Error Messages</h3>
|
||
|
|
||
|
<table width="100%" cellpadding="5">
|
||
|
<tr>
|
||
|
<th align="left" valign="top">Message ID</th>
|
||
|
<th align="left" valign="top">Error Message Text</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td width="15%" valign="top">CPE3418 E</td>
|
||
|
<td width="85%" valign="top">Possible APAR condition or hardware failure.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td valign="top">CPF9872 E</td>
|
||
|
<td valign="top">Program or service program &1 in library &2 ended.
|
||
|
Reason code &3.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td valign="top">CPFA081 E</td>
|
||
|
<td valign="top">Unable to set return value or error code.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Usage Notes</h3>
|
||
|
|
||
|
<ol type="1">
|
||
|
<li>After <strong>gsk_environment_open()</strong> returns with a GSK_OK return
|
||
|
value, attributes for the SSL environment have been set and can be retrieved
|
||
|
using any of the <strong>get</strong> function calls. The following is a list
|
||
|
of the defaulted values:
|
||
|
|
||
|
<ul>
|
||
|
<li><strong>GSK_V2_SESSION_TIMEOUT</strong> set to 100 seconds.</li>
|
||
|
|
||
|
<li><strong>GSK_V3_SESSION_TIMEOUT</strong> set to 86400 seconds (24
|
||
|
hours).</li>
|
||
|
|
||
|
<li><strong>GSK_HANDSHAKE_TIMEOUT</strong> set to 0 (wait forever).</li>
|
||
|
|
||
|
|
||
|
<li><strong>GSK_OS400_RECEIVE_TIMEOUT</strong> set to 0 (wait forever).</li>
|
||
|
|
||
|
<li><strong>GSK_SESSION_TYPE</strong> set to <em>GSK_CLIENT_SESSION</em>.</li>
|
||
|
|
||
|
<li><strong>GSK_KEYRING_LABEL</strong> set to use the default certificate from
|
||
|
the certificate store file.</li>
|
||
|
|
||
|
<li><strong>GSK_PROTOCOL_TLSV1</strong> set to
|
||
|
<em>GSK_PROTOCOL_TLSV1_ON</em>.</li>
|
||
|
|
||
|
<li><strong>GSK_PROTOCOL_SSLV3</strong> set to
|
||
|
<em>GSK_PROTOCOL_SSLV3_ON</em>.</li>
|
||
|
|
||
|
<li><strong>GSK_PROTOCOL_SSLV2</strong> set to
|
||
|
<em>GSK_PROTOCOL_SSLV2_ON</em>.</li>
|
||
|
<li>
|
||
|
<img src="delta.gif" alt="Start of change">
|
||
|
<strong>GSK_V2_CIPHER_SPECS</strong> set to the default SSL Version 2
|
||
|
cipher suite list.</li>
|
||
|
|
||
|
<li><strong>GSK_V3_CIPHER_SPECS</strong> set to the default SSL Version 3
|
||
|
cipher suite list.</li>
|
||
|
|
||
|
<img src="deltaend.gif" alt="End of change">
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
<img src="delta.gif" alt="Start of change">
|
||
|
The default cipher suite list in preference order is as follows:
|
||
|
|
||
|
<img src="deltaend.gif" alt="End of change">
|
||
|
<ul>
|
||
|
<li><strong>GSK_V3_CIPHER_SPECS</strong> set to SSL Version 3 or TLS Version 1
|
||
|
default "04052F350A090306."</li>
|
||
|
|
||
|
<li><strong>GSK_V2_CIPHER_SPECS</strong> set to "137624."<br>
|
||
|
<br>
|
||
|
<p>See the usage notes in <a href=
|
||
|
"gsk_attribute_set_buffer.htm">gsk_attribute_set_buffer()</a> API for the
|
||
|
format of the ciphers.</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
|
||
|
</ol>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Related Information</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li><a href="gsk_attribute_set_buffer.htm">gsk_attribute_set_buffer()</a>--Set
|
||
|
character information for an secure session or a SSL environment<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="gsk_attribute_set_enum.htm">gsk_attribute_set_enum()</a>--Set
|
||
|
enumerated information for a secure session or an SSL environment<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href=
|
||
|
"gsk_attribute_set_numeric_value.htm">gsk_attribute_set_numeric_value()</a>--Set
|
||
|
numeric information for a secure session or an SSL environment<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="gsk_environment_close.htm">gsk_environment_close()</a>--Close the SSL
|
||
|
environment<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="gsk_environment_init.htm">gsk_environment_init()</a>--Initialize an
|
||
|
SSL environment<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="gsk_strerror.htm">gsk_strerror()</a>--Retrieve GSK runtime error
|
||
|
message</li>
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<hr>
|
||
|
API introduced: V5R1
|
||
|
|
||
|
<hr>
|
||
|
<table cellpadding="2" cellspacing="2" align="center">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
||
|
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|
||
|
|