ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/qykmgdki.htm

302 lines
8.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>Get Default Key Item (QYKMGDKI, QykmGetDefaultKeyItem)</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: -->
<!-- YYMMDD USERID Change description -->
<!-- created by Jim Coon for V5R4 -->
<!-- 021015 JETAYLOR html and formatting cleanup -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2><img src="delta.gif" alt="Start of change">Get Default Key Item
(QYKMGDKI, QykmGetDefaultKeyItem)</h2>
<div class="box" style="width: 80%;">
<br>
&nbsp;&nbsp;Required Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Certificate store path and file
name</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Length of certificate store path and file
name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Format of certificate store path and file
name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Default certificate label</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Length of default certificate label provided</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Length of default certificate label returned</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">7</td>
<td align="left" valign="top">Error code</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Service Program Name: QYKMSYNC<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Get Default Key Item API (OPM, QYKMGDKI; ILE, QykmGetDefaultKeyItem)
allows a user to extract the label of the default certificate in a
certificate store. If there is no assigned default certificate, no label is
returned. <b>Note:</b> Option 34, Digital Certificate Manager, must be installed
in order to use this API.</p>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>Authority Required</em></dt>
<dd>
<p>To use this API, option 34 must be installed.</p>
<p>For the file object:</p>
<ul>
<li>*R authority to the certificate store.</li>
</ul>
<p>For the directory:</p>
<ul>
<li>*X authority to the directory containing the certificate store.</li>
</ul>
<p>Also, see the <a href="open.htm">open()</a> API for the authority needed to the
certificate store.</p>
</dd>
<dt><em>Locks</em></dt>
<dd>Object will be locked shared read.</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Certificate store path and file name</strong></dt>
<dd>INPUT; Char(*)
<p>The path name of the certificate store (kdb) you want to access. This path
and file name may be absolute (i.e., entire path name) or relative to the current
directory. If you are using format OBJN0100
(see below), this parameter is assumed to be represented in the coded character
set identifier (CCSID) currently in effect for the job. If the CCSID of the job
is 65535, this parameter is assumed to be represented in the default CCSID of
the job.</p>
</dd>
<dt><strong>Length of certificate store path and file name</strong></dt>
<dd>INPUT; Binary(4)
<p>The length of the certificate store path and file name. If the format
specified is OBJN0200 (see below), this field must include the QLG path name
structure length in addition to the length of the path name itself. If the
format specified is OBJN0100 (see below), only the length of the path name
itself is included.</p>
</dd>
<dt><strong>Format of certificate store path and file name</strong></dt>
<dd>INPUT; CHAR(8)
<p>The format of the certificate store path and file name parameter.</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>OBJN0100</em></td>
<td align="left" valign="top">The certificate store path and file name is a
simple path name.</td>
</tr>
<tr>
<td align="left" valign="top"><em>OBJN0200</em></td>
<td align="left" valign="top">The certificate path and file name is an LG-type
path name.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Default certificate label</strong></dt>
<dd>INPUT; CHAR(*)
<p>The label of the default certificate in the certificate store.
If there is no assigned default certificate, no label is returned.
Also, if the length of the default certificate label provided
(see next parameter) is not big enough to hold the label, the
label is not returned.</p>
</dd>
<dt><strong>Length of the default certificate label provided</strong></dt>
<dd>INPUT; Binary(4)
<p>
The length provided for the label of the default certificate in the
certificate store. This must be big enough to hold the certificate label.
If not, the label is not returned, and the length of the default certificate
label returned (see next parameter) will contain the minimum value that should
be provided.
</p>
</dd>
<dt><strong>Length of the default certificate label returned</strong></dt>
<dd>OUTPUT; Binary(4)
<p>
The actual length of the label of the default certificate in the certificate store.
If this value is greater than 0 and no label is returned, then this value is the
minimum value that should be provided on the length of the default certificate label
provided (see previous parameter).
</p>
</dd>
<dt><strong>Error code</strong></dt>
<dd>OUTPUT; CHAR(*)
<p>The structure in which to return error information. For the format of the
structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p>
</dd>
</dl>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="5">
<!-- cols="15 85" -->
<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">CPF180C E</td>
<td width="85%" valign="top">Function &amp;1 not allowed.</td>
</tr>
<tr>
<td valign="top">CPFB001 E</td>
<td valign="top">One or more input parameters is NULL or
missing.</td>
</tr>
<tr>
<td valign="top">CPFB002 E</td>
<td valign="top">Certificate store does not exist.</td>
</tr>
<tr>
<td valign="top">CPFB004 E</td>
<td valign="top">User not authorized to certificate store.</td>
</tr>
<tr>
<td valign="top">CPFB006 E</td>
<td valign="top">An error occurred. The error code is &amp;1.</td>
</tr>
<tr>
<td valign="top">CPFB007 E</td>
<td valign="top">User not authorized to directory or file.</td>
</tr>
<tr>
<td valign="top">CPFB008 E</td>
<td valign="top">The format name for the certificate store is not valid.</td>
</tr>
<tr>
<td valign="top">CPFB00A E</td>
<td valign="top">Option &amp;2 of the operating system is required to work with certificates.</td>
</tr>
</table>
<br>
<img src="deltaend.gif" alt="End of change"><br>
<hr>
API introduced: V5R4
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"sec.htm">Security APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>