diff --git a/doc/stunnel.8 b/doc/stunnel.8
index 7624a27..fcfb660 100644
--- a/doc/stunnel.8
+++ b/doc/stunnel.8
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -38,31 +38,36 @@
 .    ds PI \(*p
 .    ds L" ``
 .    ds R" ''
+.    ds C`
+.    ds C'
 'br\}
 .\"
 .\" Escape single quotes in literal strings from groff's Unicode transform.
 .ie \n(.g .ds Aq \(aq
 .el       .ds Aq '
 .\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" If the F register is >0, we'll generate index entries on stderr for
 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
 ..
-.    nr % 0
-.    rr F
-.\}
-.el \{\
+.if !\nF .nr F 0
+.if \nF>0 \{\
 .    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
 ..
+.    if !\nF==2 \{\
+.        nr % 0
+.        nr F 2
+.    \}
 .\}
 .\" ========================================================================
 .\"
 .IX Title "STUNNEL 8"
-.TH STUNNEL 8 "2013.03.20" "4.56" "stunnel"
+.TH STUNNEL 8 "2018.04.10" "4.56" "stunnel"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -87,8 +92,8 @@ your system you can easily set them up to communicate with clients over
 secure \s-1SSL\s0 channels.
 .PP
 \&\fBstunnel\fR can be used to add \s-1SSL\s0 functionality to commonly used \fIInetd\fR
-daemons like \s-1POP\-2\s0, \s-1POP\-3\s0, and \s-1IMAP\s0 servers, to standalone daemons like
-\&\s-1NNTP\s0, \s-1SMTP\s0 and \s-1HTTP\s0, and in tunneling \s-1PPP\s0 over network sockets without
+daemons like \s-1POP\-2, POP\-3,\s0 and \s-1IMAP\s0 servers, to standalone daemons like
+\&\s-1NNTP, SMTP\s0 and \s-1HTTP,\s0 and in tunneling \s-1PPP\s0 over network sockets without
 changes to the source code.
 .PP
 This product includes cryptographic software written by
@@ -147,7 +152,7 @@ A port number.
 A colon-separated pair of \s-1IP\s0 address (either IPv4, IPv6, or domain name) and port number.
 .IP "\(bu" 4
 A Unix socket path (Unix only).
-.SS "\s-1GLOBAL\s0 \s-1OPTIONS\s0"
+.SS "\s-1GLOBAL OPTIONS\s0"
 .IX Subsection "GLOBAL OPTIONS"
 .IP "\fBchroot\fR = directory (Unix only)" 4
 .IX Item "chroot = directory (Unix only)"
@@ -174,7 +179,7 @@ select data compression algorithm
 .Sp
 default: no compression
 .Sp
-deflate is the standard compression method as described in \s-1RFC\s0 1951.
+deflate is the standard compression method as described in \s-1RFC 1951.\s0
 .Sp
 zlib compression of \fBOpenSSL 0.9.8\fR or above is not backward compatible with
 \&\fBOpenSSL 0.9.7\fR.
@@ -226,14 +231,14 @@ OpenSC engine
 .IX Item "engineCtrl = command[:parameter]"
 control hardware engine
 .Sp
-Special commands \*(L"\s-1LOAD\s0\*(R" and \*(L"\s-1INIT\s0\*(R" can be used to load and initialize the
+Special commands \*(L"\s-1LOAD\*(R"\s0 and \*(L"\s-1INIT\*(R"\s0 can be used to load and initialize the
 engine cryptogaphic module.
 .IP "\fBfips\fR = yes | no" 4
 .IX Item "fips = yes | no"
-Enable or disable \s-1FIPS\s0 140\-2 mode.
+Enable or disable \s-1FIPS 140\-2\s0 mode.
 .Sp
 This option allows to disable entering \s-1FIPS\s0 mode if \fBstunnel\fR was compiled
-with \s-1FIPS\s0 140\-2 support.
+with \s-1FIPS 140\-2\s0 support.
 .Sp
 default: yes
 .IP "\fBforeground\fR = yes | no (Unix only)" 4
@@ -263,7 +268,7 @@ bytes to read from random seed files
 .Sp
 Number of bytes of data read from random seed files.  With \s-1SSL\s0 versions less
 than \fB0.9.5a\fR, also determines how many bytes of data are considered
-sufficient to seed the \s-1PRNG\s0.  More recent \fBOpenSSL\fR versions have a builtin
+sufficient to seed the \s-1PRNG.\s0  More recent \fBOpenSSL\fR versions have a builtin
 function to determine when sufficient randomness is available.
 .IP "\fBRNDfile\fR = file" 4
 .IX Item "RNDfile = file"
@@ -325,7 +330,7 @@ you distinguish \fBstunnel\fR services in your log files.
 .PP
 Note that if you wish to run \fBstunnel\fR in \fIinetd\fR mode (where it
 is provided a network socket by a server such as \fIinetd\fR, \fIxinetd\fR,
-or \fItcpserver\fR) then you should read the section entitled \fI\s-1INETD\s0 \s-1MODE\s0\fR
+or \fItcpserver\fR) then you should read the section entitled \fI\s-1INETD MODE\s0\fR
 below.
 .IP "\fBaccept\fR = address" 4
 .IX Item "accept = address"
@@ -344,7 +349,7 @@ Certificate Authority directory
 .Sp
 This is the directory in which \fBstunnel\fR will look for certificates when using
 the \fIverify\fR.  Note that the certificates in this directory should be named
-\&\s-1XXXXXXXX\s0.0 where \s-1XXXXXXXX\s0 is the hash value of the \s-1DER\s0 encoded subject of the
+\&\s-1XXXXXXXX.0\s0 where \s-1XXXXXXXX\s0 is the hash value of the \s-1DER\s0 encoded subject of the
 cert.
 .Sp
 The hash algorithm has been changed in \fBOpenSSL 1.0.0\fR.  It is required to
@@ -365,6 +370,36 @@ Specifying this flag in client mode will use this certificate chain
 as a client side certificate chain.  Using client side certs is optional.
 The certificates must be in \s-1PEM\s0 format and must be sorted starting with the
 certificate to the highest level (root \s-1CA\s0).
+.IP "\fBcheckEmail\fR = \s-1EMAIL\s0" 4
+.IX Item "checkEmail = EMAIL"
+email address of the peer certificate subject
+.Sp
+Multiple \fIcheckEmail\fR options are allowed in a single service section.
+Certificates are accepted if no \fIcheckEmail\fR option was specified, or the
+email address of the peer certificate matches any of the email addresses
+specified with \fIcheckEmail\fR.
+.Sp
+This option requires OpenSSL 1.0.2 or later.
+.IP "\fBcheckHost\fR = \s-1HOST\s0" 4
+.IX Item "checkHost = HOST"
+host of the peer certificate subject
+.Sp
+Multiple \fIcheckHost\fR options are allowed in a single service section.
+Certificates are accepted if no \fIcheckHost\fR option was specified, or the host
+name of the peer certificate matches any of the hosts specified with
+\&\fIcheckHost\fR.
+.Sp
+This option requires OpenSSL 1.0.2 or later.
+.IP "\fBcheckIP\fR = \s-1IP\s0" 4
+.IX Item "checkIP = IP"
+\&\s-1IP\s0 address of the peer certificate subject
+.Sp
+Multiple \fIcheckIP\fR options are allowed in a single service section.
+Certificates are accepted if no \fIcheckIP\fR option was specified, or the \s-1IP\s0
+address of the peer certificate matches any of the \s-1IP\s0 addresses specified with
+\&\fIcheckIP\fR.
+.Sp
+This option requires OpenSSL 1.0.2 or later.
 .IP "\fBciphers\fR = cipherlist" 4
 .IX Item "ciphers = cipherlist"
 Select permitted \s-1SSL\s0 ciphers
@@ -393,7 +428,7 @@ Certificate Revocation Lists directory
 .Sp
 This is the directory in which \fBstunnel\fR will look for CRLs when
 using the \fIverify\fR. Note that the CRLs in this directory should
-be named \s-1XXXXXXXX\s0.r0 where \s-1XXXXXXXX\s0 is the hash value of the \s-1CRL\s0.
+be named \s-1XXXXXXXX\s0.r0 where \s-1XXXXXXXX\s0 is the hash value of the \s-1CRL.\s0
 .Sp
 The hash algorithm has been changed in \fBOpenSSL 1.0.0\fR.  It is required to
 c_rehash the directory on upgrade from \fBOpenSSL 0.x.x\fR to \fBOpenSSL 1.x.x\fR.
@@ -419,8 +454,8 @@ default: prime256v1
 .IX Item "delay = yes | no"
 delay \s-1DNS\s0 lookup for 'connect' option
 .Sp
-This option is useful for dynamic \s-1DNS\s0, or when \s-1DNS\s0 is not available during
-\&\fBstunnel\fR startup (road warrior \s-1VPN\s0, dial-up configurations).
+This option is useful for dynamic \s-1DNS,\s0 or when \s-1DNS\s0 is not available during
+\&\fBstunnel\fR startup (road warrior \s-1VPN,\s0 dial-up configurations).
 .IP "\fBengineNum\fR = engine number" 4
 .IX Item "engineNum = engine number"
 select engine number to read private key
@@ -450,7 +485,7 @@ Failover strategy for multiple \*(L"connect\*(R" targets.
 default: rr
 .IP "\fBident\fR = username" 4
 .IX Item "ident = username"
-use \s-1IDENT\s0 (\s-1RFC\s0 1413) username checking
+use \s-1IDENT\s0 (\s-1RFC 1413\s0) username checking
 .IP "\fBkey\fR = keyfile" 4
 .IX Item "key = keyfile"
 private key for certificate specified with \fIcert\fR option
@@ -476,7 +511,7 @@ Use this option to bind a static local \s-1IP\s0 address, instead.
 .IP "\fBsni\fR = service_name:server_name_pattern (server mode)" 4
 .IX Item "sni = service_name:server_name_pattern (server mode)"
 Use the service as a slave service (a name-based virtual server) for Server
-Name Indication \s-1TLS\s0 extension (\s-1RFC\s0 3546).
+Name Indication \s-1TLS\s0 extension (\s-1RFC 3546\s0).
 .Sp
 \&\fIservice_name\fR specifies the master service that accepts client connections
 with \fIaccept\fR option.  \fIserver_name_pattern\fR specifies the host name to be
@@ -497,21 +532,35 @@ Libwrap checks (Unix only) are performed twice: with master service name after
 Option \fIsni\fR is only available when compiled with \fBOpenSSL 1.0.0\fR and later.
 .IP "\fBsni\fR = server_name (client mode)" 4
 .IX Item "sni = server_name (client mode)"
-Use the parameter as the value of \s-1TLS\s0 Server Name Indication (\s-1RFC\s0 3546)
+Use the parameter as the value of \s-1TLS\s0 Server Name Indication (\s-1RFC 3546\s0)
 extension.
 .Sp
 Option \fIsni\fR is only available when compiled with \fBOpenSSL 1.0.0\fR and later.
 .IP "\fB\s-1OCSP\s0\fR = url" 4
 .IX Item "OCSP = url"
 select \s-1OCSP\s0 server for certificate verification
+.IP "\fBOCSPaia\fR = yes | no" 4
+.IX Item "OCSPaia = yes | no"
+validate certificates with their \s-1AIA OCSP\s0 responders
+.Sp
+This option enables \fIstunnel\fR to validate certificates with the list of
+\&\s-1OCSP\s0 responder URLs retrieved from their \s-1AIA\s0 (Authority Information Access)
+extension.
 .IP "\fBOCSPflag\fR = flag" 4
 .IX Item "OCSPflag = flag"
 specify \s-1OCSP\s0 server flag
 .Sp
 Several \fIOCSPflag\fR can be used to specify multiple flags.
 .Sp
-currently supported flags: \s-1NOCERTS\s0, \s-1NOINTERN\s0 \s-1NOSIGS\s0, \s-1NOCHAIN\s0, \s-1NOVERIFY\s0,
-\&\s-1NOEXPLICIT\s0, \s-1NOCASIGN\s0, \s-1NODELEGATED\s0, \s-1NOCHECKS\s0, \s-1TRUSTOTHER\s0, \s-1RESPID_KEY\s0, \s-1NOTIME\s0
+currently supported flags: \s-1NOCERTS, NOINTERN NOSIGS, NOCHAIN, NOVERIFY,
+NOEXPLICIT, NOCASIGN, NODELEGATED, NOCHECKS, TRUSTOTHER, RESPID_KEY, NOTIME\s0
+.IP "\fBOCSPnonce\fR = yes | no" 4
+.IX Item "OCSPnonce = yes | no"
+send and verify the \s-1OCSP\s0 nonce extension
+.Sp
+This option protects the \s-1OCSP\s0 protocol against replay attacks.  Due to its
+computational overhead, the nonce extension is usually only supported on
+internal (e.g. corporate) responders, and not on public \s-1OCSP\s0 responders.
 .IP "\fBoptions\fR = SSL_options" 4
 .IX Item "options = SSL_options"
 \&\fBOpenSSL\fR library options
@@ -542,15 +591,15 @@ Proprietary (undocummented) extension of \s-1CIFS\s0 protocol implemented in Sam
 Support for this extension was dropped in Samba 3.0.0.
 .IP "\fIconnect\fR" 4
 .IX Item "connect"
-Based on \s-1RFC\s0 2817 \- \fIUpgrading to \s-1TLS\s0 Within \s-1HTTP/1\s0.1\fR, section 5.2 \- \fIRequesting a Tunnel with \s-1CONNECT\s0\fR
+Based on \s-1RFC 2817\s0 \- \fIUpgrading to \s-1TLS\s0 Within \s-1HTTP/1.1\s0\fR, section 5.2 \- \fIRequesting a Tunnel with \s-1CONNECT\s0\fR
 .Sp
 This protocol is only supported in client mode.
 .IP "\fIimap\fR" 4
 .IX Item "imap"
-Based on \s-1RFC\s0 2595 \- \fIUsing \s-1TLS\s0 with \s-1IMAP\s0, \s-1POP3\s0 and \s-1ACAP\s0\fR
+Based on \s-1RFC 2595\s0 \- \fIUsing \s-1TLS\s0 with \s-1IMAP, POP3\s0 and \s-1ACAP\s0\fR
 .IP "\fInntp\fR" 4
 .IX Item "nntp"
-Based on \s-1RFC\s0 4642 \- \fIUsing Transport Layer Security (\s-1TLS\s0) with Network News Transfer Protocol (\s-1NNTP\s0)\fR
+Based on \s-1RFC 4642\s0 \- \fIUsing Transport Layer Security (\s-1TLS\s0) with Network News Transfer Protocol (\s-1NNTP\s0)\fR
 .Sp
 This protocol is only supported in client mode.
 .IP "\fIpgsql\fR" 4
@@ -558,13 +607,13 @@ This protocol is only supported in client mode.
 Based on http://www.postgresql.org/docs/8.3/static/protocol\-flow.html#AEN73982
 .IP "\fIpop3\fR" 4
 .IX Item "pop3"
-Based on \s-1RFC\s0 2449 \- \fI\s-1POP3\s0 Extension Mechanism\fR
+Based on \s-1RFC 2449\s0 \- \fI\s-1POP3\s0 Extension Mechanism\fR
 .IP "\fIproxy\fR" 4
 .IX Item "proxy"
 Haproxy client \s-1IP\s0 address http://haproxy.1wt.eu/download/1.5/doc/proxy\-protocol.txt
 .IP "\fIsmtp\fR" 4
 .IX Item "smtp"
-Based on \s-1RFC\s0 2487 \- \fI\s-1SMTP\s0 Service Extension for Secure \s-1SMTP\s0 over \s-1TLS\s0\fR
+Based on \s-1RFC 2487\s0 \- \fI\s-1SMTP\s0 Service Extension for Secure \s-1SMTP\s0 over \s-1TLS\s0\fR
 .RE
 .RS 4
 .RE
@@ -613,7 +662,7 @@ this issue.
 default: yes (if supported by \fBOpenSSL\fR)
 .IP "\fBreset\fR = yes | no" 4
 .IX Item "reset = yes | no"
-attempt to use \s-1TCP\s0 \s-1RST\s0 flag to indicate an error
+attempt to use \s-1TCP RST\s0 flag to indicate an error
 .Sp
 This option is not supported on some platforms.
 .Sp
@@ -820,7 +869,7 @@ jail.
 .IX Item "SIGUSR1"
 Close and reopen \fBstunnel\fR log file.
 This function can be used for log rotation.
-.IP "\s-1SIGTERM\s0, \s-1SIGQUIT\s0, \s-1SIGINT\s0" 4
+.IP "\s-1SIGTERM, SIGQUIT, SIGINT\s0" 4
 .IX Item "SIGTERM, SIGQUIT, SIGINT"
 Shut \fBstunnel\fR down.
 .PP
@@ -862,7 +911,7 @@ Note there must be no \fI[service_name]\fR section.
 \&\fBstunnel\fR cannot be used for the \s-1FTP\s0 daemon because of the nature
 of the \s-1FTP\s0 protocol which utilizes multiple ports for data transfers.
 There are available \s-1SSL\s0 enabled versions of \s-1FTP\s0 and telnet daemons, however.
-.SS "\s-1INETD\s0 \s-1MODE\s0"
+.SS "\s-1INETD MODE\s0"
 .IX Subsection "INETD MODE"
 The most common use of \fBstunnel\fR is to listen on a network
 port and establish communication with either a new port
@@ -953,7 +1002,7 @@ Important note: If /dev/urandom is available, \fBOpenSSL\fR often seeds the \s-1
 with it while checking the random state.  On systems with /dev/urandom
 \&\fBOpenSSL\fR is likely to use it even though it is listed at the very bottom of
 the list above.  This is the behaviour of \fBOpenSSL\fR and not \fBstunnel\fR.
-.SS "\s-1DH\s0 \s-1PARAMETERS\s0"
+.SS "\s-1DH PARAMETERS\s0"
 .IX Subsection "DH PARAMETERS"
 Stunnel 4.40 and later contains hardcoded 2048\-bit \s-1DH\s0 parameters.
 .PP
diff --git a/doc/stunnel.html b/doc/stunnel.html
index 9eef2c0..9e2bf61 100644
--- a/doc/stunnel.html
+++ b/doc/stunnel.html
@@ -4,341 +4,333 @@
 <head>
 <title>stunnel.8</title>
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:root@localhost" />
+<link rev="made" href="mailto:" />
 </head>
 
-<body style="background-color: white">
+<body>
 
 
-<!-- INDEX BEGIN -->
-<div name="index">
-<p><a name="__index__"></a></p>
-<!--
 
-<ul>
-
-	<li><a href="#name">NAME</a></li>
-	<li><a href="#synopsis">SYNOPSIS</a></li>
-	<li><a href="#description">DESCRIPTION</a></li>
-	<li><a href="#options">OPTIONS</a></li>
-	<li><a href="#configuration_file">CONFIGURATION FILE</a></li>
-	<ul>
-
-		<li><a href="#global_options">GLOBAL OPTIONS</a></li>
-		<li><a href="#service_level_options">SERVICE-LEVEL OPTIONS</a></li>
-	</ul>
-
-	<li><a href="#return_value">RETURN VALUE</a></li>
-	<li><a href="#signals">SIGNALS</a></li>
-	<li><a href="#examples">EXAMPLES</a></li>
-	<li><a href="#notes">NOTES</a></li>
-	<ul>
-
-		<li><a href="#restrictions">RESTRICTIONS</a></li>
-		<li><a href="#inetd_mode">INETD MODE</a></li>
-		<li><a href="#certificates">CERTIFICATES</a></li>
-		<li><a href="#randomness">RANDOMNESS</a></li>
-		<li><a href="#dh_parameters">DH PARAMETERS</a></li>
-	</ul>
-
-	<li><a href="#files">FILES</a></li>
-	<li><a href="#bugs">BUGS</a></li>
-	<li><a href="#see_also">SEE ALSO</a></li>
-	<li><a href="#author">AUTHOR</a></li>
-</ul>
-
--->
+<h1 id="NAME">NAME</h1>
 
+<p>stunnel - universal SSL tunnel</p>
 
-</div>
-<!-- INDEX END -->
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
 
-<p>
-</p>
-<h1><a name="name">NAME</a></h1>
-<p>stunnel - universal SSL tunnel</p>
-<p>
-</p>
-<hr />
-<h1><a name="synopsis">SYNOPSIS</a></h1>
 <dl>
-<dt><strong><a name="unix" class="item"><strong>Unix:</strong></a></strong></dt>
 
+<dt id="Unix"><b>Unix:</b></dt>
 <dd>
-<p><strong>stunnel</strong> [&lt;filename&gt;] | -fd&nbsp;n | -help | -version | -sockets</p>
-</dd>
-<dt><strong><a name="win32" class="item"><strong>WIN32:</strong></a></strong></dt>
 
+<p><b>stunnel</b> [&lt;<span style="white-space: nowrap;">filename</span>&gt;] | <span style="white-space: nowrap;">-fd n</span> | <span style="white-space: nowrap;">-help</span> | <span style="white-space: nowrap;">-version</span> | <span style="white-space: nowrap;">-sockets</span></p>
+
+</dd>
+<dt id="WIN32"><b>WIN32:</b></dt>
 <dd>
-<p><strong>stunnel</strong> [ [-install | -uninstall | -start | -stop] | -exit]
-    [-quiet] [&lt;filename&gt;] ] | -help | -version | -sockets</p>
+
+<p><b>stunnel</b> [ [<span style="white-space: nowrap;">-install</span> | <span style="white-space: nowrap;">-uninstall</span> | <span style="white-space: nowrap;">-start</span> | <span style="white-space: nowrap;">-stop</span>] | <span style="white-space: nowrap;">-exit</span>] [<span style="white-space: nowrap;">-quiet</span>] [&lt;<span style="white-space: nowrap;">filename</span>&gt;] ] | <span style="white-space: nowrap;">-help</span> | <span style="white-space: nowrap;">-version</span> | <span style="white-space: nowrap;">-sockets</span></p>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="description">DESCRIPTION</a></h1>
-<p>The <strong>stunnel</strong> program is designed to work as <em>SSL</em> encryption wrapper 
-between remote clients and local (<em>inetd</em>-startable) or remote
-servers. The concept is that having non-SSL aware daemons running on
-your system you can easily set them up to communicate with clients over
-secure SSL channels.</p>
-<p><strong>stunnel</strong> can be used to add SSL functionality to commonly used <em>Inetd</em>
-daemons like POP-2, POP-3, and IMAP servers, to standalone daemons like
-NNTP, SMTP and HTTP, and in tunneling PPP over network sockets without
-changes to the source code.</p>
-<p>This product includes cryptographic software written by
-Eric Young (<a href="mailto:eay@cryptsoft.com">eay@cryptsoft.com</a>)</p>
-<p>
-</p>
-<hr />
-<h1><a name="options">OPTIONS</a></h1>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>The <b>stunnel</b> program is designed to work as <i>SSL</i> encryption wrapper between remote clients and local (<i>inetd</i>-startable) or remote servers. The concept is that having non-SSL aware daemons running on your system you can easily set them up to communicate with clients over secure SSL channels.</p>
+
+<p><b>stunnel</b> can be used to add SSL functionality to commonly used <i>Inetd</i> daemons like POP-2, POP-3, and IMAP servers, to standalone daemons like NNTP, SMTP and HTTP, and in tunneling PPP over network sockets without changes to the source code.</p>
+
+<p>This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)</p>
+
+<h1 id="OPTIONS">OPTIONS</h1>
+
 <dl>
-<dt><strong><a name="filename" class="item">&lt;<strong>filename</strong>&gt;</a></strong></dt>
 
+<dt id="filename">&lt;<b>filename</b>&gt;</dt>
 <dd>
+
 <p>Use specified configuration file</p>
-</dd>
-<dt><strong><a name="n" class="item"><strong>-fd n</strong> (Unix only)</a></strong></dt>
 
+</dd>
+<dt id="fd-n-Unix-only"><b>-fd n</b> (Unix only)</dt>
 <dd>
+
 <p>Read the config file from specified file descriptor</p>
-</dd>
-<dt><strong><a name="help" class="item"><strong>-help</strong></a></strong></dt>
 
-<dd>
-<p>Print <strong>stunnel</strong> help menu</p>
 </dd>
-<dt><strong><a name="version" class="item"><strong>-version</strong></a></strong></dt>
-
+<dt id="help"><b>-help</b></dt>
 <dd>
-<p>Print <strong>stunnel</strong> version and compile time defaults</p>
+
+<p>Print <b>stunnel</b> help menu</p>
+
 </dd>
-<dt><strong><a name="sockets" class="item"><strong>-sockets</strong></a></strong></dt>
+<dt id="version"><b>-version</b></dt>
+<dd>
+
+<p>Print <b>stunnel</b> version and compile time defaults</p>
 
+</dd>
+<dt id="sockets"><b>-sockets</b></dt>
 <dd>
+
 <p>Print default socket options</p>
-</dd>
-<dt><strong><a name="install" class="item"><strong>-install</strong> (NT/2000/XP only)</a></strong></dt>
 
+</dd>
+<dt id="install-NT-2000-XP-only"><b>-install</b> (NT/2000/XP only)</dt>
 <dd>
+
 <p>Install NT Service</p>
-</dd>
-<dt><strong><a name="uninstall" class="item"><strong>-uninstall</strong> (NT/2000/XP only)</a></strong></dt>
 
+</dd>
+<dt id="uninstall-NT-2000-XP-only"><b>-uninstall</b> (NT/2000/XP only)</dt>
 <dd>
+
 <p>Uninstall NT Service</p>
-</dd>
-<dt><strong><a name="start" class="item"><strong>-start</strong> (NT/2000/XP only)</a></strong></dt>
 
+</dd>
+<dt id="start-NT-2000-XP-only"><b>-start</b> (NT/2000/XP only)</dt>
 <dd>
+
 <p>Start NT Service</p>
-</dd>
-<dt><strong><a name="stop" class="item"><strong>-stop</strong> (NT/2000/XP only)</a></strong></dt>
 
+</dd>
+<dt id="stop-NT-2000-XP-only"><b>-stop</b> (NT/2000/XP only)</dt>
 <dd>
+
 <p>Stop NT Service</p>
-</dd>
-<dt><strong><a name="exit" class="item"><strong>-exit</strong> (Win32 only)</a></strong></dt>
 
+</dd>
+<dt id="exit-Win32-only"><b>-exit</b> (Win32 only)</dt>
 <dd>
+
 <p>Exit an already started stunnel</p>
-</dd>
-<dt><strong><a name="quiet" class="item"><strong>-quiet</strong> (NT/2000/XP only)</a></strong></dt>
 
+</dd>
+<dt id="quiet-NT-2000-XP-only"><b>-quiet</b> (NT/2000/XP only)</dt>
 <dd>
-<p>Don't display any message boxes</p>
+
+<p>Don&#39;t display any message boxes</p>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="configuration_file">CONFIGURATION FILE</a></h1>
+
+<h1 id="CONFIGURATION-FILE">CONFIGURATION FILE</h1>
+
 <p>Each line of the configuration file can be either:</p>
+
 <ul>
-<li>
-<p>An empty line (ignored).</p>
+
+<li><p>An empty line (ignored).</p>
+
 </li>
-<li>
-<p>A comment starting with ';' (ignored).</p>
+<li><p>A comment starting with &#39;;&#39; (ignored).</p>
+
 </li>
-<li>
-<p>An 'option_name = option_value' pair.</p>
+<li><p>An &#39;option_name = option_value&#39; pair.</p>
+
 </li>
-<li>
-<p>'[service_name]' indicating a start of a service definition.</p>
+<li><p>&#39;[service_name]&#39; indicating a start of a service definition.</p>
+
 </li>
 </ul>
+
 <p>An address parameter of an option may be either:</p>
+
 <ul>
-<li>
-<p>A port number.</p>
+
+<li><p>A port number.</p>
+
 </li>
-<li>
-<p>A colon-separated pair of IP address (either IPv4, IPv6, or domain name) and port number.</p>
+<li><p>A colon-separated pair of IP address (either IPv4, IPv6, or domain name) and port number.</p>
+
 </li>
-<li>
-<p>A Unix socket path (Unix only).</p>
+<li><p>A Unix socket path (Unix only).</p>
+
 </li>
 </ul>
-<p>
-</p>
-<h2><a name="global_options">GLOBAL OPTIONS</a></h2>
+
+<h2 id="GLOBAL-OPTIONS">GLOBAL OPTIONS</h2>
+
 <dl>
-<dt><strong><a name="directory" class="item"><strong>chroot</strong> = directory (Unix only)</a></strong></dt>
 
+<dt id="chroot-directory-Unix-only"><b>chroot</b> = directory (Unix only)</dt>
 <dd>
-<p>directory to chroot <strong>stunnel</strong> process</p>
-<p><strong>chroot</strong> keeps <strong>stunnel</strong> in chrooted jail.  <em>CApath</em>, <em>CRLpath</em>, <em>pid</em>
-and <em>exec</em> are located inside the jail and the patches have to be relative
-to the directory specified with <strong>chroot</strong>.</p>
+
+<p>directory to chroot <b>stunnel</b> process</p>
+
+<p><b>chroot</b> keeps <b>stunnel</b> in chrooted jail. <i>CApath</i>, <i>CRLpath</i>, <i>pid</i> and <i>exec</i> are located inside the jail and the patches have to be relative to the directory specified with <b>chroot</b>.</p>
+
 <p>Several functions of the operating system also need their files to be located within chroot jail, e.g.:</p>
+
 <ul>
-<li>
-<p>Delayed resolver typically needs /etc/nsswitch.conf and /etc/resolv.conf.</p>
+
+<li><p>Delayed resolver typically needs /etc/nsswitch.conf and /etc/resolv.conf.</p>
+
 </li>
-<li>
-<p>Local time in log files needs /etc/timezone.</p>
+<li><p>Local time in log files needs /etc/timezone.</p>
+
 </li>
-<li>
-<p>Some other functions may need devices, e.g. /dev/zero or /dev/null.</p>
+<li><p>Some other functions may need devices, e.g. /dev/zero or /dev/null.</p>
+
 </li>
 </ul>
-</dd>
-<dt><strong><a name="compression_deflate_zlib_rle" class="item"><strong>compression</strong> = deflate | zlib | rle</a></strong></dt>
 
+</dd>
+<dt id="compression-deflate-zlib-rle"><b>compression</b> = deflate | zlib | rle</dt>
 <dd>
+
 <p>select data compression algorithm</p>
+
 <p>default: no compression</p>
-<p>deflate is the standard compression method as described in <a href="http://www.ietf.org/rfc/rfc1951.txt" class="rfc">RFC 1951</a>.</p>
-<p>zlib compression of <strong>OpenSSL 0.9.8</strong> or above is not backward compatible with
-<strong>OpenSSL 0.9.7</strong>.</p>
-<p>rle compression is currently not implemented by the <strong>OpenSSL</strong> library.</p>
-</dd>
-<dt><strong><a name="debug_facility_level" class="item"><strong>debug</strong> = [facility.]level</a></strong></dt>
 
+<p>deflate is the standard compression method as described in RFC 1951.</p>
+
+<p>zlib compression of <b>OpenSSL 0.9.8</b> or above is not backward compatible with <b>OpenSSL 0.9.7</b>.</p>
+
+<p>rle compression is currently not implemented by the <b>OpenSSL</b> library.</p>
+
+</dd>
+<dt id="debug-facility.-level"><b>debug</b> = [facility.]level</dt>
 <dd>
+
 <p>debugging level</p>
-<p>Level is a one of the syslog level names or numbers
-emerg (0), alert (1), crit (2), err (3), warning (4), notice (5),
-info (6), or debug (7).  All logs for the specified level and
-all levels numerically less than it will be shown.  Use <em>debug = debug</em> or
-<em>debug = 7</em> for greatest debugging output.  The default is notice (5).</p>
-<p>The syslog facility 'daemon' will be used unless a facility name is supplied.
-(Facilities are not supported on Win32.)</p>
+
+<p>Level is a one of the syslog level names or numbers emerg (0), alert (1), crit (2), err (3), warning (4), notice (5), info (6), or debug (7). All logs for the specified level and all levels numerically less than it will be shown. Use <i>debug = debug</i> or <i>debug = 7</i> for greatest debugging output. The default is notice (5).</p>
+
+<p>The syslog facility &#39;daemon&#39; will be used unless a facility name is supplied. (Facilities are not supported on Win32.)</p>
+
 <p>Case is ignored for both facilities and levels.</p>
-</dd>
-<dt><strong><a name="path" class="item"><strong>EGD</strong> = egd path (Unix only)</a></strong></dt>
 
+</dd>
+<dt id="EGD-egd-path-Unix-only"><b>EGD</b> = egd path (Unix only)</dt>
 <dd>
+
 <p>path to Entropy Gathering Daemon socket</p>
-<p>Entropy Gathering Daemon socket to use to feed <strong>OpenSSL</strong> random number
-generator.  (Available only if compiled with <strong>OpenSSL 0.9.5a</strong> or higher)</p>
-</dd>
-<dt><strong><a name="engine_auto_engine_id" class="item"><strong>engine</strong> = auto | &lt;engine id&gt;</a></strong></dt>
 
+<p>Entropy Gathering Daemon socket to use to feed <b>OpenSSL</b> random number generator. (Available only if compiled with <b>OpenSSL 0.9.5a</b> or higher)</p>
+
+</dd>
+<dt id="engine-auto-engine-id"><b>engine</b> = auto | &lt;engine id&gt;</dt>
 <dd>
+
 <p>select hardware engine</p>
+
 <p>default: software-only cryptography</p>
-<p>Here is an example of advanced engine configuration to read private key from an
-OpenSC engine</p>
-<pre>
-    engine=dynamic
+
+<p>Here is an example of advanced engine configuration to read private key from an OpenSC engine</p>
+
+<pre><code>    engine=dynamic
     engineCtrl=SO_PATH:/usr/lib/opensc/engine_pkcs11.so
     engineCtrl=ID:pkcs11
     engineCtrl=LIST_ADD:1
     engineCtrl=LOAD
     engineCtrl=MODULE_PATH:/usr/lib/pkcs11/opensc-pkcs11.so
-    engineCtrl=INIT</pre>
-<pre>
+    engineCtrl=INIT
+
     [service]
     engineNum=1
-    key=id_45</pre>
-</dd>
-<dt><strong><a name="enginectrl_command_parameter" class="item"><strong>engineCtrl</strong> = command[:parameter]</a></strong></dt>
+    key=id_45</code></pre>
 
+</dd>
+<dt id="engineCtrl-command-:parameter"><b>engineCtrl</b> = command[:parameter]</dt>
 <dd>
+
 <p>control hardware engine</p>
-<p>Special commands &quot;LOAD&quot; and &quot;INIT&quot; can be used to load and initialize the
-engine cryptogaphic module.</p>
-</dd>
-<dt><strong><a name="fips_yes_no" class="item"><strong>fips</strong> = yes | no</a></strong></dt>
 
+<p>Special commands &quot;LOAD&quot; and &quot;INIT&quot; can be used to load and initialize the engine cryptogaphic module.</p>
+
+</dd>
+<dt id="fips-yes-no"><b>fips</b> = yes | no</dt>
 <dd>
+
 <p>Enable or disable FIPS 140-2 mode.</p>
-<p>This option allows to disable entering FIPS mode if <strong>stunnel</strong> was compiled
-with FIPS 140-2 support.</p>
+
+<p>This option allows to disable entering FIPS mode if <b>stunnel</b> was compiled with FIPS 140-2 support.</p>
+
 <p>default: yes</p>
-</dd>
-<dt><strong><a name="no" class="item"><strong>foreground</strong> = yes | no (Unix only)</a></strong></dt>
 
+</dd>
+<dt id="foreground-yes-no-Unix-only"><b>foreground</b> = yes | no (Unix only)</dt>
 <dd>
+
 <p>foreground mode</p>
-<p>Stay in foreground (don't fork) and log to stderr
-instead of via syslog (unless <em>output</em> is specified).</p>
+
+<p>Stay in foreground (don&#39;t fork) and log to stderr instead of via syslog (unless <i>output</i> is specified).</p>
+
 <p>default: background in daemon mode</p>
-</dd>
-<dt><strong><a name="output_file" class="item"><strong>output</strong> = file</a></strong></dt>
 
+</dd>
+<dt id="output-file"><b>output</b> = file</dt>
 <dd>
+
 <p>append log messages to a file</p>
-<p>/dev/stdout device can be used to send log messages to the standard
-output (for example to log them with daemontools splogger).</p>
-</dd>
-<dt><strong><a name="file" class="item"><strong>pid</strong> = file (Unix only)</a></strong></dt>
 
+<p>/dev/stdout device can be used to send log messages to the standard output (for example to log them with daemontools splogger).</p>
+
+</dd>
+<dt id="pid-file-Unix-only"><b>pid</b> = file (Unix only)</dt>
 <dd>
+
 <p>pid file location</p>
+
 <p>If the argument is empty, then no pid file will be created.</p>
-<p><em>pid</em> path is relative to <em>chroot</em> directory if specified.</p>
-</dd>
-<dt><strong><a name="rndbytes_bytes" class="item"><strong>RNDbytes</strong> = bytes</a></strong></dt>
 
+<p><i>pid</i> path is relative to <i>chroot</i> directory if specified.</p>
+
+</dd>
+<dt id="RNDbytes-bytes"><b>RNDbytes</b> = bytes</dt>
 <dd>
+
 <p>bytes to read from random seed files</p>
-<p>Number of bytes of data read from random seed files.  With SSL versions less
-than <strong>0.9.5a</strong>, also determines how many bytes of data are considered
-sufficient to seed the PRNG.  More recent <strong>OpenSSL</strong> versions have a builtin
-function to determine when sufficient randomness is available.</p>
-</dd>
-<dt><strong><a name="rndfile_file" class="item"><strong>RNDfile</strong> = file</a></strong></dt>
 
+<p>Number of bytes of data read from random seed files. With SSL versions less than <b>0.9.5a</b>, also determines how many bytes of data are considered sufficient to seed the PRNG. More recent <b>OpenSSL</b> versions have a builtin function to determine when sufficient randomness is available.</p>
+
+</dd>
+<dt id="RNDfile-file"><b>RNDfile</b> = file</dt>
 <dd>
+
 <p>path to file with random seed data</p>
-<p>The SSL library will use data from this file first to seed the random
-number generator.</p>
-</dd>
-<dt><strong><a name="rndoverwrite_yes_no" class="item"><strong>RNDoverwrite</strong> = yes | no</a></strong></dt>
 
+<p>The SSL library will use data from this file first to seed the random number generator.</p>
+
+</dd>
+<dt id="RNDoverwrite-yes-no"><b>RNDoverwrite</b> = yes | no</dt>
 <dd>
+
 <p>overwrite the random seed files with new random data</p>
+
 <p>default: yes</p>
-</dd>
-<dt><strong><a name="servicename" class="item"><strong>service</strong> = servicename (Unix only)</a></strong></dt>
 
+</dd>
+<dt id="service-servicename-Unix-only"><b>service</b> = servicename (Unix only)</dt>
 <dd>
-<p>use specified string as <em>inetd</em> mode service name for TCP Wrapper library</p>
+
+<p>use specified string as <i>inetd</i> mode service name for TCP Wrapper library</p>
+
 <p>default: stunnel</p>
-</dd>
-<dt><strong><a name="groupname" class="item"><strong>setgid</strong> = groupname (Unix only)</a></strong></dt>
 
-<dd>
-<p><code>setgid()</code> to groupname in daemon mode and clears all other groups</p>
 </dd>
-<dt><strong><a name="username" class="item"><strong>setuid</strong> = username (Unix only)</a></strong></dt>
-
+<dt id="setgid-groupname-Unix-only"><b>setgid</b> = groupname (Unix only)</dt>
 <dd>
-<p><code>setuid()</code> to username in daemon mode</p>
+
+<p>setgid() to groupname in daemon mode and clears all other groups</p>
+
 </dd>
-<dt><strong><a name="socket_a_l_r_option_value_value" class="item"><strong>socket</strong> = a|l|r:option=value[:value]</a></strong></dt>
+<dt id="setuid-username-Unix-only"><b>setuid</b> = username (Unix only)</dt>
+<dd>
 
+<p>setuid() to username in daemon mode</p>
+
+</dd>
+<dt id="socket-a-l-r:option-value-:value"><b>socket</b> = a|l|r:option=value[:value]</dt>
 <dd>
+
 <p>Set an option on accept/local/remote socket</p>
-<p>The values for linger option are l_onof:l_linger.
-The values for time are tv_sec:tv_usec.</p>
+
+<p>The values for linger option are l_onof:l_linger. The values for time are tv_sec:tv_usec.</p>
+
 <p>Examples:</p>
-<pre>
-    socket = l:SO_LINGER=1:60
+
+<pre><code>    socket = l:SO_LINGER=1:60
         set one minute timeout for closing local socket
     socket = r:SO_OOBINLINE=yes
         place out-of-band data directly into the
@@ -346,775 +338,893 @@ The values for time are tv_sec:tv_usec.</p>
     socket = a:SO_REUSEADDR=no
         disable address reuse (enabled by default)
     socket = a:SO_BINDTODEVICE=lo
-        only accept connections on loopback interface</pre>
-</dd>
-<dt><strong><strong>syslog</strong> = yes | no (Unix only)</strong></dt>
+        only accept connections on loopback interface</code></pre>
 
+</dd>
+<dt id="syslog-yes-no-Unix-only"><b>syslog</b> = yes | no (Unix only)</dt>
 <dd>
+
 <p>enable logging via syslog</p>
+
 <p>default: yes</p>
-</dd>
-<dt><strong><strong>taskbar</strong> = yes | no (WIN32 only)</strong></dt>
 
+</dd>
+<dt id="taskbar-yes-no-WIN32-only"><b>taskbar</b> = yes | no (WIN32 only)</dt>
 <dd>
+
 <p>enable the taskbar icon</p>
+
 <p>default: yes</p>
+
 </dd>
 </dl>
-<p>
-</p>
-<h2><a name="service_level_options">SERVICE-LEVEL OPTIONS</a></h2>
-<p>Each configuration section begins with service name in square brackets.
-The service name is used for libwrap (TCP Wrappers) access control and lets
-you distinguish <strong>stunnel</strong> services in your log files.</p>
-<p>Note that if you wish to run <strong>stunnel</strong> in <em>inetd</em> mode (where it
-is provided a network socket by a server such as <em>inetd</em>, <em>xinetd</em>,
-or <em>tcpserver</em>) then you should read the section entitled <em>INETD MODE</em>
-below.</p>
+
+<h2 id="SERVICE-LEVEL-OPTIONS">SERVICE-LEVEL OPTIONS</h2>
+
+<p>Each configuration section begins with service name in square brackets. The service name is used for libwrap (TCP Wrappers) access control and lets you distinguish <b>stunnel</b> services in your log files.</p>
+
+<p>Note that if you wish to run <b>stunnel</b> in <i>inetd</i> mode (where it is provided a network socket by a server such as <i>inetd</i>, <i>xinetd</i>, or <i>tcpserver</i>) then you should read the section entitled <i>INETD MODE</i> below.</p>
+
 <dl>
-<dt><strong><a name="accept_address" class="item"><strong>accept</strong> = address</a></strong></dt>
 
+<dt id="accept-address"><b>accept</b> = address</dt>
 <dd>
+
 <p>accept connections on specified address</p>
+
 <p>If no host specified, defaults to all IPv4 addresses for the local host.</p>
+
 <p>To listen on all IPv6 addresses use:</p>
-<pre>
-    connect = :::port</pre>
-</dd>
-<dt><strong><a name="capath_directory" class="item"><strong>CApath</strong> = directory</a></strong></dt>
 
+<pre><code>    connect = :::port</code></pre>
+
+</dd>
+<dt id="CApath-directory"><b>CApath</b> = directory</dt>
 <dd>
+
 <p>Certificate Authority directory</p>
-<p>This is the directory in which <strong>stunnel</strong> will look for certificates when using
-the <em>verify</em>.  Note that the certificates in this directory should be named
-XXXXXXXX.0 where XXXXXXXX is the hash value of the DER encoded subject of the
-cert.</p>
-<p>The hash algorithm has been changed in <strong>OpenSSL 1.0.0</strong>.  It is required to
-c_rehash the directory on upgrade from <strong>OpenSSL 0.x.x</strong> to <strong>OpenSSL 1.x.x</strong>.</p>
-<p><em>CApath</em> path is relative to <em>chroot</em> directory if specified.</p>
-</dd>
-<dt><strong><a name="cafile_certfile" class="item"><strong>CAfile</strong> = certfile</a></strong></dt>
 
+<p>This is the directory in which <b>stunnel</b> will look for certificates when using the <i>verify</i>. Note that the certificates in this directory should be named XXXXXXXX.0 where XXXXXXXX is the hash value of the DER encoded subject of the cert.</p>
+
+<p>The hash algorithm has been changed in <b>OpenSSL 1.0.0</b>. It is required to c_rehash the directory on upgrade from <b>OpenSSL 0.x.x</b> to <b>OpenSSL 1.x.x</b>.</p>
+
+<p><i>CApath</i> path is relative to <i>chroot</i> directory if specified.</p>
+
+</dd>
+<dt id="CAfile-certfile"><b>CAfile</b> = certfile</dt>
 <dd>
+
 <p>Certificate Authority file</p>
-<p>This file contains multiple CA certificates, used with the <em>verify</em>.</p>
-</dd>
-<dt><strong><a name="cert_pemfile" class="item"><strong>cert</strong> = pemfile</a></strong></dt>
 
+<p>This file contains multiple CA certificates, used with the <i>verify</i>.</p>
+
+</dd>
+<dt id="cert-pemfile"><b>cert</b> = pemfile</dt>
 <dd>
+
 <p>certificate chain PEM file name</p>
-<p>A PEM is always needed in server mode.
-Specifying this flag in client mode will use this certificate chain
-as a client side certificate chain.  Using client side certs is optional.
-The certificates must be in PEM format and must be sorted starting with the
-certificate to the highest level (root CA).</p>
+
+<p>A PEM is always needed in server mode. Specifying this flag in client mode will use this certificate chain as a client side certificate chain. Using client side certs is optional. The certificates must be in PEM format and must be sorted starting with the certificate to the highest level (root CA).</p>
+
+</dd>
+<dt id="checkEmail-EMAIL"><b>checkEmail</b> = EMAIL</dt>
+<dd>
+
+<p>email address of the peer certificate subject</p>
+
+<p>Multiple <i>checkEmail</i> options are allowed in a single service section. Certificates are accepted if no <i>checkEmail</i> option was specified, or the email address of the peer certificate matches any of the email addresses specified with <i>checkEmail</i>.</p>
+
+<p>This option requires OpenSSL 1.0.2 or later.</p>
+
 </dd>
-<dt><strong><a name="ciphers_cipherlist" class="item"><strong>ciphers</strong> = cipherlist</a></strong></dt>
+<dt id="checkHost-HOST"><b>checkHost</b> = HOST</dt>
+<dd>
+
+<p>host of the peer certificate subject</p>
+
+<p>Multiple <i>checkHost</i> options are allowed in a single service section. Certificates are accepted if no <i>checkHost</i> option was specified, or the host name of the peer certificate matches any of the hosts specified with <i>checkHost</i>.</p>
+
+<p>This option requires OpenSSL 1.0.2 or later.</p>
 
+</dd>
+<dt id="checkIP-IP"><b>checkIP</b> = IP</dt>
 <dd>
-<p>Select permitted SSL ciphers</p>
-<p>A colon delimited list of the ciphers to allow in the SSL connection.
-For example DES-CBC3-SHA:IDEA-CBC-MD5</p>
+
+<p>IP address of the peer certificate subject</p>
+
+<p>Multiple <i>checkIP</i> options are allowed in a single service section. Certificates are accepted if no <i>checkIP</i> option was specified, or the IP address of the peer certificate matches any of the IP addresses specified with <i>checkIP</i>.</p>
+
+<p>This option requires OpenSSL 1.0.2 or later.</p>
+
 </dd>
-<dt><strong><a name="client_yes_no" class="item"><strong>client</strong> = yes | no</a></strong></dt>
+<dt id="ciphers-cipherlist"><b>ciphers</b> = cipherlist</dt>
+<dd>
+
+<p>Select permitted SSL ciphers</p>
+
+<p>A colon delimited list of the ciphers to allow in the SSL connection. For example DES-CBC3-SHA:IDEA-CBC-MD5</p>
 
+</dd>
+<dt id="client-yes-no"><b>client</b> = yes | no</dt>
 <dd>
+
 <p>client mode (remote service uses SSL)</p>
+
 <p>default: no (server mode)</p>
-</dd>
-<dt><strong><a name="connect_address" class="item"><strong>connect</strong> = address</a></strong></dt>
 
+</dd>
+<dt id="connect-address"><b>connect</b> = address</dt>
 <dd>
+
 <p>connect to a remote address</p>
+
 <p>If no host is specified, the host defaults to localhost.</p>
-<p>Multiple <strong>connect</strong> options are allowed in a single service section.</p>
-<p>If host resolves to multiple addresses and/or if multiple <em>connect</em>
-options are specified, then the remote address is chosen using a
-round-robin algorithm.</p>
-</dd>
-<dt><strong><a name="crlpath_directory" class="item"><strong>CRLpath</strong> = directory</a></strong></dt>
 
+<p>Multiple <b>connect</b> options are allowed in a single service section.</p>
+
+<p>If host resolves to multiple addresses and/or if multiple <i>connect</i> options are specified, then the remote address is chosen using a round-robin algorithm.</p>
+
+</dd>
+<dt id="CRLpath-directory"><b>CRLpath</b> = directory</dt>
 <dd>
+
 <p>Certificate Revocation Lists directory</p>
-<p>This is the directory in which <strong>stunnel</strong> will look for CRLs when
-using the <em>verify</em>. Note that the CRLs in this directory should
-be named XXXXXXXX.r0 where XXXXXXXX is the hash value of the CRL.</p>
-<p>The hash algorithm has been changed in <strong>OpenSSL 1.0.0</strong>.  It is required to
-c_rehash the directory on upgrade from <strong>OpenSSL 0.x.x</strong> to <strong>OpenSSL 1.x.x</strong>.</p>
-<p><em>CRLpath</em> path is relative to <em>chroot</em> directory if specified.</p>
-</dd>
-<dt><strong><a name="crlfile_certfile" class="item"><strong>CRLfile</strong> = certfile</a></strong></dt>
 
+<p>This is the directory in which <b>stunnel</b> will look for CRLs when using the <i>verify</i>. Note that the CRLs in this directory should be named XXXXXXXX.r0 where XXXXXXXX is the hash value of the CRL.</p>
+
+<p>The hash algorithm has been changed in <b>OpenSSL 1.0.0</b>. It is required to c_rehash the directory on upgrade from <b>OpenSSL 0.x.x</b> to <b>OpenSSL 1.x.x</b>.</p>
+
+<p><i>CRLpath</i> path is relative to <i>chroot</i> directory if specified.</p>
+
+</dd>
+<dt id="CRLfile-certfile"><b>CRLfile</b> = certfile</dt>
 <dd>
+
 <p>Certificate Revocation Lists file</p>
-<p>This file contains multiple CRLs, used with the <em>verify</em>.</p>
-</dd>
-<dt><strong><a name="curve_nid" class="item"><strong>curve</strong> = nid</a></strong></dt>
 
+<p>This file contains multiple CRLs, used with the <i>verify</i>.</p>
+
+</dd>
+<dt id="curve-nid"><b>curve</b> = nid</dt>
 <dd>
+
 <p>specify ECDH curve name</p>
+
 <p>To get a list of supported cuves use:</p>
-<pre>
-    openssl ecparam -list_curves</pre>
+
+<pre><code>    openssl ecparam -list_curves</code></pre>
+
 <p>default: prime256v1</p>
-</dd>
-<dt><strong><a name="delay_yes_no" class="item"><strong>delay</strong> = yes | no</a></strong></dt>
 
-<dd>
-<p>delay DNS lookup for 'connect' option</p>
-<p>This option is useful for dynamic DNS, or when DNS is not available during
-<strong>stunnel</strong> startup (road warrior VPN, dial-up configurations).</p>
 </dd>
-<dt><strong><a name="enginenum_engine_number" class="item"><strong>engineNum</strong> = engine number</a></strong></dt>
+<dt id="delay-yes-no"><b>delay</b> = yes | no</dt>
+<dd>
+
+<p>delay DNS lookup for &#39;connect&#39; option</p>
+
+<p>This option is useful for dynamic DNS, or when DNS is not available during <b>stunnel</b> startup (road warrior VPN, dial-up configurations).</p>
 
+</dd>
+<dt id="engineNum-engine-number"><b>engineNum</b> = engine number</dt>
 <dd>
+
 <p>select engine number to read private key</p>
+
 <p>The engines are numbered starting from 1.</p>
-</dd>
-<dt><strong><a name="exec_executable_path" class="item"><strong>exec</strong> = executable_path</a></strong></dt>
 
+</dd>
+<dt id="exec-executable_path"><b>exec</b> = executable_path</dt>
 <dd>
+
 <p>execute local inetd-type program</p>
-<p><em>exec</em> path is relative to <em>chroot</em> directory if specified.</p>
-</dd>
-<dt><strong><a name="execargs_0_1_2" class="item"><strong>execargs</strong> = $0 $1 $2 ...</a></strong></dt>
 
-<dd>
-<p>arguments for <em>exec</em> including program name ($0)</p>
-<p>Quoting is currently not supported.
-Arguments are separated with arbitrary number of whitespaces.</p>
+<p><i>exec</i> path is relative to <i>chroot</i> directory if specified.</p>
+
 </dd>
-<dt><strong><a name="failover_rr_prio" class="item"><strong>failover</strong> = rr | prio</a></strong></dt>
+<dt id="execargs-0-1-2"><b>execargs</b> = $0 $1 $2 ...</dt>
+<dd>
+
+<p>arguments for <i>exec</i> including program name ($0)</p>
 
+<p>Quoting is currently not supported. Arguments are separated with arbitrary number of whitespaces.</p>
+
+</dd>
+<dt id="failover-rr-prio"><b>failover</b> = rr | prio</dt>
 <dd>
+
 <p>Failover strategy for multiple &quot;connect&quot; targets.</p>
-<pre>
-    rr (round robin) - fair load distribution
-    prio (priority) - use the order specified in config file</pre>
+
+<pre><code>    rr (round robin) - fair load distribution
+    prio (priority) - use the order specified in config file</code></pre>
+
 <p>default: rr</p>
-</dd>
-<dt><strong><a name="ident_username" class="item"><strong>ident</strong> = username</a></strong></dt>
 
-<dd>
-<p>use IDENT (<a href="http://www.ietf.org/rfc/rfc1413.txt" class="rfc">RFC 1413</a>) username checking</p>
 </dd>
-<dt><strong><a name="key_keyfile" class="item"><strong>key</strong> = keyfile</a></strong></dt>
-
+<dt id="ident-username"><b>ident</b> = username</dt>
 <dd>
-<p>private key for certificate specified with <em>cert</em> option</p>
-<p>Private key is needed to authenticate certificate owner.
-Since this file should be kept secret it should only be readable
-to its owner.  On Unix systems you can use the following command:</p>
-<pre>
-    chmod 600 keyfile</pre>
-<p>default: value of <em>cert</em> option</p>
+
+<p>use IDENT (RFC 1413) username checking</p>
+
 </dd>
-<dt><strong><a name="libwrap_yes_no" class="item"><strong>libwrap</strong> = yes | no</a></strong></dt>
+<dt id="key-keyfile"><b>key</b> = keyfile</dt>
+<dd>
+
+<p>private key for certificate specified with <i>cert</i> option</p>
+
+<p>Private key is needed to authenticate certificate owner. Since this file should be kept secret it should only be readable to its owner. On Unix systems you can use the following command:</p>
+
+<pre><code>    chmod 600 keyfile</code></pre>
 
+<p>default: value of <i>cert</i> option</p>
+
+</dd>
+<dt id="libwrap-yes-no"><b>libwrap</b> = yes | no</dt>
 <dd>
+
 <p>Enable or disable the use of /etc/hosts.allow and /etc/hosts.deny.</p>
+
 <p>default: yes</p>
-</dd>
-<dt><strong><a name="local_host" class="item"><strong>local</strong> = host</a></strong></dt>
 
-<dd>
-<p>IP of the outgoing interface is used as source for remote connections.
-Use this option to bind a static local IP address, instead.</p>
 </dd>
-<dt><strong><a name="server_name_pattern" class="item"><strong>sni</strong> = service_name:server_name_pattern (server mode)</a></strong></dt>
-
+<dt id="local-host"><b>local</b> = host</dt>
 <dd>
-<p>Use the service as a slave service (a name-based virtual server) for Server
-Name Indication TLS extension (<a href="http://www.ietf.org/rfc/rfc3546.txt" class="rfc">RFC 3546</a>).</p>
-<p><em>service_name</em> specifies the master service that accepts client connections
-with <em>accept</em> option.  <em>server_name_pattern</em> specifies the host name to be
-redirected.  The pattern may start with '*' character, e.g. '*.example.com'.
-Multiple slave services are normally specified for a single master service.
-<em>sni</em> option can also be specified more than once within a single slave
-service.</p>
-<p>This service, as well as the master service, may not be configured in client
-mode.</p>
-<p><em>connect</em> option of the slave service is ignored when <em>protocol</em> option is
-specified, as <em>protocol</em> connects remote host before TLS handshake.</p>
-<p>Libwrap checks (Unix only) are performed twice: with master service name after
-TCP connection is accepted, and with slave service name during TLS handshake.</p>
-<p>Option <em>sni</em> is only available when compiled with <strong>OpenSSL 1.0.0</strong> and later.</p>
-</dd>
-<dt><strong><a name="server_name" class="item"><strong>sni</strong> = server_name (client mode)</a></strong></dt>
 
+<p>IP of the outgoing interface is used as source for remote connections. Use this option to bind a static local IP address, instead.</p>
+
+</dd>
+<dt id="sni-service_name:server_name_pattern-server-mode"><b>sni</b> = service_name:server_name_pattern (server mode)</dt>
 <dd>
-<p>Use the parameter as the value of TLS Server Name Indication (<a href="http://www.ietf.org/rfc/rfc3546.txt" class="rfc">RFC 3546</a>)
-extension.</p>
-<p>Option <em>sni</em> is only available when compiled with <strong>OpenSSL 1.0.0</strong> and later.</p>
+
+<p>Use the service as a slave service (a name-based virtual server) for Server Name Indication TLS extension (RFC 3546).</p>
+
+<p><i>service_name</i> specifies the master service that accepts client connections with <i>accept</i> option. <i>server_name_pattern</i> specifies the host name to be redirected. The pattern may start with &#39;*&#39; character, e.g. &#39;*.example.com&#39;. Multiple slave services are normally specified for a single master service. <i>sni</i> option can also be specified more than once within a single slave service.</p>
+
+<p>This service, as well as the master service, may not be configured in client mode.</p>
+
+<p><i>connect</i> option of the slave service is ignored when <i>protocol</i> option is specified, as <i>protocol</i> connects remote host before TLS handshake.</p>
+
+<p>Libwrap checks (Unix only) are performed twice: with master service name after TCP connection is accepted, and with slave service name during TLS handshake.</p>
+
+<p>Option <i>sni</i> is only available when compiled with <b>OpenSSL 1.0.0</b> and later.</p>
+
 </dd>
-<dt><strong><a name="ocsp_url" class="item"><strong>OCSP</strong> = url</a></strong></dt>
+<dt id="sni-server_name-client-mode"><b>sni</b> = server_name (client mode)</dt>
+<dd>
+
+<p>Use the parameter as the value of TLS Server Name Indication (RFC 3546) extension.</p>
 
+<p>Option <i>sni</i> is only available when compiled with <b>OpenSSL 1.0.0</b> and later.</p>
+
+</dd>
+<dt id="OCSP-url"><b>OCSP</b> = url</dt>
 <dd>
+
 <p>select OCSP server for certificate verification</p>
+
 </dd>
-<dt><strong><a name="ocspflag_flag" class="item"><strong>OCSPflag</strong> = flag</a></strong></dt>
+<dt id="OCSPaia-yes-no"><b>OCSPaia</b> = yes | no</dt>
+<dd>
+
+<p>validate certificates with their AIA OCSP responders</p>
+
+<p>This option enables <i>stunnel</i> to validate certificates with the list of OCSP responder URLs retrieved from their AIA (Authority Information Access) extension.</p>
 
+</dd>
+<dt id="OCSPflag-flag"><b>OCSPflag</b> = flag</dt>
 <dd>
+
 <p>specify OCSP server flag</p>
-<p>Several <em>OCSPflag</em> can be used to specify multiple flags.</p>
-<p>currently supported flags: NOCERTS, NOINTERN NOSIGS, NOCHAIN, NOVERIFY,
-NOEXPLICIT, NOCASIGN, NODELEGATED, NOCHECKS, TRUSTOTHER, RESPID_KEY, NOTIME</p>
-</dd>
-<dt><strong><a name="options_ssl_options" class="item"><strong>options</strong> = SSL_options</a></strong></dt>
 
+<p>Several <i>OCSPflag</i> can be used to specify multiple flags.</p>
+
+<p>currently supported flags: NOCERTS, NOINTERN NOSIGS, NOCHAIN, NOVERIFY, NOEXPLICIT, NOCASIGN, NODELEGATED, NOCHECKS, TRUSTOTHER, RESPID_KEY, NOTIME</p>
+
+</dd>
+<dt id="OCSPnonce-yes-no"><b>OCSPnonce</b> = yes | no</dt>
 <dd>
-<p><strong>OpenSSL</strong> library options</p>
-<p>The parameter is the <strong>OpenSSL</strong> option name as described in the
-<em>SSL_CTX_set_options(3ssl)</em> manual, but without <em>SSL_OP_</em> prefix.
-Several <em>options</em> can be used to specify multiple options.</p>
-<p>For example for compatibility with erroneous Eudora SSL implementation
-the following option can be used:</p>
-<pre>
-    options = DONT_INSERT_EMPTY_FRAGMENTS</pre>
+
+<p>send and verify the OCSP nonce extension</p>
+
+<p>This option protects the OCSP protocol against replay attacks. Due to its computational overhead, the nonce extension is usually only supported on internal (e.g. corporate) responders, and not on public OCSP responders.</p>
+
 </dd>
-<dt><strong><a name="protocol_proto" class="item"><strong>protocol</strong> = proto</a></strong></dt>
+<dt id="options-SSL_options"><b>options</b> = SSL_options</dt>
+<dd>
+
+<p><b>OpenSSL</b> library options</p>
 
+<p>The parameter is the <b>OpenSSL</b> option name as described in the <i>SSL_CTX_set_options(3ssl)</i> manual, but without <i>SSL_OP_</i> prefix. Several <i>options</i> can be used to specify multiple options.</p>
+
+<p>For example for compatibility with erroneous Eudora SSL implementation the following option can be used:</p>
+
+<pre><code>    options = DONT_INSERT_EMPTY_FRAGMENTS</code></pre>
+
+</dd>
+<dt id="protocol-proto"><b>protocol</b> = proto</dt>
 <dd>
+
 <p>application protocol to negotiate SSL</p>
-<p>This option enables initial, protocol-specific negotiation of the SSL/TLS
-encryption.
-<em>protocol</em> option should not be used with SSL encryption on a separate port.</p>
+
+<p>This option enables initial, protocol-specific negotiation of the SSL/TLS encryption. <i>protocol</i> option should not be used with SSL encryption on a separate port.</p>
+
 <p>Currently supported protocols:</p>
+
 <dl>
-<dt><strong><a name="cifs" class="item"><em>cifs</em></a></strong></dt>
 
+<dt id="cifs"><i>cifs</i></dt>
 <dd>
-<p>Proprietary (undocummented) extension of CIFS protocol implemented in Samba.
-Support for this extension was dropped in Samba 3.0.0.</p>
-</dd>
-<dt><strong><a name="connect" class="item"><em>connect</em></a></strong></dt>
 
+<p>Proprietary (undocummented) extension of CIFS protocol implemented in Samba. Support for this extension was dropped in Samba 3.0.0.</p>
+
+</dd>
+<dt id="connect"><i>connect</i></dt>
 <dd>
-<p>Based on <a href="http://www.ietf.org/rfc/rfc2817.txt" class="rfc">RFC 2817</a> - <em>Upgrading to TLS Within HTTP/1.1</em>, section 5.2 - <em>Requesting a Tunnel with CONNECT</em></p>
+
+<p>Based on RFC 2817 - <i>Upgrading to TLS Within HTTP/1.1</i>, section 5.2 - <i>Requesting a Tunnel with CONNECT</i></p>
+
 <p>This protocol is only supported in client mode.</p>
-</dd>
-<dt><strong><a name="imap" class="item"><em>imap</em></a></strong></dt>
 
-<dd>
-<p>Based on <a href="http://www.ietf.org/rfc/rfc2595.txt" class="rfc">RFC 2595</a> - <em>Using TLS with IMAP, POP3 and ACAP</em></p>
 </dd>
-<dt><strong><a name="nntp" class="item"><em>nntp</em></a></strong></dt>
+<dt id="imap"><i>imap</i></dt>
+<dd>
 
+<p>Based on RFC 2595 - <i>Using TLS with IMAP, POP3 and ACAP</i></p>
+
+</dd>
+<dt id="nntp"><i>nntp</i></dt>
 <dd>
-<p>Based on <a href="http://www.ietf.org/rfc/rfc4642.txt" class="rfc">RFC 4642</a> - <em>Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)</em></p>
+
+<p>Based on RFC 4642 - <i>Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)</i></p>
+
 <p>This protocol is only supported in client mode.</p>
-</dd>
-<dt><strong><a name="pgsql" class="item"><em>pgsql</em></a></strong></dt>
 
-<dd>
-<p>Based on <a href="http://www.postgresql.org/docs/8.3/static/protocol-flow.html#AEN73982">http://www.postgresql.org/docs/8.3/static/protocol-flow.html#AEN73982</a></p>
 </dd>
-<dt><strong><a name="pop3" class="item"><em>pop3</em></a></strong></dt>
-
+<dt id="pgsql"><i>pgsql</i></dt>
 <dd>
-<p>Based on <a href="http://www.ietf.org/rfc/rfc2449.txt" class="rfc">RFC 2449</a> - <em>POP3 Extension Mechanism</em></p>
-</dd>
-<dt><strong><a name="proxy" class="item"><em>proxy</em></a></strong></dt>
 
+<p>Based on http://www.postgresql.org/docs/8.3/static/protocol-flow.html#AEN73982</p>
+
+</dd>
+<dt id="pop3"><i>pop3</i></dt>
 <dd>
-<p>Haproxy client IP address <a href="http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt">http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt</a></p>
+
+<p>Based on RFC 2449 - <i>POP3 Extension Mechanism</i></p>
+
 </dd>
-<dt><strong><a name="smtp" class="item"><em>smtp</em></a></strong></dt>
+<dt id="proxy"><i>proxy</i></dt>
+<dd>
+
+<p>Haproxy client IP address http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt</p>
 
+</dd>
+<dt id="smtp"><i>smtp</i></dt>
 <dd>
-<p>Based on <a href="http://www.ietf.org/rfc/rfc2487.txt" class="rfc">RFC 2487</a> - <em>SMTP Service Extension for Secure SMTP over TLS</em></p>
+
+<p>Based on RFC 2487 - <i>SMTP Service Extension for Secure SMTP over TLS</i></p>
+
 </dd>
 </dl>
-</dd>
-<dt><strong><a name="protocolauthentication_auth_type" class="item"><strong>protocolAuthentication</strong> = auth_type</a></strong></dt>
 
+</dd>
+<dt id="protocolAuthentication-auth_type"><b>protocolAuthentication</b> = auth_type</dt>
 <dd>
+
 <p>authentication type for protocol negotiations</p>
+
 <p>currently supported: basic, NTLM</p>
-<p>Currently authentication type only applies to the 'connect' protocol.</p>
+
+<p>Currently authentication type only applies to the &#39;connect&#39; protocol.</p>
+
 <p>default: basic</p>
-</dd>
-<dt><strong><a name="protocolhost_host_port" class="item"><strong>protocolHost</strong> = host:port</a></strong></dt>
 
+</dd>
+<dt id="protocolHost-host:port"><b>protocolHost</b> = host:port</dt>
 <dd>
+
 <p>destination address for protocol negotiations</p>
-<p><em>protocolHost</em> specifies the final SSL server to be connected by the proxy,
-and not the proxy server directly connected by <strong>stunnel</strong>.
-The proxy server should be specified with the 'connect' option.</p>
-<p>Currently protocol destination address only applies to 'connect' protocol.</p>
-</dd>
-<dt><strong><a name="protocolpassword_password" class="item"><strong>protocolPassword</strong> = password</a></strong></dt>
 
+<p><i>protocolHost</i> specifies the final SSL server to be connected by the proxy, and not the proxy server directly connected by <b>stunnel</b>. The proxy server should be specified with the &#39;connect&#39; option.</p>
+
+<p>Currently protocol destination address only applies to &#39;connect&#39; protocol.</p>
+
+</dd>
+<dt id="protocolPassword-password"><b>protocolPassword</b> = password</dt>
 <dd>
+
 <p>password for protocol negotiations</p>
-</dd>
-<dt><strong><a name="protocolusername_username" class="item"><strong>protocolUsername</strong> = username</a></strong></dt>
 
+</dd>
+<dt id="protocolUsername-username"><b>protocolUsername</b> = username</dt>
 <dd>
+
 <p>username for protocol negotiations</p>
-</dd>
-<dt><strong><strong>pty</strong> = yes | no (Unix only)</strong></dt>
 
-<dd>
-<p>allocate pseudo terminal for 'exec' option</p>
 </dd>
-<dt><strong><a name="renegotiation_yes_no" class="item"><strong>renegotiation</strong> = yes | no</a></strong></dt>
+<dt id="pty-yes-no-Unix-only"><b>pty</b> = yes | no (Unix only)</dt>
+<dd>
+
+<p>allocate pseudo terminal for &#39;exec&#39; option</p>
 
+</dd>
+<dt id="renegotiation-yes-no"><b>renegotiation</b> = yes | no</dt>
 <dd>
+
 <p>support SSL renegotiation</p>
-<p>Applications of the SSL renegotiation include some authentication scenarios,
-or re-keying long lasting connections.</p>
-<p>On the other hand this feature can facilitate a trivial CPU-exhaustion
-DoS attack:</p>
-<p><a href="http://vincent.bernat.im/en/blog/2011-ssl-dos-mitigation.html">http://vincent.bernat.im/en/blog/2011-ssl-dos-mitigation.html</a></p>
-<p>Please note that disabling SSL renegotiation does not fully mitigate
-this issue.</p>
-<p>default: yes (if supported by <strong>OpenSSL</strong>)</p>
-</dd>
-<dt><strong><a name="reset_yes_no" class="item"><strong>reset</strong> = yes | no</a></strong></dt>
 
+<p>Applications of the SSL renegotiation include some authentication scenarios, or re-keying long lasting connections.</p>
+
+<p>On the other hand this feature can facilitate a trivial CPU-exhaustion DoS attack:</p>
+
+<p>http://vincent.bernat.im/en/blog/2011-ssl-dos-mitigation.html</p>
+
+<p>Please note that disabling SSL renegotiation does not fully mitigate this issue.</p>
+
+<p>default: yes (if supported by <b>OpenSSL</b>)</p>
+
+</dd>
+<dt id="reset-yes-no"><b>reset</b> = yes | no</dt>
 <dd>
+
 <p>attempt to use TCP RST flag to indicate an error</p>
+
 <p>This option is not supported on some platforms.</p>
+
 <p>default: yes</p>
-</dd>
-<dt><strong><a name="retry_yes_no" class="item"><strong>retry</strong> = yes | no</a></strong></dt>
 
+</dd>
+<dt id="retry-yes-no"><b>retry</b> = yes | no</dt>
 <dd>
-<p>reconnect a connect+exec section after it's disconnected</p>
+
+<p>reconnect a connect+exec section after it&#39;s disconnected</p>
+
 <p>default: no</p>
-</dd>
-<dt><strong><a name="sessioncachesize_size" class="item"><strong>sessionCacheSize</strong> = size</a></strong></dt>
 
+</dd>
+<dt id="sessionCacheSize-size"><b>sessionCacheSize</b> = size</dt>
 <dd>
+
 <p>session cache size</p>
-<p><em>sessionCacheSize</em> specifies the maximum number of the internal session cache
-entries.</p>
-<p>The value of 0 can be used for unlimited size.  It is not recommended
-for production use due to the risk of memory exhaustion DoS attack.</p>
-</dd>
-<dt><strong><a name="sessioncachetimeout_timeout" class="item"><strong>sessionCacheTimeout</strong> = timeout</a></strong></dt>
 
+<p><i>sessionCacheSize</i> specifies the maximum number of the internal session cache entries.</p>
+
+<p>The value of 0 can be used for unlimited size. It is not recommended for production use due to the risk of memory exhaustion DoS attack.</p>
+
+</dd>
+<dt id="sessionCacheTimeout-timeout"><b>sessionCacheTimeout</b> = timeout</dt>
 <dd>
+
 <p>session cache timeout</p>
+
 <p>This is the number of seconds to keep cached SSL sessions.</p>
-</dd>
-<dt><strong><a name="sessiond_host_port" class="item"><strong>sessiond</strong> = host:port</a></strong></dt>
 
+</dd>
+<dt id="sessiond-host:port"><b>sessiond</b> = host:port</dt>
 <dd>
+
 <p>address of sessiond SSL cache server</p>
-</dd>
-<dt><strong><a name="sslversion_version" class="item"><strong>sslVersion</strong> = version</a></strong></dt>
 
+</dd>
+<dt id="sslVersion-version"><b>sslVersion</b> = version</dt>
 <dd>
+
 <p>select version of SSL protocol</p>
+
 <p>Allowed options: all, SSLv2, SSLv3, TLSv1, TLSv1.1, TLSv1.2</p>
-</dd>
-<dt><strong><a name="bytes" class="item"><strong>stack</strong> = bytes (except for FORK model)</a></strong></dt>
 
+</dd>
+<dt id="stack-bytes-except-for-FORK-model"><b>stack</b> = bytes (except for FORK model)</dt>
 <dd>
+
 <p>thread stack size</p>
-</dd>
-<dt><strong><a name="timeoutbusy_seconds" class="item"><strong>TIMEOUTbusy</strong> = seconds</a></strong></dt>
 
+</dd>
+<dt id="TIMEOUTbusy-seconds"><b>TIMEOUTbusy</b> = seconds</dt>
 <dd>
+
 <p>time to wait for expected data</p>
-</dd>
-<dt><strong><a name="timeoutclose_seconds" class="item"><strong>TIMEOUTclose</strong> = seconds</a></strong></dt>
 
+</dd>
+<dt id="TIMEOUTclose-seconds"><b>TIMEOUTclose</b> = seconds</dt>
 <dd>
+
 <p>time to wait for close_notify (set to 0 for buggy MSIE)</p>
-</dd>
-<dt><strong><a name="timeoutconnect_seconds" class="item"><strong>TIMEOUTconnect</strong> = seconds</a></strong></dt>
 
+</dd>
+<dt id="TIMEOUTconnect-seconds"><b>TIMEOUTconnect</b> = seconds</dt>
 <dd>
+
 <p>time to wait to connect a remote host</p>
-</dd>
-<dt><strong><a name="timeoutidle_seconds" class="item"><strong>TIMEOUTidle</strong> = seconds</a></strong></dt>
 
+</dd>
+<dt id="TIMEOUTidle-seconds"><b>TIMEOUTidle</b> = seconds</dt>
 <dd>
+
 <p>time to keep an idle connection</p>
-</dd>
-<dt><strong><a name="both" class="item"><strong>transparent</strong> = none | source | destination | both (Unix only)</a></strong></dt>
 
+</dd>
+<dt id="transparent-none-source-destination-both-Unix-only"><b>transparent</b> = none | source | destination | both (Unix only)</dt>
 <dd>
+
 <p>enable transparent proxy support on selected platforms</p>
+
 <p>Supported values:</p>
+
 <dl>
-<dt><strong><a name="none" class="item"><em>none</em></a></strong></dt>
 
+<dt id="none"><i>none</i></dt>
 <dd>
-<p>Disable transparent proxy support.  This is the default.</p>
-</dd>
-<dt><strong><a name="source" class="item"><em>source</em></a></strong></dt>
 
+<p>Disable transparent proxy support. This is the default.</p>
+
+</dd>
+<dt id="source"><i>source</i></dt>
 <dd>
-<p>Re-write address to appear as if wrapped daemon is connecting
-from the SSL client machine instead of the machine running <strong>stunnel</strong>.</p>
+
+<p>Re-write address to appear as if wrapped daemon is connecting from the SSL client machine instead of the machine running <b>stunnel</b>.</p>
+
 <p>This option is currently available in:</p>
+
 <dl>
-<dt><strong><a name="mode" class="item">Remote mode (<em>connect</em> option) on <em>Linux &gt;=2.6.28</em></a></strong></dt>
 
+<dt id="Remote-mode-connect-option-on-Linux-2.6.28">Remote mode (<i>connect</i> option) on <i>Linux &gt;=2.6.28</i></dt>
 <dd>
-<p>This configuration requires <strong>stunnel</strong> to be executed as root and without
-<em>setuid</em> option.</p>
-<p>This configuration requires the following setup for iptables and routing
-(possibly in /etc/rc.local or equivalent file):</p>
-<pre>
-    iptables -t mangle -N DIVERT
+
+<p>This configuration requires <b>stunnel</b> to be executed as root and without <i>setuid</i> option.</p>
+
+<p>This configuration requires the following setup for iptables and routing (possibly in /etc/rc.local or equivalent file):</p>
+
+<pre><code>    iptables -t mangle -N DIVERT
     iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
     iptables -t mangle -A DIVERT -j MARK --set-mark 1
     iptables -t mangle -A DIVERT -j ACCEPT
     ip rule add fwmark 1 lookup 100
     ip route add local 0.0.0.0/0 dev lo table 100
-    echo 0 &gt;/proc/sys/net/ipv4/conf/lo/rp_filter</pre>
-<p><strong>stunnel</strong> must also to be executed as root and without <em>setuid</em> option.</p>
-</dd>
-<dt><strong>Remote mode (<em>connect</em> option) on <em>Linux 2.2.x</em></strong></dt>
+    echo 0 &gt;/proc/sys/net/ipv4/conf/lo/rp_filter</code></pre>
 
-<dd>
-<p>This configuration requires kernel to be compiled with <em>transparent proxy</em>
-option.
-Connected service must be installed on a separate host.
-Routing towards the clients has to go through the <strong>stunnel</strong> box.</p>
-<p><strong>stunnel</strong> must also to be executed as root and without <em>setuid</em> option.</p>
-</dd>
-<dt><strong>Remote mode (<em>connect</em> option) on <em>FreeBSD &gt;=8.0</em></strong></dt>
+<p><b>stunnel</b> must also to be executed as root and without <i>setuid</i> option.</p>
 
+</dd>
+<dt id="Remote-mode-connect-option-on-Linux-2.2.x">Remote mode (<i>connect</i> option) on <i>Linux 2.2.x</i></dt>
 <dd>
-<p>This configuration requires additional firewall and routing setup.
-<strong>stunnel</strong> must also to be executed as root and without <em>setuid</em> option.</p>
+
+<p>This configuration requires kernel to be compiled with <i>transparent proxy</i> option. Connected service must be installed on a separate host. Routing towards the clients has to go through the <b>stunnel</b> box.</p>
+
+<p><b>stunnel</b> must also to be executed as root and without <i>setuid</i> option.</p>
+
 </dd>
-<dt><strong>Local mode (<em>exec</em> option)</strong></dt>
+<dt id="Remote-mode-connect-option-on-FreeBSD-8.0">Remote mode (<i>connect</i> option) on <i>FreeBSD &gt;=8.0</i></dt>
+<dd>
+
+<p>This configuration requires additional firewall and routing setup. <b>stunnel</b> must also to be executed as root and without <i>setuid</i> option.</p>
 
+</dd>
+<dt id="Local-mode-exec-option">Local mode (<i>exec</i> option)</dt>
 <dd>
-<p>This configuration works by pre-loading <em>libstunnel.so</em> shared library.
-_RLD_LIST environment variable is used on Tru64, and LD_PRELOAD variable on
-other platforms.</p>
+
+<p>This configuration works by pre-loading <i>libstunnel.so</i> shared library. _RLD_LIST environment variable is used on Tru64, and LD_PRELOAD variable on other platforms.</p>
+
 </dd>
 </dl>
-</dd>
-<dt><strong><a name="destination" class="item"><em>destination</em></a></strong></dt>
 
+</dd>
+<dt id="destination"><i>destination</i></dt>
 <dd>
-<p>Original destination is used instead of <em>connect</em> option.</p>
+
+<p>Original destination is used instead of <i>connect</i> option.</p>
+
 <p>A service section for transparent destination may look like this:</p>
-<pre>
-    [transparent]
+
+<pre><code>    [transparent]
     client=yes
     accept=&lt;stunnel_port&gt;
-    transparent=destination</pre>
-<p>This configuration requires the following setup for iptables
-(possibly in /etc/rc.local or equivalent file):</p>
-<pre>
-    /sbin/iptables -I INPUT -i eth0 -p tcp --dport &lt;stunnel_port&gt; -j ACCEPT
-    /sbin/iptables -t nat -I PREROUTING -i eth0 -p tcp --dport &lt;redirected_port&gt; -j DNAT --to-destination &lt;local_ip&gt;:&lt;stunnel_port&gt;</pre>
+    transparent=destination</code></pre>
+
+<p>This configuration requires the following setup for iptables (possibly in /etc/rc.local or equivalent file):</p>
+
+<pre><code>    /sbin/iptables -I INPUT -i eth0 -p tcp --dport &lt;stunnel_port&gt; -j ACCEPT
+    /sbin/iptables -t nat -I PREROUTING -i eth0 -p tcp --dport &lt;redirected_port&gt; -j DNAT --to-destination &lt;local_ip&gt;:&lt;stunnel_port&gt;</code></pre>
+
 <p>Transparent destination option is currently only supported on Linux.</p>
-</dd>
-<dt><strong><em>both</em></strong></dt>
 
+</dd>
+<dt id="both"><i>both</i></dt>
 <dd>
-<p>Use both <em>source</em> and <em>destination</em> transparent proxy.</p>
+
+<p>Use both <i>source</i> and <i>destination</i> transparent proxy.</p>
+
 </dd>
 </dl>
+
 <p>Two legacy options are also supported for backward compatibility:</p>
+
 <dl>
-<dt><strong><a name="yes" class="item"><em>yes</em></a></strong></dt>
 
+<dt id="yes"><i>yes</i></dt>
 <dd>
-<p>This options has been renamed to <em>source</em>.</p>
-</dd>
-<dt><strong><em>no</em></strong></dt>
 
+<p>This options has been renamed to <i>source</i>.</p>
+
+</dd>
+<dt id="no"><i>no</i></dt>
 <dd>
-<p>This options has been renamed to <em>none</em>.</p>
+
+<p>This options has been renamed to <i>none</i>.</p>
+
 </dd>
 </dl>
-</dd>
-<dt><strong><a name="verify_level" class="item"><strong>verify</strong> = level</a></strong></dt>
 
+</dd>
+<dt id="verify-level"><b>verify</b> = level</dt>
 <dd>
+
 <p>verify peer certificate</p>
+
 <dl>
-<dt><strong><a name="level_0" class="item">level 0</a></strong></dt>
 
+<dt id="level-0">level 0</dt>
 <dd>
+
 <p>Request and ignore peer certificate.</p>
-</dd>
-<dt><strong><a name="level_1" class="item">level 1</a></strong></dt>
 
+</dd>
+<dt id="level-1">level 1</dt>
 <dd>
+
 <p>Verify peer certificate if present.</p>
-</dd>
-<dt><strong><a name="level_2" class="item">level 2</a></strong></dt>
 
+</dd>
+<dt id="level-2">level 2</dt>
 <dd>
+
 <p>Verify peer certificate.</p>
-</dd>
-<dt><strong><a name="level_3" class="item">level 3</a></strong></dt>
 
+</dd>
+<dt id="level-3">level 3</dt>
 <dd>
+
 <p>Verify peer with locally installed certificate.</p>
-</dd>
-<dt><strong><a name="level_4" class="item">level 4</a></strong></dt>
 
+</dd>
+<dt id="level-4">level 4</dt>
 <dd>
+
 <p>Ignore CA chain and only verify peer certificate.</p>
-</dd>
-<dt><strong><a name="default" class="item">default</a></strong></dt>
 
+</dd>
+<dt id="default">default</dt>
 <dd>
+
 <p>No verify.</p>
+
 </dd>
 </dl>
-<p>It is important to understand, that this option was solely designed for access
-control and not for authorization.  Specifically for level 2 every non-revoked
-certificate is accepted regardless of its Common Name.  For this reason a
-dedicated CA should be used with level 2, and not a generic CA commonly used
-for webservers.  Level 3 is preferred for point-to-point connections.</p>
+
+<p>It is important to understand, that this option was solely designed for access control and not for authorization. Specifically for level 2 every non-revoked certificate is accepted regardless of its Common Name. For this reason a dedicated CA should be used with level 2, and not a generic CA commonly used for webservers. Level 3 is preferred for point-to-point connections.</p>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="return_value">RETURN VALUE</a></h1>
-<p><strong>stunnel</strong> returns zero on success, non-zero on error.</p>
-<p>
-</p>
-<hr />
-<h1><a name="signals">SIGNALS</a></h1>
-<p>The following signals can be used to control <strong>stunnel</strong> in Unix environment:</p>
+
+<h1 id="RETURN-VALUE">RETURN VALUE</h1>
+
+<p><b>stunnel</b> returns zero on success, non-zero on error.</p>
+
+<h1 id="SIGNALS">SIGNALS</h1>
+
+<p>The following signals can be used to control <b>stunnel</b> in Unix environment:</p>
+
 <dl>
-<dt><strong><a name="sighup" class="item">SIGHUP</a></strong></dt>
 
+<dt id="SIGHUP">SIGHUP</dt>
 <dd>
+
 <p>Force a reload of the configuration file.</p>
+
 <p>Some global options will not be reloaded:</p>
+
 <ul>
-<li>
-<p>chroot</p>
+
+<li><p>chroot</p>
+
 </li>
-<li>
-<p>foreground</p>
+<li><p>foreground</p>
+
 </li>
-<li>
-<p>pid</p>
+<li><p>pid</p>
+
 </li>
-<li>
-<p>setgid</p>
+<li><p>setgid</p>
+
 </li>
-<li>
-<p>setuid</p>
+<li><p>setuid</p>
+
 </li>
 </ul>
-<p>The use of 'setuid' option will also prevent <strong>stunnel</strong> from binding privileged
-(&lt;1024) ports during configuration reloading.</p>
-<p>When 'chroot' option is used, <strong>stunnel</strong> will look for all its files (including
-configuration file, certificates, log file and pid file) within the chroot
-jail.</p>
-</dd>
-<dt><strong><a name="sigusr1" class="item">SIGUSR1</a></strong></dt>
 
-<dd>
-<p>Close and reopen <strong>stunnel</strong> log file.
-This function can be used for log rotation.</p>
+<p>The use of &#39;setuid&#39; option will also prevent <b>stunnel</b> from binding privileged (&lt;1024) ports during configuration reloading.</p>
+
+<p>When &#39;chroot&#39; option is used, <b>stunnel</b> will look for all its files (including configuration file, certificates, log file and pid file) within the chroot jail.</p>
+
 </dd>
-<dt><strong><a name="sigterm_sigquit_sigint" class="item">SIGTERM, SIGQUIT, SIGINT</a></strong></dt>
+<dt id="SIGUSR1">SIGUSR1</dt>
+<dd>
 
+<p>Close and reopen <b>stunnel</b> log file. This function can be used for log rotation.</p>
+
+</dd>
+<dt id="SIGTERM-SIGQUIT-SIGINT">SIGTERM, SIGQUIT, SIGINT</dt>
 <dd>
-<p>Shut <strong>stunnel</strong> down.</p>
+
+<p>Shut <b>stunnel</b> down.</p>
+
 </dd>
 </dl>
+
 <p>The result of sending any other signals to the server is undefined.</p>
-<p>
-</p>
-<hr />
-<h1><a name="examples">EXAMPLES</a></h1>
-<p>In order to provide SSL encapsulation to your local <em>imapd</em> service, use</p>
-<pre>
-    [imapd]
+
+<h1 id="EXAMPLES">EXAMPLES</h1>
+
+<p>In order to provide SSL encapsulation to your local <i>imapd</i> service, use</p>
+
+<pre><code>    [imapd]
     accept = 993
     exec = /usr/sbin/imapd
-    execargs = imapd</pre>
-<p>If you want to provide tunneling to your <em>pppd</em> daemon on port 2020,
-use something like</p>
-<pre>
-    [vpn]
+    execargs = imapd</code></pre>
+
+<p>If you want to provide tunneling to your <i>pppd</i> daemon on port 2020, use something like</p>
+
+<pre><code>    [vpn]
     accept = 2020
     exec = /usr/sbin/pppd
     execargs = pppd local
-    pty = yes</pre>
-<p>If you want to use <strong>stunnel</strong> in <em>inetd</em> mode to launch your imapd
-process, you'd use this <em>stunnel.conf</em>.
-Note there must be no <em>[service_name]</em> section.</p>
-<pre>
-    exec = /usr/sbin/imapd
-    execargs = imapd</pre>
-<p>
-</p>
-<hr />
-<h1><a name="notes">NOTES</a></h1>
-<p>
-</p>
-<h2><a name="restrictions">RESTRICTIONS</a></h2>
-<p><strong>stunnel</strong> cannot be used for the FTP daemon because of the nature
-of the FTP protocol which utilizes multiple ports for data transfers.
-There are available SSL enabled versions of FTP and telnet daemons, however.</p>
-<p>
-</p>
-<h2><a name="inetd_mode">INETD MODE</a></h2>
-<p>The most common use of <strong>stunnel</strong> is to listen on a network
-port and establish communication with either a new port
-via the connect option, or a new program via the <em>exec</em> option.
-However there is a special case when you wish to have
-some other program accept incoming connections and
-launch <strong>stunnel</strong>, for example with <em>inetd</em>, <em>xinetd</em>,
-or <em>tcpserver</em>.</p>
-<p>For example, if you have the following line in <em>inetd.conf</em>:</p>
-<pre>
-    imaps stream tcp nowait root /usr/bin/stunnel stunnel /etc/stunnel/imaps.conf</pre>
-<p>In these cases, the <em>inetd</em>-style program is responsible
-for binding a network socket (<em>imaps</em> above) and handing
-it to <strong>stunnel</strong> when a connection is received.
-Thus you do not want <strong>stunnel</strong> to have any <em>accept</em> option.
-All the <em>Service Level Options</em> should be placed in the
-global options section, and no <em>[service_name]</em> section
-will be present.  See the <em>EXAMPLES</em> section for example
-configurations.</p>
-<p>
-</p>
-<h2><a name="certificates">CERTIFICATES</a></h2>
-<p>Each SSL enabled daemon needs to present a valid X.509 certificate
-to the peer. It also needs a private key to decrypt the incoming
-data. The easiest way to obtain a certificate and a key is to 
-generate them with the free <strong>OpenSSL</strong> package. You can find more
-information on certificates generation on pages listed below.</p>
-<p>The order of contents of the <em>.pem</em> file is important.  It should contain the
-unencrypted private key first, then a signed certificate (not certificate
-request).  There should be also empty lines after certificate and private key.
-Plaintext certificate information appended on the top of generated certificate
-should be discarded. So the file should look like this:</p>
-<pre>
-    -----BEGIN RSA PRIVATE KEY-----
+    pty = yes</code></pre>
+
+<p>If you want to use <b>stunnel</b> in <i>inetd</i> mode to launch your imapd process, you&#39;d use this <i>stunnel.conf</i>. Note there must be no <i>[service_name]</i> section.</p>
+
+<pre><code>    exec = /usr/sbin/imapd
+    execargs = imapd</code></pre>
+
+<h1 id="NOTES">NOTES</h1>
+
+<h2 id="RESTRICTIONS">RESTRICTIONS</h2>
+
+<p><b>stunnel</b> cannot be used for the FTP daemon because of the nature of the FTP protocol which utilizes multiple ports for data transfers. There are available SSL enabled versions of FTP and telnet daemons, however.</p>
+
+<h2 id="INETD-MODE">INETD MODE</h2>
+
+<p>The most common use of <b>stunnel</b> is to listen on a network port and establish communication with either a new port via the connect option, or a new program via the <i>exec</i> option. However there is a special case when you wish to have some other program accept incoming connections and launch <b>stunnel</b>, for example with <i>inetd</i>, <i>xinetd</i>, or <i>tcpserver</i>.</p>
+
+<p>For example, if you have the following line in <i>inetd.conf</i>:</p>
+
+<pre><code>    imaps stream tcp nowait root /usr/bin/stunnel stunnel /etc/stunnel/imaps.conf</code></pre>
+
+<p>In these cases, the <i>inetd</i>-style program is responsible for binding a network socket (<i>imaps</i> above) and handing it to <b>stunnel</b> when a connection is received. Thus you do not want <b>stunnel</b> to have any <i>accept</i> option. All the <i>Service Level Options</i> should be placed in the global options section, and no <i>[service_name]</i> section will be present. See the <i>EXAMPLES</i> section for example configurations.</p>
+
+<h2 id="CERTIFICATES">CERTIFICATES</h2>
+
+<p>Each SSL enabled daemon needs to present a valid X.509 certificate to the peer. It also needs a private key to decrypt the incoming data. The easiest way to obtain a certificate and a key is to generate them with the free <b>OpenSSL</b> package. You can find more information on certificates generation on pages listed below.</p>
+
+<p>The order of contents of the <i>.pem</i> file is important. It should contain the unencrypted private key first, then a signed certificate (not certificate request). There should be also empty lines after certificate and private key. Plaintext certificate information appended on the top of generated certificate should be discarded. So the file should look like this:</p>
+
+<pre><code>    -----BEGIN RSA PRIVATE KEY-----
     [encoded key]
     -----END RSA PRIVATE KEY-----
     [empty line]
     -----BEGIN CERTIFICATE-----
     [encoded certificate]
     -----END CERTIFICATE-----
-    [empty line]</pre>
-<p>
-</p>
-<h2><a name="randomness">RANDOMNESS</a></h2>
-<p><strong>stunnel</strong> needs to seed the PRNG (pseudo random number generator) in
-order for SSL to use good randomness.  The following sources are loaded
-in order until sufficient random data has been gathered:</p>
+    [empty line]</code></pre>
+
+<h2 id="RANDOMNESS">RANDOMNESS</h2>
+
+<p><b>stunnel</b> needs to seed the PRNG (pseudo random number generator) in order for SSL to use good randomness. The following sources are loaded in order until sufficient random data has been gathered:</p>
+
 <ul>
-<li>
-<p>The file specified with the <em>RNDfile</em> flag.</p>
+
+<li><p>The file specified with the <i>RNDfile</i> flag.</p>
+
 </li>
-<li>
-<p>The file specified by the RANDFILE environment variable, if set.</p>
+<li><p>The file specified by the RANDFILE environment variable, if set.</p>
+
 </li>
-<li>
-<p>The file .rnd in your home directory, if RANDFILE not set.</p>
+<li><p>The file .rnd in your home directory, if RANDFILE not set.</p>
+
 </li>
-<li>
-<p>The file specified with '--with-random' at compile time.</p>
+<li><p>The file specified with &#39;--with-random&#39; at compile time.</p>
+
 </li>
-<li>
-<p>The contents of the screen if running on Windows.</p>
+<li><p>The contents of the screen if running on Windows.</p>
+
 </li>
-<li>
-<p>The egd socket specified with the <em>EGD</em> flag.</p>
+<li><p>The egd socket specified with the <i>EGD</i> flag.</p>
+
 </li>
-<li>
-<p>The egd socket specified with '--with-egd-sock' at compile time.</p>
+<li><p>The egd socket specified with &#39;--with-egd-sock&#39; at compile time.</p>
+
 </li>
-<li>
-<p>The /dev/urandom device.</p>
+<li><p>The /dev/urandom device.</p>
+
 </li>
 </ul>
-<p>With recent (<strong>OpenSSL 0.9.5a</strong> or later) version of SSL it will stop loading
-random data automatically when sufficient entropy has been gathered.  With
-previous versions it will continue to gather from all the above sources since
-no SSL function exists to tell when enough data is available.</p>
-<p>Note that on Windows machines that do not have console user interaction
-(mouse movements, creating windows, etc.) the screen contents are not
-variable enough to be sufficient, and you should provide a random file
-for use with the <em>RNDfile</em> flag.</p>
-<p>Note that the file specified with the <em>RNDfile</em> flag should contain
-random data -- that means it should contain different information
-each time <strong>stunnel</strong> is run.  This is handled automatically
-unless the <em>RNDoverwrite</em> flag is used.  If you wish to update this file
-manually, the <em>openssl rand</em> command in recent versions of <strong>OpenSSL</strong>,
-would be useful.</p>
-<p>Important note: If /dev/urandom is available, <strong>OpenSSL</strong> often seeds the PRNG
-with it while checking the random state.  On systems with /dev/urandom
-<strong>OpenSSL</strong> is likely to use it even though it is listed at the very bottom of
-the list above.  This is the behaviour of <strong>OpenSSL</strong> and not <strong>stunnel</strong>.</p>
-<p>
-</p>
-<h2><a name="dh_parameters">DH PARAMETERS</a></h2>
+
+<p>With recent (<b>OpenSSL 0.9.5a</b> or later) version of SSL it will stop loading random data automatically when sufficient entropy has been gathered. With previous versions it will continue to gather from all the above sources since no SSL function exists to tell when enough data is available.</p>
+
+<p>Note that on Windows machines that do not have console user interaction (mouse movements, creating windows, etc.) the screen contents are not variable enough to be sufficient, and you should provide a random file for use with the <i>RNDfile</i> flag.</p>
+
+<p>Note that the file specified with the <i>RNDfile</i> flag should contain random data -- that means it should contain different information each time <b>stunnel</b> is run. This is handled automatically unless the <i>RNDoverwrite</i> flag is used. If you wish to update this file manually, the <i>openssl rand</i> command in recent versions of <b>OpenSSL</b>, would be useful.</p>
+
+<p>Important note: If /dev/urandom is available, <b>OpenSSL</b> often seeds the PRNG with it while checking the random state. On systems with /dev/urandom <b>OpenSSL</b> is likely to use it even though it is listed at the very bottom of the list above. This is the behaviour of <b>OpenSSL</b> and not <b>stunnel</b>.</p>
+
+<h2 id="DH-PARAMETERS">DH PARAMETERS</h2>
+
 <p>Stunnel 4.40 and later contains hardcoded 2048-bit DH parameters.</p>
+
 <p>It is also possible to specify DH parameters in the certificate file:</p>
-<pre>
-    openssl dhparam 2048 &gt;&gt; stunnel.pem</pre>
+
+<pre><code>    openssl dhparam 2048 &gt;&gt; stunnel.pem</code></pre>
+
 <p>DH parameter generation may take several minutes.</p>
-<p>
-</p>
-<hr />
-<h1><a name="files">FILES</a></h1>
+
+<h1 id="FILES">FILES</h1>
+
 <dl>
-<dt><strong><a name="stunnel_conf" class="item"><em class="file">stunnel.conf</em></a></strong></dt>
 
+<dt id="stunnel.conf"><i>stunnel.conf</i></dt>
 <dd>
-<p><strong>stunnel</strong> configuration file</p>
+
+<p><b>stunnel</b> configuration file</p>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="bugs">BUGS</a></h1>
-<p>Option <em>execargs</em> and Win32 command line does not support quoting.</p>
-<p>
-</p>
-<hr />
-<h1><a name="see_also">SEE ALSO</a></h1>
+
+<h1 id="BUGS">BUGS</h1>
+
+<p>Option <i>execargs</i> and Win32 command line does not support quoting.</p>
+
+<h1 id="SEE-ALSO">SEE ALSO</h1>
+
 <dl>
-<dt><strong><a name="tcpd" class="item"><a href="#tcpd">tcpd(8)</a></a></strong></dt>
 
+<dt id="tcpd-8"><a href="http://man.he.net/man8/tcpd">tcpd(8)</a></dt>
 <dd>
+
 <p>access control facility for internet services</p>
-</dd>
-<dt><strong><a name="inetd" class="item"><a href="#inetd">inetd(8)</a></a></strong></dt>
 
-<dd>
-<p>internet 'super-server'</p>
 </dd>
-<dt><strong><a name="http_www_stunnel_org" class="item"><em class="file"><a href="http://www.stunnel.org/">http://www.stunnel.org/</a></em></a></strong></dt>
-
+<dt id="inetd-8"><a href="http://man.he.net/man8/inetd">inetd(8)</a></dt>
 <dd>
-<p><strong>stunnel</strong> homepage</p>
+
+<p>internet &#39;super-server&#39;</p>
+
 </dd>
-<dt><strong><a name="http_www_openssl_org" class="item"><em class="file"><a href="http://www.openssl.org/">http://www.openssl.org/</a></em></a></strong></dt>
+<dt id="http:-www.stunnel.org"><i>http://www.stunnel.org/</i></dt>
+<dd>
+
+<p><b>stunnel</b> homepage</p>
 
+</dd>
+<dt id="http:-www.openssl.org"><i>http://www.openssl.org/</i></dt>
 <dd>
-<p><strong>OpenSSL</strong> project website</p>
+
+<p><b>OpenSSL</b> project website</p>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="author">AUTHOR</a></h1>
+
+<h1 id="AUTHOR">AUTHOR</h1>
+
 <dl>
-<dt><strong><a name="micha_trojnara" class="item">Michał Trojnara</a></strong></dt>
 
+<dt id="Micha-Trojnara">Micha&#x142; Trojnara</dt>
 <dd>
-<p>&lt;<em class="file"><a href="mailto:Michal.Trojnara@mirt.net">Michal.Trojnara@mirt.net</a></em>&gt;</p>
+
+<p>&lt;<i>Michal.Trojnara@mirt.net</i>&gt;</p>
+
 </dd>
 </dl>
 
+
 </body>
 
 </html>
+
+
diff --git a/doc/stunnel.pl.8 b/doc/stunnel.pl.8
index 0df17bc..9cd86fc 100644
--- a/doc/stunnel.pl.8
+++ b/doc/stunnel.pl.8
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -38,31 +38,36 @@
 .    ds PI \(*p
 .    ds L" ``
 .    ds R" ''
+.    ds C`
+.    ds C'
 'br\}
 .\"
 .\" Escape single quotes in literal strings from groff's Unicode transform.
 .ie \n(.g .ds Aq \(aq
 .el       .ds Aq '
 .\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" If the F register is >0, we'll generate index entries on stderr for
 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
 ..
-.    nr % 0
-.    rr F
-.\}
-.el \{\
+.if !\nF .nr F 0
+.if \nF>0 \{\
 .    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
 ..
+.    if !\nF==2 \{\
+.        nr % 0
+.        nr F 2
+.    \}
 .\}
 .\" ========================================================================
 .\"
 .IX Title "STUNNEL.PL 8"
-.TH STUNNEL.PL 8 "2013.03.22" "4.56" "stunnel"
+.TH STUNNEL.PL 8 "2018.04.10" "4.56" "stunnel"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -147,7 +152,7 @@ numerem portu
 oddzieloną średnikiem parą adresu (IPv4, IPv6, lub nazwą domenową) i numeru portu
 .IP "\(bu" 4
 ścieżką do gniazda Unix (tylko Unix)
-.SS "\s-1OPCJE\s0 \s-1GLOBALNE\s0"
+.SS "\s-1OPCJE GLOBALNE\s0"
 .IX Subsection "OPCJE GLOBALNE"
 .IP "\fBchroot\fR = katalog (tylko Unix)" 4
 .IX Item "chroot = katalog (tylko Unix)"
@@ -176,7 +181,7 @@ wybór algorytmu kompresji przesyłanych danych
 .Sp
 domyślnie: bez kompresji
 .Sp
-Algorytm deflate jest standardową metodą kompresji zgodnie z \s-1RFC\s0 1951.
+Algorytm deflate jest standardową metodą kompresji zgodnie z \s-1RFC 1951.\s0
 .Sp
 Kompresja zlib zaimplementowana w \fBOpenSSL 0.9.8\fR i nowszych nie jest
 kompatybilna implementacją \fBOpenSSL 0.9.7\fR.
@@ -230,16 +235,16 @@ urządzenia zgodnego z OpenSC:
 .IX Item "engineCtrl = <command>[:<parameter>]"
 konfiguracja urządzenia kryptograficznego
 .Sp
-Specjalne komendy \*(L"\s-1LOAD\s0\*(R" i \*(L"\s-1INIT\s0\*(R" pozwalają na załadowanie i inicjalizację
+Specjalne komendy \*(L"\s-1LOAD\*(R"\s0 i \*(L"\s-1INIT\*(R"\s0 pozwalają na załadowanie i inicjalizację
 modułu kryptograficznego urządzenia.
 .IP "\fBfips\fR = yes | no" 4
 .IX Item "fips = yes | no"
-Włącz lub wyłącz tryb \s-1FIPS\s0 140\-2.
+Włącz lub wyłącz tryb \s-1FIPS 140\-2.\s0
 .Sp
-Opcja pozwala wyłączyć wejście w tryb \s-1FIPS\s0, jeśli \fBstunnel\fR został
-skompilowany ze wsparciem dla \s-1FIPS\s0 140\-2.
+Opcja pozwala wyłączyć wejście w tryb \s-1FIPS,\s0 jeśli \fBstunnel\fR został
+skompilowany ze wsparciem dla \s-1FIPS 140\-2.\s0
 .Sp
-domyślnie: yes (pracuj w trybie \s-1FIPS\s0 140\-2)
+domyślnie: yes (pracuj w trybie \s-1FIPS 140\-2\s0)
 .IP "\fBforeground\fR = yes | no (tylko Unix)" 4
 .IX Item "foreground = yes | no (tylko Unix)"
 tryb pierwszoplanowy
@@ -269,7 +274,7 @@ względem tego katalogu.
 liczba bajtów do zainicjowania generatora pseudolosowego
 .Sp
 W wersjach biblioteki \fBOpenSSL\fR starszych niż \fB0.9.5a\fR opcja ta określa
-również liczbę bajtów wystarczających do zainicjowania \s-1PRNG\s0.
+również liczbę bajtów wystarczających do zainicjowania \s-1PRNG.\s0
 Nowsze wersje biblioteki mają wbudowaną funkcję określającą, czy
 dostarczona ilość losowości jest wystarczająca do zainicjowania generatora.
 .IP "\fBRNDfile\fR = plik" 4
@@ -337,7 +342,7 @@ usługi w logach.
 .PP
 Jeżeli \fBstunnel\fR ma zostać użyty w trybie \fIinetd\fR, gdzie za odebranie
 połączenia odpowiada osobny program (zwykle \fIinetd\fR, \fIxinetd\fR
-lub \fItcpserver\fR), należy przeczytać sekcję \fI\s-1TRYB\s0 \s-1INETD\s0\fR poniżej.
+lub \fItcpserver\fR), należy przeczytać sekcję \fI\s-1TRYB INETD\s0\fR poniżej.
 .IP "\fBaccept\fR = [adres:]port" 4
 .IX Item "accept = [adres:]port"
 nasłuchuje na połączenia na podanym adresie i porcie
@@ -356,7 +361,7 @@ katalog Centrum Certyfikacji
 .Sp
 Opcja określa katalog, w którym \fBstunnel\fR będzie szukał certyfikatów,
 jeżeli użyta została opcja \fIverify\fR.  Pliki z certyfikatami muszą
-posiadać specjalne nazwy \s-1XXXXXXXX\s0.0, gdzie \s-1XXXXXXXX\s0 jest skrótem
+posiadać specjalne nazwy \s-1XXXXXXXX.0,\s0 gdzie \s-1XXXXXXXX\s0 jest skrótem
 kryptograficznym reprezentacji \s-1DER\s0 nazwy podmiotu certyfikatu.
 .Sp
 Funkcja skrótu została zmieniona w \fBOpenSSL 1.0.0\fR.
@@ -378,12 +383,42 @@ Opcja określa położenie pliku zawierającego certyfikaty używane przez
 program \fBstunnel\fR do uwierzytelnienia się przed drugą stroną połączenia.
 Certyfikat jest konieczny, aby używać programu w trybie serwera.
 W trybie klienta certyfikat jest opcjonalny.
+.IP "\fBcheckEmail\fR = \s-1EMAIL\s0" 4
+.IX Item "checkEmail = EMAIL"
+adres email przedstawionego certyfikatu
+.Sp
+Pojedyncza sekcja może zawierać wiele wystąpień opcji \fBcheckEmail\fR.
+Certyfikaty są akceptowane, jeżeli sekcja nie zawiera opcji \fBcheckEmail\fR,
+albo adres email przedstawionego certyfikatu pasuje do jednego z adresów
+email określonych przy pomocy \fBcheckEmail\fR.
+.Sp
+Opcja ta wymaga biblioteki OpenSSL w wersji 1.0.2 lub nowszej.
+.IP "\fBcheckHost\fR = \s-1NAZWA_SERWERA\s0" 4
+.IX Item "checkHost = NAZWA_SERWERA"
+nazwa serwera przedstawionego certyfikatu
+.Sp
+Pojedyncza sekcja może zawierać wiele wystąpień opcji \fBcheckHost\fR.
+Certyfikaty są akceptowane, jeżeli sekcja nie zawiera opcji \fBcheckHost\fR, albo
+nazwa serwera przedstawionego certyfikatu pasuje do jednego nazw określonych
+przy pomocy \fBcheckHost\fR.
+.Sp
+Opcja ta wymaga biblioteki OpenSSL w wersji 1.0.2 lub nowszej.
+.IP "\fBcheckIP\fR = \s-1IP\s0" 4
+.IX Item "checkIP = IP"
+adres \s-1IP\s0 przedstawionego certyfikatu
+.Sp
+Pojedyncza sekcja może zawierać wiele wystąpień opcji \fBcheckIP\fR.  Certyfikaty
+są akceptowane, jeżeli sekcja nie zawiera opcji \fBcheckIP\fR, albo adres \s-1IP\s0
+przedstawionego certyfikatu pasuje do jednego z adresów \s-1IP\s0 określonych przy
+pomocy \fBcheckIP\fR.
+.Sp
+Opcja ta wymaga biblioteki OpenSSL w wersji 1.0.2 lub nowszej.
 .IP "\fBciphers\fR = lista_szyfrów" 4
 .IX Item "ciphers = lista_szyfrów"
 lista dozwolonych szyfrów \s-1SSL\s0
 .Sp
 Parametrem tej opcji jest lista szyfrów, które będą użyte przy
-otwieraniu nowych połączeń \s-1SSL\s0, np.:  \s-1DES\-CBC3\-SHA:IDEA\-CBC\-MD5\s0
+otwieraniu nowych połączeń \s-1SSL,\s0 np.:  \s-1DES\-CBC3\-SHA:IDEA\-CBC\-MD5\s0
 .IP "\fBclient\fR = yes | no" 4
 .IX Item "client = yes | no"
 tryb kliencki (zdalna usługa używa \s-1SSL\s0)
@@ -403,10 +438,10 @@ ruchu pomiędzy wiele serwerów.
 .IX Item "CRLpath = katalog_CRL"
 katalog List Odwołanych Certyfikatów (\s-1CRL\s0)
 .Sp
-Opcja określa katalog, w którym \fBstunnel\fR będzie szukał list \s-1CRL\s0,
+Opcja określa katalog, w którym \fBstunnel\fR będzie szukał list \s-1CRL,\s0
 jeżeli użyta została opcja \fIverify\fR.  Pliki z listami \s-1CRL\s0 muszą
 posiadać specjalne nazwy \s-1XXXXXXXX\s0.r0, gdzie \s-1XXXXXXXX\s0 jest skrótem
-listy \s-1CRL\s0.
+listy \s-1CRL.\s0
 .Sp
 Funkcja skrótu została zmieniona \fBOpenSSL 1.0.0\fR.
 Należy wykonać c_rehash przy zmianie \fBOpenSSL 0.x.x\fR na \fB1.x.x\fR.
@@ -434,8 +469,8 @@ domyślnie: prime256v1
 .IX Item "delay = yes | no"
 opóźnij rozwinięcie adresu \s-1DNS\s0 podanego w opcji \fIconnect\fR
 .Sp
-Opcja jest przydatna przy dynamicznym \s-1DNS\s0, albo gdy usługa \s-1DNS\s0 nie jest
-dostępna przy starcie programu \fBstunnel\fR (klient \s-1VPN\s0, połączenie wdzwaniane).
+Opcja jest przydatna przy dynamicznym \s-1DNS,\s0 albo gdy usługa \s-1DNS\s0 nie jest
+dostępna przy starcie programu \fBstunnel\fR (klient \s-1VPN,\s0 połączenie wdzwaniane).
 .IP "\fBengineNum\fR = <numer urządzenia>" 4
 .IX Item "engineNum = <numer urządzenia>"
 wybierz urządzenie do odczyta klucza prywatnego
@@ -466,7 +501,7 @@ Strategia wybierania serwerów wyspecyfikowanych parametrami \*(L"connect\*(R".
 domyślnie: rr
 .IP "\fBident\fR = nazwa_użytkownika" 4
 .IX Item "ident = nazwa_użytkownika"
-weryfikuj nazwę zdalnego użytkownika korzystając z protokołu \s-1IDENT\s0 (\s-1RFC\s0 1413)
+weryfikuj nazwę zdalnego użytkownika korzystając z protokołu \s-1IDENT\s0 (\s-1RFC 1413\s0)
 .IP "\fBkey\fR = plik_klucza" 4
 .IX Item "key = plik_klucza"
 klucz prywatny do certyfikatu podanego w opcji \fIcert\fR
@@ -495,7 +530,7 @@ serwera, do którego nawiązywane jest połączenie.
 .IP "\fBsni\fR = nazwa_usługi:wzorzec_nazwy_serwera (tryb serwera)" 4
 .IX Item "sni = nazwa_usługi:wzorzec_nazwy_serwera (tryb serwera)"
 Użyj usługi jako podrzędnej (virtualnego serwera) dla rozszerzenia \s-1TLS\s0 Server
-Name Indication (\s-1RFC\s0 3546).
+Name Indication (\s-1RFC 3546\s0).
 .Sp
 \&\fInazwa_usługi\fR wskazuje usługę nadrzędną, która odbiera połączenia od klientów
 przy pomocy opcji \fIaccept\fR.  \fIwzorzec_nazwy_serwera\fR wskazuje nazwę serwera
@@ -509,30 +544,41 @@ klienckim.
 .Sp
 Opcja \fIconnect\fR usługi podrzędnej jest ignorowana w połączeniu z opcją
 \&\fIprotocol\fR, gdyż połączenie do zdalnego serwera jest w tym wypadku nawiązywane
-przed negocjacją \s-1TLS\s0.
+przed negocjacją \s-1TLS.\s0
 .Sp
 Uwierzytelnienie przy pomocy biblioteki libwrap jest realizowane dwukrotnie:
-najpierw dla usługi nadrzędnej po odebraniu połączenia \s-1TCP\s0, a następnie dla
-usługi podrzędnej podczas negocjacji \s-1TLS\s0.
+najpierw dla usługi nadrzędnej po odebraniu połączenia \s-1TCP,\s0 a następnie dla
+usługi podrzędnej podczas negocjacji \s-1TLS.\s0
 .Sp
 Opcja \fIsni\fR jest dostępna począwszy od \fBOpenSSL 1.0.0\fR.
 .IP "\fBsni\fR = nazwa_serwera (tryb klienta)" 4
 .IX Item "sni = nazwa_serwera (tryb klienta)"
 Użyj parametru jako wartości rozszerzenia \s-1TLS\s0 Server Name Indication
-(\s-1RFC\s0 3546).
+(\s-1RFC 3546\s0).
 .Sp
 Opcja \fIsni\fR jest dostępna począwszy od \fBOpenSSL 1.0.0\fR.
 .IP "\fB\s-1OCSP\s0\fR = \s-1URL\s0" 4
 .IX Item "OCSP = URL"
 serwer \s-1OCSP\s0 do weryfikacji certyfikatów
+.IP "\fBOCSPaia\fR = yes | no" 4
+.IX Item "OCSPaia = yes | no"
+weryfikuj certyfikaty przy użyciu respondertów \s-1AIA\s0
 .IP "\fBOCSPflag\fR = flaga" 4
 .IX Item "OCSPflag = flaga"
 flaga serwera \s-1OCSP\s0
 .Sp
-aktualnie wspierane flagi: \s-1NOCERTS\s0, \s-1NOINTERN\s0 \s-1NOSIGS\s0, \s-1NOCHAIN\s0, \s-1NOVERIFY\s0,
-\&\s-1NOEXPLICIT\s0, \s-1NOCASIGN\s0, \s-1NODELEGATED\s0, \s-1NOCHECKS\s0, \s-1TRUSTOTHER\s0, \s-1RESPID_KEY\s0, \s-1NOTIME\s0
+aktualnie wspierane flagi: \s-1NOCERTS, NOINTERN NOSIGS, NOCHAIN, NOVERIFY,
+NOEXPLICIT, NOCASIGN, NODELEGATED, NOCHECKS, TRUSTOTHER, RESPID_KEY, NOTIME\s0
 .Sp
 Aby wyspecyfikować kilka flag należy użyć \fIOCSPflag\fR wielokrotnie.
+.IP "\fBOCSPnonce\fR = yes | no" 4
+.IX Item "OCSPnonce = yes | no"
+wysyłaj i weryfikuj \s-1OCSP\s0 nonce
+.Sp
+Opcja \fBOCSPnonce\fR zabezpiecza protokół \s-1OCSP\s0 przed atakami powtórzeniowymi.
+Ze względu na złożoność obliczeniową rozszerzenie nonce jest zwykle wspierane
+jedynie przez wewnętrzne (np. korporacyjne), a nie przez publiczne respondery
+\&\s-1OCSP.\s0
 .IP "\fBoptions\fR = opcje_SSL" 4
 .IX Item "options = opcje_SSL"
 opcje biblioteki \fBOpenSSL\fR
@@ -563,15 +609,15 @@ Unieudokumentowane rozszerzenie protokołu \s-1CIFS\s0 wspierane przez serwer Sa
 Wsparcie dla tego rozrzeczenia zostało zarzucone w wersji 3.0.0 serwera Samba.
 .IP "\fIconnect\fR" 4
 .IX Item "connect"
-Negocjacja \s-1RFC\s0 2817 \- \fIUpgrading to \s-1TLS\s0 Within \s-1HTTP/1\s0.1\fR, rozdział 5.2 \- \fIRequesting a Tunnel with \s-1CONNECT\s0\fR
+Negocjacja \s-1RFC 2817\s0 \- \fIUpgrading to \s-1TLS\s0 Within \s-1HTTP/1.1\s0\fR, rozdział 5.2 \- \fIRequesting a Tunnel with \s-1CONNECT\s0\fR
 .Sp
 Ten protokół jest wspierany wyłącznie w trybie klienckim.
 .IP "\fIimap\fR" 4
 .IX Item "imap"
-Negocjacja \s-1RFC\s0 2595 \- \fIUsing \s-1TLS\s0 with \s-1IMAP\s0, \s-1POP3\s0 and \s-1ACAP\s0\fR
+Negocjacja \s-1RFC 2595\s0 \- \fIUsing \s-1TLS\s0 with \s-1IMAP, POP3\s0 and \s-1ACAP\s0\fR
 .IP "\fInntp\fR" 4
 .IX Item "nntp"
-Negocjacja \s-1RFC\s0 4642 \- \fIUsing Transport Layer Security (\s-1TLS\s0) with Network News Transfer Protocol (\s-1NNTP\s0)\fR
+Negocjacja \s-1RFC 4642\s0 \- \fIUsing Transport Layer Security (\s-1TLS\s0) with Network News Transfer Protocol (\s-1NNTP\s0)\fR
 .Sp
 Ten protokół jest wspierany wyłącznie w trybie klienckim.
 .IP "\fIpgsql\fR" 4
@@ -579,13 +625,13 @@ Ten protokół jest wspierany wyłącznie w trybie klienckim.
 Negocjacja http://www.postgresql.org/docs/8.3/static/protocol\-flow.html#AEN73982
 .IP "\fIpop3\fR" 4
 .IX Item "pop3"
-Negocjacja \s-1RFC\s0 2449 \- \fI\s-1POP3\s0 Extension Mechanism\fR
+Negocjacja \s-1RFC 2449\s0 \- \fI\s-1POP3\s0 Extension Mechanism\fR
 .IP "\fIproxy\fR" 4
 .IX Item "proxy"
 Przekazywanie adresu \s-1IP\s0 haproxy http://haproxy.1wt.eu/download/1.5/doc/proxy\-protocol.txt
 .IP "\fIsmtp\fR" 4
 .IX Item "smtp"
-Negocjacja \s-1RFC\s0 2487 \- \fI\s-1SMTP\s0 Service Extension for Secure \s-1SMTP\s0 over \s-1TLS\s0\fR
+Negocjacja \s-1RFC 2487\s0 \- \fI\s-1SMTP\s0 Service Extension for Secure \s-1SMTP\s0 over \s-1TLS\s0\fR
 .RE
 .RS 4
 .RE
@@ -602,7 +648,7 @@ domyślnie: basic
 .IX Item "protocolHost = adres:port"
 adres docelowy do negocjacji protokołu
 .Sp
-\&\fIprotocolHost\fR określa docelowy serwer \s-1SSL\s0, do którego połączyć ma się proxy.
+\&\fIprotocolHost\fR określa docelowy serwer \s-1SSL,\s0 do którego połączyć ma się proxy.
 Nie jest to adres serwera proxy, do którego połączenie zestawia \fBstunnel\fR.
 Adres serwera proxy powinien być określony przy pomocy opcji 'connect'.
 .Sp
@@ -635,7 +681,7 @@ przed opisanym problemem.
 domyślnie: yes (o ile wspierane przez \fBOpenSSL\fR)
 .IP "\fBreset\fR = yes | no" 4
 .IX Item "reset = yes | no"
-sygnalizuj wystąpienie błędu przy pomocy flagi \s-1TCP\s0 \s-1RST\s0
+sygnalizuj wystąpienie błędu przy pomocy flagi \s-1TCP RST\s0
 .Sp
 Ta opcja nie jest wspierana na niektórych platformach.
 .Sp
@@ -654,7 +700,7 @@ sesji.
 .Sp
 Wartość 0 oznacza brak ograniczenia rozmiaru.  Nie jest to zalecane dla
 systemów produkcyjnych z uwagi na ryzyko ataku DoS przez wyczerpanie pamięci
-\&\s-1RAM\s0.
+\&\s-1RAM.\s0
 .IP "\fBsessionCacheTimeout\fR = czas" 4
 .IX Item "sessionCacheTimeout = czas"
 przeterminowanie pamięci podręcznej sesji \s-1SSL\s0
@@ -836,7 +882,7 @@ plikiem pid) wewnątrz katalogu wskazanego przez 'chroot'.
 .IX Item "SIGUSR1"
 Zamknij i otwórz ponownie log.
 Funkcja ta może zostać użyta w skrypcie rotującym log programu \fBstunnel\fR.
-.IP "\s-1SIGTERM\s0, \s-1SIGQUIT\s0, \s-1SIGINT\s0" 4
+.IP "\s-1SIGTERM, SIGQUIT, SIGINT\s0" 4
 .IX Item "SIGTERM, SIGQUIT, SIGINT"
 Zakończ działanie programu.
 .PP
@@ -860,7 +906,7 @@ albo w trybie zdalnym:
 \&    connect = 143
 .Ve
 .PP
-W połączeniu z programem \fIpppd\fR \fBstunnel\fR pozwala zestawić prosty \s-1VPN\s0.
+W połączeniu z programem \fIpppd\fR \fBstunnel\fR pozwala zestawić prosty \s-1VPN.\s0
 Po stronie serwera nasłuchującego na porcie 2020 jego konfiguracja
 może wyglądać następująco:
 .PP
@@ -889,7 +935,7 @@ ponieważ do przesyłania poszczególnych plików używa on dodatkowych
 połączeń otwieranych na portach o dynamicznie przydzielanych numerach.
 Istnieją jednak specjalne wersje klientów i serwerów \s-1FTP\s0 pozwalające
 na szyfrowanie przesyłanych danych przy pomocy protokołu \fI\s-1SSL\s0\fR.
-.SS "\s-1TRYB\s0 \s-1INETD\s0 (tylko Unix)"
+.SS "\s-1TRYB INETD\s0 (tylko Unix)"
 .IX Subsection "TRYB INETD (tylko Unix)"
 W większości zastosowań \fBstunnel\fR samodzielnie nasłuchuje na porcie
 podanym w pliku konfiguracyjnym i tworzy połączenie z innym portem
@@ -951,7 +997,7 @@ uzyskania  wystarczającej ilości entropii:
 Zawartość pliku podanego w opcji \fIRNDfile\fR.
 .IP "\(bu" 4
 Zawartość pliku o nazwie określonej przez zmienną środowiskową
-\&\s-1RANDFILE\s0, o ile jest ona ustawiona.
+\&\s-1RANDFILE,\s0 o ile jest ona ustawiona.
 .IP "\(bu" 4
 Plik .rnd umieszczony w katalogu domowym użytkownika,
 jeżeli zmienna \s-1RANDFILE\s0 nie jest ustawiona.
@@ -975,7 +1021,7 @@ uzyskano już wystarczająco dużo danych.
 .PP
 Warto zwrócić uwagę, że na maszynach z systemem Windows, na których
 konsoli nie pracuje użytkownik, zawartość ekranu nie jest wystarczająco
-zmienna, aby zainicjować \s-1PRNG\s0.  W takim przypadku do zainicjowania
+zmienna, aby zainicjować \s-1PRNG.\s0  W takim przypadku do zainicjowania
 generatora należy użyć opcji \fIRNDfile\fR.
 .PP
 Plik \fIRNDfile\fR powinien zawierać dane losowe \*(-- również w tym sensie,
@@ -991,10 +1037,10 @@ sprawdzania stanu generatora.  W systemach z \fI/dev/urandom\fR urządzenie
 to będzie najprawdopodobniej użyte, pomimo że znajduje się na samym końcu
 powyższej listy.  Jest to właściwość biblioteki \fBOpenSSL\fR, a nie programu
 \&\fBstunnel\fR.
-.SS "\s-1PARAMETRY\s0 \s-1DH\s0"
+.SS "\s-1PARAMETRY DH\s0"
 .IX Subsection "PARAMETRY DH"
 Począwszy od wersji 4.40 \fBstunnel\fR zawiera w kodzie programu 2048\-bitowe
-parametry \s-1DH\s0.
+parametry \s-1DH.\s0
 .PP
 Alternatywnie parametry \s-1DH\s0 można umieścić w pliku razem z certyfikatem:
 .PP
diff --git a/doc/stunnel.pl.html b/doc/stunnel.pl.html
index e9b2433..fd1a490 100644
--- a/doc/stunnel.pl.html
+++ b/doc/stunnel.pl.html
@@ -4,1155 +4,1230 @@
 <head>
 <title>stunnel.8</title>
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:root@localhost" />
+<link rev="made" href="mailto:" />
 </head>
 
-<body style="background-color: white">
+<body>
 
 
-<!-- INDEX BEGIN -->
-<div name="index">
-<p><a name="__index__"></a></p>
-<!--
 
-<ul>
-
-	<li><a href="#nazwa">NAZWA</a></li>
-	<li><a href="#sk__adnia">SKŁADNIA</a></li>
-	<li><a href="#opis">OPIS</a></li>
-	<li><a href="#opcje">OPCJE</a></li>
-	<li><a href="#plik_konfiguracyjny">PLIK KONFIGURACYJNY</a></li>
-	<ul>
-
-		<li><a href="#opcje_globalne">OPCJE GLOBALNE</a></li>
-		<li><a href="#opcje_us__ug">OPCJE USŁUG</a></li>
-	</ul>
-
-	<li><a href="#zwracana_warto____">ZWRACANA WARTOŚĆ</a></li>
-	<li><a href="#signa__y">SIGNAŁY</a></li>
-	<li><a href="#przyk__ady">PRZYKŁADY</a></li>
-	<li><a href="#notki">NOTKI</a></li>
-	<ul>
-
-		<li><a href="#ograniczenia">OGRANICZENIA</a></li>
-		<li><a href="#tryb_inetd__tylko_unix_">TRYB INETD (tylko Unix)</a></li>
-		<li><a href="#certyfikaty">CERTYFIKATY</a></li>
-		<li><a href="#losowo____">LOSOWOŚĆ</a></li>
-		<li><a href="#parametry_dh">PARAMETRY DH</a></li>
-	</ul>
-
-	<li><a href="#pliki">PLIKI</a></li>
-	<li><a href="#b____dy">BŁĘDY</a></li>
-	<li><a href="#zobacz_r__wnie__">ZOBACZ RÓWNIEŻ</a></li>
-	<li><a href="#autor">AUTOR</a></li>
-</ul>
+<h1 id="NAZWA">NAZWA</h1>
 
--->
+<p>stunnel - uniwersalny tunel protoko&#x142;u SSL</p>
 
+<h1 id="SKADNIA">SK&#x141;ADNIA</h1>
 
-</div>
-<!-- INDEX END -->
-
-<p>
-</p>
-<h1><a name="nazwa">NAZWA</a></h1>
-<p>stunnel - uniwersalny tunel protokołu SSL</p>
-<p>
-</p>
-<hr />
-<h1><a name="sk__adnia">SKŁADNIA</a></h1>
 <dl>
-<dt><strong><a name="unix" class="item"><strong>Unix:</strong></a></strong></dt>
 
+<dt id="Unix"><b>Unix:</b></dt>
 <dd>
-<p><strong>stunnel</strong> [&lt;plik&gt;] | -fd&nbsp;n | -help | -version | -sockets</p>
-</dd>
-<dt><strong><a name="win32" class="item"><strong>WIN32:</strong></a></strong></dt>
 
+<p><b>stunnel</b> [&lt;<span style="white-space: nowrap;">plik</span>&gt;] | <span style="white-space: nowrap;">-fd n</span> | <span style="white-space: nowrap;">-help</span> | <span style="white-space: nowrap;">-version</span> | <span style="white-space: nowrap;">-sockets</span></p>
+
+</dd>
+<dt id="WIN32"><b>WIN32:</b></dt>
 <dd>
-<p><strong>stunnel</strong> [ [-install | -uninstall | -start | -stop ] | -exit]
-    [-quiet] [&lt;plik&gt;] ] | -help | -version | -sockets</p>
+
+<p><b>stunnel</b> [ [<span style="white-space: nowrap;">-install</span> | <span style="white-space: nowrap;">-uninstall</span> | <span style="white-space: nowrap;">-start</span> | <span style="white-space: nowrap;">-stop</span> ] | <span style="white-space: nowrap;">-exit</span>] [<span style="white-space: nowrap;">-quiet</span>] [&lt;<span style="white-space: nowrap;">plik</span>&gt;] ] | <span style="white-space: nowrap;">-help</span> | <span style="white-space: nowrap;">-version</span> | <span style="white-space: nowrap;">-sockets</span></p>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="opis">OPIS</a></h1>
-<p>Program <strong>stunnel</strong> został zaprojektowany do opakowywania w protokół <em>SSL</em>
-połączeń pomiędzy zdalnymi klientami a lokalnymi lub zdalnymi serwerami.
-Przez serwer lokalny rozumiana jest aplikacja przeznaczona do uruchamiania
-przy pomocy <em>inetd</em>.
-Stunnel pozwala na proste zestawienie komunikacji serwerów nie posiadających
-funkcjonalności <em>SSL</em> poprzez bezpieczne kanały <em>SSL</em>.</p>
-<p><strong>stunnel</strong> pozwala dodać funkcjonalność <em>SSL</em> do powszechnie stosowanych
-demonów <em>inetd</em>, np. <em>pop3</em> lub <em>imap</em>, do samodzielnych demonów,
-np. <em>nntp</em>, <em>smtp</em> lub <em>http</em>, a nawet tunelować ppp poprzez gniazda sieciowe
-bez zmian w kodzie źródłowym.</p>
-<p>
-</p>
-<hr />
-<h1><a name="opcje">OPCJE</a></h1>
+
+<h1 id="OPIS">OPIS</h1>
+
+<p>Program <b>stunnel</b> zosta&#x142; zaprojektowany do opakowywania w protok&oacute;&#x142; <i>SSL</i> po&#x142;&#x105;cze&#x144; pomi&#x119;dzy zdalnymi klientami a lokalnymi lub zdalnymi serwerami. Przez serwer lokalny rozumiana jest aplikacja przeznaczona do uruchamiania przy pomocy <i>inetd</i>. Stunnel pozwala na proste zestawienie komunikacji serwer&oacute;w nie posiadaj&#x105;cych funkcjonalno&#x15B;ci <i>SSL</i> poprzez bezpieczne kana&#x142;y <i>SSL</i>.</p>
+
+<p><b>stunnel</b> pozwala doda&#x107; funkcjonalno&#x15B;&#x107; <i>SSL</i> do powszechnie stosowanych demon&oacute;w <i>inetd</i>, np. <i>pop3</i> lub <i>imap</i>, do samodzielnych demon&oacute;w, np. <i>nntp</i>, <i>smtp</i> lub <i>http</i>, a nawet tunelowa&#x107; ppp poprzez gniazda sieciowe bez zmian w kodzie &#x17A;r&oacute;d&#x142;owym.</p>
+
+<h1 id="OPCJE">OPCJE</h1>
+
 <dl>
-<dt><strong><a name="plik" class="item">&lt;<strong>plik</strong>&gt;</a></strong></dt>
 
+<dt id="plik">&lt;<b>plik</b>&gt;</dt>
 <dd>
-<p>użyj podanego pliku konfiguracyjnego</p>
-</dd>
-<dt><strong><a name="n" class="item"><strong>-fd n</strong> (tylko Unix)</a></strong></dt>
 
-<dd>
-<p>wczytaj konfigurację z podanego deskryptora pliku</p>
-</dd>
-<dt><strong><a name="help" class="item"><strong>-help</strong></a></strong></dt>
+<p>u&#x17C;yj podanego pliku konfiguracyjnego</p>
 
-<dd>
-<p>drukuj listę wspieranych opcji</p>
 </dd>
-<dt><strong><a name="version" class="item"><strong>-version</strong></a></strong></dt>
-
+<dt id="fd-n-tylko-Unix"><b>-fd n</b> (tylko Unix)</dt>
 <dd>
-<p>drukuj wersję programu i domyślne wartości parametrów</p>
+
+<p>wczytaj konfiguracj&#x119; z podanego deskryptora pliku</p>
+
 </dd>
-<dt><strong><a name="sockets" class="item"><strong>-sockets</strong></a></strong></dt>
+<dt id="help"><b>-help</b></dt>
+<dd>
+
+<p>drukuj list&#x119; wspieranych opcji</p>
 
+</dd>
+<dt id="version"><b>-version</b></dt>
 <dd>
-<p>drukuj domyślne opcje gniazd</p>
+
+<p>drukuj wersj&#x119; programu i domy&#x15B;lne warto&#x15B;ci parametr&oacute;w</p>
+
 </dd>
-<dt><strong><a name="install" class="item"><strong>-install</strong> (tylko NT/2000/XP)</a></strong></dt>
+<dt id="sockets"><b>-sockets</b></dt>
+<dd>
+
+<p>drukuj domy&#x15B;lne opcje gniazd</p>
 
+</dd>
+<dt id="install-tylko-NT-2000-XP"><b>-install</b> (tylko NT/2000/XP)</dt>
 <dd>
+
 <p>instaluj serwis NT</p>
-</dd>
-<dt><strong><a name="uninstall" class="item"><strong>-uninstall</strong> (tylko NT/2000/XP)</a></strong></dt>
 
+</dd>
+<dt id="uninstall-tylko-NT-2000-XP"><b>-uninstall</b> (tylko NT/2000/XP)</dt>
 <dd>
+
 <p>odinstaluj serwis NT</p>
-</dd>
-<dt><strong><a name="start" class="item"><strong>-start</strong> (tylko NT/2000/XP)</a></strong></dt>
 
+</dd>
+<dt id="start-tylko-NT-2000-XP"><b>-start</b> (tylko NT/2000/XP)</dt>
 <dd>
+
 <p>uruchom serwis NT</p>
-</dd>
-<dt><strong><a name="stop" class="item"><strong>-stop</strong> (tylko NT/2000/XP)</a></strong></dt>
 
+</dd>
+<dt id="stop-tylko-NT-2000-XP"><b>-stop</b> (tylko NT/2000/XP)</dt>
 <dd>
+
 <p>zatrzymaj serwis NT</p>
-</dd>
-<dt><strong><a name="exit" class="item"><strong>-exit</strong> (tylko Win32)</a></strong></dt>
 
+</dd>
+<dt id="exit-tylko-Win32"><b>-exit</b> (tylko Win32)</dt>
 <dd>
+
 <p>zatrzymaj uruchomiony program</p>
-</dd>
-<dt><strong><a name="quiet" class="item"><strong>-quiet</strong> (tylko NT/2000/XP)</a></strong></dt>
 
+</dd>
+<dt id="quiet-tylko-NT-2000-XP"><b>-quiet</b> (tylko NT/2000/XP)</dt>
 <dd>
-<p>nie wyświetlaj okienka informującego o pomyślnym zainstalowaniu lub
-odinstalowaniu</p>
+
+<p>nie wy&#x15B;wietlaj okienka informuj&#x105;cego o pomy&#x15B;lnym zainstalowaniu lub odinstalowaniu</p>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="plik_konfiguracyjny">PLIK KONFIGURACYJNY</a></h1>
-<p>Linia w pliku konfiguracyjnym może być:</p>
+
+<h1 id="PLIK-KONFIGURACYJNY">PLIK KONFIGURACYJNY</h1>
+
+<p>Linia w pliku konfiguracyjnym mo&#x17C;e by&#x107;:</p>
+
 <ul>
-<li>
-<p>pusta (ignorowana)</p>
+
+<li><p>pusta (ignorowana)</p>
+
 </li>
-<li>
-<p>komentarzem rozpoczynającym się znakiem ';' (ignorowana)</p>
+<li><p>komentarzem rozpoczynaj&#x105;cym si&#x119; znakiem &#39;;&#39; (ignorowana)</p>
+
 </li>
-<li>
-<p>parą 'nazwa_opcji = wartość_opcji'</p>
+<li><p>par&#x105; &#39;nazwa_opcji = warto&#x15B;&#x107;_opcji&#39;</p>
+
 </li>
-<li>
-<p>tekstem '[nazwa_usługi]' wskazującym początek definicji usługi</p>
+<li><p>tekstem &#39;[nazwa_us&#x142;ugi]&#39; wskazuj&#x105;cym pocz&#x105;tek definicji us&#x142;ugi</p>
+
 </li>
 </ul>
-<p>Parametr adres może być:</p>
+
+<p>Parametr adres mo&#x17C;e by&#x107;:</p>
+
 <ul>
-<li>
-<p>numerem portu</p>
+
+<li><p>numerem portu</p>
+
 </li>
-<li>
-<p>oddzieloną średnikiem parą adresu (IPv4, IPv6, lub nazwą domenową) i numeru portu</p>
+<li><p>oddzielon&#x105; &#x15B;rednikiem par&#x105; adresu (IPv4, IPv6, lub nazw&#x105; domenow&#x105;) i numeru portu</p>
+
 </li>
-<li>
-<p>ścieżką do gniazda Unix (tylko Unix)</p>
+<li><p>&#x15B;cie&#x17C;k&#x105; do gniazda Unix (tylko Unix)</p>
+
 </li>
 </ul>
-<p>
-</p>
-<h2><a name="opcje_globalne">OPCJE GLOBALNE</a></h2>
+
+<h2 id="OPCJE-GLOBALNE">OPCJE GLOBALNE</h2>
+
 <dl>
-<dt><strong><a name="katalog" class="item"><strong>chroot</strong> = katalog (tylko Unix)</a></strong></dt>
 
+<dt id="chroot-katalog-tylko-Unix"><b>chroot</b> = katalog (tylko Unix)</dt>
 <dd>
-<p>katalog roboczego korzenia systemu plików</p>
-<p>Opcja określa katalog, w którym uwięziony zostanie proces programu
-<strong>stunnel</strong> tuż po jego inicjalizacji, a przed rozpoczęciem odbierania
-połączeń.  Ścieżki podane w opcjach <em>CApath</em>, <em>CRLpath</em>, <em>pid</em>
-oraz <em>exec</em> muszą być umieszczone wewnątrz katalogu podanego w opcji
-<em>chroot</em> i określone względem tego katalogu.</p>
-<p>Niektóre funkcje systemu operacyjnego mogą wymagać dodatkowych plików umieszczonych w katalogu podanego w parametrze chroot:</p>
+
+<p>katalog roboczego korzenia systemu plik&oacute;w</p>
+
+<p>Opcja okre&#x15B;la katalog, w kt&oacute;rym uwi&#x119;ziony zostanie proces programu <b>stunnel</b> tu&#x17C; po jego inicjalizacji, a przed rozpocz&#x119;ciem odbierania po&#x142;&#x105;cze&#x144;. &#x15A;cie&#x17C;ki podane w opcjach <i>CApath</i>, <i>CRLpath</i>, <i>pid</i> oraz <i>exec</i> musz&#x105; by&#x107; umieszczone wewn&#x105;trz katalogu podanego w opcji <i>chroot</i> i okre&#x15B;lone wzgl&#x119;dem tego katalogu.</p>
+
+<p>Niekt&oacute;re funkcje systemu operacyjnego mog&#x105; wymaga&#x107; dodatkowych plik&oacute;w umieszczonych w katalogu podanego w parametrze chroot:</p>
+
 <ul>
-<li>
-<p>opóźnione rozwinięcie adresów DNS typowo wymaga /etc/nsswitch.conf i /etc/resolv.conf</p>
+
+<li><p>op&oacute;&#x17A;nione rozwini&#x119;cie adres&oacute;w DNS typowo wymaga /etc/nsswitch.conf i /etc/resolv.conf</p>
+
 </li>
-<li>
-<p>lokalizacja strefy czasowej w logach wymaga pliku /etc/timezone</p>
+<li><p>lokalizacja strefy czasowej w logach wymaga pliku /etc/timezone</p>
+
 </li>
-<li>
-<p>niektóre inne pliki mogą potrzebować plików urządzeń, np. /dev/zero lub /dev/null</p>
+<li><p>niekt&oacute;re inne pliki mog&#x105; potrzebowa&#x107; plik&oacute;w urz&#x105;dze&#x144;, np. /dev/zero lub /dev/null</p>
+
 </li>
 </ul>
-</dd>
-<dt><strong><a name="compression_deflate_zlib_rle" class="item"><strong>compression</strong> = deflate | zlib | rle</a></strong></dt>
 
-<dd>
-<p>wybór algorytmu kompresji przesyłanych danych</p>
-<p>domyślnie: bez kompresji</p>
-<p>Algorytm deflate jest standardową metodą kompresji zgodnie z <a href="http://www.ietf.org/rfc/rfc1951.txt" class="rfc">RFC 1951</a>.</p>
-<p>Kompresja zlib zaimplementowana w <strong>OpenSSL 0.9.8</strong> i nowszych nie jest
-kompatybilna implementacją <strong>OpenSSL 0.9.7</strong>.</p>
-<p>Kompresja rle nie jest zaimplementowana w aktualnych wersjach <strong>OpenSSL</strong>.</p>
 </dd>
-<dt><strong><a name="debug_poziom_podsystem" class="item"><strong>debug</strong> = poziom[.podsystem]</a></strong></dt>
-
+<dt id="compression-deflate-zlib-rle"><b>compression</b> = deflate | zlib | rle</dt>
 <dd>
-<p>szczegółowość logowania</p>
-<p>Poziom logowania można określić przy pomocy jednej z nazw lub liczb:
-emerg (0), alert (1), crit (2), err (3), warning (4), notice (5),
-info (6) lub debug (7).
-Zapisywane są komunikaty o poziomie niższym (numerycznie) lub równym podanemu.
-Do uzyskania najwyższego poziomu szczegółowości można użyć opcji
-<em>debug = debug</em> lub <em>debug = 7</em>.  Domyślnym poziomem jest notice (5).</p>
-<p>O ile nie wyspecyfikowano podsystemu użyty będzie domyślny: daemon.
-Podsystemy nie są wspierane przez platformę Win32.</p>
-<p>Wielkość liter jest ignorowana zarówno dla poziomu jak podsystemu.</p>
-</dd>
-<dt><strong><a name="ka_do_egd" class="item"><strong>EGD</strong> = ścieżka_do_EGD (tylko Unix)</a></strong></dt>
 
+<p>wyb&oacute;r algorytmu kompresji przesy&#x142;anych danych</p>
+
+<p>domy&#x15B;lnie: bez kompresji</p>
+
+<p>Algorytm deflate jest standardow&#x105; metod&#x105; kompresji zgodnie z RFC 1951.</p>
+
+<p>Kompresja zlib zaimplementowana w <b>OpenSSL 0.9.8</b> i nowszych nie jest kompatybilna implementacj&#x105; <b>OpenSSL 0.9.7</b>.</p>
+
+<p>Kompresja rle nie jest zaimplementowana w aktualnych wersjach <b>OpenSSL</b>.</p>
+
+</dd>
+<dt id="debug-poziom-.podsystem"><b>debug</b> = poziom[.podsystem]</dt>
 <dd>
-<p>ścieżka do gniazda programu Entropy Gathering Daemon</p>
-<p>Opcja pozwala określić ścieżkę do gniazda programu Entropy Gathering Daemon
-używanego do zainicjalizowania generatora ciągów pseudolosowych biblioteki
-<strong>OpenSSL</strong>.  Opcja jest dostępna z biblioteką <strong>OpenSSL 0.9.5a</strong> lub nowszą.</p>
+
+<p>szczeg&oacute;&#x142;owo&#x15B;&#x107; logowania</p>
+
+<p>Poziom logowania mo&#x17C;na okre&#x15B;li&#x107; przy pomocy jednej z nazw lub liczb: emerg (0), alert (1), crit (2), err (3), warning (4), notice (5), info (6) lub debug (7). Zapisywane s&#x105; komunikaty o poziomie ni&#x17C;szym (numerycznie) lub r&oacute;wnym podanemu. Do uzyskania najwy&#x17C;szego poziomu szczeg&oacute;&#x142;owo&#x15B;ci mo&#x17C;na u&#x17C;y&#x107; opcji <i>debug = debug</i> lub <i>debug = 7</i>. Domy&#x15B;lnym poziomem jest notice (5).</p>
+
+<p>O ile nie wyspecyfikowano podsystemu u&#x17C;yty b&#x119;dzie domy&#x15B;lny: daemon. Podsystemy nie s&#x105; wspierane przez platform&#x119; Win32.</p>
+
+<p>Wielko&#x15B;&#x107; liter jest ignorowana zar&oacute;wno dla poziomu jak podsystemu.</p>
+
 </dd>
-<dt><strong><a name="engine_auto_identyfikator_urz_dzenia" class="item"><strong>engine</strong> = auto | &lt;identyfikator urządzenia&gt;</a></strong></dt>
+<dt id="EGD-cieka_do_EGD-tylko-Unix"><b>EGD</b> = &#x15B;cie&#x17C;ka_do_EGD (tylko Unix)</dt>
+<dd>
+
+<p>&#x15B;cie&#x17C;ka do gniazda programu Entropy Gathering Daemon</p>
 
+<p>Opcja pozwala okre&#x15B;li&#x107; &#x15B;cie&#x17C;k&#x119; do gniazda programu Entropy Gathering Daemon u&#x17C;ywanego do zainicjalizowania generatora ci&#x105;g&oacute;w pseudolosowych biblioteki <b>OpenSSL</b>. Opcja jest dost&#x119;pna z bibliotek&#x105; <b>OpenSSL 0.9.5a</b> lub nowsz&#x105;.</p>
+
+</dd>
+<dt id="engine-auto-identyfikator-urzdzenia"><b>engine</b> = auto | &lt;identyfikator urz&#x105;dzenia&gt;</dt>
 <dd>
-<p>wybór sprzętowego urządzenia kryptograficznego</p>
-<p>domyślnie: bez wykorzystania urządzeń kryptograficznych</p>
-<p>Przykładowa konfiguracja umożliwiająca odczytanie klucza prywatnego z
-urządzenia zgodnego z OpenSC:</p>
-<pre>
-    engine=dynamic
+
+<p>wyb&oacute;r sprz&#x119;towego urz&#x105;dzenia kryptograficznego</p>
+
+<p>domy&#x15B;lnie: bez wykorzystania urz&#x105;dze&#x144; kryptograficznych</p>
+
+<p>Przyk&#x142;adowa konfiguracja umo&#x17C;liwiaj&#x105;ca odczytanie klucza prywatnego z urz&#x105;dzenia zgodnego z OpenSC:</p>
+
+<pre><code>    engine=dynamic
     engineCtrl=SO_PATH:/usr/lib/opensc/engine_pkcs11.so
     engineCtrl=ID:pkcs11
     engineCtrl=LIST_ADD:1
     engineCtrl=LOAD
     engineCtrl=MODULE_PATH:/usr/lib/pkcs11/opensc-pkcs11.so
-    engineCtrl=INIT</pre>
-<pre>
+    engineCtrl=INIT
+
     [service]
     engineNum=1
-    key=id_45</pre>
+    key=id_45</code></pre>
+
+</dd>
+<dt id="engineCtrl-command-:parameter"><b>engineCtrl</b> = &lt;command&gt;[:&lt;parameter&gt;]</dt>
+<dd>
+
+<p>konfiguracja urz&#x105;dzenia kryptograficznego</p>
+
+<p>Specjalne komendy &quot;LOAD&quot; i &quot;INIT&quot; pozwalaj&#x105; na za&#x142;adowanie i inicjalizacj&#x119; modu&#x142;u kryptograficznego urz&#x105;dzenia.</p>
+
+</dd>
+<dt id="fips-yes-no"><b>fips</b> = yes | no</dt>
+<dd>
+
+<p>W&#x142;&#x105;cz lub wy&#x142;&#x105;cz tryb FIPS 140-2.</p>
+
+<p>Opcja pozwala wy&#x142;&#x105;czy&#x107; wej&#x15B;cie w tryb FIPS, je&#x15B;li <b>stunnel</b> zosta&#x142; skompilowany ze wsparciem dla FIPS 140-2.</p>
+
+<p>domy&#x15B;lnie: yes (pracuj w trybie FIPS 140-2)</p>
+
+</dd>
+<dt id="foreground-yes-no-tylko-Unix"><b>foreground</b> = yes | no (tylko Unix)</dt>
+<dd>
+
+<p>tryb pierwszoplanowy</p>
+
+<p>U&#x17C;ycie tej opcji powoduje, &#x17C;e <b>stunnel</b> nie przechodzi w t&#x142;o loguj&#x105;c swoje komunikaty na konsol&#x119; zamiast przez <i>syslog</i> (o ile nie u&#x17C;yto opcji <i>output</i>).</p>
+
 </dd>
-<dt><strong><a name="enginectrl_command_parameter" class="item"><strong>engineCtrl</strong> = &lt;command&gt;[:&lt;parameter&gt;]</a></strong></dt>
+<dt id="output-plik"><b>output</b> = plik</dt>
+<dd>
+
+<p>plik, do kt&oacute;rego dopisane zostan&#x105; logi</p>
 
+<p>U&#x17C;ycie tej opcji powoduje dopisanie log&oacute;w do podanego pliku.</p>
+
+<p>Do kierowaniakomunikat&oacute;w na standardowe wyj&#x15B;cie (na przyk&#x142;ad po to, &#x17C;eby zalogowa&#x107; je programem splogger z pakietu daemontools) mo&#x17C;na poda&#x107; jako parametr urz&#x105;dzenie /dev/stdout.</p>
+
+</dd>
+<dt id="pid-plik-tylko-Unix"><b>pid</b> = plik (tylko Unix)</dt>
 <dd>
-<p>konfiguracja urządzenia kryptograficznego</p>
-<p>Specjalne komendy &quot;LOAD&quot; i &quot;INIT&quot; pozwalają na załadowanie i inicjalizację
-modułu kryptograficznego urządzenia.</p>
+
+<p>po&#x142;o&#x17C;enie pliku z numerem procesu</p>
+
+<p>Je&#x17C;eli argument jest pusty plik nie zostanie stworzony.</p>
+
+<p>Je&#x17C;eli zdefiniowano katalog <i>chroot</i>, to &#x15B;cie&#x17C;ka do <i>pid</i> jest okre&#x15B;lona wzgl&#x119;dem tego katalogu.</p>
+
 </dd>
-<dt><strong><a name="fips_yes_no" class="item"><strong>fips</strong> = yes | no</a></strong></dt>
+<dt id="RNDbytes-liczba_bajtw"><b>RNDbytes</b> = liczba_bajt&oacute;w</dt>
+<dd>
 
+<p>liczba bajt&oacute;w do zainicjowania generatora pseudolosowego</p>
+
+<p>W wersjach biblioteki <b>OpenSSL</b> starszych ni&#x17C; <b>0.9.5a</b> opcja ta okre&#x15B;la r&oacute;wnie&#x17C; liczb&#x119; bajt&oacute;w wystarczaj&#x105;cych do zainicjowania PRNG. Nowsze wersje biblioteki maj&#x105; wbudowan&#x105; funkcj&#x119; okre&#x15B;laj&#x105;c&#x105;, czy dostarczona ilo&#x15B;&#x107; losowo&#x15B;ci jest wystarczaj&#x105;ca do zainicjowania generatora.</p>
+
+</dd>
+<dt id="RNDfile-plik"><b>RNDfile</b> = plik</dt>
 <dd>
-<p>Włącz lub wyłącz tryb FIPS 140-2.</p>
-<p>Opcja pozwala wyłączyć wejście w tryb FIPS, jeśli <strong>stunnel</strong> został
-skompilowany ze wsparciem dla FIPS 140-2.</p>
-<p>domyślnie: yes (pracuj w trybie FIPS 140-2)</p>
+
+<p>&#x15B;cie&#x17C;ka do pliku zawieraj&#x105;cego losowe dane</p>
+
+<p>Biblioteka <b>OpenSSL</b> u&#x17C;yje danych z tego pliku do zainicjowania generatora pseudolosowego.</p>
+
 </dd>
-<dt><strong><a name="no" class="item"><strong>foreground</strong> = yes | no (tylko Unix)</a></strong></dt>
+<dt id="RNDoverwrite-yes-no"><b>RNDoverwrite</b> = yes | no</dt>
+<dd>
+
+<p>nadpisz plik nowymi warto&#x15B;ciami pseudolosowymi</p>
+
+<p>domy&#x15B;lnie: yes (nadpisz)</p>
 
+</dd>
+<dt id="service-nazwa_serwisu-tylko-Unix"><b>service</b> = nazwa_serwisu (tylko Unix)</dt>
 <dd>
-<p>tryb pierwszoplanowy</p>
-<p>Użycie tej opcji powoduje, że <strong>stunnel</strong> nie przechodzi w tło logując
-swoje komunikaty na konsolę zamiast przez <em>syslog</em> (o ile nie użyto
-opcji <em>output</em>).</p>
+
+<p>u&#x17C;yj parametru jako nazwy serwisu dla biblioteki TCP Wrapper w trybie <i>inetd</i></p>
+
+<p>domy&#x15B;lnie: stunnel</p>
+
+</dd>
+<dt id="setgid-identyfikator_grupy-tylko-Unix"><b>setgid</b> = identyfikator_grupy (tylko Unix)</dt>
+<dd>
+
+<p>grupa z kt&oacute;rej prawami pracowa&#x142; b&#x119;dzie <b>stunnel</b></p>
+
+</dd>
+<dt id="setuid-identyfikator_uytkownika-tylko-Unix"><b>setuid</b> = identyfikator_u&#x17C;ytkownika (tylko Unix)</dt>
+<dd>
+
+<p>u&#x17C;ytkownik, z kt&oacute;rego prawami pracowa&#x142; b&#x119;dzie <b>stunnel</b></p>
+
+</dd>
+<dt id="socket-a-l-r:option-value-:value"><b>socket</b> = a|l|r:option=value[:value]</dt>
+<dd>
+
+<p>ustaw opcj&#x119; na akceptuj&#x105;cym/lokalnym/zdalnym gnie&#x17A;dzie</p>
+
+<p>Dla opcji linger warto&#x15B;ci maj&#x105; posta&#x107; l_onof:l_linger. Dla opcji time warto&#x15B;ci maj&#x105; posta&#x107; tv_sec:tv_usec.</p>
+
+<p>Przyk&#x142;ady:</p>
+
+<pre><code>    socket = l:SO_LINGER=1:60
+        ustaw jednominutowe przeterminowanie
+        przy zamykaniu lokalnego gniazda
+    socket = r:SO_OOBINLINE=yes
+        umie&#x15B;&#x107; dane pozapasmowe (out-of-band)
+        bezpo&#x15B;rednio w strumieniu danych
+        wej&#x15B;ciowych dla zdalnych gniazd
+    socket = a:SO_REUSEADDR=no
+        zablokuj ponowne u&#x17C;ywanie portu
+        (domy&#x15B;lnie w&#x142;&#x105;czone)
+    socket = a:SO_BINDTODEVICE=lo
+        przyjmuj po&#x142;&#x105;czenia wy&#x142;&#x105;cznie na
+        interfejsie zwrotnym (ang. loopback)</code></pre>
+
+</dd>
+<dt id="syslog-yes-no-tylko-Unix"><b>syslog</b> = yes | no (tylko Unix)</dt>
+<dd>
+
+<p>w&#x142;&#x105;cz logowanie poprzez mechanizm syslog</p>
+
+<p>domy&#x15B;lnie: yes (w&#x142;&#x105;cz)</p>
+
+</dd>
+<dt id="taskbar-yes-no-tylko-WIN32"><b>taskbar</b> = yes | no (tylko WIN32)</dt>
+<dd>
+
+<p>w&#x142;&#x105;cz ikonk&#x119; w prawym dolnym rogu ekranu</p>
+
+<p>domy&#x15B;lnie: yes (w&#x142;&#x105;cz)</p>
+
+</dd>
+</dl>
+
+<h2 id="OPCJE-USUG">OPCJE US&#x141;UG</h2>
+
+<p>Ka&#x17C;da sekcja konfiguracji us&#x142;ugi zaczyna si&#x119; jej nazw&#x105; uj&#x119;t&#x105; w nawias kwadratowy. Nazwa us&#x142;ugi u&#x17C;ywana jest do kontroli dost&#x119;pu przez bibliotek&#x119; libwrap (TCP wrappers) oraz pozwala rozr&oacute;&#x17C;ni&#x107; poszczeg&oacute;lne us&#x142;ugi w logach.</p>
+
+<p>Je&#x17C;eli <b>stunnel</b> ma zosta&#x107; u&#x17C;yty w trybie <i>inetd</i>, gdzie za odebranie po&#x142;&#x105;czenia odpowiada osobny program (zwykle <i>inetd</i>, <i>xinetd</i> lub <i>tcpserver</i>), nale&#x17C;y przeczyta&#x107; sekcj&#x119; <i>TRYB INETD</i> poni&#x17C;ej.</p>
+
+<dl>
+
+<dt id="accept-adres:-port"><b>accept</b> = [adres:]port</dt>
+<dd>
+
+<p>nas&#x142;uchuje na po&#x142;&#x105;czenia na podanym adresie i porcie</p>
+
+<p>Je&#x17C;eli nie zosta&#x142; podany adres, <b>stunnel</b> domy&#x15B;lnie nas&#x142;uchuje na wszystkich adresach IPv4 lokalnych interfejs&oacute;w.</p>
+
+<p>Aby nas&#x142;uchiwa&#x107; na wszystkich adresach IPv6 nale&#x17C;y u&#x17C;y&#x107;:</p>
+
+<pre><code>    accept = :::port</code></pre>
+
 </dd>
-<dt><strong><a name="output_plik" class="item"><strong>output</strong> = plik</a></strong></dt>
+<dt id="CApath-katalog_CA"><b>CApath</b> = katalog_CA</dt>
+<dd>
+
+<p>katalog Centrum Certyfikacji</p>
 
+<p>Opcja okre&#x15B;la katalog, w kt&oacute;rym <b>stunnel</b> b&#x119;dzie szuka&#x142; certyfikat&oacute;w, je&#x17C;eli u&#x17C;yta zosta&#x142;a opcja <i>verify</i>. Pliki z certyfikatami musz&#x105; posiada&#x107; specjalne nazwy XXXXXXXX.0, gdzie XXXXXXXX jest skr&oacute;tem kryptograficznym reprezentacji DER nazwy podmiotu certyfikatu.</p>
+
+<p>Funkcja skr&oacute;tu zosta&#x142;a zmieniona w <b>OpenSSL 1.0.0</b>. Nale&#x17C;y wykona&#x107; c_rehash przy zmianie <b>OpenSSL 0.x.x</b> na <b>1.x.x</b>.</p>
+
+<p>Je&#x17C;eli zdefiniowano katalog <i>chroot</i>, to &#x15B;cie&#x17C;ka do <i>CApath</i> jest okre&#x15B;lona wzgl&#x119;dem tego katalogu.</p>
+
+</dd>
+<dt id="CAfile-plik_CA"><b>CAfile</b> = plik_CA</dt>
 <dd>
-<p>plik, do którego dopisane zostaną logi</p>
-<p>Użycie tej opcji powoduje dopisanie logów do podanego pliku.</p>
-<p>Do kierowaniakomunikatów na standardowe wyjście (na przykład po to, żeby
-zalogować je programem splogger z pakietu daemontools) można podać jako
-parametr urządzenie /dev/stdout.</p>
+
+<p>plik Centrum Certyfikacji</p>
+
+<p>Opcja pozwala okre&#x15B;li&#x107; po&#x142;o&#x17C;enie pliku zawieraj&#x105;cego certyfikaty u&#x17C;ywane przez opcj&#x119; <i>verify</i>.</p>
+
 </dd>
-<dt><strong><strong>pid</strong> = plik (tylko Unix)</strong></dt>
+<dt id="cert-plik_pem"><b>cert</b> = plik_pem</dt>
+<dd>
 
+<p>plik z &#x142;a&#x144;cuchem certyfikat&oacute;w</p>
+
+<p>Opcja okre&#x15B;la po&#x142;o&#x17C;enie pliku zawieraj&#x105;cego certyfikaty u&#x17C;ywane przez program <b>stunnel</b> do uwierzytelnienia si&#x119; przed drug&#x105; stron&#x105; po&#x142;&#x105;czenia. Certyfikat jest konieczny, aby u&#x17C;ywa&#x107; programu w trybie serwera. W trybie klienta certyfikat jest opcjonalny.</p>
+
+</dd>
+<dt id="checkEmail-EMAIL"><b>checkEmail</b> = EMAIL</dt>
 <dd>
-<p>położenie pliku z numerem procesu</p>
-<p>Jeżeli argument jest pusty plik nie zostanie stworzony.</p>
-<p>Jeżeli zdefiniowano katalog <em>chroot</em>, to ścieżka do <em>pid</em> jest określona
-względem tego katalogu.</p>
+
+<p>adres email przedstawionego certyfikatu</p>
+
+<p>Pojedyncza sekcja mo&#x17C;e zawiera&#x107; wiele wyst&#x105;pie&#x144; opcji <b>checkEmail</b>. Certyfikaty s&#x105; akceptowane, je&#x17C;eli sekcja nie zawiera opcji <b>checkEmail</b>, albo adres email przedstawionego certyfikatu pasuje do jednego z adres&oacute;w email okre&#x15B;lonych przy pomocy <b>checkEmail</b>.</p>
+
+<p>Opcja ta wymaga biblioteki OpenSSL w wersji 1.0.2 lub nowszej.</p>
+
 </dd>
-<dt><strong><a name="rndbytes_liczba_bajt_w" class="item"><strong>RNDbytes</strong> = liczba_bajtów</a></strong></dt>
+<dt id="checkHost-NAZWA_SERWERA"><b>checkHost</b> = NAZWA_SERWERA</dt>
+<dd>
 
+<p>nazwa serwera przedstawionego certyfikatu</p>
+
+<p>Pojedyncza sekcja mo&#x17C;e zawiera&#x107; wiele wyst&#x105;pie&#x144; opcji <b>checkHost</b>. Certyfikaty s&#x105; akceptowane, je&#x17C;eli sekcja nie zawiera opcji <b>checkHost</b>, albo nazwa serwera przedstawionego certyfikatu pasuje do jednego nazw okre&#x15B;lonych przy pomocy <b>checkHost</b>.</p>
+
+<p>Opcja ta wymaga biblioteki OpenSSL w wersji 1.0.2 lub nowszej.</p>
+
+</dd>
+<dt id="checkIP-IP"><b>checkIP</b> = IP</dt>
 <dd>
-<p>liczba bajtów do zainicjowania generatora pseudolosowego</p>
-<p>W wersjach biblioteki <strong>OpenSSL</strong> starszych niż <strong>0.9.5a</strong> opcja ta określa
-również liczbę bajtów wystarczających do zainicjowania PRNG.
-Nowsze wersje biblioteki mają wbudowaną funkcję określającą, czy
-dostarczona ilość losowości jest wystarczająca do zainicjowania generatora.</p>
+
+<p>adres IP przedstawionego certyfikatu</p>
+
+<p>Pojedyncza sekcja mo&#x17C;e zawiera&#x107; wiele wyst&#x105;pie&#x144; opcji <b>checkIP</b>. Certyfikaty s&#x105; akceptowane, je&#x17C;eli sekcja nie zawiera opcji <b>checkIP</b>, albo adres IP przedstawionego certyfikatu pasuje do jednego z adres&oacute;w IP okre&#x15B;lonych przy pomocy <b>checkIP</b>.</p>
+
+<p>Opcja ta wymaga biblioteki OpenSSL w wersji 1.0.2 lub nowszej.</p>
+
 </dd>
-<dt><strong><a name="rndfile_plik" class="item"><strong>RNDfile</strong> = plik</a></strong></dt>
+<dt id="ciphers-lista_szyfrw"><b>ciphers</b> = lista_szyfr&oacute;w</dt>
+<dd>
+
+<p>lista dozwolonych szyfr&oacute;w SSL</p>
+
+<p>Parametrem tej opcji jest lista szyfr&oacute;w, kt&oacute;re b&#x119;d&#x105; u&#x17C;yte przy otwieraniu nowych po&#x142;&#x105;cze&#x144; SSL, np.: DES-CBC3-SHA:IDEA-CBC-MD5</p>
 
+</dd>
+<dt id="client-yes-no"><b>client</b> = yes | no</dt>
 <dd>
-<p>ścieżka do pliku zawierającego losowe dane</p>
-<p>Biblioteka <strong>OpenSSL</strong> użyje danych z tego pliku do zainicjowania
-generatora pseudolosowego.</p>
+
+<p>tryb kliencki (zdalna us&#x142;uga u&#x17C;ywa SSL)</p>
+
+<p>domy&#x15B;lnie: no (tryb serwerowy)</p>
+
 </dd>
-<dt><strong><a name="rndoverwrite_yes_no" class="item"><strong>RNDoverwrite</strong> = yes | no</a></strong></dt>
+<dt id="connect-adres:-port"><b>connect</b> = [adres:]port</dt>
+<dd>
+
+<p>po&#x142;&#x105;cz si&#x119; ze zdalnym serwerem na podany port</p>
 
+<p>Je&#x17C;eli nie zosta&#x142; podany adres, <b>stunnel</b> domy&#x15B;lnie &#x142;&#x105;czy si&#x119; z lokalnym serwerem.</p>
+
+<p>Komenda mo&#x17C;e byc u&#x17C;yta wielokrotnie w pojedynczej sekcji celem zapewnienia wysokiej niezawodno&#x15B;ci lub roz&#x142;o&#x17C;enia ruchu pomi&#x119;dzy wiele serwer&oacute;w.</p>
+
+</dd>
+<dt id="CRLpath-katalog_CRL"><b>CRLpath</b> = katalog_CRL</dt>
 <dd>
-<p>nadpisz plik nowymi wartościami pseudolosowymi</p>
-<p>domyślnie: yes (nadpisz)</p>
+
+<p>katalog List Odwo&#x142;anych Certyfikat&oacute;w (CRL)</p>
+
+<p>Opcja okre&#x15B;la katalog, w kt&oacute;rym <b>stunnel</b> b&#x119;dzie szuka&#x142; list CRL, je&#x17C;eli u&#x17C;yta zosta&#x142;a opcja <i>verify</i>. Pliki z listami CRL musz&#x105; posiada&#x107; specjalne nazwy XXXXXXXX.r0, gdzie XXXXXXXX jest skr&oacute;tem listy CRL.</p>
+
+<p>Funkcja skr&oacute;tu zosta&#x142;a zmieniona <b>OpenSSL 1.0.0</b>. Nale&#x17C;y wykona&#x107; c_rehash przy zmianie <b>OpenSSL 0.x.x</b> na <b>1.x.x</b>.</p>
+
+<p>Je&#x17C;eli zdefiniowano katalog <i>chroot</i>, to &#x15B;cie&#x17C;ka do <i>CRLpath</i> jest okre&#x15B;lona wzgl&#x119;dem tego katalogu.</p>
+
 </dd>
-<dt><strong><a name="nazwa_serwisu" class="item"><strong>service</strong> = nazwa_serwisu (tylko Unix)</a></strong></dt>
+<dt id="CRLfile-plik_CRL"><b>CRLfile</b> = plik_CRL</dt>
+<dd>
+
+<p>plik List Odwo&#x142;anych Certyfikat&oacute;w (CRL)</p>
+
+<p>Opcja pozwala okre&#x15B;li&#x107; po&#x142;o&#x17C;enie pliku zawieraj&#x105;cego listy CRL u&#x17C;ywane przez opcj&#x119; <i>verify</i>.</p>
 
+</dd>
+<dt id="curve-nid"><b>curve</b> = nid</dt>
 <dd>
-<p>użyj parametru jako nazwy serwisu dla biblioteki TCP Wrapper w trybie <em>inetd</em></p>
-<p>domyślnie: stunnel</p>
+
+<p>krzywa dla ECDH</p>
+
+<p>List&#x119; dost&#x119;pnych krzywych mo&#x17C;na uzyska&#x107; poleceniem:</p>
+
+<pre><code>    openssl ecparam -list_curves</code></pre>
+
+<p>domy&#x15B;lnie: prime256v1</p>
+
 </dd>
-<dt><strong><a name="identyfikator_grupy" class="item"><strong>setgid</strong> = identyfikator_grupy (tylko Unix)</a></strong></dt>
+<dt id="delay-yes-no"><b>delay</b> = yes | no</dt>
+<dd>
 
+<p>op&oacute;&#x17A;nij rozwini&#x119;cie adresu DNS podanego w opcji <i>connect</i></p>
+
+<p>Opcja jest przydatna przy dynamicznym DNS, albo gdy us&#x142;uga DNS nie jest dost&#x119;pna przy starcie programu <b>stunnel</b> (klient VPN, po&#x142;&#x105;czenie wdzwaniane).</p>
+
+</dd>
+<dt id="engineNum-numer-urzdzenia"><b>engineNum</b> = &lt;numer urz&#x105;dzenia&gt;</dt>
 <dd>
-<p>grupa z której prawami pracował będzie <strong>stunnel</strong></p>
+
+<p>wybierz urz&#x105;dzenie do odczyta klucza prywatnego</p>
+
+<p>Urz&#x105;dzenia s&#x105; numerowane od 1 w g&oacute;r&#x119;.</p>
+
 </dd>
-<dt><strong><a name="ytkownika" class="item"><strong>setuid</strong> = identyfikator_użytkownika (tylko Unix)</a></strong></dt>
+<dt id="exec-cieka_do_programu"><b>exec</b> = &#x15B;cie&#x17C;ka_do_programu</dt>
+<dd>
+
+<p>wykonaj lokalny program przystosowany do pracy z superdemonem inetd</p>
+
+<p>Je&#x17C;eli zdefiniowano katalog <i>chroot</i>, to &#x15B;cie&#x17C;ka do <i>exec</i> jest okre&#x15B;lona wzgl&#x119;dem tego katalogu.</p>
 
+</dd>
+<dt id="execargs-0-1-2"><b>execargs</b> = $0 $1 $2 ...</dt>
 <dd>
-<p>użytkownik, z którego prawami pracował będzie <strong>stunnel</strong></p>
+
+<p>argumenty do opcji <i>exec</i> w&#x142;&#x105;cznie z nazw&#x105; programu ($0)</p>
+
+<p>Cytowanie nie jest wspierane w obecnej wersji programu. Argumenty s&#x105; rozdzielone dowoln&#x105; liczb&#x105; bia&#x142;ych znak&oacute;w.</p>
+
 </dd>
-<dt><strong><a name="socket_a_l_r_option_value_value" class="item"><strong>socket</strong> = a|l|r:option=value[:value]</a></strong></dt>
+<dt id="failover-rr-prio"><b>failover</b> = rr | prio</dt>
+<dd>
+
+<p>Strategia wybierania serwer&oacute;w wyspecyfikowanych parametrami &quot;connect&quot;.</p>
+
+<pre><code>    rr (round robin) - sprawiedliwe roz&#x142;o&#x17C;enie obci&#x105;&#x17C;enia
+    prio (priority) - u&#x17C;yj kolejno&#x15B;ci opcji w pliku konfiguracyjnym</code></pre>
 
+<p>domy&#x15B;lnie: rr</p>
+
+</dd>
+<dt id="ident-nazwa_uytkownika"><b>ident</b> = nazwa_u&#x17C;ytkownika</dt>
 <dd>
-<p>ustaw opcję na akceptującym/lokalnym/zdalnym gnieździe</p>
-<p>Dla opcji linger wartości mają postać l_onof:l_linger.
-Dla opcji time wartości mają postać tv_sec:tv_usec.</p>
-<p>Przykłady:</p>
-<pre>
-    socket = l:SO_LINGER=1:60
-        ustaw jednominutowe przeterminowanie
-        przy zamykaniu lokalnego gniazda
-    socket = r:SO_OOBINLINE=yes
-        umieść dane pozapasmowe (out-of-band)
-        bezpośrednio w strumieniu danych
-        wejściowych dla zdalnych gniazd
-    socket = a:SO_REUSEADDR=no
-        zablokuj ponowne używanie portu
-        (domyślnie włączone)
-    socket = a:SO_BINDTODEVICE=lo
-        przyjmuj połączenia wyłącznie na
-        interfejsie zwrotnym (ang. loopback)</pre>
+
+<p>weryfikuj nazw&#x119; zdalnego u&#x17C;ytkownika korzystaj&#x105;c z protoko&#x142;u IDENT (RFC 1413)</p>
+
 </dd>
-<dt><strong><strong>syslog</strong> = yes | no (tylko Unix)</strong></dt>
+<dt id="key-plik_klucza"><b>key</b> = plik_klucza</dt>
+<dd>
+
+<p>klucz prywatny do certyfikatu podanego w opcji <i>cert</i></p>
+
+<p>Klucz prywatny jest potrzebny do uwierzytelnienia w&#x142;a&#x15B;ciciela certyfikatu. Poniewa&#x17C; powinien on by&#x107; zachowany w tajemnicy, prawa do jego odczytu powinien mie&#x107; wy&#x142;&#x105;cznie w&#x142;a&#x15B;ciciel pliku. W systemie Unix mo&#x17C;na to osi&#x105;gn&#x105;&#x107; komend&#x105;:</p>
+
+<pre><code>    chmod 600 keyfile</code></pre>
 
+<p>domy&#x15B;lnie: warto&#x15B;&#x107; opcji <i>cert</i></p>
+
+</dd>
+<dt id="libwrap-yes-no"><b>libwrap</b> = yes | no</dt>
 <dd>
-<p>włącz logowanie poprzez mechanizm syslog</p>
-<p>domyślnie: yes (włącz)</p>
+
+<p>w&#x142;&#x105;cz lub wy&#x142;&#x105;cz korzystanie z /etc/hosts.allow i /etc/hosts.deny.</p>
+
+<p>domy&#x15B;lnie: yes</p>
+
 </dd>
-<dt><strong><strong>taskbar</strong> = yes | no (tylko WIN32)</strong></dt>
+<dt id="local-serwer"><b>local</b> = serwer</dt>
+<dd>
+
+<p>IP &#x17A;r&oacute;d&#x142;a do nawi&#x105;zywania zdalnych po&#x142;&#x105;cze&#x144;</p>
+
+<p>Domy&#x15B;lnie u&#x17C;ywane jest IP najbardziej zewn&#x119;trznego interfejsu w stron&#x119; serwera, do kt&oacute;rego nawi&#x105;zywane jest po&#x142;&#x105;czenie.</p>
+
+</dd>
+<dt id="sni-nazwa_usugi:wzorzec_nazwy_serwera-tryb-serwera"><b>sni</b> = nazwa_us&#x142;ugi:wzorzec_nazwy_serwera (tryb serwera)</dt>
+<dd>
 
+<p>U&#x17C;yj us&#x142;ugi jako podrz&#x119;dnej (virtualnego serwera) dla rozszerzenia TLS Server Name Indication (RFC 3546).</p>
+
+<p><i>nazwa_us&#x142;ugi</i> wskazuje us&#x142;ug&#x119; nadrz&#x119;dn&#x105;, kt&oacute;ra odbiera po&#x142;&#x105;czenia od klient&oacute;w przy pomocy opcji <i>accept</i>. <i>wzorzec_nazwy_serwera</i> wskazuje nazw&#x119; serwera wirtualnego. Wzorzec mo&#x17C;e zaczyna&#x107; si&#x119; znakiem &#39;*&#39;, np. &#39;*.example.com&quot;. Z pojedy&#x144;cz&#x105; us&#x142;ug&#x105; nadrz&#x119;dn&#x105; powi&#x105;zane jest zwykle wiele us&#x142;ug podrz&#x119;dnych. Opcja <i>sni</i> mo&#x17C;e by&#x107; rownie&#x17C; u&#x17C;yta wielokrotnie w ramach jednej us&#x142;ugi podrz&#x119;dnej.</p>
+
+<p>Zar&oacute;wno us&#x142;uga nadrz&#x119;dna jak i podrz&#x119;dna nie mo&#x17C;e by&#x107; skonfigurowana w trybie klienckim.</p>
+
+<p>Opcja <i>connect</i> us&#x142;ugi podrz&#x119;dnej jest ignorowana w po&#x142;&#x105;czeniu z opcj&#x105; <i>protocol</i>, gdy&#x17C; po&#x142;&#x105;czenie do zdalnego serwera jest w tym wypadku nawi&#x105;zywane przed negocjacj&#x105; TLS.</p>
+
+<p>Uwierzytelnienie przy pomocy biblioteki libwrap jest realizowane dwukrotnie: najpierw dla us&#x142;ugi nadrz&#x119;dnej po odebraniu po&#x142;&#x105;czenia TCP, a nast&#x119;pnie dla us&#x142;ugi podrz&#x119;dnej podczas negocjacji TLS.</p>
+
+<p>Opcja <i>sni</i> jest dost&#x119;pna pocz&#x105;wszy od <b>OpenSSL 1.0.0</b>.</p>
+
+</dd>
+<dt id="sni-nazwa_serwera-tryb-klienta"><b>sni</b> = nazwa_serwera (tryb klienta)</dt>
 <dd>
-<p>włącz ikonkę w prawym dolnym rogu ekranu</p>
-<p>domyślnie: yes (włącz)</p>
+
+<p>U&#x17C;yj parametru jako warto&#x15B;ci rozszerzenia TLS Server Name Indication (RFC 3546).</p>
+
+<p>Opcja <i>sni</i> jest dost&#x119;pna pocz&#x105;wszy od <b>OpenSSL 1.0.0</b>.</p>
+
 </dd>
-</dl>
-<p>
-</p>
-<h2><a name="opcje_us__ug">OPCJE USŁUG</a></h2>
-<p>Każda sekcja konfiguracji usługi zaczyna się jej nazwą ujętą w nawias
-kwadratowy.  Nazwa usługi używana jest do kontroli dostępu przez
-bibliotekę libwrap (TCP wrappers) oraz pozwala rozróżnić poszczególne
-usługi w logach.</p>
-<p>Jeżeli <strong>stunnel</strong> ma zostać użyty w trybie <em>inetd</em>, gdzie za odebranie
-połączenia odpowiada osobny program (zwykle <em>inetd</em>, <em>xinetd</em>
-lub <em>tcpserver</em>), należy przeczytać sekcję <em>TRYB INETD</em> poniżej.</p>
+<dt id="OCSP-URL"><b>OCSP</b> = URL</dt>
+<dd>
+
+<p>serwer OCSP do weryfikacji certyfikat&oacute;w</p>
+
+</dd>
+<dt id="OCSPaia-yes-no"><b>OCSPaia</b> = yes | no</dt>
+<dd>
+
+<p>weryfikuj certyfikaty przy u&#x17C;yciu respondert&oacute;w AIA</p>
+
+</dd>
+<dt id="OCSPflag-flaga"><b>OCSPflag</b> = flaga</dt>
+<dd>
+
+<p>flaga serwera OCSP</p>
+
+<p>aktualnie wspierane flagi: NOCERTS, NOINTERN NOSIGS, NOCHAIN, NOVERIFY, NOEXPLICIT, NOCASIGN, NODELEGATED, NOCHECKS, TRUSTOTHER, RESPID_KEY, NOTIME</p>
+
+<p>Aby wyspecyfikowa&#x107; kilka flag nale&#x17C;y u&#x17C;y&#x107; <i>OCSPflag</i> wielokrotnie.</p>
+
+</dd>
+<dt id="OCSPnonce-yes-no"><b>OCSPnonce</b> = yes | no</dt>
+<dd>
+
+<p>wysy&#x142;aj i weryfikuj OCSP nonce</p>
+
+<p>Opcja <b>OCSPnonce</b> zabezpiecza protok&oacute;&#x142; OCSP przed atakami powt&oacute;rzeniowymi. Ze wzgl&#x119;du na z&#x142;o&#x17C;ono&#x15B;&#x107; obliczeniow&#x105; rozszerzenie nonce jest zwykle wspierane jedynie przez wewn&#x119;trzne (np. korporacyjne), a nie przez publiczne respondery OCSP.</p>
+
+</dd>
+<dt id="options-opcje_SSL"><b>options</b> = opcje_SSL</dt>
+<dd>
+
+<p>opcje biblioteki <b>OpenSSL</b></p>
+
+<p>Parametrem jest nazwa opcji zgodnie z opisem w <i>SSL_CTX_set_options(3ssl)</i>, ale bez przedrostka <i>SSL_OP_</i>. Aby wyspecyfikowa&#x107; kilka opcji nale&#x17C;y u&#x17C;y&#x107; <i>options</i> wielokrotnie.</p>
+
+<p>Na przyk&#x142;ad dla zachowania kompatybilno&#x15B;ci z b&#x142;&#x119;dami implementacji SSL w programie Eudora mo&#x17C;na u&#x17C;y&#x107; opcji:</p>
+
+<pre><code>    options = DONT_INSERT_EMPTY_FRAGMENTS</code></pre>
+
+</dd>
+<dt id="protocol-protok"><b>protocol</b> = protok&oacute;&#x142;</dt>
+<dd>
+
+<p>negocjuj SSL podanym protoko&#x142;em aplikacyjnym</p>
+
+<p>Opcja ta w&#x142;&#x105;cza wst&#x119;pn&#x105; negocjacj&#x119; szyfrowania SSL dla wybranego protoko&#x142;u aplikacyjnego. Opcji <i>protocol</i> nie nale&#x17C;y u&#x17C;ywa&#x107; z szyfrowaniem SSL na osobnym porcie.</p>
+
+<p>Aktualnie wspierane protoko&#x142;y:</p>
+
 <dl>
-<dt><strong><a name="accept_adres_port" class="item"><strong>accept</strong> = [adres:]port</a></strong></dt>
 
+<dt id="cifs"><i>cifs</i></dt>
+<dd>
+
+<p>Unieudokumentowane rozszerzenie protoko&#x142;u CIFS wspierane przez serwer Samba. Wsparcie dla tego rozrzeczenia zosta&#x142;o zarzucone w wersji 3.0.0 serwera Samba.</p>
+
+</dd>
+<dt id="connect"><i>connect</i></dt>
 <dd>
-<p>nasłuchuje na połączenia na podanym adresie i porcie</p>
-<p>Jeżeli nie został podany adres, <strong>stunnel</strong> domyślnie nasłuchuje
-na wszystkich adresach IPv4 lokalnych interfejsów.</p>
-<p>Aby nasłuchiwać na wszystkich adresach IPv6 należy użyć:</p>
-<pre>
-    accept = :::port</pre>
+
+<p>Negocjacja RFC 2817 - <i>Upgrading to TLS Within HTTP/1.1</i>, rozdzia&#x142; 5.2 - <i>Requesting a Tunnel with CONNECT</i></p>
+
+<p>Ten protok&oacute;&#x142; jest wspierany wy&#x142;&#x105;cznie w trybie klienckim.</p>
+
 </dd>
-<dt><strong><a name="capath_katalog_ca" class="item"><strong>CApath</strong> = katalog_CA</a></strong></dt>
+<dt id="imap"><i>imap</i></dt>
+<dd>
+
+<p>Negocjacja RFC 2595 - <i>Using TLS with IMAP, POP3 and ACAP</i></p>
 
+</dd>
+<dt id="nntp"><i>nntp</i></dt>
 <dd>
-<p>katalog Centrum Certyfikacji</p>
-<p>Opcja określa katalog, w którym <strong>stunnel</strong> będzie szukał certyfikatów,
-jeżeli użyta została opcja <em>verify</em>.  Pliki z certyfikatami muszą
-posiadać specjalne nazwy XXXXXXXX.0, gdzie XXXXXXXX jest skrótem
-kryptograficznym reprezentacji DER nazwy podmiotu certyfikatu.</p>
-<p>Funkcja skrótu została zmieniona w <strong>OpenSSL 1.0.0</strong>.
-Należy wykonać c_rehash przy zmianie <strong>OpenSSL 0.x.x</strong> na <strong>1.x.x</strong>.</p>
-<p>Jeżeli zdefiniowano katalog <em>chroot</em>, to ścieżka do <em>CApath</em> jest określona
-względem tego katalogu.</p>
+
+<p>Negocjacja RFC 4642 - <i>Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)</i></p>
+
+<p>Ten protok&oacute;&#x142; jest wspierany wy&#x142;&#x105;cznie w trybie klienckim.</p>
+
 </dd>
-<dt><strong><a name="cafile_plik_ca" class="item"><strong>CAfile</strong> = plik_CA</a></strong></dt>
+<dt id="pgsql"><i>pgsql</i></dt>
+<dd>
 
+<p>Negocjacja http://www.postgresql.org/docs/8.3/static/protocol-flow.html#AEN73982</p>
+
+</dd>
+<dt id="pop3"><i>pop3</i></dt>
 <dd>
-<p>plik Centrum Certyfikacji</p>
-<p>Opcja pozwala określić położenie pliku zawierającego certyfikaty używane
-przez opcję <em>verify</em>.</p>
+
+<p>Negocjacja RFC 2449 - <i>POP3 Extension Mechanism</i></p>
+
 </dd>
-<dt><strong><a name="cert_plik_pem" class="item"><strong>cert</strong> = plik_pem</a></strong></dt>
+<dt id="proxy"><i>proxy</i></dt>
+<dd>
 
+<p>Przekazywanie adresu IP haproxy http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt</p>
+
+</dd>
+<dt id="smtp"><i>smtp</i></dt>
 <dd>
-<p>plik z łańcuchem certyfikatów</p>
-<p>Opcja określa położenie pliku zawierającego certyfikaty używane przez
-program <strong>stunnel</strong> do uwierzytelnienia się przed drugą stroną połączenia.
-Certyfikat jest konieczny, aby używać programu w trybie serwera.
-W trybie klienta certyfikat jest opcjonalny.</p>
+
+<p>Negocjacja RFC 2487 - <i>SMTP Service Extension for Secure SMTP over TLS</i></p>
+
+</dd>
+</dl>
+
 </dd>
-<dt><strong><a name="ciphers_lista_szyfr_w" class="item"><strong>ciphers</strong> = lista_szyfrów</a></strong></dt>
+<dt id="protocolAuthentication-uwierzytelnienie"><b>protocolAuthentication</b> = uwierzytelnienie</dt>
+<dd>
+
+<p>rodzaj uwierzytelnienia do negocjacji protoko&#x142;u</p>
+
+<p>aktualnie wspierane: basic, NTLM</p>
+
+<p>Obecnie typ uwierzytelnienia ma zastosowanie wy&#x142;&#x105;cznie w protokole &#39;connect&#39;.</p>
+
+<p>domy&#x15B;lnie: basic</p>
 
-<dd>
-<p>lista dozwolonych szyfrów SSL</p>
-<p>Parametrem tej opcji jest lista szyfrów, które będą użyte przy
-otwieraniu nowych połączeń SSL, np.:  DES-CBC3-SHA:IDEA-CBC-MD5</p>
 </dd>
-<dt><strong><a name="client_yes_no" class="item"><strong>client</strong> = yes | no</a></strong></dt>
-
+<dt id="protocolHost-adres:port"><b>protocolHost</b> = adres:port</dt>
 <dd>
-<p>tryb kliencki (zdalna usługa używa SSL)</p>
-<p>domyślnie: no (tryb serwerowy)</p>
-</dd>
-<dt><strong><a name="connect_adres_port" class="item"><strong>connect</strong> = [adres:]port</a></strong></dt>
 
-<dd>
-<p>połącz się ze zdalnym serwerem na podany port</p>
-<p>Jeżeli nie został podany adres, <strong>stunnel</strong> domyślnie łączy się
-z lokalnym serwerem.</p>
-<p>Komenda może byc użyta wielokrotnie w pojedynczej sekcji
-celem zapewnienia wysokiej niezawodności lub rozłożenia
-ruchu pomiędzy wiele serwerów.</p>
-</dd>
-<dt><strong><a name="crlpath_katalog_crl" class="item"><strong>CRLpath</strong> = katalog_CRL</a></strong></dt>
+<p>adres docelowy do negocjacji protoko&#x142;u</p>
 
-<dd>
-<p>katalog List Odwołanych Certyfikatów (CRL)</p>
-<p>Opcja określa katalog, w którym <strong>stunnel</strong> będzie szukał list CRL,
-jeżeli użyta została opcja <em>verify</em>.  Pliki z listami CRL muszą
-posiadać specjalne nazwy XXXXXXXX.r0, gdzie XXXXXXXX jest skrótem
-listy CRL.</p>
-<p>Funkcja skrótu została zmieniona <strong>OpenSSL 1.0.0</strong>.
-Należy wykonać c_rehash przy zmianie <strong>OpenSSL 0.x.x</strong> na <strong>1.x.x</strong>.</p>
-<p>Jeżeli zdefiniowano katalog <em>chroot</em>, to ścieżka do <em>CRLpath</em> jest określona
-względem tego katalogu.</p>
-</dd>
-<dt><strong><a name="crlfile_plik_crl" class="item"><strong>CRLfile</strong> = plik_CRL</a></strong></dt>
+<p><i>protocolHost</i> okre&#x15B;la docelowy serwer SSL, do kt&oacute;rego po&#x142;&#x105;czy&#x107; ma si&#x119; proxy. Nie jest to adres serwera proxy, do kt&oacute;rego po&#x142;&#x105;czenie zestawia <b>stunnel</b>. Adres serwera proxy powinien by&#x107; okre&#x15B;lony przy pomocy opcji &#39;connect&#39;.</p>
 
-<dd>
-<p>plik List Odwołanych Certyfikatów (CRL)</p>
-<p>Opcja pozwala określić położenie pliku zawierającego listy CRL używane
-przez opcję <em>verify</em>.</p>
-</dd>
-<dt><strong><a name="curve_nid" class="item"><strong>curve</strong> = nid</a></strong></dt>
+<p>W obecnej wersji adres docelowy protoko&#x142;u ma zastosowanie wy&#x142;&#x105;cznie w protokole &#39;connect&#39;.</p>
 
-<dd>
-<p>krzywa dla ECDH</p>
-<p>Listę dostępnych krzywych można uzyskać poleceniem:</p>
-<pre>
-    openssl ecparam -list_curves</pre>
-<p>domyślnie: prime256v1</p>
 </dd>
-<dt><strong><a name="delay_yes_no" class="item"><strong>delay</strong> = yes | no</a></strong></dt>
-
+<dt id="protocolPassword-haso"><b>protocolPassword</b> = has&#x142;o</dt>
 <dd>
-<p>opóźnij rozwinięcie adresu DNS podanego w opcji <em>connect</em></p>
-<p>Opcja jest przydatna przy dynamicznym DNS, albo gdy usługa DNS nie jest
-dostępna przy starcie programu <strong>stunnel</strong> (klient VPN, połączenie wdzwaniane).</p>
-</dd>
-<dt><strong><a name="enginenum_numer_urz_dzenia" class="item"><strong>engineNum</strong> = &lt;numer urządzenia&gt;</a></strong></dt>
 
-<dd>
-<p>wybierz urządzenie do odczyta klucza prywatnego</p>
-<p>Urządzenia są numerowane od 1 w górę.</p>
-</dd>
-<dt><strong><a name="exec_cie_ka_do_programu" class="item"><strong>exec</strong> = ścieżka_do_programu</a></strong></dt>
+<p>has&#x142;o do negocjacji protoko&#x142;u</p>
 
-<dd>
-<p>wykonaj lokalny program przystosowany do pracy z superdemonem inetd</p>
-<p>Jeżeli zdefiniowano katalog <em>chroot</em>, to ścieżka do <em>exec</em> jest określona
-względem tego katalogu.</p>
 </dd>
-<dt><strong><a name="execargs_0_1_2" class="item"><strong>execargs</strong> = $0 $1 $2 ...</a></strong></dt>
-
+<dt id="protocolUsername-uytkownik"><b>protocolUsername</b> = u&#x17C;ytkownik</dt>
 <dd>
-<p>argumenty do opcji <em>exec</em> włącznie z nazwą programu ($0)</p>
-<p>Cytowanie nie jest wspierane w obecnej wersji programu.
-Argumenty są rozdzielone dowolną liczbą białych znaków.</p>
-</dd>
-<dt><strong><a name="failover_rr_prio" class="item"><strong>failover</strong> = rr | prio</a></strong></dt>
 
-<dd>
-<p>Strategia wybierania serwerów wyspecyfikowanych parametrami &quot;connect&quot;.</p>
-<pre>
-    rr (round robin) - sprawiedliwe rozłożenie obciążenia
-    prio (priority) - użyj kolejności opcji w pliku konfiguracyjnym</pre>
-<p>domyślnie: rr</p>
-</dd>
-<dt><strong><a name="ident_nazwa_u_ytkownika" class="item"><strong>ident</strong> = nazwa_użytkownika</a></strong></dt>
+<p>nazwa u&#x17C;ytkownika do negocjacji protoko&#x142;u</p>
 
-<dd>
-<p>weryfikuj nazwę zdalnego użytkownika korzystając z protokołu IDENT (<a href="http://www.ietf.org/rfc/rfc1413.txt" class="rfc">RFC 1413</a>)</p>
 </dd>
-<dt><strong><a name="key_plik_klucza" class="item"><strong>key</strong> = plik_klucza</a></strong></dt>
-
+<dt id="pty-yes-no-tylko-Unix"><b>pty</b> = yes | no (tylko Unix)</dt>
 <dd>
-<p>klucz prywatny do certyfikatu podanego w opcji <em>cert</em></p>
-<p>Klucz prywatny jest potrzebny do uwierzytelnienia właściciela certyfikatu.
-Ponieważ powinien on być zachowany w tajemnicy, prawa do jego odczytu
-powinien mieć wyłącznie właściciel pliku.  W systemie Unix można to osiągnąć
-komendą:</p>
-<pre>
-    chmod 600 keyfile</pre>
-<p>domyślnie: wartość opcji <em>cert</em></p>
-</dd>
-<dt><strong><a name="libwrap_yes_no" class="item"><strong>libwrap</strong> = yes | no</a></strong></dt>
 
-<dd>
-<p>włącz lub wyłącz korzystanie z /etc/hosts.allow i /etc/hosts.deny.</p>
-<p>domyślnie: yes</p>
-</dd>
-<dt><strong><a name="local_serwer" class="item"><strong>local</strong> = serwer</a></strong></dt>
+<p>alokuj pseudoterminal dla programu uruchamianego w opcji &#39;exec&#39;</p>
 
-<dd>
-<p>IP źródła do nawiązywania zdalnych połączeń</p>
-<p>Domyślnie używane jest IP najbardziej zewnętrznego interfejsu w stronę
-serwera, do którego nawiązywane jest połączenie.</p>
 </dd>
-<dt><strong><a name="wzorzec_nazwy_serwera" class="item"><strong>sni</strong> = nazwa_usługi:wzorzec_nazwy_serwera (tryb serwera)</a></strong></dt>
-
+<dt id="renegotiation-yes-no"><b>renegotiation</b> = yes | no</dt>
 <dd>
-<p>Użyj usługi jako podrzędnej (virtualnego serwera) dla rozszerzenia TLS Server
-Name Indication (<a href="http://www.ietf.org/rfc/rfc3546.txt" class="rfc">RFC 3546</a>).</p>
-<p><em>nazwa_usługi</em> wskazuje usługę nadrzędną, która odbiera połączenia od klientów
-przy pomocy opcji <em>accept</em>.  <em>wzorzec_nazwy_serwera</em> wskazuje nazwę serwera
-wirtualnego.  Wzorzec może zaczynać się znakiem '*', np. '*.example.com&quot;.
-Z pojedyńczą usługą nadrzędną powiązane jest zwykle wiele usług podrzędnych.
-Opcja <em>sni</em> może być rownież użyta wielokrotnie w ramach jednej usługi
-podrzędnej.</p>
-<p>Zarówno usługa nadrzędna jak i podrzędna nie może być skonfigurowana w trybie
-klienckim.</p>
-<p>Opcja <em>connect</em> usługi podrzędnej jest ignorowana w połączeniu z opcją
-<em>protocol</em>, gdyż połączenie do zdalnego serwera jest w tym wypadku nawiązywane
-przed negocjacją TLS.</p>
-<p>Uwierzytelnienie przy pomocy biblioteki libwrap jest realizowane dwukrotnie:
-najpierw dla usługi nadrzędnej po odebraniu połączenia TCP, a następnie dla
-usługi podrzędnej podczas negocjacji TLS.</p>
-<p>Opcja <em>sni</em> jest dostępna począwszy od <strong>OpenSSL 1.0.0</strong>.</p>
-</dd>
-<dt><strong><a name="nazwa_serwera" class="item"><strong>sni</strong> = nazwa_serwera (tryb klienta)</a></strong></dt>
 
-<dd>
-<p>Użyj parametru jako wartości rozszerzenia TLS Server Name Indication
-(<a href="http://www.ietf.org/rfc/rfc3546.txt" class="rfc">RFC 3546</a>).</p>
-<p>Opcja <em>sni</em> jest dostępna począwszy od <strong>OpenSSL 1.0.0</strong>.</p>
-</dd>
-<dt><strong><a name="ocsp_url" class="item"><strong>OCSP</strong> = URL</a></strong></dt>
+<p>pozwalaj na renegocjacj&#x119; SSL</p>
 
-<dd>
-<p>serwer OCSP do weryfikacji certyfikatów</p>
-</dd>
-<dt><strong><a name="ocspflag_flaga" class="item"><strong>OCSPflag</strong> = flaga</a></strong></dt>
+<p>W&#x15B;r&oacute;d zastosowa&#x144; renegocjacji SSL s&#x105; niekt&oacute;re scenariusze uwierzytelnienia, oraz renegocjacja kluczy dla d&#x142;ugotrwa&#x142;ych po&#x142;&#x105;cze&#x144;.</p>
 
-<dd>
-<p>flaga serwera OCSP</p>
-<p>aktualnie wspierane flagi: NOCERTS, NOINTERN NOSIGS, NOCHAIN, NOVERIFY,
-NOEXPLICIT, NOCASIGN, NODELEGATED, NOCHECKS, TRUSTOTHER, RESPID_KEY, NOTIME</p>
-<p>Aby wyspecyfikować kilka flag należy użyć <em>OCSPflag</em> wielokrotnie.</p>
-</dd>
-<dt><strong><a name="options_opcje_ssl" class="item"><strong>options</strong> = opcje_SSL</a></strong></dt>
+<p>Z drugiej strony w&#x142;asno&#x15B;&#x107; na mo&#x17C;e u&#x142;atwi&#x107; trywialny atak DoS poprzez wygenerowanie obci&#x105;&#x17C;enia procesora:</p>
 
-<dd>
-<p>opcje biblioteki <strong>OpenSSL</strong></p>
-<p>Parametrem jest nazwa opcji zgodnie z opisem w <em>SSL_CTX_set_options(3ssl)</em>,
-ale bez przedrostka <em>SSL_OP_</em>.
-Aby wyspecyfikować kilka opcji należy użyć <em>options</em> wielokrotnie.</p>
-<p>Na przykład dla zachowania kompatybilności z błędami implementacji SSL
-w programie Eudora można użyć opcji:</p>
-<pre>
-    options = DONT_INSERT_EMPTY_FRAGMENTS</pre>
-</dd>
-<dt><strong><a name="protocol_protok" class="item"><strong>protocol</strong> = protokół</a></strong></dt>
+<p>http://vincent.bernat.im/en/blog/2011-ssl-dos-mitigation.html</p>
 
-<dd>
-<p>negocjuj SSL podanym protokołem aplikacyjnym</p>
-<p>Opcja ta włącza wstępną negocjację szyfrowania SSL dla wybranego protokołu
-aplikacyjnego.
-Opcji <em>protocol</em> nie należy używać z szyfrowaniem SSL na osobnym porcie.</p>
-<p>Aktualnie wspierane protokoły:</p>
-<dl>
-<dt><strong><a name="cifs" class="item"><em>cifs</em></a></strong></dt>
+<p>Warto zauwa&#x17C;y&#x107;, &#x17C;e zablokowanie renegocjacji SSL nie zebezpiecza w pe&#x142;ni przed opisanym problemem.</p>
 
-<dd>
-<p>Unieudokumentowane rozszerzenie protokołu CIFS wspierane przez serwer Samba.
-Wsparcie dla tego rozrzeczenia zostało zarzucone w wersji 3.0.0 serwera Samba.</p>
-</dd>
-<dt><strong><a name="connect" class="item"><em>connect</em></a></strong></dt>
+<p>domy&#x15B;lnie: yes (o ile wspierane przez <b>OpenSSL</b>)</p>
 
-<dd>
-<p>Negocjacja <a href="http://www.ietf.org/rfc/rfc2817.txt" class="rfc">RFC 2817</a> - <em>Upgrading to TLS Within HTTP/1.1</em>, rozdział 5.2 - <em>Requesting a Tunnel with CONNECT</em></p>
-<p>Ten protokół jest wspierany wyłącznie w trybie klienckim.</p>
 </dd>
-<dt><strong><a name="imap" class="item"><em>imap</em></a></strong></dt>
-
+<dt id="reset-yes-no"><b>reset</b> = yes | no</dt>
 <dd>
-<p>Negocjacja <a href="http://www.ietf.org/rfc/rfc2595.txt" class="rfc">RFC 2595</a> - <em>Using TLS with IMAP, POP3 and ACAP</em></p>
-</dd>
-<dt><strong><a name="nntp" class="item"><em>nntp</em></a></strong></dt>
 
-<dd>
-<p>Negocjacja <a href="http://www.ietf.org/rfc/rfc4642.txt" class="rfc">RFC 4642</a> - <em>Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)</em></p>
-<p>Ten protokół jest wspierany wyłącznie w trybie klienckim.</p>
-</dd>
-<dt><strong><a name="pgsql" class="item"><em>pgsql</em></a></strong></dt>
+<p>sygnalizuj wyst&#x105;pienie b&#x142;&#x119;du przy pomocy flagi TCP RST</p>
 
-<dd>
-<p>Negocjacja <a href="http://www.postgresql.org/docs/8.3/static/protocol-flow.html#AEN73982">http://www.postgresql.org/docs/8.3/static/protocol-flow.html#AEN73982</a></p>
-</dd>
-<dt><strong><a name="pop3" class="item"><em>pop3</em></a></strong></dt>
+<p>Ta opcja nie jest wspierana na niekt&oacute;rych platformach.</p>
 
-<dd>
-<p>Negocjacja <a href="http://www.ietf.org/rfc/rfc2449.txt" class="rfc">RFC 2449</a> - <em>POP3 Extension Mechanism</em></p>
-</dd>
-<dt><strong><a name="proxy" class="item"><em>proxy</em></a></strong></dt>
+<p>domy&#x15B;lnie: yes</p>
 
-<dd>
-<p>Przekazywanie adresu IP haproxy <a href="http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt">http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt</a></p>
 </dd>
-<dt><strong><a name="smtp" class="item"><em>smtp</em></a></strong></dt>
-
+<dt id="retry-yes-no"><b>retry</b> = yes | no</dt>
 <dd>
-<p>Negocjacja <a href="http://www.ietf.org/rfc/rfc2487.txt" class="rfc">RFC 2487</a> - <em>SMTP Service Extension for Secure SMTP over TLS</em></p>
-</dd>
-</dl>
-</dd>
-<dt><strong><a name="protocolauthentication_uwierzytelnienie" class="item"><strong>protocolAuthentication</strong> = uwierzytelnienie</a></strong></dt>
 
-<dd>
-<p>rodzaj uwierzytelnienia do negocjacji protokołu</p>
-<p>aktualnie wspierane: basic, NTLM</p>
-<p>Obecnie typ uwierzytelnienia ma zastosowanie wyłącznie w protokole 'connect'.</p>
-<p>domyślnie: basic</p>
-</dd>
-<dt><strong><a name="protocolhost_adres_port" class="item"><strong>protocolHost</strong> = adres:port</a></strong></dt>
+<p>po&#x142;&#x105;cz ponownie sekcj&#x119; connect+exec po roz&#x142;&#x105;czeniu</p>
 
-<dd>
-<p>adres docelowy do negocjacji protokołu</p>
-<p><em>protocolHost</em> określa docelowy serwer SSL, do którego połączyć ma się proxy.
-Nie jest to adres serwera proxy, do którego połączenie zestawia <strong>stunnel</strong>.
-Adres serwera proxy powinien być określony przy pomocy opcji 'connect'.</p>
-<p>W obecnej wersji adres docelowy protokołu ma zastosowanie wyłącznie w protokole
-'connect'.</p>
-</dd>
-<dt><strong><a name="protocolpassword_has_o" class="item"><strong>protocolPassword</strong> = hasło</a></strong></dt>
+<p>domy&#x15B;lnie: no</p>
 
-<dd>
-<p>hasło do negocjacji protokołu</p>
 </dd>
-<dt><strong><a name="protocolusername_u_ytkownik" class="item"><strong>protocolUsername</strong> = użytkownik</a></strong></dt>
-
+<dt id="sessionCacheSize-rozmiar"><b>sessionCacheSize</b> = rozmiar</dt>
 <dd>
-<p>nazwa użytkownika do negocjacji protokołu</p>
-</dd>
-<dt><strong><strong>pty</strong> = yes | no (tylko Unix)</strong></dt>
 
-<dd>
-<p>alokuj pseudoterminal dla programu uruchamianego w opcji 'exec'</p>
-</dd>
-<dt><strong><a name="renegotiation_yes_no" class="item"><strong>renegotiation</strong> = yes | no</a></strong></dt>
+<p>rozmiar pami&#x119;ci podr&#x119;cznej sesji SSL</p>
 
-<dd>
-<p>pozwalaj na renegocjację SSL</p>
-<p>Wśród zastosowań renegocjacji SSL są niektóre scenariusze uwierzytelnienia,
-oraz renegocjacja kluczy dla długotrwałych połączeń.</p>
-<p>Z drugiej strony własność na może ułatwić trywialny atak DoS poprzez
-wygenerowanie obciążenia procesora:</p>
-<p><a href="http://vincent.bernat.im/en/blog/2011-ssl-dos-mitigation.html">http://vincent.bernat.im/en/blog/2011-ssl-dos-mitigation.html</a></p>
-<p>Warto zauważyć, że zablokowanie renegocjacji SSL nie zebezpiecza w pełni
-przed opisanym problemem.</p>
-<p>domyślnie: yes (o ile wspierane przez <strong>OpenSSL</strong>)</p>
-</dd>
-<dt><strong><a name="reset_yes_no" class="item"><strong>reset</strong> = yes | no</a></strong></dt>
+<p>Parametr okre&#x15B;la maksymaln&#x105; liczb&#x119; pozycji wewn&#x119;trznej pami&#x119;ci podr&#x119;cznej sesji.</p>
 
-<dd>
-<p>sygnalizuj wystąpienie błędu przy pomocy flagi TCP RST</p>
-<p>Ta opcja nie jest wspierana na niektórych platformach.</p>
-<p>domyślnie: yes</p>
-</dd>
-<dt><strong><a name="retry_yes_no" class="item"><strong>retry</strong> = yes | no</a></strong></dt>
+<p>Warto&#x15B;&#x107; 0 oznacza brak ograniczenia rozmiaru. Nie jest to zalecane dla system&oacute;w produkcyjnych z uwagi na ryzyko ataku DoS przez wyczerpanie pami&#x119;ci RAM.</p>
 
-<dd>
-<p>połącz ponownie sekcję connect+exec po rozłączeniu</p>
-<p>domyślnie: no</p>
 </dd>
-<dt><strong><a name="sessioncachesize_rozmiar" class="item"><strong>sessionCacheSize</strong> = rozmiar</a></strong></dt>
-
+<dt id="sessionCacheTimeout-czas"><b>sessionCacheTimeout</b> = czas</dt>
 <dd>
-<p>rozmiar pamięci podręcznej sesji SSL</p>
-<p>Parametr określa maksymalną liczbę pozycji wewnętrznej pamięci podręcznej
-sesji.</p>
-<p>Wartość 0 oznacza brak ograniczenia rozmiaru.  Nie jest to zalecane dla
-systemów produkcyjnych z uwagi na ryzyko ataku DoS przez wyczerpanie pamięci
-RAM.</p>
-</dd>
-<dt><strong><a name="sessioncachetimeout_czas" class="item"><strong>sessionCacheTimeout</strong> = czas</a></strong></dt>
 
-<dd>
-<p>przeterminowanie pamięci podręcznej sesji SSL</p>
-<p>Parametr określa czas w sekundach, po którym sesja SSL zostanie usunięta z
-pamięci podręcznej.</p>
-</dd>
-<dt><strong><a name="sessiond_adres_port" class="item"><strong>sessiond</strong> = adres:port</a></strong></dt>
+<p>przeterminowanie pami&#x119;ci podr&#x119;cznej sesji SSL</p>
+
+<p>Parametr okre&#x15B;la czas w sekundach, po kt&oacute;rym sesja SSL zostanie usuni&#x119;ta z pami&#x119;ci podr&#x119;cznej.</p>
 
+</dd>
+<dt id="sessiond-adres:port"><b>sessiond</b> = adres:port</dt>
 <dd>
+
 <p>adres sessiond - servera cache sesji SSL</p>
-</dd>
-<dt><strong><a name="sslversion_wersja" class="item"><strong>sslVersion</strong> = wersja</a></strong></dt>
 
+</dd>
+<dt id="sslVersion-wersja"><b>sslVersion</b> = wersja</dt>
 <dd>
-<p>wersja protokołu SSL</p>
+
+<p>wersja protoko&#x142;u SSL</p>
+
 <p>Dozwolone opcje: all, SSLv2, SSLv3, TLSv1, TLSv1.1, TLSv1.2</p>
-</dd>
-<dt><strong><a name="w" class="item"><strong>stack</strong> = liczba_bajtów (z wyjątkiem modelu FORK)</a></strong></dt>
 
-<dd>
-<p>rozmiar stosu procesora wątku</p>
 </dd>
-<dt><strong><a name="timeoutbusy_liczba_sekund" class="item"><strong>TIMEOUTbusy</strong> = liczba_sekund</a></strong></dt>
+<dt id="stack-liczba_bajtw-z-wyjtkiem-modelu-FORK"><b>stack</b> = liczba_bajt&oacute;w (z wyj&#x105;tkiem modelu FORK)</dt>
+<dd>
+
+<p>rozmiar stosu procesora w&#x105;tku</p>
 
+</dd>
+<dt id="TIMEOUTbusy-liczba_sekund"><b>TIMEOUTbusy</b> = liczba_sekund</dt>
 <dd>
+
 <p>czas oczekiwania na spodziewane dane</p>
-</dd>
-<dt><strong><a name="timeoutclose_liczba_sekund" class="item"><strong>TIMEOUTclose</strong> = liczba_sekund</a></strong></dt>
 
-<dd>
-<p>czas oczekiwania na close_notify (ustaw na 0, jeżeli klientem jest MSIE)</p>
 </dd>
-<dt><strong><a name="timeoutconnect_liczba_sekund" class="item"><strong>TIMEOUTconnect</strong> = liczba_sekund</a></strong></dt>
-
+<dt id="TIMEOUTclose-liczba_sekund"><b>TIMEOUTclose</b> = liczba_sekund</dt>
 <dd>
-<p>czas oczekiwania na nawiązanie połączenia</p>
-</dd>
-<dt><strong><a name="timeoutidle_liczba_sekund" class="item"><strong>TIMEOUTidle</strong> = liczba_sekund</a></strong></dt>
 
+<p>czas oczekiwania na close_notify (ustaw na 0, je&#x17C;eli klientem jest MSIE)</p>
+
+</dd>
+<dt id="TIMEOUTconnect-liczba_sekund"><b>TIMEOUTconnect</b> = liczba_sekund</dt>
 <dd>
-<p>maksymalny czas utrzymywania bezczynnego połączenia</p>
+
+<p>czas oczekiwania na nawi&#x105;zanie po&#x142;&#x105;czenia</p>
+
 </dd>
-<dt><strong><a name="both" class="item"><strong>transparent</strong> = none | source | destination | both (tylko Unix)</a></strong></dt>
+<dt id="TIMEOUTidle-liczba_sekund"><b>TIMEOUTidle</b> = liczba_sekund</dt>
+<dd>
+
+<p>maksymalny czas utrzymywania bezczynnego po&#x142;&#x105;czenia</p>
 
+</dd>
+<dt id="transparent-none-source-destination-both-tylko-Unix"><b>transparent</b> = none | source | destination | both (tylko Unix)</dt>
 <dd>
+
 <p>tryb przezroczystego proxy na wspieranych platformach</p>
+
 <p>Wspierane opcje:</p>
+
 <dl>
-<dt><strong><a name="none" class="item"><strong>none</strong></a></strong></dt>
 
+<dt id="none"><b>none</b></dt>
 <dd>
-<p>Zablokuj wsparcie dla przezroczystago proxy.  Jest to wartość domyślna.</p>
-</dd>
-<dt><strong><a name="source" class="item"><strong>source</strong></a></strong></dt>
 
+<p>Zablokuj wsparcie dla przezroczystago proxy. Jest to warto&#x15B;&#x107; domy&#x15B;lna.</p>
+
+</dd>
+<dt id="source"><b>source</b></dt>
 <dd>
-<p>Przepisz adres, aby nawiązywane połączenie wydawało się pochodzić
-bezpośrednio od klienta, a nie od programu <strong>stunnel</strong>.</p>
-<p>Opcja jest aktualnie obsługiwana w:</p>
+
+<p>Przepisz adres, aby nawi&#x105;zywane po&#x142;&#x105;czenie wydawa&#x142;o si&#x119; pochodzi&#x107; bezpo&#x15B;rednio od klienta, a nie od programu <b>stunnel</b>.</p>
+
+<p>Opcja jest aktualnie obs&#x142;ugiwana w:</p>
+
 <dl>
-<dt><strong><a name="zdalnym" class="item">Trybie zdalnym (opcja <em>connect</em>) w systemie <em>Linux &gt;=2.6.28</em></a></strong></dt>
 
+<dt id="Trybie-zdalnym-opcja-connect-w-systemie-Linux-2.6.28">Trybie zdalnym (opcja <i>connect</i>) w systemie <i>Linux &gt;=2.6.28</i></dt>
 <dd>
-<p>Konfiguracja wymaga następujących ustawień iptables oraz routingu
-(na przykład w pliku /etc/rc.local lub analogicznym):</p>
-<pre>
-    iptables -t mangle -N DIVERT
+
+<p>Konfiguracja wymaga nast&#x119;puj&#x105;cych ustawie&#x144; iptables oraz routingu (na przyk&#x142;ad w pliku /etc/rc.local lub analogicznym):</p>
+
+<pre><code>    iptables -t mangle -N DIVERT
     iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
     iptables -t mangle -A DIVERT -j MARK --set-mark 1
     iptables -t mangle -A DIVERT -j ACCEPT
     ip rule add fwmark 1 lookup 100
     ip route add local 0.0.0.0/0 dev lo table 100
-    echo 0 &gt;/proc/sys/net/ipv4/conf/lo/rp_filter</pre>
-<p>Konfiguracja ta wymaga, aby <strong>stunnel</strong> był wykonywany jako root i bez opcji <em>setuid</em>.</p>
-</dd>
-<dt><strong>Trybie zdalnym (opcja <em>connect</em>) w systemie <em>Linux 2.2.x</em></strong></dt>
+    echo 0 &gt;/proc/sys/net/ipv4/conf/lo/rp_filter</code></pre>
 
-<dd>
-<p>Konfiguracja ta wymaga skompilowania jądra z opcją <em>transparent proxy</em>.
-Docelowa usługa musi być umieszczona na osobnej maszynie, do której routing
-kierowany jest poprzez serwer <strong>stunnela</strong>.</p>
-<p>Dodatkowo <strong>stunnel</strong> powinien być wykonywany jako root i bez opcji <em>setuid</em>.</p>
-</dd>
-<dt><strong>Trybie zdalnym (opcja <em>connect</em>) w systemie <em>FreeBSD &gt;=8.0</em></strong></dt>
+<p>Konfiguracja ta wymaga, aby <b>stunnel</b> by&#x142; wykonywany jako root i bez opcji <i>setuid</i>.</p>
 
+</dd>
+<dt id="Trybie-zdalnym-opcja-connect-w-systemie-Linux-2.2.x">Trybie zdalnym (opcja <i>connect</i>) w systemie <i>Linux 2.2.x</i></dt>
 <dd>
-<p>Konfiguracja ta wymaga skonfigurowania firewalla i routingu.
-<strong>stunnel</strong> musi być wykonywany jako root i bez opcji <em>setuid</em>.</p>
+
+<p>Konfiguracja ta wymaga skompilowania j&#x105;dra z opcj&#x105; <i>transparent proxy</i>. Docelowa us&#x142;uga musi by&#x107; umieszczona na osobnej maszynie, do kt&oacute;rej routing kierowany jest poprzez serwer <b>stunnela</b>.</p>
+
+<p>Dodatkowo <b>stunnel</b> powinien by&#x107; wykonywany jako root i bez opcji <i>setuid</i>.</p>
+
 </dd>
-<dt><strong><a name="lokalnym" class="item">Trybie lokalnym (opcja <em>exec</em>)</a></strong></dt>
+<dt id="Trybie-zdalnym-opcja-connect-w-systemie-FreeBSD-8.0">Trybie zdalnym (opcja <i>connect</i>) w systemie <i>FreeBSD &gt;=8.0</i></dt>
+<dd>
 
+<p>Konfiguracja ta wymaga skonfigurowania firewalla i routingu. <b>stunnel</b> musi by&#x107; wykonywany jako root i bez opcji <i>setuid</i>.</p>
+
+</dd>
+<dt id="Trybie-lokalnym-opcja-exec">Trybie lokalnym (opcja <i>exec</i>)</dt>
 <dd>
-<p>Konfiguracja ta jest realizowana przy pomocy biblioteki <em>libstunnel.so</em>.
-Do załadowania biblioteki wykorzystywana jest zmienna środowiskowa _RLD_LIST na
-platformie Tru64 lub LD_PRELOAD na innych platformach.</p>
+
+<p>Konfiguracja ta jest realizowana przy pomocy biblioteki <i>libstunnel.so</i>. Do za&#x142;adowania biblioteki wykorzystywana jest zmienna &#x15B;rodowiskowa _RLD_LIST na platformie Tru64 lub LD_PRELOAD na innych platformach.</p>
+
 </dd>
 </dl>
-</dd>
-<dt><strong><a name="destination" class="item"><em>destination</em></a></strong></dt>
 
+</dd>
+<dt id="destination"><i>destination</i></dt>
 <dd>
-<p>Oryginalny adres docelowy jest używany zamiast opcji <em>connect</em>.</p>
-<p>Przykładowana konfiguracja przezroczystego adresu docelowego:</p>
-<pre>
-    [transparent]
+
+<p>Oryginalny adres docelowy jest u&#x17C;ywany zamiast opcji <i>connect</i>.</p>
+
+<p>Przyk&#x142;adowana konfiguracja przezroczystego adresu docelowego:</p>
+
+<pre><code>    [transparent]
     client=yes
     accept=&lt;port_stunnela&gt;
-    transparent=destination</pre>
-<p>Konfiguracja wymaga następujących ustawień iptables
-(na przykład w pliku /etc/rc.local lub analogicznym):</p>
-<pre>
-    /sbin/iptables -I INPUT -i eth0 -p tcp --dport &lt;port_stunnela&gt; -j ACCEPT
-    /sbin/iptables -t nat -I PREROUTING -i eth0 -p tcp --dport &lt;port_przekierowany&gt; -j DNAT --to-destination &lt;lokalne_ip&gt;:&lt;port_stunnela&gt;</pre>
-<p>Przezroczysty adres docelowy jest aktualnie wspierany wyłącznie w systemie Linux.</p>
-</dd>
-<dt><strong><em>both</em></strong></dt>
+    transparent=destination</code></pre>
 
+<p>Konfiguracja wymaga nast&#x119;puj&#x105;cych ustawie&#x144; iptables (na przyk&#x142;ad w pliku /etc/rc.local lub analogicznym):</p>
+
+<pre><code>    /sbin/iptables -I INPUT -i eth0 -p tcp --dport &lt;port_stunnela&gt; -j ACCEPT
+    /sbin/iptables -t nat -I PREROUTING -i eth0 -p tcp --dport &lt;port_przekierowany&gt; -j DNAT --to-destination &lt;lokalne_ip&gt;:&lt;port_stunnela&gt;</code></pre>
+
+<p>Przezroczysty adres docelowy jest aktualnie wspierany wy&#x142;&#x105;cznie w systemie Linux.</p>
+
+</dd>
+<dt id="both"><i>both</i></dt>
 <dd>
-<p>Użyj przezroczystego proxy zarówno dla adresu źródłowego jak i docelowego.</p>
+
+<p>U&#x17C;yj przezroczystego proxy zar&oacute;wno dla adresu &#x17A;r&oacute;d&#x142;owego jak i docelowego.</p>
+
 </dd>
 </dl>
-<p>Dla zapewnienia kompatybilności z wcześniejszymim wersjami wspierane są dwie
-dodatkowe opcje:</p>
+
+<p>Dla zapewnienia kompatybilno&#x15B;ci z wcze&#x15B;niejszymim wersjami wspierane s&#x105; dwie dodatkowe opcje:</p>
+
 <dl>
-<dt><strong><a name="yes" class="item"><em>yes</em></a></strong></dt>
 
+<dt id="yes"><i>yes</i></dt>
 <dd>
-<p>Opcja została przemianowana na <em>source</em>.</p>
-</dd>
-<dt><strong><em>no</em></strong></dt>
 
+<p>Opcja zosta&#x142;a przemianowana na <i>source</i>.</p>
+
+</dd>
+<dt id="no"><i>no</i></dt>
 <dd>
-<p>Opcja została przemianowana na <em>none</em>.</p>
+
+<p>Opcja zosta&#x142;a przemianowana na <i>none</i>.</p>
+
 </dd>
 </dl>
-</dd>
-<dt><strong><a name="verify_poziom" class="item"><strong>verify</strong> = poziom</a></strong></dt>
 
+</dd>
+<dt id="verify-poziom"><b>verify</b> = poziom</dt>
 <dd>
-<p>weryfikuj certyfikat drugiej strony połączenia</p>
+
+<p>weryfikuj certyfikat drugiej strony po&#x142;&#x105;czenia</p>
+
 <dl>
-<dt><strong><a name="poziom_0" class="item"><em>poziom 0</em></a></strong></dt>
 
+<dt id="poziom-0"><i>poziom 0</i></dt>
 <dd>
-<p>zarządaj certyfikatu i zignoruj go</p>
-</dd>
-<dt><strong><a name="poziom_1" class="item"><em>poziom 1</em></a></strong></dt>
 
-<dd>
-<p>weryfikuj, jeżeli został przedstawiony</p>
+<p>zarz&#x105;daj certyfikatu i zignoruj go</p>
+
 </dd>
-<dt><strong><a name="poziom_2" class="item"><em>poziom 2</em></a></strong></dt>
+<dt id="poziom-1"><i>poziom 1</i></dt>
+<dd>
+
+<p>weryfikuj, je&#x17C;eli zosta&#x142; przedstawiony</p>
 
+</dd>
+<dt id="poziom-2"><i>poziom 2</i></dt>
 <dd>
+
 <p>weryfikuj z zainstalowanym certyfikatem Centrum Certyfikacji</p>
-</dd>
-<dt><strong><a name="poziom_3" class="item"><em>poziom 3</em></a></strong></dt>
 
+</dd>
+<dt id="poziom-3"><i>poziom 3</i></dt>
 <dd>
+
 <p>weryfikuj z lokalnie zainstalowanym certyfikatem drugiej strony</p>
-</dd>
-<dt><strong><a name="poziom_4" class="item"><em>poziom 4</em></a></strong></dt>
 
-<dd>
-<p>weryfikuj z certyfikatem drugiej strony ignorując łańcuch CA</p>
 </dd>
-<dt><strong><a name="domy_lnie" class="item"><em>domyślnie</em></a></strong></dt>
+<dt id="poziom-4"><i>poziom 4</i></dt>
+<dd>
 
+<p>weryfikuj z certyfikatem drugiej strony ignoruj&#x105;c &#x142;a&#x144;cuch CA</p>
+
+</dd>
+<dt id="domylnie"><i>domy&#x15B;lnie</i></dt>
 <dd>
+
 <p>nie weryfikuj</p>
+
 </dd>
 </dl>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="zwracana_warto____">ZWRACANA WARTOŚĆ</a></h1>
-<p><strong>stunnel</strong> zwraca zero w przypadku sukcesu, lub wartość niezerową
-w przypadku błędu.</p>
-<p>
-</p>
-<hr />
-<h1><a name="signa__y">SIGNAŁY</a></h1>
-<p>Następujące sygnały mogą być użyte do sterowania programem w systemie Unix:</p>
+
+<h1 id="ZWRACANA-WARTO">ZWRACANA WARTO&#x15A;&#x106;</h1>
+
+<p><b>stunnel</b> zwraca zero w przypadku sukcesu, lub warto&#x15B;&#x107; niezerow&#x105; w przypadku b&#x142;&#x119;du.</p>
+
+<h1 id="SIGNAY">SIGNA&#x141;Y</h1>
+
+<p>Nast&#x119;puj&#x105;ce sygna&#x142;y mog&#x105; by&#x107; u&#x17C;yte do sterowania programem w systemie Unix:</p>
+
 <dl>
-<dt><strong><a name="sighup" class="item">SIGHUP</a></strong></dt>
 
+<dt id="SIGHUP">SIGHUP</dt>
 <dd>
-<p>Załaduj ponownie plik konfiguracyjny.</p>
-<p>Niektóre globalne opcje nie będą przeładowane:</p>
+
+<p>Za&#x142;aduj ponownie plik konfiguracyjny.</p>
+
+<p>Niekt&oacute;re globalne opcje nie b&#x119;d&#x105; prze&#x142;adowane:</p>
+
 <ul>
-<li>
-<p>chroot</p>
+
+<li><p>chroot</p>
+
 </li>
-<li>
-<p>foreground</p>
+<li><p>foreground</p>
+
 </li>
-<li>
-<p>pid</p>
+<li><p>pid</p>
+
 </li>
-<li>
-<p>setgid</p>
+<li><p>setgid</p>
+
 </li>
-<li>
-<p>setuid</p>
+<li><p>setuid</p>
+
 </li>
 </ul>
-<p>Jeżeli wykorzystywana jest opcja 'setuid' <strong>stunnel</strong> nie będzie mógł załadować
-ponownie konfiguracji wykorzystującej uprzywilejowane (&lt;1024) porty.</p>
-<p>Jeżeli wykorzystywana jest opcja 'chroot' <strong>stunnel</strong> będzie szukał wszystkich
-potrzebnych plików (łącznie z plikiem konfiguracyjnym, certyfikatami, logiem i
-plikiem pid) wewnątrz katalogu wskazanego przez 'chroot'.</p>
-</dd>
-<dt><strong><a name="sigusr1" class="item">SIGUSR1</a></strong></dt>
 
-<dd>
-<p>Zamknij i otwórz ponownie log.
-Funkcja ta może zostać użyta w skrypcie rotującym log programu <strong>stunnel</strong>.</p>
+<p>Je&#x17C;eli wykorzystywana jest opcja &#39;setuid&#39; <b>stunnel</b> nie b&#x119;dzie m&oacute;g&#x142; za&#x142;adowa&#x107; ponownie konfiguracji wykorzystuj&#x105;cej uprzywilejowane (&lt;1024) porty.</p>
+
+<p>Je&#x17C;eli wykorzystywana jest opcja &#39;chroot&#39; <b>stunnel</b> b&#x119;dzie szuka&#x142; wszystkich potrzebnych plik&oacute;w (&#x142;&#x105;cznie z plikiem konfiguracyjnym, certyfikatami, logiem i plikiem pid) wewn&#x105;trz katalogu wskazanego przez &#39;chroot&#39;.</p>
+
 </dd>
-<dt><strong><a name="sigterm_sigquit_sigint" class="item">SIGTERM, SIGQUIT, SIGINT</a></strong></dt>
+<dt id="SIGUSR1">SIGUSR1</dt>
+<dd>
 
+<p>Zamknij i otw&oacute;rz ponownie log. Funkcja ta mo&#x17C;e zosta&#x107; u&#x17C;yta w skrypcie rotuj&#x105;cym log programu <b>stunnel</b>.</p>
+
+</dd>
+<dt id="SIGTERM-SIGQUIT-SIGINT">SIGTERM, SIGQUIT, SIGINT</dt>
 <dd>
-<p>Zakończ działanie programu.</p>
+
+<p>Zako&#x144;cz dzia&#x142;anie programu.</p>
+
 </dd>
 </dl>
-<p>Skutek wysłania innych sygnałów jest niezdefiniowany.</p>
-<p>
-</p>
-<hr />
-<h1><a name="przyk__ady">PRZYKŁADY</a></h1>
-<p>Szyfrowanie połączeń do lokalnego serwera <em>imapd</em> można użyć:</p>
-<pre>
-    [imapd]
+
+<p>Skutek wys&#x142;ania innych sygna&#x142;&oacute;w jest niezdefiniowany.</p>
+
+<h1 id="PRZYKADY">PRZYK&#x141;ADY</h1>
+
+<p>Szyfrowanie po&#x142;&#x105;cze&#x144; do lokalnego serwera <i>imapd</i> mo&#x17C;na u&#x17C;y&#x107;:</p>
+
+<pre><code>    [imapd]
     accept = 993
     exec = /usr/sbin/imapd
-    execargs = imapd</pre>
+    execargs = imapd</code></pre>
+
 <p>albo w trybie zdalnym:</p>
-<pre>
-    [imapd]
+
+<pre><code>    [imapd]
     accept = 993
-    connect = 143</pre>
-<p>W połączeniu z programem <em>pppd</em> <strong>stunnel</strong> pozwala zestawić prosty VPN.
-Po stronie serwera nasłuchującego na porcie 2020 jego konfiguracja
-może wyglądać następująco:</p>
-<pre>
-    [vpn]
+    connect = 143</code></pre>
+
+<p>W po&#x142;&#x105;czeniu z programem <i>pppd</i> <b>stunnel</b> pozwala zestawi&#x107; prosty VPN. Po stronie serwera nas&#x142;uchuj&#x105;cego na porcie 2020 jego konfiguracja mo&#x17C;e wygl&#x105;da&#x107; nast&#x119;puj&#x105;co:</p>
+
+<pre><code>    [vpn]
     accept = 2020
     exec = /usr/sbin/pppd
     execargs = pppd local
-    pty = yes</pre>
-<p>Poniższy plik konfiguracyjny może być wykorzystany do uruchomienia
-programu <strong>stunnel</strong> w trybie <em>inetd</em>.  Warto zauważyć, że w pliku
-konfiguracyjnym nie ma sekcji <em>[nazwa_usługi]</em>.</p>
-<pre>
-    exec = /usr/sbin/imapd
-    execargs = imapd</pre>
-<p>
-</p>
-<hr />
-<h1><a name="notki">NOTKI</a></h1>
-<p>
-</p>
-<h2><a name="ograniczenia">OGRANICZENIA</a></h2>
-<p><strong>stunnel</strong> nie może być używany do szyfrowania protokołu <em>FTP</em>,
-ponieważ do przesyłania poszczególnych plików używa on dodatkowych
-połączeń otwieranych na portach o dynamicznie przydzielanych numerach.
-Istnieją jednak specjalne wersje klientów i serwerów FTP pozwalające
-na szyfrowanie przesyłanych danych przy pomocy protokołu <em>SSL</em>.</p>
-<p>
-</p>
-<h2><a name="tryb_inetd__tylko_unix_">TRYB INETD (tylko Unix)</a></h2>
-<p>W większości zastosowań <strong>stunnel</strong> samodzielnie nasłuchuje na porcie
-podanym w pliku konfiguracyjnym i tworzy połączenie z innym portem
-podanym w opcji <em>connect</em> lub nowym programem podanym w opcji <em>exec</em>.
-Niektórzy wolą jednak wykorzystywać oddzielny program, który odbiera
-połączenia, po czym uruchamia program <strong>stunnel</strong>.  Przykładami takich
-programów są inetd, xinetd i tcpserver.</p>
-<p>Przykładowa linia pliku /etc/inetd.conf może wyglądać tak:</p>
-<pre>
-    imaps stream tcp nowait root /usr/bin/stunnel
-        stunnel /etc/stunnel/imaps.conf</pre>
-<p>Ponieważ w takich przypadkach połączenie na zdefiniowanym porcie
-(tutaj <em>imaps</em>) nawiązuje osobny program (tutaj <em>inetd</em>), <strong>stunnel</strong>
-nie może używać opcji <em>accept</em>.  W pliku konfiguracyjnym nie może
-być również zdefiniowana żadna usługa (<em>[nazwa_usługi]</em>), ponieważ
-konfiguracja taka pozwala na nawiązanie tylko jednego połączenia.
-Wszystkie <em>OPCJE USŁUG</em> powinny być umieszczone razem z opcjami
-globalnymi.  Przykład takiej konfiguracji znajduje się w sekcji
-<em>PRZYKŁADY</em>.</p>
-<p>
-</p>
-<h2><a name="certyfikaty">CERTYFIKATY</a></h2>
-<p>Protokół SSL wymaga, aby każdy serwer przedstawiał się nawiązującemu
-połączenie klientowi prawidłowym certyfikatem X.509.
-Potwierdzenie tożsamości serwera polega na wykazaniu, że posiada on
-odpowiadający certyfikatowi klucz prywatny.
-Najprostszą metodą uzyskania certyfikatu jest wygenerowanie go przy pomocy
-wolnego pakietu <strong>OpenSSL</strong>.  Więcej informacji na temat generowania
-certyfikatów można znaleźć na umieszczonych poniżej stronach.</p>
-<p>Istotną kwestią jest kolejność zawartości pliku <em>.pem</em>.
-W pierwszej kolejności powinien on zawierać klucz prywatny,
-a dopiero za nim podpisany certyfikat (nie żądanie certyfikatu).
-Po certyfikacie i kluczu prywatnym powinny znajdować się puste linie.
-Jeżeli przed certyfikatem znajdują się dodatkowe informacje tekstowe,
-to powinny one zostać usunięte.  Otrzymany plik powinien mieć
-następującą postać:</p>
-<pre>
-    -----BEGIN RSA PRIVATE KEY-----
+    pty = yes</code></pre>
+
+<p>Poni&#x17C;szy plik konfiguracyjny mo&#x17C;e by&#x107; wykorzystany do uruchomienia programu <b>stunnel</b> w trybie <i>inetd</i>. Warto zauwa&#x17C;y&#x107;, &#x17C;e w pliku konfiguracyjnym nie ma sekcji <i>[nazwa_us&#x142;ugi]</i>.</p>
+
+<pre><code>    exec = /usr/sbin/imapd
+    execargs = imapd</code></pre>
+
+<h1 id="NOTKI">NOTKI</h1>
+
+<h2 id="OGRANICZENIA">OGRANICZENIA</h2>
+
+<p><b>stunnel</b> nie mo&#x17C;e by&#x107; u&#x17C;ywany do szyfrowania protoko&#x142;u <i>FTP</i>, poniewa&#x17C; do przesy&#x142;ania poszczeg&oacute;lnych plik&oacute;w u&#x17C;ywa on dodatkowych po&#x142;&#x105;cze&#x144; otwieranych na portach o dynamicznie przydzielanych numerach. Istniej&#x105; jednak specjalne wersje klient&oacute;w i serwer&oacute;w FTP pozwalaj&#x105;ce na szyfrowanie przesy&#x142;anych danych przy pomocy protoko&#x142;u <i>SSL</i>.</p>
+
+<h2 id="TRYB-INETD-tylko-Unix">TRYB INETD (tylko Unix)</h2>
+
+<p>W wi&#x119;kszo&#x15B;ci zastosowa&#x144; <b>stunnel</b> samodzielnie nas&#x142;uchuje na porcie podanym w pliku konfiguracyjnym i tworzy po&#x142;&#x105;czenie z innym portem podanym w opcji <i>connect</i> lub nowym programem podanym w opcji <i>exec</i>. Niekt&oacute;rzy wol&#x105; jednak wykorzystywa&#x107; oddzielny program, kt&oacute;ry odbiera po&#x142;&#x105;czenia, po czym uruchamia program <b>stunnel</b>. Przyk&#x142;adami takich program&oacute;w s&#x105; inetd, xinetd i tcpserver.</p>
+
+<p>Przyk&#x142;adowa linia pliku /etc/inetd.conf mo&#x17C;e wygl&#x105;da&#x107; tak:</p>
+
+<pre><code>    imaps stream tcp nowait root /usr/bin/stunnel
+        stunnel /etc/stunnel/imaps.conf</code></pre>
+
+<p>Poniewa&#x17C; w takich przypadkach po&#x142;&#x105;czenie na zdefiniowanym porcie (tutaj <i>imaps</i>) nawi&#x105;zuje osobny program (tutaj <i>inetd</i>), <b>stunnel</b> nie mo&#x17C;e u&#x17C;ywa&#x107; opcji <i>accept</i>. W pliku konfiguracyjnym nie mo&#x17C;e by&#x107; r&oacute;wnie&#x17C; zdefiniowana &#x17C;adna us&#x142;uga (<i>[nazwa_us&#x142;ugi]</i>), poniewa&#x17C; konfiguracja taka pozwala na nawi&#x105;zanie tylko jednego po&#x142;&#x105;czenia. Wszystkie <i>OPCJE US&#x141;UG</i> powinny by&#x107; umieszczone razem z opcjami globalnymi. Przyk&#x142;ad takiej konfiguracji znajduje si&#x119; w sekcji <i>PRZYK&#x141;ADY</i>.</p>
+
+<h2 id="CERTYFIKATY">CERTYFIKATY</h2>
+
+<p>Protok&oacute;&#x142; SSL wymaga, aby ka&#x17C;dy serwer przedstawia&#x142; si&#x119; nawi&#x105;zuj&#x105;cemu po&#x142;&#x105;czenie klientowi prawid&#x142;owym certyfikatem X.509. Potwierdzenie to&#x17C;samo&#x15B;ci serwera polega na wykazaniu, &#x17C;e posiada on odpowiadaj&#x105;cy certyfikatowi klucz prywatny. Najprostsz&#x105; metod&#x105; uzyskania certyfikatu jest wygenerowanie go przy pomocy wolnego pakietu <b>OpenSSL</b>. Wi&#x119;cej informacji na temat generowania certyfikat&oacute;w mo&#x17C;na znale&#x17A;&#x107; na umieszczonych poni&#x17C;ej stronach.</p>
+
+<p>Istotn&#x105; kwesti&#x105; jest kolejno&#x15B;&#x107; zawarto&#x15B;ci pliku <i>.pem</i>. W pierwszej kolejno&#x15B;ci powinien on zawiera&#x107; klucz prywatny, a dopiero za nim podpisany certyfikat (nie &#x17C;&#x105;danie certyfikatu). Po certyfikacie i kluczu prywatnym powinny znajdowa&#x107; si&#x119; puste linie. Je&#x17C;eli przed certyfikatem znajduj&#x105; si&#x119; dodatkowe informacje tekstowe, to powinny one zosta&#x107; usuni&#x119;te. Otrzymany plik powinien mie&#x107; nast&#x119;puj&#x105;c&#x105; posta&#x107;:</p>
+
+<pre><code>    -----BEGIN RSA PRIVATE KEY-----
     [zakodowany klucz]
     -----END RSA PRIVATE KEY-----
     [pusta linia]
     -----BEGIN CERTIFICATE-----
     [zakodowany certyfikat]
     -----END CERTIFICATE-----
-    [pusta linia]</pre>
-<p>
-</p>
-<h2><a name="losowo____">LOSOWOŚĆ</a></h2>
-<p><strong>stunnel</strong> potrzebuje zainicjować PRNG (generator liczb pseudolosowych),
-gdyż protokół SSL wymaga do bezpieczeństwa kryptograficznego źródła
-dobrej losowości.  Następujące źródła są kolejno odczytywane aż do
-uzyskania  wystarczającej ilości entropii:</p>
+    [pusta linia]</code></pre>
+
+<h2 id="LOSOWO">LOSOWO&#x15A;&#x106;</h2>
+
+<p><b>stunnel</b> potrzebuje zainicjowa&#x107; PRNG (generator liczb pseudolosowych), gdy&#x17C; protok&oacute;&#x142; SSL wymaga do bezpiecze&#x144;stwa kryptograficznego &#x17A;r&oacute;d&#x142;a dobrej losowo&#x15B;ci. Nast&#x119;puj&#x105;ce &#x17A;r&oacute;d&#x142;a s&#x105; kolejno odczytywane a&#x17C; do uzyskania wystarczaj&#x105;cej ilo&#x15B;ci entropii:</p>
+
 <ul>
-<li>
-<p>Zawartość pliku podanego w opcji <em>RNDfile</em>.</p>
+
+<li><p>Zawarto&#x15B;&#x107; pliku podanego w opcji <i>RNDfile</i>.</p>
+
 </li>
-<li>
-<p>Zawartość pliku o nazwie określonej przez zmienną środowiskową
-RANDFILE, o ile jest ona ustawiona.</p>
+<li><p>Zawarto&#x15B;&#x107; pliku o nazwie okre&#x15B;lonej przez zmienn&#x105; &#x15B;rodowiskow&#x105; RANDFILE, o ile jest ona ustawiona.</p>
+
 </li>
-<li>
-<p>Plik .rnd umieszczony w katalogu domowym użytkownika,
-jeżeli zmienna RANDFILE nie jest ustawiona.</p>
+<li><p>Plik .rnd umieszczony w katalogu domowym u&#x17C;ytkownika, je&#x17C;eli zmienna RANDFILE nie jest ustawiona.</p>
+
 </li>
-<li>
-<p>Plik podany w opcji '--with-random' w czasie konfiguracji programu.</p>
+<li><p>Plik podany w opcji &#39;--with-random&#39; w czasie konfiguracji programu.</p>
+
 </li>
-<li>
-<p>Zawartość ekranu w systemie Windows.</p>
+<li><p>Zawarto&#x15B;&#x107; ekranu w systemie Windows.</p>
+
 </li>
-<li>
-<p>Gniazdo egd, jeżeli użyta została opcja <em>EGD</em>.</p>
+<li><p>Gniazdo egd, je&#x17C;eli u&#x17C;yta zosta&#x142;a opcja <i>EGD</i>.</p>
+
 </li>
-<li>
-<p>Gniazdo egd podane w opcji '--with-egd-socket' w czasie konfiguracji
-programu.</p>
+<li><p>Gniazdo egd podane w opcji &#39;--with-egd-socket&#39; w czasie konfiguracji programu.</p>
+
 </li>
-<li>
-<p>Urządzenie /dev/urandom.</p>
+<li><p>Urz&#x105;dzenie /dev/urandom.</p>
+
 </li>
 </ul>
-<p>Współczesne (<strong>0.9.5a</strong> lub nowsze) wersje biblioteki <strong>OpenSSL</strong> automatycznie
-zaprzestają ładowania kolejnych danych w momencie uzyskania wystarczającej
-ilości entropii.  Wcześniejsze wersje biblioteki wykorzystają wszystkie
-powyższe źródła, gdyż nie istnieje tam funkcja pozwalająca określić, czy
-uzyskano już wystarczająco dużo danych.</p>
-<p>Warto zwrócić uwagę, że na maszynach z systemem Windows, na których
-konsoli nie pracuje użytkownik, zawartość ekranu nie jest wystarczająco
-zmienna, aby zainicjować PRNG.  W takim przypadku do zainicjowania
-generatora należy użyć opcji <em>RNDfile</em>.</p>
-<p>Plik <em>RNDfile</em> powinien zawierać dane losowe -- również w tym sensie,
-że powinny być one inne przy każdym uruchomieniu programu <strong>stunnel</strong>.
-O ile nie użyta została opcja <em>RNDoverwrite</em> jest to robione
-automatycznie.  Do ręcznego uzyskania takiego pliku użyteczna
-może być komenda <em>openssl rand</em> dostarczana ze współczesnymi
-wersjami pakietu <strong>OpenSSL</strong>.</p>
-<p>Jeszcze jedna istotna informacja -- jeżeli dostępne jest urządzenie
-<em>/dev/urandom</em> biblioteka <strong>OpenSSL</strong> ma zwyczaj zasilania nim PRNG w trakcie
-sprawdzania stanu generatora.  W systemach z <em>/dev/urandom</em> urządzenie
-to będzie najprawdopodobniej użyte, pomimo że znajduje się na samym końcu
-powyższej listy.  Jest to właściwość biblioteki <strong>OpenSSL</strong>, a nie programu
-<strong>stunnel</strong>.</p>
-<p>
-</p>
-<h2><a name="parametry_dh">PARAMETRY DH</a></h2>
-<p>Począwszy od wersji 4.40 <strong>stunnel</strong> zawiera w kodzie programu 2048-bitowe
-parametry DH.</p>
-<p>Alternatywnie parametry DH można umieścić w pliku razem z certyfikatem:</p>
-<pre>
-    openssl dhparam 2048 &gt;&gt; stunnel.pem</pre>
-<p>Wygenerowanie parametrów DH może zająć nawet wiele minut.</p>
-<p>
-</p>
-<hr />
-<h1><a name="pliki">PLIKI</a></h1>
+
+<p>Wsp&oacute;&#x142;czesne (<b>0.9.5a</b> lub nowsze) wersje biblioteki <b>OpenSSL</b> automatycznie zaprzestaj&#x105; &#x142;adowania kolejnych danych w momencie uzyskania wystarczaj&#x105;cej ilo&#x15B;ci entropii. Wcze&#x15B;niejsze wersje biblioteki wykorzystaj&#x105; wszystkie powy&#x17C;sze &#x17A;r&oacute;d&#x142;a, gdy&#x17C; nie istnieje tam funkcja pozwalaj&#x105;ca okre&#x15B;li&#x107;, czy uzyskano ju&#x17C; wystarczaj&#x105;co du&#x17C;o danych.</p>
+
+<p>Warto zwr&oacute;ci&#x107; uwag&#x119;, &#x17C;e na maszynach z systemem Windows, na kt&oacute;rych konsoli nie pracuje u&#x17C;ytkownik, zawarto&#x15B;&#x107; ekranu nie jest wystarczaj&#x105;co zmienna, aby zainicjowa&#x107; PRNG. W takim przypadku do zainicjowania generatora nale&#x17C;y u&#x17C;y&#x107; opcji <i>RNDfile</i>.</p>
+
+<p>Plik <i>RNDfile</i> powinien zawiera&#x107; dane losowe -- r&oacute;wnie&#x17C; w tym sensie, &#x17C;e powinny by&#x107; one inne przy ka&#x17C;dym uruchomieniu programu <b>stunnel</b>. O ile nie u&#x17C;yta zosta&#x142;a opcja <i>RNDoverwrite</i> jest to robione automatycznie. Do r&#x119;cznego uzyskania takiego pliku u&#x17C;yteczna mo&#x17C;e by&#x107; komenda <i>openssl rand</i> dostarczana ze wsp&oacute;&#x142;czesnymi wersjami pakietu <b>OpenSSL</b>.</p>
+
+<p>Jeszcze jedna istotna informacja -- je&#x17C;eli dost&#x119;pne jest urz&#x105;dzenie <i>/dev/urandom</i> biblioteka <b>OpenSSL</b> ma zwyczaj zasilania nim PRNG w trakcie sprawdzania stanu generatora. W systemach z <i>/dev/urandom</i> urz&#x105;dzenie to b&#x119;dzie najprawdopodobniej u&#x17C;yte, pomimo &#x17C;e znajduje si&#x119; na samym ko&#x144;cu powy&#x17C;szej listy. Jest to w&#x142;a&#x15B;ciwo&#x15B;&#x107; biblioteki <b>OpenSSL</b>, a nie programu <b>stunnel</b>.</p>
+
+<h2 id="PARAMETRY-DH">PARAMETRY DH</h2>
+
+<p>Pocz&#x105;wszy od wersji 4.40 <b>stunnel</b> zawiera w kodzie programu 2048-bitowe parametry DH.</p>
+
+<p>Alternatywnie parametry DH mo&#x17C;na umie&#x15B;ci&#x107; w pliku razem z certyfikatem:</p>
+
+<pre><code>    openssl dhparam 2048 &gt;&gt; stunnel.pem</code></pre>
+
+<p>Wygenerowanie parametr&oacute;w DH mo&#x17C;e zaj&#x105;&#x107; nawet wiele minut.</p>
+
+<h1 id="PLIKI">PLIKI</h1>
+
 <dl>
-<dt><strong><a name="stunnel_conf" class="item"><em class="file">stunnel.conf</em></a></strong></dt>
 
+<dt id="stunnel.conf"><i>stunnel.conf</i></dt>
 <dd>
+
 <p>plik konfiguracyjny programu</p>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="b____dy">BŁĘDY</a></h1>
-<p>Opcja <em>execargs</em> oraz linia komend Win32 nie obsługuje cytowania.</p>
-<p>
-</p>
-<hr />
-<h1><a name="zobacz_r__wnie__">ZOBACZ RÓWNIEŻ</a></h1>
+
+<h1 id="BDY">B&#x141;&#x118;DY</h1>
+
+<p>Opcja <i>execargs</i> oraz linia komend Win32 nie obs&#x142;uguje cytowania.</p>
+
+<h1 id="ZOBACZ-RWNIE">ZOBACZ R&Oacute;WNIE&#x17B;</h1>
+
 <dl>
-<dt><strong><a name="tcpd" class="item"><a href="#tcpd">tcpd(8)</a></a></strong></dt>
 
+<dt id="tcpd-8"><a href="http://man.he.net/man8/tcpd">tcpd(8)</a></dt>
 <dd>
-<p>biblioteka kontroli dostępu do usług internetowych</p>
-</dd>
-<dt><strong><a name="inetd" class="item"><a href="#inetd">inetd(8)</a></a></strong></dt>
 
-<dd>
-<p>'super-serwer' internetowy</p>
-</dd>
-<dt><strong><a name="http_www_stunnel_org" class="item"><em class="file"><a href="http://www.stunnel.org/">http://www.stunnel.org/</a></em></a></strong></dt>
+<p>biblioteka kontroli dost&#x119;pu do us&#x142;ug internetowych</p>
 
+</dd>
+<dt id="inetd-8"><a href="http://man.he.net/man8/inetd">inetd(8)</a></dt>
 <dd>
-<p>strona domowa programu <strong>stunnel</strong></p>
+
+<p>&#39;super-serwer&#39; internetowy</p>
+
 </dd>
-<dt><strong><a name="http_www_openssl_org" class="item"><em class="file"><a href="http://www.openssl.org/">http://www.openssl.org/</a></em></a></strong></dt>
+<dt id="http:-www.stunnel.org"><i>http://www.stunnel.org/</i></dt>
+<dd>
+
+<p>strona domowa programu <b>stunnel</b></p>
 
+</dd>
+<dt id="http:-www.openssl.org"><i>http://www.openssl.org/</i></dt>
 <dd>
-<p>strona projektu <strong>OpenSSL</strong></p>
+
+<p>strona projektu <b>OpenSSL</b></p>
+
 </dd>
 </dl>
-<p>
-</p>
-<hr />
-<h1><a name="autor">AUTOR</a></h1>
+
+<h1 id="AUTOR">AUTOR</h1>
+
 <dl>
-<dt><strong><a name="micha_trojnara" class="item">Michał Trojnara</a></strong></dt>
 
+<dt id="Micha-Trojnara">Micha&#x142; Trojnara</dt>
 <dd>
-<p>&lt;<em class="file"><a href="mailto:Michal.Trojnara@mirt.net">Michal.Trojnara@mirt.net</a></em>&gt;</p>
+
+<p>&lt;<i>Michal.Trojnara@mirt.net</i>&gt;</p>
+
 </dd>
 </dl>
 
+
 </body>
 
 </html>
+
+
diff --git a/doc/stunnel.pl.pod b/doc/stunnel.pl.pod
index f203312..2eaf480 100644
--- a/doc/stunnel.pl.pod
+++ b/doc/stunnel.pl.pod
@@ -392,6 +392,39 @@ program B<stunnel> do uwierzytelnienia się przed drugą stroną połączenia.
 Certyfikat jest konieczny, aby używać programu w trybie serwera.
 W trybie klienta certyfikat jest opcjonalny.
 
+=item B<checkEmail> = EMAIL
+
+adres email przedstawionego certyfikatu
+
+Pojedyncza sekcja może zawierać wiele wystąpień opcji B<checkEmail>.
+Certyfikaty są akceptowane, jeżeli sekcja nie zawiera opcji B<checkEmail>,
+albo adres email przedstawionego certyfikatu pasuje do jednego z adresów
+email określonych przy pomocy B<checkEmail>.
+
+Opcja ta wymaga biblioteki OpenSSL w wersji 1.0.2 lub nowszej.
+
+=item B<checkHost> = NAZWA_SERWERA
+
+nazwa serwera przedstawionego certyfikatu
+
+Pojedyncza sekcja może zawierać wiele wystąpień opcji B<checkHost>.
+Certyfikaty są akceptowane, jeżeli sekcja nie zawiera opcji B<checkHost>, albo
+nazwa serwera przedstawionego certyfikatu pasuje do jednego nazw określonych
+przy pomocy B<checkHost>.
+
+Opcja ta wymaga biblioteki OpenSSL w wersji 1.0.2 lub nowszej.
+
+=item B<checkIP> = IP
+
+adres IP przedstawionego certyfikatu
+
+Pojedyncza sekcja może zawierać wiele wystąpień opcji B<checkIP>.  Certyfikaty
+są akceptowane, jeżeli sekcja nie zawiera opcji B<checkIP>, albo adres IP
+przedstawionego certyfikatu pasuje do jednego z adresów IP określonych przy
+pomocy B<checkIP>.
+
+Opcja ta wymaga biblioteki OpenSSL w wersji 1.0.2 lub nowszej.
+
 =item B<ciphers> = lista_szyfrów
 
 lista dozwolonych szyfrów SSL
@@ -550,6 +583,10 @@ Opcja I<sni> jest dostępna począwszy od B<OpenSSL 1.0.0>.
 
 serwer OCSP do weryfikacji certyfikatów
 
+=item B<OCSPaia> = yes | no
+
+weryfikuj certyfikaty przy użyciu respondertów AIA
+
 =item B<OCSPflag> = flaga
 
 flaga serwera OCSP
@@ -559,6 +596,15 @@ NOEXPLICIT, NOCASIGN, NODELEGATED, NOCHECKS, TRUSTOTHER, RESPID_KEY, NOTIME
 
 Aby wyspecyfikować kilka flag należy użyć I<OCSPflag> wielokrotnie.
 
+=item B<OCSPnonce> = yes | no
+
+wysyłaj i weryfikuj OCSP nonce
+
+Opcja B<OCSPnonce> zabezpiecza protokół OCSP przed atakami powtórzeniowymi.
+Ze względu na złożoność obliczeniową rozszerzenie nonce jest zwykle wspierane
+jedynie przez wewnętrzne (np. korporacyjne), a nie przez publiczne respondery
+OCSP.
+
 =item B<options> = opcje_SSL
 
 opcje biblioteki B<OpenSSL>
diff --git a/doc/stunnel.pod b/doc/stunnel.pod
index 4d21676..38392ef 100644
--- a/doc/stunnel.pod
+++ b/doc/stunnel.pod
@@ -381,6 +381,39 @@ as a client side certificate chain.  Using client side certs is optional.
 The certificates must be in PEM format and must be sorted starting with the
 certificate to the highest level (root CA).
 
+=item B<checkEmail> = EMAIL
+
+email address of the peer certificate subject
+
+Multiple I<checkEmail> options are allowed in a single service section.
+Certificates are accepted if no I<checkEmail> option was specified, or the
+email address of the peer certificate matches any of the email addresses
+specified with I<checkEmail>.
+
+This option requires OpenSSL 1.0.2 or later.
+
+=item B<checkHost> = HOST
+
+host of the peer certificate subject
+
+Multiple I<checkHost> options are allowed in a single service section.
+Certificates are accepted if no I<checkHost> option was specified, or the host
+name of the peer certificate matches any of the hosts specified with
+I<checkHost>.
+
+This option requires OpenSSL 1.0.2 or later.
+
+=item B<checkIP> = IP
+
+IP address of the peer certificate subject
+
+Multiple I<checkIP> options are allowed in a single service section.
+Certificates are accepted if no I<checkIP> option was specified, or the IP
+address of the peer certificate matches any of the IP addresses specified with
+I<checkIP>.
+
+This option requires OpenSSL 1.0.2 or later.
+
 =item B<ciphers> = cipherlist
 
 Select permitted SSL ciphers
@@ -531,6 +564,14 @@ Option I<sni> is only available when compiled with B<OpenSSL 1.0.0> and later.
 
 select OCSP server for certificate verification
 
+=item B<OCSPaia> = yes | no
+
+validate certificates with their AIA OCSP responders
+
+This option enables I<stunnel> to validate certificates with the list of
+OCSP responder URLs retrieved from their AIA (Authority Information Access)
+extension.
+
 =item B<OCSPflag> = flag
 
 specify OCSP server flag
@@ -540,6 +581,14 @@ Several I<OCSPflag> can be used to specify multiple flags.
 currently supported flags: NOCERTS, NOINTERN NOSIGS, NOCHAIN, NOVERIFY,
 NOEXPLICIT, NOCASIGN, NODELEGATED, NOCHECKS, TRUSTOTHER, RESPID_KEY, NOTIME
 
+=item B<OCSPnonce> = yes | no
+
+send and verify the OCSP nonce extension
+
+This option protects the OCSP protocol against replay attacks.  Due to its
+computational overhead, the nonce extension is usually only supported on
+internal (e.g. corporate) responders, and not on public OCSP responders.
+
 =item B<options> = SSL_options
 
 B<OpenSSL> library options
diff --git a/src/options.c b/src/options.c
index 0a0e909..c201cd0 100644
--- a/src/options.c
+++ b/src/options.c
@@ -74,7 +74,6 @@ static char *print_option(int, OPT_UNION *);
 static int parse_socket_option(char *);
 
 #ifdef HAVE_OSSL_OCSP_H
-static char *parse_ocsp_url(SERVICE_OPTIONS *, char *);
 static unsigned long parse_ocsp_flag(char *);
 #endif /* HAVE_OSSL_OCSP_H */
 
@@ -87,6 +86,8 @@ static ENGINE *get_engine(int);
 #endif
 
 static void print_syntax(void);
+
+static void name_list_append(NAME_LIST **, char *);
 #ifndef USE_WIN32
 static char **argalloc(char *);
 #endif
@@ -806,6 +807,82 @@ static char *parse_service_option(CMD cmd, SERVICE_OPTIONS *section,
         break;
     }
 
+#if OPENSSL_VERSION_NUMBER>=0x10002000L
+
+    /* checkEmail */
+    switch(cmd) {
+    case CMD_BEGIN:
+        section->check_email=NULL;
+        break;
+    case CMD_EXEC:
+        if(strcasecmp(opt, "checkEmail"))
+            break;
+        name_list_append(&section->check_email, arg);
+        return NULL; /* OK */
+    case CMD_END:
+    if(section->check_email && section->verify_level<1)
+            return "\"verify\" has to be enabled";
+        break;
+    case CMD_FREE:
+        break;
+    case CMD_DEFAULT:
+        break;
+    case CMD_HELP:
+        s_log(LOG_NOTICE, "%-22s = peer certificate email address",
+            "checkEmail");
+        break;
+    }
+
+    /* checkHost */
+    switch(cmd) {
+    case CMD_BEGIN:
+        section->check_host=NULL;
+        break;
+    case CMD_EXEC:
+        if(strcasecmp(opt, "checkHost"))
+            break;
+        name_list_append(&section->check_host, arg);
+        return NULL; /* OK */
+    case CMD_END:
+        if(section->check_host && section->verify_level<1)
+            return "\"verify\" has to be enabled";
+        break;
+    case CMD_FREE:
+        break;
+    case CMD_DEFAULT:
+        break;
+    case CMD_HELP:
+        s_log(LOG_NOTICE, "%-22s = peer certificate host name pattern",
+            "checkHost");
+        break;
+    }
+
+    /* checkIP */
+    switch(cmd) {
+    case CMD_BEGIN:
+        section->check_ip=NULL;
+        break;
+    case CMD_EXEC:
+        if(strcasecmp(opt, "checkIP"))
+            break;
+        name_list_append(&section->check_ip, arg);
+        return NULL; /* OK */
+    case CMD_END:
+        if(section->check_ip && section->verify_level<1)
+            return "\"verify\" has to be enabled";
+        break;
+    case CMD_FREE:
+        break;
+    case CMD_DEFAULT:
+        break;
+    case CMD_HELP:
+        s_log(LOG_NOTICE, "%-22s = peer certificate IP address",
+            "checkIP");
+        break;
+    }
+
+#endif /* OPENSSL_VERSION_NUMBER>=0x10002000L */
+
     /* ciphers */
     switch(cmd) {
     case CMD_BEGIN:
@@ -1221,15 +1298,13 @@ static char *parse_service_option(CMD cmd, SERVICE_OPTIONS *section,
     /* OCSP */
     switch(cmd) {
     case CMD_BEGIN:
-        section->option.ocsp=0;
-        memset(&section->ocsp_addr, 0, sizeof(SOCKADDR_UNION));
-        section->ocsp_addr.in.sin_family=AF_INET;
+        section->ocsp_url=NULL;
         break;
     case CMD_EXEC:
         if(strcasecmp(opt, "ocsp"))
             break;
-        section->option.ocsp=1;
-        return parse_ocsp_url(section, arg);
+        section->ocsp_url=str_dup(arg);
+        return NULL; /* OK */
     case CMD_END:
         break;
     case CMD_FREE:
@@ -1241,6 +1316,34 @@ static char *parse_service_option(CMD cmd, SERVICE_OPTIONS *section,
         break;
     }
 
+    /* OCSPaia */
+    switch(cmd) {
+    case CMD_BEGIN:
+        section->option.aia=0; /* disable AIA by default */
+        break;
+    case CMD_EXEC:
+        if(strcasecmp(opt, "OCSPaia"))
+            break;
+        if(!strcasecmp(arg, "yes"))
+            section->option.aia=1;
+        else if(!strcasecmp(arg, "no"))
+            section->option.aia=0;
+        else
+            return "The argument needs to be either 'yes' or 'no'";
+        return NULL; /* OK */
+    case CMD_END:
+        break;
+    case CMD_FREE:
+        break;
+    case CMD_DEFAULT:
+        break;
+    case CMD_HELP:
+        s_log(LOG_NOTICE,
+            "%-22s = yes|no check the AIA responders from certificates",
+            "OCSPaia");
+        break;
+    }
+
     /* OCSPflag */
     switch(cmd) {
     case CMD_BEGIN:
@@ -1265,6 +1368,34 @@ static char *parse_service_option(CMD cmd, SERVICE_OPTIONS *section,
         break;
     }
 
+    /* OCSPnonce */
+    switch(cmd) {
+    case CMD_BEGIN:
+        section->option.nonce=0; /* disable OCSP nonce by default */
+        break;
+    case CMD_EXEC:
+        if(strcasecmp(opt, "OCSPnonce"))
+            break;
+        if(!strcasecmp(arg, "yes"))
+            section->option.nonce=1;
+        else if(!strcasecmp(arg, "no"))
+            section->option.nonce=0;
+        else
+            return "The argument needs to be either 'yes' or 'no'";
+        return NULL; /* OK */
+    case CMD_END:
+        break;
+    case CMD_FREE:
+        break;
+    case CMD_DEFAULT:
+        break;
+    case CMD_HELP:
+        s_log(LOG_NOTICE,
+            "%-22s = yes|no send and verify the OCSP nonce extension",
+            "OCSPnonce");
+        break;
+    }
+
 #endif /* HAVE_OSSL_OCSP_H */
 
     /* options */
@@ -2559,27 +2690,6 @@ static int parse_socket_option(char *arg) {
 
 #ifdef HAVE_OSSL_OCSP_H
 
-static char *parse_ocsp_url(SERVICE_OPTIONS *section, char *arg) {
-    char *host, *port, *path;
-    int ssl;
-
-    if(!OCSP_parse_url(arg, &host, &port, &path, &ssl))
-        return "Failed to parse OCSP URL";
-    if(ssl)
-        return "SSL not supported for OCSP"
-            " - additional stunnel service needs to be defined";
-    if(!hostport2addr(&section->ocsp_addr, host, port))
-        return "Failed to resolve OCSP server address";
-    section->ocsp_path=str_dup(path);
-    if(host)
-        OPENSSL_free(host);
-    if(port)
-        OPENSSL_free(port);
-    if(path)
-        OPENSSL_free(path);
-    return NULL; /* OK! */
-}
-
 static unsigned long parse_ocsp_flag(char *arg) {
     struct {
         char *name;
@@ -2725,6 +2835,14 @@ static void print_syntax(void) {
 
 /**************************************** various supporting functions */
 
+static void name_list_append(NAME_LIST **ptr, char *name) {
+    while(*ptr) /* find the null pointer */
+        ptr=&(*ptr)->next;
+    *ptr=str_alloc(sizeof(NAME_LIST));
+    (*ptr)->name=str_dup(name);
+    (*ptr)->next=NULL;
+}
+
 #ifndef USE_WIN32
 
 static char **argalloc(char *str) { /* allocate 'exec' argumets */
diff --git a/src/prototypes.h b/src/prototypes.h
index 0b02b54..cecc2f7 100644
--- a/src/prototypes.h
+++ b/src/prototypes.h
@@ -142,10 +142,12 @@ typedef struct service_options_struct {
     int verify_level;
     X509_STORE *revocation_store;             /* cert store for CRL checking */
 #ifdef HAVE_OSSL_OCSP_H
-    SOCKADDR_UNION ocsp_addr;
-    char *ocsp_path;
+    char *ocsp_url;
     unsigned long ocsp_flags;
 #endif
+#if OPENSSL_VERSION_NUMBER>=0x10002000L
+    NAME_LIST *check_host, *check_email, *check_ip;   /* cert subject checks */
+#endif /* OPENSSL_VERSION_NUMBER>=0x10002000L */
 
         /* service-specific data for ctx.c */
     char *cipher_list;
@@ -221,7 +223,8 @@ typedef struct service_options_struct {
         unsigned int transparent_dst:1; /* endpoint: transparent destination */
 #endif
 #ifdef HAVE_OSSL_OCSP_H
-        unsigned int ocsp:1;
+        unsigned aia:1;                 /* Authority Information Access */
+        unsigned nonce:1;               /* send and verify OCSP nonce */
 #endif
         unsigned int reset:1;           /* reset sockets on error */
         unsigned int renegotiation:1;
diff --git a/src/verify.c b/src/verify.c
index c3c7c2a..7ddae8e 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -47,10 +47,15 @@ static int add_dir_lookup(X509_STORE *, char *);
 /* verify callback */
 static int verify_callback(int, X509_STORE_CTX *);
 static int cert_check(CLI *c, X509_STORE_CTX *, int);
+#if OPENSSL_VERSION_NUMBER>=0x10002000L
+static int cert_check_subject(CLI *, X509_STORE_CTX *);
+#endif /* OPENSSL_VERSION_NUMBER>=0x10002000L */
 static int crl_check(CLI *c, X509_STORE_CTX *);
 #ifdef HAVE_OSSL_OCSP_H
 static int ocsp_check(CLI *c, X509_STORE_CTX *);
-static OCSP_RESPONSE *ocsp_get_response(CLI *, OCSP_REQUEST *);
+static OCSP_RESPONSE *ocsp_get_response(CLI *, OCSP_REQUEST *, char *);
+static int ocsp_request(CLI *, X509_STORE_CTX *, OCSP_CERTID *, char *);
+static X509 *get_current_issuer(X509_STORE_CTX *);
 #endif
 
 /* utility functions */
@@ -190,7 +195,8 @@ static int verify_callback(int preverify_ok, X509_STORE_CTX *callback_ctx) {
         return 0; /* reject connection */
     }
 #ifdef HAVE_OSSL_OCSP_H
-    if(c->opt->option.ocsp && !ocsp_check(c, callback_ctx)) {
+    if((c->opt->ocsp_url || c->opt->option.aia) &&
+            !ocsp_check(c, callback_ctx)) {
         s_log(LOG_WARNING, "OCSP check failed: depth=%d, %s",
             depth, subject_name);
         OPENSSL_free(subject_name);
@@ -211,28 +217,40 @@ static int cert_check(CLI *c, X509_STORE_CTX *callback_ctx, int preverify_ok) {
 #if OPENSSL_VERSION_NUMBER>=0x0090700fL
     ASN1_BIT_STRING *local_key, *peer_key;
 #endif
-    X509 *cert;
-    int depth;
+    int err, depth;
 
     if(c->opt->verify_level<1) {
         s_log(LOG_INFO, "CERT: Verification not enabled");
         return 1; /* accept connection */
     }
-    cert=X509_STORE_CTX_get_current_cert(callback_ctx);
+    err=X509_STORE_CTX_get_error(callback_ctx);
     depth=X509_STORE_CTX_get_error_depth(callback_ctx);
-    if(!preverify_ok) {
-        /* remote site specified a certificate, but it's not correct */
-        if(c->opt->verify_level>=4 && depth>0) {
-            s_log(LOG_INFO, "CERT: Invalid CA certificate ignored");
-            return 1; /* accept connection */
-        } else {
-            s_log(LOG_WARNING, "CERT: Verification error: %s",
-                X509_verify_cert_error_string(
-                    X509_STORE_CTX_get_error(callback_ctx)));
-            return 0; /* reject connection */
+    if(preverify_ok) {
+        s_log(LOG_DEBUG, "CERT: Pre-verification succeeded");
+    } else { /* remote site sent an invalid certificate */
+        if(c->opt->verify_level<4 || (depth==0 &&
+                err!=X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY &&
+                err!=X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE &&
+                err!=X509_V_ERR_CERT_UNTRUSTED)) {
+            s_log(LOG_WARNING, "CERT: Pre-verification error: %s",
+                X509_verify_cert_error_string(err));
+            /* retain the STORE_CTX error produced by pre-verification */
+            return 0; /* reject */
         }
+        s_log(LOG_INFO, "CERT: Pre-verification error ignored: %s",
+            X509_verify_cert_error_string(err));
     }
-    if(c->opt->verify_level>=3 && depth==0) {
+
+    if(depth!=0) /* we only check peer certificates beyond this point */
+        return 1; /* accept connection */
+
+#if OPENSSL_VERSION_NUMBER>=0x10002000L
+    if(c->opt->verify_level>=2 && !cert_check_subject(c, callback_ctx))
+        return 0; /* reject */
+#endif /* OPENSSL_VERSION_NUMBER>=0x10002000L */
+
+    if(c->opt->verify_level>=3) {
+        X509 *cert=X509_STORE_CTX_get_current_cert(callback_ctx);
         if(X509_STORE_get_by_subject(callback_ctx, X509_LU_X509,
                 X509_get_subject_name(cert), &obj)!=1) {
             s_log(LOG_WARNING,
@@ -253,6 +271,51 @@ static int cert_check(CLI *c, X509_STORE_CTX *callback_ctx, int preverify_ok) {
     return 1; /* accept connection */
 }
 
+#if OPENSSL_VERSION_NUMBER>=0x10002000L
+static int cert_check_subject(CLI *c, X509_STORE_CTX *callback_ctx) {
+    X509 *cert=X509_STORE_CTX_get_current_cert(callback_ctx);
+    NAME_LIST *ptr;
+    char *peername=NULL;
+
+    if(c->opt->check_host) {
+        for(ptr=c->opt->check_host; ptr; ptr=ptr->next)
+            if(X509_check_host(cert, ptr->name, 0, 0, &peername)>0)
+                break;
+        if(!ptr) {
+            s_log(LOG_WARNING, "CERT: No matching host name found");
+            return 0; /* reject */
+        }
+        s_log(LOG_INFO, "CERT: Host name \"%s\" matched with \"%s\"",
+            ptr->name, peername);
+        OPENSSL_free(peername);
+    }
+
+    if(c->opt->check_email) {
+        for(ptr=c->opt->check_email; ptr; ptr=ptr->next)
+            if(X509_check_email(cert, ptr->name, 0, 0)>0)
+                break;
+        if(!ptr) {
+            s_log(LOG_WARNING, "CERT: No matching email address found");
+            return 0; /* reject */
+        }
+        s_log(LOG_INFO, "CERT: Email address \"%s\" matched", ptr->name);
+    }
+
+    if(c->opt->check_ip) {
+        for(ptr=c->opt->check_ip; ptr; ptr=ptr->next)
+            if(X509_check_ip_asc(cert, ptr->name, 0)>0)
+                break;
+        if(!ptr) {
+            s_log(LOG_WARNING, "CERT: No matching IP address found");
+            return 0; /* reject */
+        }
+        s_log(LOG_INFO, "CERT: IP address \"%s\" matched", ptr->name);
+    }
+
+    return 1; /* accept */
+}
+#endif /* OPENSSL_VERSION_NUMBER>=0x10002000L */
+
 /**************************************** CRL checking */
 
 /* based on BSD-style licensed code of mod_ssl */
@@ -353,32 +416,96 @@ static int crl_check(CLI *c, X509_STORE_CTX *callback_ctx) {
 
 #ifdef HAVE_OSSL_OCSP_H
 
-/**************************************** OCSP checking */
-/* TODO: check OCSP server specified in the certificate */
+#ifdef DEFINE_STACK_OF
+/* defined in openssl/safestack.h:
+ * DEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char) */
+#else /* DEFINE_STACK_OF */
+#ifndef sk_OPENSSL_STRING_num
+#define sk_OPENSSL_STRING_num(st) sk_num(st)
+#endif /* sk_OPENSSL_STRING_num */
+#ifndef sk_OPENSSL_STRING_value
+#define sk_OPENSSL_STRING_value(st, i) sk_value((st),(i))
+#endif /* sk_OPENSSL_STRING_value */
+#endif /* DEFINE_STACK_OF */
 
 static int ocsp_check(CLI *c, X509_STORE_CTX *callback_ctx) {
-    int error, retval=0;
     X509 *cert;
-    X509 *issuer=NULL;
-    OCSP_CERTID *certID;
+    OCSP_CERTID *cert_id;
+    STACK_OF(OPENSSL_STRING) *aia;
+    int i, ocsp_status=V_OCSP_CERTSTATUS_UNKNOWN, saved_error;
+    char *url;
+
+    /* the original error code is restored unless we report our own error */
+    saved_error=X509_STORE_CTX_get_error(callback_ctx);
+
+    /* get the current certificate ID */
+    cert=X509_STORE_CTX_get_current_cert(callback_ctx);
+    if(!cert) {
+        s_log(LOG_ERR, "OCSP: Failed to get the current certificate");
+        X509_STORE_CTX_set_error(callback_ctx,
+            X509_V_ERR_APPLICATION_VERIFICATION);
+        return 0; /* reject */
+    }
+    if(!X509_NAME_cmp(X509_get_subject_name(cert),
+            X509_get_issuer_name(cert))) {
+        s_log(LOG_DEBUG, "OCSP: Ignoring root certificate");
+        return 1; /* accept */
+    }
+    cert_id=OCSP_cert_to_id(NULL, cert, get_current_issuer(callback_ctx));
+    if(!cert_id) {
+        sslerror("OCSP: OCSP_cert_to_id");
+        X509_STORE_CTX_set_error(callback_ctx,
+            X509_V_ERR_APPLICATION_VERIFICATION);
+        return 0; /* reject */
+    }
+
+    /* use the responder specified in the configuration file */
+    if(c->opt->ocsp_url) {
+        s_log(LOG_NOTICE, "OCSP: Connecting the configured responder \"%s\"",
+            c->opt->ocsp_url);
+        if(ocsp_request(c, callback_ctx, cert_id, c->opt->ocsp_url)!=
+                V_OCSP_CERTSTATUS_GOOD) {
+            OCSP_CERTID_free(cert_id);
+            return 0; /* reject */
+        }
+    }
+
+    /* use the responder from AIA (Authority Information Access) */
+    if(c->opt->option.aia && (aia=X509_get1_ocsp(cert))) {
+        for(i=0; i<sk_OPENSSL_STRING_num(aia); i++) {
+            url=sk_OPENSSL_STRING_value(aia, i);
+            s_log(LOG_NOTICE, "OCSP: Connecting the AIA responder \"%s\"", url);
+            ocsp_status=ocsp_request(c, callback_ctx, cert_id, url);
+            if(ocsp_status!=V_OCSP_CERTSTATUS_UNKNOWN)
+                break; /* we received a definitive response */
+        }
+        X509_email_free(aia);
+        if(ocsp_status!=V_OCSP_CERTSTATUS_GOOD) {
+            OCSP_CERTID_free(cert_id);
+            return 0; /* reject */
+        }
+    }
+
+    OCSP_CERTID_free(cert_id);
+    X509_STORE_CTX_set_error(callback_ctx, saved_error);
+    return 1; /* accept */
+}
+
+/* returns one of:
+ * V_OCSP_CERTSTATUS_GOOD
+ * V_OCSP_CERTSTATUS_REVOKED
+ * V_OCSP_CERTSTATUS_UNKNOWN */
+static int ocsp_request(CLI *c, X509_STORE_CTX *callback_ctx,
+        OCSP_CERTID *cert_id, char *url) {
+    int ocsp_status=V_OCSP_CERTSTATUS_UNKNOWN;
+    int response_status;
+    int reason;
+    int ctx_err=X509_V_ERR_APPLICATION_VERIFICATION;
     OCSP_REQUEST *request=NULL;
     OCSP_RESPONSE *response=NULL;
-    OCSP_BASICRESP *basicResponse=NULL;
+    OCSP_BASICRESP *basic_response=NULL;
     ASN1_GENERALIZEDTIME *revoked_at=NULL,
         *this_update=NULL, *next_update=NULL;
-    int status, reason;
-
-    /* get current certificate ID */
-    cert=X509_STORE_CTX_get_current_cert(callback_ctx); /* get current cert */
-    if(X509_STORE_CTX_get1_issuer(&issuer, callback_ctx, cert)!=1) {
-        sslerror("OCSP: X509_STORE_CTX_get1_issuer");
-        goto cleanup;
-    }
-    certID=OCSP_cert_to_id(0, cert, issuer);
-    if(!certID) {
-        sslerror("OCSP: OCSP_cert_to_id");
-        goto cleanup;
-    }
 
     /* build request */
     request=OCSP_REQUEST_new();
@@ -386,113 +513,167 @@ static int ocsp_check(CLI *c, X509_STORE_CTX *callback_ctx) {
         sslerror("OCSP: OCSP_REQUEST_new");
         goto cleanup;
     }
-    if(!OCSP_request_add0_id(request, certID)) {
+    if(!OCSP_request_add0_id(request, OCSP_CERTID_dup(cert_id))) {
         sslerror("OCSP: OCSP_request_add0_id");
         goto cleanup;
     }
-    OCSP_request_add1_nonce(request, 0, -1);
+    if(c->opt->option.nonce)
+        OCSP_request_add1_nonce(request, NULL, -1);
 
     /* send the request and get a response */
-    response=ocsp_get_response(c, request);
+    response=ocsp_get_response(c, request, url);
     if(!response)
         goto cleanup;
-    error=OCSP_response_status(response);
-    if(error!=OCSP_RESPONSE_STATUS_SUCCESSFUL) {
-        s_log(LOG_WARNING, "OCSP: Responder error: %d: %s",
-            error, OCSP_response_status_str(error));
+    response_status=OCSP_response_status(response);
+    if(response_status!=OCSP_RESPONSE_STATUS_SUCCESSFUL) {
+        s_log(LOG_ERR, "OCSP: Responder error: %d: %s",
+            response_status, OCSP_response_status_str(response_status));
         goto cleanup;
     }
-    s_log(LOG_DEBUG, "OCSP: Response received");
 
     /* verify the response */
-    basicResponse=OCSP_response_get1_basic(response);
-    if(!basicResponse) {
+    basic_response=OCSP_response_get1_basic(response);
+    if(!basic_response) {
         sslerror("OCSP: OCSP_response_get1_basic");
         goto cleanup;
     }
-    if(OCSP_check_nonce(request, basicResponse)<=0) {
-        sslerror("OCSP: OCSP_check_nonce");
+    if(c->opt->option.nonce && OCSP_check_nonce(request, basic_response)<=0) {
+        s_log(LOG_ERR, "OCSP: Invalid or unsupported nonce");
         goto cleanup;
     }
-    if(OCSP_basic_verify(basicResponse, NULL,
-            c->opt->revocation_store, c->opt->ocsp_flags)<=0) {
+    if(OCSP_basic_verify(basic_response,
+            X509_STORE_CTX_get_chain(callback_ctx),
+            SSL_CTX_get_cert_store(c->opt->ctx), c->opt->ocsp_flags)<=0) {
         sslerror("OCSP: OCSP_basic_verify");
         goto cleanup;
     }
-    if(!OCSP_resp_find_status(basicResponse, certID, &status, &reason,
+    if(!OCSP_resp_find_status(basic_response, cert_id, &ocsp_status, &reason,
             &revoked_at, &this_update, &next_update)) {
         sslerror("OCSP: OCSP_resp_find_status");
         goto cleanup;
     }
-    s_log(LOG_NOTICE, "OCSP: Status: %d: %s",
-        status, OCSP_cert_status_str(status));
+    s_log(LOG_INFO, "OCSP: Status: %s", OCSP_cert_status_str(ocsp_status));
     log_time(LOG_INFO, "OCSP: This update", this_update);
     log_time(LOG_INFO, "OCSP: Next update", next_update);
     /* check if the response is valid for at least one minute */
     if(!OCSP_check_validity(this_update, next_update, 60, -1)) {
         sslerror("OCSP: OCSP_check_validity");
+        ocsp_status=V_OCSP_CERTSTATUS_UNKNOWN;
         goto cleanup;
     }
-    if(status==V_OCSP_CERTSTATUS_REVOKED) {
+    switch(ocsp_status) {
+    case V_OCSP_CERTSTATUS_GOOD:
+        s_log(LOG_NOTICE, "OCSP: Certificate accepted");
+        break;
+    case V_OCSP_CERTSTATUS_REVOKED:
         if(reason==-1)
-            s_log(LOG_WARNING, "OCSP: Certificate revoked");
+            s_log(LOG_ERR, "OCSP: Certificate revoked");
         else
-            s_log(LOG_WARNING, "OCSP: Certificate revoked: %d: %s",
+            s_log(LOG_ERR, "OCSP: Certificate revoked: %d: %s",
                 reason, OCSP_crl_reason_str(reason));
         log_time(LOG_NOTICE, "OCSP: Revoked at", revoked_at);
-        goto cleanup;
+        ctx_err=X509_V_ERR_CERT_REVOKED;
+        break;
+    case V_OCSP_CERTSTATUS_UNKNOWN:
+        s_log(LOG_WARNING, "OCSP: Unknown verification status");
     }
-    retval=1; /* accept connection */
 cleanup:
-    if(issuer)
-        X509_free(issuer);
     if(request)
         OCSP_REQUEST_free(request);
     if(response)
         OCSP_RESPONSE_free(response);
-    if(basicResponse)
-        OCSP_BASICRESP_free(basicResponse);
-    return retval;
+    if(basic_response)
+        OCSP_BASICRESP_free(basic_response);
+    if(ocsp_status!=V_OCSP_CERTSTATUS_GOOD)
+        X509_STORE_CTX_set_error(callback_ctx, ctx_err);
+    return ocsp_status;
 }
 
-static OCSP_RESPONSE *ocsp_get_response(CLI *c, OCSP_REQUEST *req) {
+static OCSP_RESPONSE *ocsp_get_response(CLI *c,
+        OCSP_REQUEST *req, char *url) {
     BIO *bio=NULL;
     OCSP_REQ_CTX *req_ctx=NULL;
     OCSP_RESPONSE *resp=NULL;
-    int err;
+    char *host=NULL, *port=NULL, *path=NULL;
+    SOCKADDR_UNION addr;
+    int ssl;
+
+    /* parse the OCSP URL */
+    if(!OCSP_parse_url(url, &host, &port, &path, &ssl)) {
+        s_log(LOG_ERR, "OCSP: Failed to parse the OCSP URL");
+        goto cleanup;
+    }
+    if(ssl) {
+        s_log(LOG_ERR, "OCSP: TLS not supported for OCSP"
+            " - an additional stunnel service needs to be defined");
+        goto cleanup;
+    }
+    if(!hostport2addr(&addr, host, port)) {
+        s_log(LOG_ERR, "OCSP: Failed to resolve the OCSP responder address");
+        goto cleanup;
+    }
 
-    /* connect specified OCSP server (responder) */
-    c->fd=s_socket(c->opt->ocsp_addr.sa.sa_family, SOCK_STREAM, 0,
-        1, "OCSP: socket (auth_user)");
+    /* connect specified OCSP responder */
+    c->fd=s_socket(addr.sa.sa_family, SOCK_STREAM, 0, 1, "OCSP: socket");
     if(c->fd<0)
         goto cleanup;
-    if(connect_blocking(c, &c->opt->ocsp_addr, addr_len(&c->opt->ocsp_addr)))
+    if(connect_blocking(c, &addr, addr_len(&addr)))
         goto cleanup;
-    bio=BIO_new_fd(c->fd, BIO_NOCLOSE);
-    if(!bio)
+    bio=BIO_new_socket((int)c->fd, BIO_NOCLOSE);
+    if(!bio) {
+        sslerror("OCSP: BIO_new_socket");
         goto cleanup;
-    s_log(LOG_DEBUG, "OCSP: server connected");
+    }
+    s_log(LOG_DEBUG, "OCSP: Connected %s:%s", host, port);
 
-    /* OCSP protocol communication loop */
-    req_ctx=OCSP_sendreq_new(bio, c->opt->ocsp_path, req, -1);
+    /* initialize an HTTP request with the POST method */
+#if OPENSSL_VERSION_NUMBER>=0x10000000L
+    req_ctx=OCSP_sendreq_new(bio, path, NULL, -1);
+#else
+    /* there is no way to send the Host header with older OpenSSL versions */
+    req_ctx=OCSP_sendreq_new(bio, path, req, -1);
+#endif
     if(!req_ctx) {
         sslerror("OCSP: OCSP_sendreq_new");
         goto cleanup;
     }
+#if OPENSSL_VERSION_NUMBER>=0x10000000L
+    /* add the HTTP headers */
+    if(!OCSP_REQ_CTX_add1_header(req_ctx, "Host", host)) {
+        sslerror("OCSP: OCSP_REQ_CTX_add1_header");
+        goto cleanup;
+    }
+    if(!OCSP_REQ_CTX_add1_header(req_ctx, "User-Agent", "stunnel")) {
+        sslerror("OCSP: OCSP_REQ_CTX_add1_header");
+        goto cleanup;
+    }
+    /* add the remaining HTTP headers and the OCSP request body */
+    if(!OCSP_REQ_CTX_set1_req(req_ctx, req)) {
+        sslerror("OCSP: OCSP_REQ_CTX_set1_req");
+        goto cleanup;
+    }
+#endif
+
+    /* OCSP protocol communication loop */
     while(OCSP_sendreq_nbio(&resp, req_ctx)==-1) {
         s_poll_init(c->fds);
         s_poll_add(c->fds, c->fd, BIO_should_read(bio), BIO_should_write(bio));
-        err=s_poll_wait(c->fds, c->opt->timeout_busy, 0);
-        if(err==-1)
+        switch(s_poll_wait(c->fds, c->opt->timeout_busy, 0)) {
+        case -1:
             sockerror("OCSP: s_poll_wait");
-        if(err==0)
+            goto cleanup;
+        case 0:
             s_log(LOG_INFO, "OCSP: s_poll_wait: TIMEOUTbusy exceeded");
-        if(err<=0)
             goto cleanup;
+        }
     }
-    /* s_log(LOG_DEBUG, "OCSP: context state: 0x%x", *(int *)req_ctx); */
+#if 0
+    s_log(LOG_DEBUG, "OCSP: context state: 0x%x", *(int *)req_ctx);
+#endif
     /* http://www.mail-archive.com/openssl-users@openssl.org/msg61691.html */
-    if(!resp) {
+    if(resp) {
+        s_log(LOG_DEBUG, "OCSP: Response received");
+    } else {
         if(ERR_peek_error())
             sslerror("OCSP: OCSP_sendreq_nbio");
         else /* OpenSSL error: OCSP_sendreq_nbio does not use OCSPerr */
@@ -508,9 +689,27 @@ cleanup:
         closesocket(c->fd);
         c->fd=-1; /* avoid double close on cleanup */
     }
+    if(host)
+        OPENSSL_free(host);
+    if(port)
+        OPENSSL_free(port);
+    if(path)
+        OPENSSL_free(path);
     return resp;
 }
 
+/* find the issuer certificate without lookups */
+static X509 *get_current_issuer(X509_STORE_CTX *callback_ctx) {
+    STACK_OF(X509) *chain;
+    int depth;
+
+    chain=X509_STORE_CTX_get_chain(callback_ctx);
+    depth=X509_STORE_CTX_get_error_depth(callback_ctx);
+    if(depth<sk_X509_num(chain)-1) /* not the root CA cert */
+        ++depth; /* index of the issuer cert */
+    return sk_X509_value(chain, depth);
+}
+
 #endif /* HAVE_OSSL_OCSP_H */
 
 static void log_time(const int level, const char *txt, ASN1_TIME *t) {
@@ -525,7 +724,7 @@ static void log_time(const int level, const char *txt, ASN1_TIME *t) {
         return;
     ASN1_TIME_print(bio, t);
     n=BIO_pending(bio);
-    cp=str_alloc(n+1);
+    cp=str_alloc((size_t)n+1);
     n=BIO_read(bio, cp, n);
     if(n<0) {
         BIO_free(bio);
