Certificate (Socket function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
{{Template:Socket:Certificate subtitle}}
{{Template:Socket:Certificate subtitle}}


This page is [[under construction]].
This method is designed to enable a server socket to get a <var>Longstring</var> version of a client socket's SSL certificate.
 
==Syntax==
==Syntax==
{{Template:Socket:Certificate syntax}}
{{Template:Socket:Certificate syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%string</th><td>This <var>Longstring</var> contains the binary 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>%string</th><td>A <var>Longstring</var> to contain the binary content of the SSL certificate presented by the client socket (if <var class="term">socket</var> is a server socket).  
If no certificate is provided (for whatever reason), <var class="term">%string</var> is a null string. If <var class="term">socket</var> is a client socket, <var class="term">%string</var> is always a null string. </td></tr>
<tr><th>socket</th>
<tr><th>socket</th>
<td>Socket object</td></tr>
<td>A variable or an expression that is a reference to a server or client <var>Socket</var> object.</td></tr>
<tr><th><var>RequestCertificate</var></th>
<tr><th><var>RequestCertificate</var></th>
<td><var>Boolean</var> value</td></tr>
<td>This [[Notation conventions for methods#Named parameters|name required]] argument is a <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> enumeration. If the value is <code>True</code>:
<ul>
<li>If <var class="term">socket</var> is a server socket, it requests a certificate from its client socket at the time of the method call.
<li>If <var class="term">socket</var> is a client socket, this option is valid but meaningless (the server sends its certificate during the connection negotiation), and no certificate request occurs.
</ul>
 
If the argument value is <code>False</code> &mdash; the default &mdash; no certificate request occurs.
</td></tr>
</table>
</table>


==Usage notes==
==Usage notes==
==Examples==
<ul>
<li>Specifying <code>RequestCertificate=True</code> only has an effect for 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).
</ul>
 
==See also==
==See also==
{{Template:Socket:Certificate footer}}
{{Template:Socket:Certificate footer}}

Revision as of 01:19, 15 November 2011

Retrieve the SSL certificate (Socket class)

[Introduced in Sirius Mods 8.0]


This method is designed to enable a server socket to get a Longstring version of a client socket's SSL certificate.

Syntax

%string = socket:Certificate[( [RequestCertificate= boolean])]

Syntax terms

%stringA Longstring to contain the binary content of the SSL certificate presented by the client socket (if socket is a server socket). If no certificate is provided (for whatever reason), %string is a null string. If socket is a client socket, %string is always a null string.
socket A variable or an expression that is a reference to a server or client Socket object.
RequestCertificate This name required argument is a Boolean enumeration. If the value is True:
  • If socket is a server socket, it requests a certificate from its client socket at the time of the method call.
  • If socket is a client socket, this option is valid but meaningless (the server sends its certificate during the connection negotiation), and no certificate request occurs.

If the argument value is False — the default — no certificate request occurs.

Usage notes

  • Specifying RequestCertificate=True only has an effect for 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