AppendClientCertificateRequest (Stringlist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (→‎See also: add links)
m (→‎See also: add method to list)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:Stringlist:AppendClientCertificateRequest subtitle}}
{{Template:Stringlist:AppendClientCertificateRequest subtitle}}
This [[Notation conventions for methods#Callable functions|callable]] method generates an SSL client certificate request from a given client public key, and it adds the request 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 client public key, and it adds the request lines to the end of a <var>Stringlist</var>.


==Syntax==
==Syntax==
Line 8: Line 8:
<table class="syntaxTable">
<table class="syntaxTable">
<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 elsewhere 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 elsewhere 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 to contain the certificate request that is produced.</td></tr>
 
<tr><th><var>PublicKey</var></th>
<tr><th><var>PublicKey</var></th>
<td>This [[Notation conventions for methods#Named parameters|name allowed]] parameter is a <var>Stringlist</var> object that contains an RSA-generated client public key.</td></tr>
<td>This [[Notation conventions for methods#Named parameters|name allowed]] parameter is a string or <var>Stringlist</var> object that contains an RSA-generated client public key.</td></tr>
 
<tr><th><var>Country</var></th>
<tr><th><var>Country</var></th>
<td>This name allowed, optional, string argument inserts a country value into the generated certificate request. </td></tr>
<td>This name allowed, optional, string argument inserts a country value into the generated certificate request. </td></tr>
Line 33: Line 36:
<tr><th><var>Challenge</var></th>
<tr><th><var>Challenge</var></th>
<td>This name allowed, optional, string argument inserts the expected authentication challenge data/password. You might need to identify the type of authentication, for example, certificate-based authentication.</td></tr>
<td>This name allowed, optional, string argument inserts the expected authentication challenge data/password. You might need to identify the type of authentication, for example, certificate-based authentication.</td></tr>
</table>
 
<tr><th><var>SignatureAlgorithm</var></th>
<td>This optional, [[Notation conventions for methods#Named parameters|name required]], argument is a <var>[[DigestAlgorithm enumeration|DigestAlgorithm]]</var> enumeration value. Valid values are: <var>MD5</var>, <var>SHA1</var>, <var>SHA256</var>, <var>SHA384</var> (Model 204 7.7 and later), and <var>SHA512</var> (Model 204 7.7 and later). The default value is <var>SHA256</var> as of Model 204 7.7 (and zap maintenance for versions 7.6 and 7.5).
<p class="note"><b>Note:</b> Although supported and formerly the default, most modern browsers are deprecating <var>SHA1</var>.</p></td></tr></table>


===Return codes===
===Return codes===
<table>
<table class="thJustBold">
<tr><th>0</th><td>All is well.</td></tr>
<tr><th>0</th><td>All is well.</td></tr>
<tr><th>3</th><td>Out of CCATEMP.</td></tr>
<tr><th>3</th><td>Out of CCATEMP.</td></tr>
Line 48: Line 54:
<tr><th>14</th><td>Bad public key/challenge signature.</td></tr>
<tr><th>14</th><td>Bad public key/challenge signature.</td></tr>
</table>
</table>
==Usage notes==
For some background information concerning certificates, see [https://en.wikipedia.org/wiki/Public-key_cryptography Public-key cryptography] and [https://en.wikipedia.org/wiki/Certificate_signing_request Certificate signing request].


==Examples==
==Examples==
For a closely related example, see the <var>AppendCertificateRequest</var> [[AppendCertificateRequest (Stringlist function)#Examples|"Examples"]] section.
For a closely related example, see the <var>AppendCertificateRequest</var> [[AppendCertificateRequest (Stringlist function)#Examples|Examples]] section.


==See also==
==See also==
<p>
<p>
<var>Stringlist</var> methods: </p>
<var>Stringlist</var> methods: </p>
{{Template:Stringlist crypto methods}}
<p>
<var>String</var> methods:</p>
<ul>
<ul>
<li><var>[[AppendCertificateInfo (Stringlist function)|AppendCertificateInfo]]</var></li>
<li><var>[[CertificateRequest (String function)|CertificateRequest]]</var> </li>


<li><var>[[AppendCertificateRequest (Stringlist function)|AppendCertificateRequest]]</var></li>
<li><var>[[SignedCertificate (String function)|SignedCertificate]]</var> </li>


<li><var>[[AppendCertificateRequestInfo (Stringlist function)|AppendCertificateRequestinfo]]</var></li>
<li><var>[[SignedClientCertificate (String function)|SignedClientCertificate]]</var> </li>


<li><var>[[AppendEncryptedSecurityData (Stringlist subroutine)|AppendEncryptedSecurityData]]</var></li>
<li><var>[[DerToXmlDoc (String function)|DerToXmlDoc]]</var> </li>


<li><var>[[AppendGeneratedPrivateKey (Stringlist subroutine)|AppendGeneratedPrivateKey]]</var></li>
<li><var>[[RSAPrivateKeyToXmlDoc (String function)|RSAPrivateKeyToXmlDoc]]</var></li>


<li><var>[[AppendPrivateKeyInfo (Stringlist function)|AppendPrivateKeyInfo]]</var></li>
<li><var>[[X509CertificateToXmlDoc (String function)|X509CertificateToXmlDoc]]</var> </li>


<li><var>[[AppendSignedCertificate (Stringlist function)|AppendSignedCertificate]]</var></li>
<li><var>[[X509CrlToXmlDoc (String function)|X509CrlToXmlDoc]]</var> </li>


<li><var>[[AppendSignedClientCertificate (Stringlist function)|AppendSignedClientCertificate]]</var></li>
<li>Multiple cryptographic cipher methods </li>
 
<li><var>[[CheckCertificate (Stringlist function)|CheckCertificate]]</var></li>
 
<li><var>[[CheckCertificateRequest (Stringlist function)|CheckCertificateRequest]]</var></li>
</ul>
</ul>
<p>
<p>
<var>String</var> methods:</p>
<var>System</var> methods: </p>
<ul>
<ul>
<li><var>[[CertificateRequest (String function)|CertificateRequest]]</var> </li>
<li><var>[[ClientCertificate (System function)|ClientCertificate]]</var> </li><li><var>[[GeneratedPrivateKey (System function)|GeneratedPrivateKey]]</var> </li>
 
<li><var>[[SignedCertificate (String function)|SignedCertificate]]</var> </li>
 
<li>[[Release notes for Sirius Mods V8.0#DER2Xml|DER-to-XmlDoc methods]]</li>
</ul>
</ul>
<p>
<p>
<var>System</var> methods: </p>
<var>Socket</var> methods: </p>
<ul>
<ul>
<li><var>[[GeneratedPrivateKey (System function)|GeneratedPrivateKey]]</var></li>
<li><var>[[Certificate (Socket function)|Certificate]]</var> </li>
</ul>
</ul>


{{Template:Stringlist:AppendClientCertificateRequest footer}}
{{Template:Stringlist:AppendClientCertificateRequest footer}}

Latest revision as of 15:10, 6 September 2018

Add client certificate request to a Stringlist (Stringlist class)

[Requires Janus Network Security]

This callable method generates an SSL client-certificate request from a given client public key, and it adds the request lines to the end of a Stringlist.

Syntax

[%rc =] sl:AppendClientCertificateRequest( [PublicKey=] string, - [[Country=] string], - [[State=] string], - [[City=] string], - [[Organization=] string], - [[OrganizationalUnit=] string], - [[CommonName=] string], - [[Challenge=] 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 elsewhere in Return codes.
sl A Stringlist object to contain the certificate request that is produced.
PublicKey This name allowed parameter is a string or Stringlist object that contains an RSA-generated client public key.
Country This name allowed, optional, string argument inserts a country value into the generated certificate request.
State This name allowed, optional, string argument inserts a state/province value into the generated certificate request.
City This name allowed, optional, string argument inserts a locality value into the generated certificate request.
Organization This name allowed, optional, string argument inserts an organization value (for example, a company name) into the generated certificate request.
OrganizationalUnit This name allowed, optional, string argument inserts an organization unit (OU) value into the generated certificate request. For example, a department within a company.
CommonName This name allowed, optional, string argument inserts a common-name (CN) value into the generated certificate request. For example, a host name like "www.sirius-software.com".
Challenge This name allowed, optional, string argument inserts the expected authentication challenge data/password. You might need to identify the type of authentication, for example, certificate-based authentication.
SignatureAlgorithm This optional, name required, argument is a DigestAlgorithm enumeration value. Valid values are: MD5, SHA1, SHA256, SHA384 (Model 204 7.7 and later), and SHA512 (Model 204 7.7 and later). The default value is SHA256 as of Model 204 7.7 (and zap maintenance for versions 7.6 and 7.5).

Note: Although supported and formerly the default, most modern browsers are deprecating SHA1.

Return codes

0All is well.
3Out of CCATEMP.
5Stringlist identifier missing.
6Invalid Stringlist identifier.
7Insufficient storage.
10Public key Stringlist identifier missing.
11Invalid public key Stringlist identifier.
12Invalid public key.
13Challenge data mismatch.
14Bad public key/challenge signature.

Usage notes

For some background information concerning certificates, see Public-key cryptography and Certificate signing request.

Examples

For a closely related example, see the AppendCertificateRequest Examples section.

See also

Stringlist methods:

String methods:

System methods:

Socket methods: