Certificate (Socket function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (→‎See also: add mention of String cipher methods)
m (→‎See also: add mention of String cipher methods)
Line 33: Line 33:
==See also==
==See also==
<p>
<p>
<var>String</var> class: </p>
<var>String</var> methods: </p>
<ul>
<ul>
<li><var>[[CertificateRequest (String function)|CertificateRequest]]</var> </li>
<li><var>[[CertificateRequest (String function)|CertificateRequest]]</var> </li>

Revision as of 21:42, 15 March 2016

Retrieve the SSL certificate (Socket class)

[Introduced in Sirius Mods 8.0]


This method enables 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 a copy of the binary, ASN.1 encoded, 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, the method requests a certificate from the 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

String methods:

Stringlist methods:

System methods:

HttpRequest methods: