ClientCertificate (System function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
{{Template:System:ClientCertificate subtitle}}
{{Template:System:ClientCertificate subtitle}}
The <var>ClientCertificate</var> function returns to a Janus server a [[Longstrings|Longstring]] that contains the binary content of a client SSL certificate.   
The <var>ClientCertificate</var> function returns to a Janus server a <var>[[Longstrings|Longstring]]</var> that contains the binary content of a client SSL certificate.   
                                                                                
                                                                                
==Syntax==
==Syntax==
{{Template:System:ClientCertificate syntax}}
{{Template:System:ClientCertificate syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%string</th>
<tr><th>%string</th>
<td>This <var>Longstring</var> contains a copy of the binary, ASN.1 encoded, content of the SSL certificate presented by this server's client. If no client certificate is provided (possibly because the port is not using SSL, or the certificate was already provided), <var class="term">%string</var> is a null string.  </td></tr>
<td>This <var>Longstring</var> contains a copy of the binary, ASN.1 encoded, content of the SSL certificate presented by this server's client. If no client certificate is provided (possibly because the port is not using SSL, or the certificate was already provided), <var class="term">%string</var> is a null string.  </td></tr>
<tr><th><var>%(System)</var></th>
<tr><th><var>%(System)</var></th>
<td>The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. <var>ClientCertificate</var> can also be invoked via a <var>System</var> object variable, which may be <var>null</var>.</td></tr>
<td>The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. <var>ClientCertificate</var> can also be invoked via a <var>System</var> object variable, which may be <var>null</var>.</td></tr>
<tr><th><var>RequestCertificate</var></th>
<tr><th><var>RequestCertificate</var></th>
<td>This [[Notation conventions for methods#Named parameters|name required]] argument is a <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> enumeration. If <var>True</var>, a certificate is requested from the client at the time of the method call. If <var>False</var>, no certificate is requested.
<td>This [[Notation conventions for methods#Named parameters|name required]] argument is a <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> enumeration. If <var>True</var>, a certificate is requested from the client at the time of the method call. If <var>False</var>, no certificate is requested.
</td></tr></table>
</td></tr>
</table>


==Usage notes==
==Usage notes==
Line 18: Line 22:
<li>This method can be used only on a <var class="product">Janus Web Server</var>, <var class="product">Janus Telnet Server</var>, or <var class="product">Janus Sockets</var> Server thread. If used on any other kind of thread, it throws a  
<li>This method can be used only on a <var class="product">Janus Web Server</var>, <var class="product">Janus Telnet Server</var>, or <var class="product">Janus Sockets</var> Server thread. If used on any other kind of thread, it throws a  
<var>[[NotJanusConnection class|NotJanusConnection]]</var> exception.  
<var>[[NotJanusConnection class|NotJanusConnection]]</var> exception.  
<li>Specifying <code>RequestCertificate=True</code> only has an effect on a Janus <var>[[SSL]]</var> port whose definition does ''not'' include <var>[[SSLCLCERT and SSLCLCERTR|SSLCLCERT]]</var> or <var>[[SSLCLCERT and SSLCLCERTR|SSLCLCERTR]]</var>. These parameters request a client certificate at connection-establishment time, and a client certificate
<li>Specifying <code>RequestCertificate=True</code> only has an effect on a Janus <var>[[SSL]]</var> port whose definition does ''not'' include <var>[[SSLCLCERT and SSLCLCERTR|SSLCLCERT]]</var> or <var>[[SSLCLCERT and SSLCLCERTR|SSLCLCERTR]]</var>. These parameters request a client certificate at connection-establishment time, and a client certificate
may only be requested once for an SSL session (whether or not the request successfully gets a certificate in return).
may only be requested once for an SSL session (whether or not the request successfully gets a certificate in return).
Line 26: Line 31:
<ul>
<ul>
<li><var>String</var> class: <var>[[DerToXmlDoc_(String_function)|DerToXmlDoc]]</var>, <var>[[X509CrlToXmlDoc_(String_function)|X509CrlToXmlDoc]]</var>, <var>[[X509CertificateToXmlDoc_(String_function)|X509CertificateToXmlDoc]]</var>, and <var>[[RSAPrivateKeyToXmlDoc _(String_function)|RSAPrivateKeyToXmlDoc]]</var>
<li><var>String</var> class: <var>[[DerToXmlDoc_(String_function)|DerToXmlDoc]]</var>, <var>[[X509CrlToXmlDoc_(String_function)|X509CrlToXmlDoc]]</var>, <var>[[X509CertificateToXmlDoc_(String_function)|X509CertificateToXmlDoc]]</var>, and <var>[[RSAPrivateKeyToXmlDoc _(String_function)|RSAPrivateKeyToXmlDoc]]</var>
<li><var>Socket</var> class: <var>[[Certificate (Socket function)|Certificate]]</var>  
<li><var>Socket</var> class: <var>[[Certificate (Socket function)|Certificate]]</var>  
<li><var>HttpRequest</var> class: <var>[[Get (HttpRequest function)|Get]]</var>, <var>[[Post (HttpRequest function)|Post]]</var>, and <var>[[Send (HttpRequest function)|Send]]</var>  
<li><var>HttpRequest</var> class: <var>[[Get (HttpRequest function)|Get]]</var>, <var>[[Post (HttpRequest function)|Post]]</var>, and <var>[[Send (HttpRequest function)|Send]]</var>  
<li><var>Stringlist</var> class: <var>[[PemToString_(Stringlist_function)|PemToString]]</var>  
<li><var>Stringlist</var> class: <var>[[PemToString_(Stringlist_function)|PemToString]]</var>  
</ul>
</ul>


{{Template:System:ClientCertificate footer}}
{{Template:System:ClientCertificate footer}}

Revision as of 17:50, 16 November 2012

Get client certificate (System class)

[Introduced in Sirius Mods 8.0]

The ClientCertificate function returns to a Janus server a Longstring that contains the binary content of a client SSL certificate.

Syntax

%string = %(System):ClientCertificate[( [RequestCertificate= boolean])] Throws NotJanusConnection

Syntax terms

%string This Longstring contains a copy of the binary, ASN.1 encoded, content of the SSL certificate presented by this server's client. If no client certificate is provided (possibly because the port is not using SSL, or the certificate was already provided), %string is a null string.
%(System) The class name in parentheses denotes a shared method. ClientCertificate can also be invoked via a System object variable, which may be null.
RequestCertificate This name required argument is a Boolean enumeration. If True, a certificate is requested from the client at the time of the method call. If False, no certificate is requested.

Usage notes

  • This method can be used only on a Janus Web Server, Janus Telnet Server, or Janus Sockets Server thread. If used on any other kind of thread, it throws a NotJanusConnection exception.
  • Specifying RequestCertificate=True only has an effect on a Janus SSL port whose definition does not include SSLCLCERT or SSLCLCERTR. These parameters request a client certificate at connection-establishment time, and a client certificate may only be requested once for an SSL session (whether or not the request successfully gets a certificate in return).

See also

Related methods: