CertLevels (Socket function): Difference between revisions
m (1 revision) |
m (→Syntax terms) |
||
Line 17: | Line 17: | ||
<td>Return string, which contains the value of the number of levels of the certificate provided by the remote partner on a socket. | <td>Return string, which contains the value of the number of levels of the certificate provided by the remote partner on a socket. | ||
If no such certificate was provided, the null string is returned. Otherwise, level 0 corresponds to the client or the "subject" of the certificate; level 1 to the "signer" of the certificate; level 2 to the "signer" of the level 1 signer's certificate; and so on. | If no such certificate was provided, the null string is returned. Otherwise, level 0 corresponds to the client or the "subject" of the certificate; level 1 to the "signer" of the certificate; level 2 to the "signer" of the level 1 signer's certificate; and so on. | ||
Since all certificates accepted by <var class="product">Janus Network Security</var> must be signed, <var class="term">%cl</var> will always be greater than or equal to 2 if non-zero. Level 3 would indicate a certificate that includes an intermediate certificate. | Since all certificates accepted by <var class="product">Janus Network Security</var> must be signed, <var class="term">%cl</var> will always be greater than or equal to 2 if non-zero. Level 3 would indicate a certificate that includes an intermediate certificate. | ||
For information on the data that can be retrieved for each certificate level see <var>[[CertInfo (Socket function)|CertInfo]]</var>. To learn more about client certificates, see the [http://www.sirius-software.com/maint/download/jansslr.pdf Janus Network Security Reference Manual]. | |||
For information on the data that can be retrieved for each certificate level see <var>[[CertInfo (Socket function)|CertInfo]]</var>. To learn more about client certificates, see the <i>[http://www.sirius-software.com/maint/download/jansslr.pdf Janus Network Security Reference Manual]</i>. | |||
</td></tr> | </td></tr> | ||
<tr><th>%socko</th> | <tr><th>%socko</th> |
Revision as of 22:02, 8 November 2011
<section begin=dpl_desc/><section end=dpl_desc/>
CertLevels is a member of the Socket class.
This method retrieves the number of levels of the SSL certificate provided on a socket by the remote partner. The CertLevels function has an effect similar to its equivalent $function, $Sock_Cert_Levels.
Syntax
%cl = %socko:CertLevels
Syntax terms
%cl | Return string, which contains the value of the number of levels of the certificate provided by the remote partner on a socket.
If no such certificate was provided, the null string is returned. Otherwise, level 0 corresponds to the client or the "subject" of the certificate; level 1 to the "signer" of the certificate; level 2 to the "signer" of the level 1 signer's certificate; and so on. Since all certificates accepted by Janus Network Security must be signed, %cl will always be greater than or equal to 2 if non-zero. Level 3 would indicate a certificate that includes an intermediate certificate. For information on the data that can be retrieved for each certificate level see CertInfo. To learn more about client certificates, see the Janus Network Security Reference Manual. |
---|---|
%socko | A variable or an expression that is a reference to a socket object. |
Usage notes
- CertLevels returns the value -1 if the socket is not open
and
ONRESET CONTINUE
is in effect for the socket. - A CertLevels call may cause an SSL renegotiation in order to request a digital certificate from the client.
Example
The following statement
returns the number of levels of the certificate received from the remote partner
using the %sok
socket:
%count = %sok:Certlevels