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

343 lines
9.1 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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>Add User Certificate (QSYADDUC, QsyAddUserCertificate) API</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. -->
<!-- Sec SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- Edited by Kersten Jan 02 -->
<!--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 language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>Add User Certificate (QSYADDUC, QsyAddUserCertificate) API</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;<img src="delta.gif" alt="Start of change">Required Parameter Group for QSYADDUC:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">User profile</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Certificate</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Type</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Length of certificate</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">5</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;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<br>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Syntax for QsyAddUserCertificate:<br>
<pre>
#include &lt;qsydigid.h&gt;
void QsyAddUserCertificate
(char *<em>User_profile</em>,
char *<em>Certificate</em>,
int <em>Type</em>,
int <em>Length_of_certificate</em>,
void *<em>Error_code</em>);
</pre>
&nbsp;&nbsp;Service Program: QSYDIGID<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<img src="deltaend.gif" alt="End of change"><br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Add User Certificate (OPM, QSYADDUC; ILE, QsyAddUserCertificate) API
associates a certificate with an i5/OS user profile.</p>
<p>A common scenario is that only one certificate is associated with an i5/OS
user profile at any given time, but more than one certificate may be associated
with the same i5/OS user profile if each certificate is unique. A reason for
having more than one certificate associated with an i5/OS user profile may be
that the first certificate is about to expire. The same certificate is not
allowed to be associated with more than one i5/OS user profile.</p>
<p>Because certificates vary in length, the actual number of certificates that
can be listed using the List User Certificates API will also vary. Depending on
the length of each of the certificates, no more than a few hundred certificates
should be added to an i5/OS user profile or incomplete results may be returned
when attempting to use the List User Certificates API to list certificates that
are associated with the i5/OS user profile.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>User Profile Authority</em></dt>
<dd>If the user profile specified is not the user profile that is currently
running, then *SECADM special authority and *USE and *OBJMGT authorities to the
user profile are required.</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>User profile</strong></dt>
<dd>INPUT; CHAR(10)
<p>The name of the user profile that will hold the certificate.</p>
<p>The following is also a valid selection for the user profile:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*CURRENT</em></td>
<td align="left" valign="top">The user profile that is currently running.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Certificate</strong></dt>
<dd>INPUT; CHAR(*)
<p>The entire certificate in Abstract Syntax Notation 1 Distinguished Encoding
Rules (ASN.1 DER) format. This is not a text string. This certificate is
associated with the user profile.</p>
</dd>
<dt><strong>Type</strong></dt>
<dd>INPUT; BINARY(4)
<p>The type or format of the certificate.</p>
<p>The possible types are:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">Entire X.509 public key certificate in ASN.1 DER
encoding.</td>
</tr>
<tr>
<td align="left" valign="top"><em>3</em></td>
<td align="left" valign="top">Base 64 encoded version of the entire X.509
public key certificate in ASN.1 DER encoding. Note that the characters of
the Base 64 encoding are the
ASCII representation and not the EBCDIC representation.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Length of certificate</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the certificate.</p>
</dd>
<dt><strong>Error code</strong></dt>
<dd>I/O; 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">CPFA0AA E</td>
<td width="85%" valign="top">Error occurred while attempting to obtain
space.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1F41 E</td>
<td align="left" valign="top">Severe error occurred while addressing parameter
list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2204 E</td>
<td align="left" valign="top">User profile &amp;1 not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2213 E</td>
<td align="left" valign="top">Not able to allocate user profile &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2217 E</td>
<td align="left" valign="top">Not authorized to user profile &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2222 E</td>
<td align="left" valign="top">Storage limit is greater than specified for user
profile &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF227A E</td>
<td align="left" valign="top">Certificate type is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF227B E</td>
<td align="left" valign="top">Certificate is not correct for the specified
type.</td>
</tr>
<tr>
<td align="left" valign="top">CPF227C E</td>
<td align="left" valign="top">Certificate association already exists.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3BFF E</td>
<td align="left" valign="top">Required option &amp;1 is not available.
</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td align="left" valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF2 E</td>
<td align="left" valign="top">Error(s) occurred during running of &amp;1
API.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C1D E</td>
<td align="left" valign="top">Length specified in parameter &amp;1 not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C1E E</td>
<td align="left" valign="top">Required parameter &amp;1 omitted.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C36 E</td>
<td align="left" valign="top">Number of parameters, &amp;1, entered for this
API was not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C90 E</td>
<td align="left" valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF4AB9 E</td>
<td align="left" valign="top">User certificate function not successful.
</td>
</tr>
<tr>
<td align="left" valign="top">CPF9872 E</td>
<td align="left" valign="top">Program or service program &amp;1 in library
&amp;2 ended. Reason code &amp;3.</td>
</tr>
</table>
<br>
<hr>
API introduced: V4R2
<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>