|
@@ -2,16 +2,36 @@
|
|
|
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
|
|
|
|
|
-<section id="textops.functions" xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
|
- <sectioninfo>
|
|
|
+<section id="textops.functions">
|
|
|
+ <sectioninfo>
|
|
|
<revhistory>
|
|
|
<revision>
|
|
|
<revnumber>$Revision$</revnumber>
|
|
|
<date>$Date$</date>
|
|
|
</revision>
|
|
|
</revhistory>
|
|
|
- </sectioninfo>
|
|
|
+ </sectioninfo>
|
|
|
+
|
|
|
+ <title>Functions</title>
|
|
|
+
|
|
|
+ <section id="tls.is_peer_verfied">
|
|
|
+ <title><function>is_peer_verified()</function></title>
|
|
|
+ <para>
|
|
|
+ Returns true if the connection on which the message was received
|
|
|
+ is TLS , the peer presented an X509 certificate and the
|
|
|
+ certificate chain verified ok.
|
|
|
+ It can be used only in a request route.
|
|
|
+ </para>
|
|
|
+ <example>
|
|
|
+ <title><function>is_peer_verified</function> usage</title>
|
|
|
+ <programlisting>
|
|
|
+ if (proto==TLS && !is_peer_verified()){
|
|
|
+ sl_send_reply("400", "No certificate or verification failed");
|
|
|
+ drop;
|
|
|
+ }
|
|
|
+ </programlisting>
|
|
|
+ </example>
|
|
|
+ </section>
|
|
|
|
|
|
- <title>Functions</title>
|
|
|
|
|
|
</section>
|