{
    "content": [
        {
            "type": "text",
            "text": "# stunnel3 (man)\n\n## NAME\n\nstunnel - universal SSL tunnel\n\n## SYNOPSIS\n\nstunnel [-c ⎪ -T] [-D [facility.]level] [-O a⎪l⎪r:option=value[:value]] [-o file] [-C ci‐\npherlist] [-p pemfile] [-v level] [-A certfile] [-S sources] [-a directory] [-t timeout]\n[-u identusername] [-s setuiduser] [-g setgidgroup] [-n protocol] [-P { filename ⎪ '' } ]\n[-B bytes] [-R randfile] [-W] [-E socket] [-I host] [-d [host:]port [-f] ]\n[ -r [host:]port ⎪ { -l ⎪ -L } program [-- progname args] ]\n\n## DESCRIPTION\n\nThe stunnel program is designed to work as SSL encryption wrapper between remote clients and\nlocal (inetd-startable) or remote servers. The concept is that having non-SSL aware daemons\nrunning on your system you can easily set them up to communicate with clients over secure SSL\nchannels.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (28 subsections)\n- **EXAMPLES**\n- **ENVIRONMENT**\n- **CERTIFICATES**\n- **RANDOMNESS**\n- **LIMITATIONS**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "stunnel3",
        "section": "",
        "mode": "man",
        "summary": "stunnel - universal SSL tunnel",
        "synopsis": "stunnel [-c ⎪ -T] [-D [facility.]level] [-O a⎪l⎪r:option=value[:value]] [-o file] [-C ci‐\npherlist] [-p pemfile] [-v level] [-A certfile] [-S sources] [-a directory] [-t timeout]\n[-u identusername] [-s setuiduser] [-g setgidgroup] [-n protocol] [-P { filename ⎪ '' } ]\n[-B bytes] [-R randfile] [-W] [-E socket] [-I host] [-d [host:]port [-f] ]\n[ -r [host:]port ⎪ { -l ⎪ -L } program [-- progname args] ]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-D",
                "long": null,
                "arg": null,
                "description": "Debugging level 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 -D debug or -D 7 for greatest debugging output. The default is notice (5). The syslog facility 'daemon' will be used unless a facility name is supplied. (Facili‐ ties are not supported on windows.) Case is ignored for both facilities and levels."
            },
            {
                "flag": "-O",
                "long": null,
                "arg": null,
                "description": "Set an option on accept/local/remote socket The values for linger option are lonof:llinger. The values for time are tvsec:tvusec. Examples: -O l:SOLINGER=1:60 - set one minute timeout for closing local socket -O r:TCPNODELAY=1 - turn off the Nagle algorithm for remote sockets -O r:SOOOBINLINE=1 - place out-of-band data directly into the receive data stream for remote sockets -O a:SOREUSEADDR=0 - disable address reuse (enabled by default) -O a:SOBINDTODEVICE=lo - only accept connections on loopback interface The available options and their defaults are: Option Accept Local Remote OS default SODEBUG -- -- -- 0 SODONTROUTE -- -- -- 0 SOKEEPALIVE -- -- -- 0 SOLINGER -- -- -- 0:0 SOOOBINLINE -- -- -- 0 SORCVBUF -- -- -- 87380 SOSNDBUF -- -- -- 16384 SORCVLOWAT -- -- -- 1 SOSNDLOWAT -- -- -- 1 SORCVTIMEO -- -- -- 0:0 SOSNDTIMEO -- -- -- 0:0 SOREUSEADDR 1 -- -- 0 SOBINDTODEVICE -- -- -- -- IPTOS -- -- -- 0 IPTTL -- -- -- 64 TCPNODELAY -- -- -- 0"
            },
            {
                "flag": "-o",
                "long": null,
                "arg": null,
                "description": "Append log messages to a file."
            },
            {
                "flag": "-C",
                "long": null,
                "arg": null,
                "description": "Select permitted SSL ciphers A colon delimited list of the ciphers to allow in the SSL connection. For example DES-CBC3-SHA:IDEA-CBC-MD5"
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "default: server mode"
            },
            {
                "flag": "-T",
                "long": null,
                "arg": null,
                "description": "Re-write address to appear as if wrapped daemon is connecting from the SSL client machine instead of the machine running stunnel. Available only on some operating systems (Linux only, we believe) and then only in server mode. Note that this option will not combine with proxy mode (-r) unless the client's default route to the target machine lies through the host running stunnel, which cannot be localhost."
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "private key and certificate chain PEM file name A PEM is always needed in server mode (by default located in /etc/stunnel/stunnel.pem). Specifying this flag in client mode will use this key and 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)."
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": "verify peer certificate • level 1 - verify peer certificate if present • level 2 - verify peer certificate • level 3 - verify peer with locally installed certificate • default - no verify"
            },
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": "client certificate directory This is the directory in which stunnel will look for certificates when using the -v op‐ tions. Note that the certificates in this directory should be named XXXXXXXX.0 where XXXXXXXX is the hash value of the cert."
            },
            {
                "flag": "-A",
                "long": null,
                "arg": null,
                "description": "Certificate Authority file This file contains multiple CA certificates, used with the -v options."
            },
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": "session cache timeout default: 300 seconds."
            },
            {
                "flag": "-N",
                "long": null,
                "arg": null,
                "description": "Service name to use for tcpwrappers. If not specified then a tcpwrapper service name will be generated automatically for you. This will also be used when auto-generating pid file‐ names."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "Use IDENT (RFC 1413) username checking"
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": "Negotiate SSL with specified protocol currently supported: smtp, pop3, nntp"
            },
            {
                "flag": "-E",
                "long": null,
                "arg": null,
                "description": "Entropy Gathering Daemon socket to use to feed OpenSSL random number generator. (Avail‐ able only if compiled with OpenSSL 0.9.5a or higher)"
            },
            {
                "flag": "-R",
                "long": null,
                "arg": null,
                "description": "File containing random input. The SSL library will use data from this file first to seed the random number generator."
            },
            {
                "flag": "-W",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-B",
                "long": null,
                "arg": null,
                "description": "Number of bytes of data read from random seed files. With SSL versions less than 0.9.5a, also determines how many bytes of data are considered sufficient to seed the PRNG. More recent OpenSSL versions have a builtin function to determine when sufficient randomness is available."
            },
            {
                "flag": "-I",
                "long": null,
                "arg": null,
                "description": "IP of the outgoing interface is used as source for remote connections. Use this option to bind a static local IP address, instead."
            },
            {
                "flag": "-d",
                "long": null,
                "arg": null,
                "description": "daemon mode Listen for connections on [host:]port. If no host specified, defaults to all IP addresses for the local host. default: inetd mode"
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "Stay in foreground (don't fork) and log to stderr instead of via syslog (unless -o is specified). default: background in daemon mode"
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": "execute local inetd-type program."
            },
            {
                "flag": "-L",
                "long": null,
                "arg": null,
                "description": "open local pty and execute program."
            },
            {
                "flag": "-s",
                "long": null,
                "arg": null,
                "description": "setuid() to username in daemon mode"
            },
            {
                "flag": "-g",
                "long": null,
                "arg": null,
                "description": "setgid() to groupname in daemon mode. Clears all other groups."
            },
            {
                "flag": "-P",
                "long": null,
                "arg": null,
                "description": "Pid file location If the argument is a filename, then that filename will be used for the pid. If the argu‐ ment is empty ('', not missing), then no pid file will be created."
            },
            {
                "flag": "-r",
                "long": null,
                "arg": null,
                "description": "connect to remote service If no host specified, defaults to localhost."
            }
        ],
        "examples": [
            "In order to provide SSL encapsulation to your local imapd service, use",
            "stunnel -d 993 -l /usr/sbin/imapd -- imapd",
            "In order to let your local e-mail client connect to a SSL-enabled imapd service on another",
            "server, configure the e-mail client to connect to localhost on port 119 and use:",
            "stunnel -c -d 143 -r servername:993",
            "If you want to provide tunneling to your pppd daemon on port 2020, use something like",
            "stunnel -d 2020 -L /usr/sbin/pppd -- pppd local"
        ],
        "see_also": [
            {
                "name": "tcpd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tcpd/8/json"
            },
            {
                "name": "inetd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/inetd/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-h",
                        "lines": 1,
                        "flag": "-h"
                    },
                    {
                        "name": "-D",
                        "lines": 12,
                        "flag": "-D"
                    },
                    {
                        "name": "-O",
                        "lines": 36,
                        "flag": "-O"
                    },
                    {
                        "name": "-o",
                        "lines": 2,
                        "flag": "-o"
                    },
                    {
                        "name": "-C",
                        "lines": 5,
                        "flag": "-C"
                    },
                    {
                        "name": "-c",
                        "lines": 2,
                        "flag": "-c"
                    },
                    {
                        "name": "-T",
                        "lines": 6,
                        "flag": "-T"
                    },
                    {
                        "name": "-p",
                        "lines": 8,
                        "flag": "-p"
                    },
                    {
                        "name": "-v",
                        "lines": 10,
                        "flag": "-v"
                    },
                    {
                        "name": "-a",
                        "lines": 6,
                        "flag": "-a"
                    },
                    {
                        "name": "-A",
                        "lines": 4,
                        "flag": "-A"
                    },
                    {
                        "name": "-t",
                        "lines": 4,
                        "flag": "-t"
                    },
                    {
                        "name": "-N",
                        "lines": 4,
                        "flag": "-N"
                    },
                    {
                        "name": "-u",
                        "lines": 2,
                        "flag": "-u"
                    },
                    {
                        "name": "-n",
                        "lines": 4,
                        "flag": "-n"
                    },
                    {
                        "name": "-E",
                        "lines": 3,
                        "flag": "-E"
                    },
                    {
                        "name": "-R",
                        "lines": 3,
                        "flag": "-R"
                    },
                    {
                        "name": "-W",
                        "lines": 1,
                        "flag": "-W"
                    },
                    {
                        "name": "-B",
                        "lines": 5,
                        "flag": "-B"
                    },
                    {
                        "name": "-I",
                        "lines": 3,
                        "flag": "-I"
                    },
                    {
                        "name": "-d",
                        "lines": 7,
                        "flag": "-d"
                    },
                    {
                        "name": "-f",
                        "lines": 5,
                        "flag": "-f"
                    },
                    {
                        "name": "-l",
                        "lines": 2,
                        "flag": "-l"
                    },
                    {
                        "name": "-L",
                        "lines": 2,
                        "flag": "-L"
                    },
                    {
                        "name": "-s",
                        "lines": 2,
                        "flag": "-s"
                    },
                    {
                        "name": "-g",
                        "lines": 2,
                        "flag": "-g"
                    },
                    {
                        "name": "-P",
                        "lines": 5,
                        "flag": "-P"
                    },
                    {
                        "name": "-r",
                        "lines": 4,
                        "flag": "-r"
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "CERTIFICATES",
                "lines": 25,
                "subsections": []
            },
            {
                "name": "RANDOMNESS",
                "lines": 39,
                "subsections": []
            },
            {
                "name": "LIMITATIONS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "stunnel - universal SSL tunnel\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "stunnel [-c ⎪ -T] [-D [facility.]level] [-O a⎪l⎪r:option=value[:value]] [-o file] [-C ci‐\npherlist] [-p pemfile] [-v level] [-A certfile] [-S sources] [-a directory] [-t timeout]\n[-u identusername] [-s setuiduser] [-g setgidgroup] [-n protocol] [-P { filename ⎪ '' } ]\n[-B bytes] [-R randfile] [-W] [-E socket] [-I host] [-d [host:]port [-f] ]\n[ -r [host:]port ⎪ { -l ⎪ -L } program [-- progname args] ]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The stunnel program is designed to work as SSL encryption wrapper between remote clients and\nlocal (inetd-startable) or remote servers. The concept is that having non-SSL aware daemons\nrunning on your system you can easily set them up to communicate with clients over secure SSL\nchannels.\n\nstunnel can be used to add SSL functionality to commonly used inetd daemons like POP-2,\nPOP-3, and IMAP servers, to standalone daemons like NNTP, SMTP and HTTP, and in tunneling PPP\nover network sockets without changes to the source code.\n\nThis product includes cryptographic software written by Eric Young (eay@cryptsoft.com)\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-h",
                        "content": "",
                        "flag": "-h"
                    },
                    {
                        "name": "-D",
                        "content": "Debugging level\n\nLevel is a one of the syslog level names or numbers emerg (0), alert (1), crit (2), err\n(3), warning (4), notice (5), info (6), or debug (7).  All logs for the specified level\nand all levels numerically less than it will be shown.  Use -D debug or -D 7 for greatest\ndebugging output.  The default is notice (5).\n\nThe syslog facility 'daemon' will be used unless a facility name is supplied.  (Facili‐\nties are not supported on windows.)\n\nCase is ignored for both facilities and levels.\n",
                        "flag": "-D"
                    },
                    {
                        "name": "-O",
                        "content": "Set an option on accept/local/remote socket\n\nThe values for linger option are lonof:llinger. The values for time are tvsec:tvusec.\n\nExamples:\n\n-O l:SOLINGER=1:60 - set one minute timeout for closing local socket\n\n-O r:TCPNODELAY=1 - turn off the Nagle algorithm for remote sockets\n\n-O r:SOOOBINLINE=1 - place out-of-band data directly into the receive data stream for\nremote sockets\n\n-O a:SOREUSEADDR=0 - disable address reuse (enabled by default)\n\n-O a:SOBINDTODEVICE=lo - only accept connections on loopback interface\n\nThe available options and their defaults are:\nOption          Accept    Local     Remote    OS default\nSODEBUG            --        --        --             0\nSODONTROUTE        --        --        --             0\nSOKEEPALIVE        --        --        --             0\nSOLINGER           --        --        --    0:0\nSOOOBINLINE        --        --        --             0\nSORCVBUF           --        --        --         87380\nSOSNDBUF           --        --        --         16384\nSORCVLOWAT         --        --        --             1\nSOSNDLOWAT         --        --        --             1\nSORCVTIMEO         --        --        --         0:0\nSOSNDTIMEO         --        --        --         0:0\nSOREUSEADDR             1    --        --             0\nSOBINDTODEVICE     --        --        --        --\nIPTOS              --        --        --             0\nIPTTL              --        --        --            64\nTCPNODELAY         --        --        --             0\n",
                        "flag": "-O"
                    },
                    {
                        "name": "-o",
                        "content": "Append log messages to a file.\n",
                        "flag": "-o"
                    },
                    {
                        "name": "-C",
                        "content": "Select permitted SSL ciphers\n\nA colon delimited list of the ciphers to allow in the SSL connection.  For example\nDES-CBC3-SHA:IDEA-CBC-MD5\n",
                        "flag": "-C"
                    },
                    {
                        "name": "-c",
                        "content": "default: server mode\n",
                        "flag": "-c"
                    },
                    {
                        "name": "-T",
                        "content": "Re-write address to appear as if wrapped daemon is connecting from the SSL client machine\ninstead of the machine running stunnel. Available only on some operating systems (Linux\nonly, we believe) and then only in server mode. Note that this option will not combine\nwith proxy mode (-r) unless the client's default route to the target machine lies through\nthe host running stunnel, which cannot be localhost.\n",
                        "flag": "-T"
                    },
                    {
                        "name": "-p",
                        "content": "private key and certificate chain PEM file name\n\nA PEM is always needed in server mode (by default located in /etc/stunnel/stunnel.pem).\nSpecifying this flag in client mode will use this key and certificate chain as a client\nside certificate chain.  Using client side certs is optional. The certificates must be in\nPEM format and must be sorted starting with the certificate to the highest level (root\nCA).\n",
                        "flag": "-p"
                    },
                    {
                        "name": "-v",
                        "content": "verify peer certificate\n\n•       level 1 - verify peer certificate if present\n\n•       level 2 - verify peer certificate\n\n•       level 3 - verify peer with locally installed certificate\n\n•       default - no verify\n",
                        "flag": "-v"
                    },
                    {
                        "name": "-a",
                        "content": "client certificate directory\n\nThis is the directory in which stunnel will look for certificates when using the -v op‐\ntions. Note that the certificates in this directory should be named XXXXXXXX.0 where\nXXXXXXXX is the hash value of the cert.\n",
                        "flag": "-a"
                    },
                    {
                        "name": "-A",
                        "content": "Certificate Authority file\n\nThis file contains multiple CA certificates, used with the -v options.\n",
                        "flag": "-A"
                    },
                    {
                        "name": "-t",
                        "content": "session cache timeout\n\ndefault: 300 seconds.\n",
                        "flag": "-t"
                    },
                    {
                        "name": "-N",
                        "content": "Service name to use for tcpwrappers. If not specified then a tcpwrapper service name will\nbe generated automatically for you. This will also be used when auto-generating pid file‐\nnames.\n",
                        "flag": "-N"
                    },
                    {
                        "name": "-u",
                        "content": "Use IDENT (RFC 1413) username checking\n",
                        "flag": "-u"
                    },
                    {
                        "name": "-n",
                        "content": "Negotiate SSL with specified protocol\n\ncurrently supported: smtp, pop3, nntp\n",
                        "flag": "-n"
                    },
                    {
                        "name": "-E",
                        "content": "Entropy Gathering Daemon socket to use to feed OpenSSL random number generator.  (Avail‐\nable only if compiled with OpenSSL 0.9.5a or higher)\n",
                        "flag": "-E"
                    },
                    {
                        "name": "-R",
                        "content": "File containing random input.  The SSL library will use data from this file first to seed\nthe random number generator.\n",
                        "flag": "-R"
                    },
                    {
                        "name": "-W",
                        "content": "",
                        "flag": "-W"
                    },
                    {
                        "name": "-B",
                        "content": "Number of bytes of data read from random seed files.  With SSL versions less than 0.9.5a,\nalso determines how many bytes of data are considered sufficient to seed the PRNG.  More\nrecent OpenSSL versions have a builtin function to determine when sufficient randomness\nis available.\n",
                        "flag": "-B"
                    },
                    {
                        "name": "-I",
                        "content": "IP of the outgoing interface is used as source for remote connections.  Use this option\nto bind a static local IP address, instead.\n",
                        "flag": "-I"
                    },
                    {
                        "name": "-d",
                        "content": "daemon mode\n\nListen for connections on [host:]port. If no host specified, defaults to all IP addresses\nfor the local host.\n\ndefault: inetd mode\n",
                        "flag": "-d"
                    },
                    {
                        "name": "-f",
                        "content": "Stay in foreground (don't fork) and log to stderr instead of via syslog (unless -o is\nspecified).\n\ndefault: background in daemon mode\n",
                        "flag": "-f"
                    },
                    {
                        "name": "-l",
                        "content": "execute local inetd-type program.\n",
                        "flag": "-l"
                    },
                    {
                        "name": "-L",
                        "content": "open local pty and execute program.\n",
                        "flag": "-L"
                    },
                    {
                        "name": "-s",
                        "content": "setuid() to username in daemon mode\n",
                        "flag": "-s"
                    },
                    {
                        "name": "-g",
                        "content": "setgid() to groupname in daemon mode. Clears all other groups.\n",
                        "flag": "-g"
                    },
                    {
                        "name": "-P",
                        "content": "Pid file location\n\nIf the argument is a filename, then that filename will be used for the pid. If the argu‐\nment is empty ('', not missing), then no pid file will be created.\n",
                        "flag": "-P"
                    },
                    {
                        "name": "-r",
                        "content": "connect to remote service\n\nIf no host specified, defaults to localhost.\n",
                        "flag": "-r"
                    }
                ]
            },
            "EXAMPLES": {
                "content": "In order to provide SSL encapsulation to your local imapd service, use\n\nstunnel -d 993 -l /usr/sbin/imapd -- imapd\n\nIn order to let your local e-mail client connect to a SSL-enabled imapd service on another\nserver, configure the e-mail client to connect to localhost on port 119 and use:\n\nstunnel -c -d 143 -r servername:993\n\nIf you want to provide tunneling to your pppd daemon on port 2020, use something like\n\nstunnel -d 2020 -L /usr/sbin/pppd -- pppd local\n",
                "subsections": []
            },
            "ENVIRONMENT": {
                "content": "If Stunnel is used to create local processes using the -l or -L options, it will set the fol‐\nlowing environment variables\n\nREMOTEHOST\nThe IP address of the remote end of the connection.\n\nSSLCLIENTDN\nThe DN (Distinguished Name, aka subject name) of the peer certificate, if a certificate\nwas present and verified.\n\nSSLCLIENTIDN\nThe Issuer's DN of the peer's certificate, if a certificate was present and verified.\n",
                "subsections": []
            },
            "CERTIFICATES": {
                "content": "•   Each SSL enabled daemon needs to present a valid X.509 certificate to the peer. It also\nneeds a private key to decrypt the incoming data.  The easiest way to obtain a certifi‐\ncate and a key is to generate them with the free openssl package. You can find more in‐\nformation on certificates generation on pages listed below.\n\nTwo things are important when generating certificate-key pairs for stunnel. The private\nkey cannot be encrypted, because the server has no way to obtain the password from the\nuser. To produce an unencrypted key add the -nodes option when running the req command\nfrom the openssl kit.\n\nThe order of contents of the .pem file is also important. It should contain the unen‐\ncrypted private key first, then a signed certificate (not certificate request). There\nshould be also empty lines after certificate and private key. Plaintext certificate in‐\nformation appended on the top of generated certificate should be discarded. So the file\nshould look like this:\n\n-----BEGIN RSA PRIVATE KEY-----\n[encoded key]\n-----END RSA PRIVATE KEY-----\n[empty line]\n-----BEGIN CERTIFICATE-----\n[encoded certificate]\n-----END CERTIFICATE-----\n[empty line]\n",
                "subsections": []
            },
            "RANDOMNESS": {
                "content": "•   stunnel needs to seed the PRNG (pseudo random number generator) in order for SSL to use\ngood randomness.  The following sources are loaded in order until sufficient random data\nhas been gathered:\n\n•       The file specified with the -R flag.\n\n•       The file specified by the RANDFILE environment variable, if set.\n\n•       The file .rnd in your home directory, if RANDFILE not set.\n\n•       The file specified with '--with-random' at compile time.\n\n•       The contents of the screen if running on Windows.\n\n•       The egd socket specified with the -E flag.\n\n•       The egd socket specified with '--with-egd-sock' at compile time.\n\n•       The /dev/urandom device.\n\nWith recent (>=OpenSSL 0.9.5a) version of SSL it will stop loading random data automati‐\ncally when sufficient entropy has been gathered.  With previous versions it will continue\nto gather from all the above sources since no SSL function exists to tell when enough\ndata is available.\n\nNote that on Windows machines that do not have console user interaction (mouse movements,\ncreating windows, etc) the screen contents are not variable enough to be sufficient, and\nyou should provide a random file for use with the -R flag.\n\nNote that the file specified with the -R flag should contain random data -- that means it\nshould contain different information each time stunnel is run.  This is handled automati‐\ncally unless the -W flag is used.  If you wish to update this file manually, the openssl\nrand command in recent versions of OpenSSL, would be useful.\n\nOne important note -- if /dev/urandom is available, OpenSSL has a habit of seeding the\nPRNG with it even when checking the random state, so on systems with /dev/urandom you're\nlikely to use it even though it's listed at the very bottom of the list above.  This\nisn't stunnel's behaviour, it's OpenSSLs.\n",
                "subsections": []
            },
            "LIMITATIONS": {
                "content": "•   stunnel cannot be used for the FTP daemon because of the nature of the FTP protocol which\nutilizes multiple ports for data transfers.  There are available SSL enabled versions of\nFTP and telnet daemons, however.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "tcpd(8) access control facility for internet services\n\ninetd(8)\ninternet ``super-server''\n\nhttps://www.stunnel.org/\nStunnel homepage\n\nhttps://www.openssl.org/\nOpenSSL project website\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Michal Trojnara\n<Michal.Trojnara@stunnel.org>\n\n\n\n2003-08-01                                   STUNNEL(8)",
                "subsections": []
            }
        }
    }
}