Certificate (Socket function): Difference between revisions
Jump to navigation
Jump to search
m (→See also) |
m (minor cleanup) |
||
Line 1: | Line 1: | ||
{{Template:Socket:Certificate subtitle}} | {{Template:Socket:Certificate subtitle}} | ||
This method | This method enables a server socket to get a <var>Longstring</var> version of a client socket's SSL certificate. | ||
==Syntax== | ==Syntax== | ||
Line 10: | Line 10: | ||
<tr><th>%string</th><td>A <var>Longstring</var> to contain a copy of the binary, ASN.1 encoded, content of the SSL certificate presented by the client socket (if <var class="term">socket</var> is a server socket). | <tr><th>%string</th><td>A <var>Longstring</var> to contain a copy of the binary, ASN.1 encoded, 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> | 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>A variable or an expression that is a reference to a server or client <var>Socket</var> 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>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>: | <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> | <ul> | ||
<li>If <var class="term">socket</var> is a server socket, the method requests a certificate from the client socket at the time of the method call. | <li>If <var class="term">socket</var> is a server socket, the method requests a certificate from the client socket at the time of the method call. </li> | ||
<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. | <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. </li> | ||
</ul> | </ul> | ||
Line 32: | Line 34: | ||
Related methods: | Related methods: | ||
<ul> | <ul> | ||
<li><var>String</var> class: <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>System</var> class: <var>[[ClientCertificate (System function)|ClientCertificate]]</var> | <li><var>System</var> class: <var>[[ClientCertificate (System function)|ClientCertificate]]</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>[[ | <li><var>Stringlist</var> class: <var>[[PemToString (Stringlist function)|PemToString]]</var> | ||
</ul> | </ul> | ||
{{Template:Socket:Certificate footer}} | {{Template:Socket:Certificate footer}} |
Revision as of 19:08, 14 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
%string | A 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 the argument value is |
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
Related methods:
- String class: DerToXmlDoc, X509CrlToXmlDoc, X509CertificateToXmlDoc, and RSAPrivateKeyToXmlDoc
- System class: ClientCertificate
- HttpRequest class: Get, Post, and Send
- Stringlist class: PemToString