Stunnel.org  
   
Home
About
News
Faq
Examples
Download
Patches
Support
Related
<Patch List> <Patch Directory>
Patch info for stdin_confpatch_bri

Patch info for stdin_confpatch_bri

CreatorBrian Hatch
Patch to Version4.04
TypeNew Feature
Patchstdin_confpatch_bri.patch
Description

(Full Text)

Allow config file on stdin or any arbitrary file descriptor

Author Comments



This patch allows you to provide the Stunnel configuration file
on stdin or on any arbitrary file descriptor.

  stunnel -conf_stdin		# take the configuration from standard input

  stunnel -conf_fd=#		# take the configuration from file
                                   descriptor number "#"


This allows you much greater flexibility, in that you can
generate dynamic stunnel configurations on the fly without
resorting to temporary stunnel.conf files.

I'm debating if I should make it possible to have the config
file on stdin work in non-daemon mode.  For example, with the
a file such as this:

        client = yes
        pid =
        connect = www.example.com:443

you'd be able to run stunnel like this:

        $ stunnel stunnel.conf
        GET / HTTP/1.0             <== typed by you.
                                   <== typed by you.
        HTTP/1.0 200 OK            <== returned by remote
        ....
        
and have your stdin and stdout connected to the remote end.  If you
use 'stunnel -conf_stdin' this is not possible, because the config
file (stdin) is closed after being read.

The only way I can think to get around this is by instead using
-conf_fd= instead, or by modifying the patch to create some new
config option that says 'config ends here' and makes sure that
it leaves the file descriptor open.  I'm not too pleased with
that second option.







This website makes patches available for use by the Internet community. However it does not endorse any of the patches contained herein. They could be work perfectly, or totally foul up everything. We don't know. Contact the authors if you have any questions. Use at your own risk.

The Stunnel software package does not contain any cryptography itself, however please remember that import and/or export of cryptographic software, code providing hooks to cryptographic algorithms, and discussion about cryptography is illegal in some countries. It is imperative for you to know your local laws governing cryptography. We're not liable for anything you do that violates your local laws.