227 lines
5.3 KiB
HTML
227 lines
5.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_strerror()--Retrieve GSKit runtime error message</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_strerror()--Retrieve GSKit runtime error message</h2>
|
|
|
|
<div class="box" style="width: 80%;">
|
|
<br>
|
|
Syntax
|
|
|
|
<pre>
|
|
#include <gskssl.h>
|
|
|
|
const char *gsk_strerror(int <em>gsk_return_value</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_strerror()</strong> function is used to retrieve an error
|
|
message and associated text string that describes a return value that was
|
|
returned from calling a GSKit API.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
|
|
<dl>
|
|
<dt><strong>gsk_return_value</strong> (Input) </dt>
|
|
|
|
<dd>The return value received from a GSKit API.</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Authorities</h3>
|
|
|
|
<p>No authorization is required.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Return Value</h3>
|
|
|
|
<p><strong>gsk_strerror()</strong> returns a pointer to the return value
|
|
text.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Usage Notes</h3>
|
|
|
|
<ol>
|
|
<li><strong>gsk_strerror()</strong> returns a pointer to the string. The
|
|
null-terminated string is stored in the CCSID of the job.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>If a <em>gsk_return_value</em> is specified for which there is no
|
|
corresponding description, an Unknown Error string is returned.</li>
|
|
</ol>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Related Information</h3>
|
|
|
|
<ul>
|
|
<li><a href="gsk_attribute_get_buffer.htm">gsk_attribute_get_buffer()</a>--Get
|
|
character information about a secure session or an SSL environment.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href=
|
|
"gsk_attribute_get_cert_info.htm">gsk_attribute_get_cert_info()</a>--Get
|
|
information about a local or partner certificate.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsk_attribute_get_enum.htm">gsk_attribute_get_enum()</a>--Get
|
|
enumerated information about a secure session or an SSL environment.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href=
|
|
"gsk_attribute_get_numeric_value.htm">gsk_attribute_get_numeric_value()</a>--Get
|
|
numeric information about a secure session or an SSL environment.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsk_attribute_set_buffer.htm">gsk_attribute_set_buffer()</a>--Set
|
|
character information for a secure session or an 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 a SSL
|
|
environment<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsk_environment_open.htm">gsk_environment_open()</a>--Get a handle for
|
|
an SSL environment<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsk_secure_soc_close.htm">gsk_secure_soc_close()</a>--Close a secure
|
|
session<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsk_secure_soc_init.htm">gsk_secure_soc_init()</a>--Negotiate a secure
|
|
session<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsk_secure_soc_misc.htm">gsk_secure_soc_misc()</a>--Perform
|
|
miscellaneous functions for a secure session<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsk_secure_soc_open.htm">gsk_secure_soc_open()</a>--Get a handle for a
|
|
secure session<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsk_secure_soc_read.htm">gsk_secure_soc_read()</a>--Receive data on a
|
|
secure session<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsk_secure_soc_write.htm">gsk_secure_soc_write()</a>--Send data on a
|
|
secure session</li>
|
|
</ul>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Example</h3>
|
|
<p>See <a href="../apiref/aboutapis.htm#codedisclaimer">Code disclaimer information</a>
|
|
for information pertaining to code examples.</p>
|
|
<p>The following example shows how <strong>gsk_strerror()</strong> is used:</p>
|
|
|
|
<pre>
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
#include <gskssl.h>
|
|
|
|
void main()
|
|
{
|
|
int rc = GSK_OK;
|
|
gsk_handle env_handle = NULL;
|
|
|
|
rc = gsk_environment_open(&env_handle);
|
|
if (rc != GSK_OK)
|
|
{
|
|
printf("gsk_environment_open() failed with rc = %d %s\n",
|
|
rc,<strong>gsk_strerror</strong>(rc));
|
|
break;
|
|
}
|
|
|
|
...
|
|
|
|
}
|
|
</pre>
|
|
|
|
<br>
|
|
<hr>
|
|
API introduced: V5R1
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<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></center>
|
|
</body>
|
|
</html>
|
|
|