AppendSignedCertificate (Stringlist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Automatically generated page update)
 
mNo edit summary
Line 1: Line 1:
{{Template:Stringlist:AppendSignedCertificate subtitle}}
{{Template:Stringlist:AppendSignedCertificate subtitle}}


This page is [[under construction]].
This [[Notation conventions for methods#Callable functions|callable]] method signs an X.509 certificate request and adds the lines of the signed certificate to the end of a <var>Stringlist</var>.
 
==Syntax==
==Syntax==
{{Template:Stringlist:AppendSignedCertificate syntax}}
{{Template:Stringlist:AppendSignedCertificate syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%rc</th><td>number</td></tr>
<tr><th>%rc</th>
<td>An, optional, numeric variable that is set to zero if the function is a success. The possible return codes are described below in [[#Return codes|"Return codes"]]. </td></tr>
<tr><th>sl</th>
<tr><th>sl</th>
<td>Stringlist object</td></tr>
<td>A <var>Stringlist</var> object.</td></tr>
<tr><th><var>PrivateKey</var></th>
<tr><th><var>PrivateKey</var></th>
<td><var>Stringlist</var> object</td></tr>
<td>This [[Notation conventions for methods#Named parameters|name allowed]] argument is a <var>Stringlist</var> that contains the private key to be used for signing.</td></tr>
<tr><th><var>Request</var></th>
<tr><th><var>Request</var></th>
<td><var>Stringlist</var> object</td></tr>
<td>This name allowed argument is a <var>Stringlist</var> that contains the base-64 encoded X.509 certificate request.</td></tr>
<tr><th><var>Signer</var></th>
<tr><th><var>Signer</var></th>
<td><var>Stringlist</var> object</td></tr>
<td>This optional, name allowed, argument is a <var>Stringlist</var> that contains the base-64 encoded CA (certifying authority) X.509 certificate. If not specified, the <var>Request</var> <var>Stringlist</var> is used: that is, the certificate will be self-signed. </td></tr>
<tr><th><var>StartDate</var></th>
<tr><th><var>StartDate</var></th>
<td>string</td></tr>
<td>This optional, name allowed, argument is a string that contains the Start date for the signed certificate (in YYMMDDHHMISS format). The default is today's date.</td></tr>
<tr><th><var>EndDate</var></th>
<tr><th><var>EndDate</var></th>
<td>string</td></tr>
<td>This optional, name allowed, argument is a string that contains the End date for the signed certificate (in YYMMDDHHMISS format). The default is 24 hours from <var>StartDate</var>.</td></tr>
<tr><th><var>SerialNumber</var></th>
<tr><th><var>SerialNumber</var></th>
<td>number</td></tr>
<td>This optional, name allowed, argument is a numeric value that is the Serial number for the signed certificate. The default is a number guaranteed to increase by 1 for every call and guaranteed to increase from run to run, unless there is an extreme amount
of signing occurrences. </td></tr>
</table>
</table>
==Usage notes==
 
===Return codes===
<table>
<tr><th>0</th><td>All is well.</td></tr>
<tr><th>-3</th><td>Out of CCATEMP.</td></tr>
<tr><th>-5</th><td><var>Stringlist</var> identifier missing.</td></tr>
<tr><th>-6</th><td>Invalid <var>Stringlist</var> identifier.</td></tr>
<tr><th>-7</th><td>Insufficient storage.</td></tr>
<tr><th>-10</th><td>Private key <var>Stringlist</var> identifier missing.</td></tr>
<tr><th>-11</th><td>Invalid private key <var>Stringlist</var> identifier.</td></tr>
<tr><th>-12</th><td>Invalid private key <var>Stringlist</var> data (not correctly base-64 encoded).</td></tr>
<tr><th>-13</th><td>Certificate request <var>Stringlist</var> identifier missing.</td></tr>
<tr><th>-14</th><td>Invalid certificate request <var>Stringlist</var> identifier.</td></tr>
<tr><th>-15</th><td>Invalid certificate request.</td></tr>               
<tr><th>-16</th><td>Invalid CA certificate <var>Stringlist</var> identifier.</td></tr>     
<tr><th>-17</th><td>Invalid CA certificate.</td></tr>                     
<tr><th>-18</th><td>Invalid start date.</td></tr>                         
<tr><th>-19</th><td>Invalid end date.</td></tr>                           
<tr><th>-20</th><td>Invalid serial number.</td></tr>                     
<tr><th>-21</th><td>Private key does not match signer public key.</td></tr>
</table>
 
==Examples==
==Examples==
==See also==
==See also==
<ul>
<li><var>[[AppendCertificateRequestInfo (Stringlist function)|AppendCertificateRequestInfo]]</var>
<li><var>[[AppendCertificateInfo (Stringlist function)|AppendCertificateInfo]]</var>
<li><var>[[AppendPrivateKeyInfo (Stringlist function)|AppendPrivateKeyInfo]]</var>
</ul>
{{Template:Stringlist:AppendSignedCertificate footer}}
{{Template:Stringlist:AppendSignedCertificate footer}}

Revision as of 22:22, 8 May 2012

Add base64 encoded signed certificate to a Stringlist (Stringlist class)

[Requires Janus Network Security]


This callable method signs an X.509 certificate request and adds the lines of the signed certificate to the end of a Stringlist.

Syntax

[%rc =] sl:AppendSignedCertificate( [PrivateKey=] string, [Request=] string, - [[Signer=] string], - [[StartDate=] string], - [[EndDate=] string], - [[SerialNumber=] number], - [SignatureAlgorithm= digestAlgorithm])

Syntax terms

%rc An, optional, numeric variable that is set to zero if the function is a success. The possible return codes are described below in "Return codes".
sl A Stringlist object.
PrivateKey This name allowed argument is a Stringlist that contains the private key to be used for signing.
Request This name allowed argument is a Stringlist that contains the base-64 encoded X.509 certificate request.
Signer This optional, name allowed, argument is a Stringlist that contains the base-64 encoded CA (certifying authority) X.509 certificate. If not specified, the Request Stringlist is used: that is, the certificate will be self-signed.
StartDate This optional, name allowed, argument is a string that contains the Start date for the signed certificate (in YYMMDDHHMISS format). The default is today's date.
EndDate This optional, name allowed, argument is a string that contains the End date for the signed certificate (in YYMMDDHHMISS format). The default is 24 hours from StartDate.
SerialNumber This optional, name allowed, argument is a numeric value that is the Serial number for the signed certificate. The default is a number guaranteed to increase by 1 for every call and guaranteed to increase from run to run, unless there is an extreme amount of signing occurrences.

Return codes

0All is well.
-3Out of CCATEMP.
-5Stringlist identifier missing.
-6Invalid Stringlist identifier.
-7Insufficient storage.
-10Private key Stringlist identifier missing.
-11Invalid private key Stringlist identifier.
-12Invalid private key Stringlist data (not correctly base-64 encoded).
-13Certificate request Stringlist identifier missing.
-14Invalid certificate request Stringlist identifier.
-15Invalid certificate request.
-16Invalid CA certificate Stringlist identifier.
-17Invalid CA certificate.
-18Invalid start date.
-19Invalid end date.
-20Invalid serial number.
-21Private key does not match signer public key.

Examples

See also