AppendCertificateRequest (Stringlist function): Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{Template:Stringlist:AppendCertificateRequest subtitle}} | {{Template:Stringlist:AppendCertificateRequest subtitle}} | ||
This [[Notation conventions for methods#Callable functions|callable]] method generates an SSL client certificate from a given private key, and it adds the certificate lines to the end of a <var>Stringlist</var>. | This [[Notation conventions for methods#Callable functions|callable]] method generates an SSL client certificate request from a given private key, and it adds the certificate request lines to the end of a <var>Stringlist</var>. | ||
==Syntax== | ==Syntax== | ||
| Line 10: | Line 10: | ||
<tr><th>%rc</th> | <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> | <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 Stringlist object to contain the generated request.</td></tr> | ||
<tr><th><var>PrivateKey</var></th> | <tr><th><var>PrivateKey</var></th> | ||
<td>This [[Notation conventions for methods#Named parameters|name allowed]] parameter is a <var>Stringlist</var> object that contains an RSA-generated private key. This value must be less than or equal to 2048 bits. </td></tr> | <td>This [[Notation conventions for methods#Named parameters|name allowed]] parameter is a <var>Stringlist</var> object that contains an RSA-generated private key. This value must be less than or equal to 2048 bits. </td></tr> | ||
<tr><th><var>Country</var></th> | <tr><th><var>Country</var></th> | ||
<td>string</td></tr> | <td>string</td></tr> | ||
<tr><th><var>State</var></th> | <tr><th><var>State</var></th> | ||
<td>string</td></tr> | <td>string</td></tr> | ||
<tr><th><var>City</var></th> | <tr><th><var>City</var></th> | ||
<td>string</td></tr> | <td>string</td></tr> | ||
<tr><th><var>Organization</var></th> | <tr><th><var>Organization</var></th> | ||
<td>string</td></tr> | <td>string</td></tr> | ||
<tr><th><var>OrganizationalUnit</var></th> | <tr><th><var>OrganizationalUnit</var></th> | ||
<td>string</td></tr> | <td>string</td></tr> | ||
<tr><th><var>CommonName</var></th> | <tr><th><var>CommonName</var></th> | ||
<td>string</td></tr> | <td>string</td></tr> | ||
| Line 43: | Line 51: | ||
==Usage notes== | ==Usage notes== | ||
<ul> | |||
<li>To review the contents of the generated request, you can use <var>[[DerToXmlDoc (String function)|DerToXmlDoc]]</var>. | |||
</ul> | |||
==Examples== | ==Examples== | ||
Revision as of 00:54, 25 May 2012
Add certificate request to a Stringlist (Stringlist class)
[Requires Janus Network Security]
This callable method generates an SSL client certificate request from a given private key, and it adds the certificate request lines to the end of a Stringlist.
Syntax
[%rc =] sl:AppendCertificateRequest( [PrivateKey=] string, - [[Country=] string], [[State=] string], - [[City=] string], - [[Organization=] string], - [[OrganizationalUnit=] string], - [[CommonName=] string], - [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 to contain the generated request. |
| PrivateKey | This name allowed parameter is a Stringlist object that contains an RSA-generated private key. This value must be less than or equal to 2048 bits. |
| Country | string |
| State | string |
| City | string |
| Organization | string |
| OrganizationalUnit | string |
| CommonName | string |
Return codes
| 0 | All is well. |
|---|---|
| 3 | Out of CCATEMP. |
| 5 | Stringlist identifier missing. |
| 6 | Invalid Stringlist identifier. |
| 7 | Insufficient storage. |
| 10 | Private key Stringlist identifier missing. |
| 11 | Invalid private key Stringlist identifier. |
| 12 | Invalid private key. |
| 13 | Challenge data mismatch. |
| 14 | Bad private key/challenge signature. |
Usage notes
- To review the contents of the generated request, you can use DerToXmlDoc.
Examples
See also
- AppendCertificateInfo
- AppendCertificateRequestInfo
- AppendClientCertificateRequest
- AppendPrivateKeyInfo
- AppendSignedCertificate
- AppendSignedClientCertificate
- CheckCertificate
- CheckCertificateRequest