openssl/demos
Geoff Thorpe 282d8b1c38 This change was a quick experiment that I'd wanted to try that works quite
well (and is a good demonstration of how encapsulating the SSL in a
memory-based state machine can make it easier to apply to different
situations).

The change implements a new command-line switch "-flipped <0|1>" which, if
set to 1, reverses the usual interpretation of a client and server for SSL
tunneling. Normally, an ssl client (ie. "-server 0") accepts "cleartext"
connections and conducts SSL/TLS over a proxied connection acting as an SSL
client. Likewise, an ssl server (ie. "-server 1") accepts connections and
conducts SSL/TLS (as an SSL server) over them and passes "cleartext" over
the proxied connection. With "-flipped 1", an SSL client (specified with
"-server 0") in fact accepts SSL connections and proxies clear, whereas an
SSL server ("-server 1") accepts clear and proxies SSL. NB: most of this
diff is command-line handling, the actual meat of the change is simply the
line or two that plugs "clean" and "dirty" file descriptors into the item
that holds the state-machine - reverse them and you get the desired
behaviour.

This allows a network server to be an SSL client, and a network client to
be an SSL server. Apart from curiosity value, there's a couple of possibly
interesting applications - SSL/TLS is inherently vulnerable to trivial DoS
attacks, because the SSL server usually has to perform a private key
operation first, even if the client is authenticated. With this scenario,
the network client is the SSL server and performs the first private key
operation, whereas the network server serves as the SSL client. Another
possible application is when client-only authentication is required (ie.
the underlying protocol handles (or doesn't care about) authenticating the
server). Eg. an SSL/TLS version of 'ssh' could be concocted where the
client's signed certificate is used to validate login to a server system -
whether or not the client needs to validate who the server is can be
configured at the client end rather than at the server end (ie. a complete
inversion of what happens in normal SSL/TLS).

NB: This is just an experiment/play-thing, using "-flipped 1" probably
creates something that is interoperable with exactly nothing. :-)
2001-02-12 02:28:29 +00:00
..
asn1 Merge from the ASN1 branch of new ASN1 code 2000-12-08 19:09:35 +00:00
bio Rename SSLeay_add_all_algorithms() et al to 2000-02-04 14:01:38 +00:00
eay Updated some demos. 1999-05-27 23:52:31 +00:00
maurice Updated some demos. 1999-05-27 23:52:31 +00:00
pkcs12 Two new PKCS#12 demo programs. 2000-09-07 23:14:26 +00:00
prime Updated some demos. 1999-05-27 23:52:31 +00:00
sign Reformat and "modernise" the sign.c demo. 1999-06-09 23:33:48 +00:00
ssl John Denney <jdenney@ca.mdis.com> reports that we forgot to convert 2000-10-18 19:36:27 +00:00
state_machine Improve the state machine. 2001-02-06 13:13:31 +00:00
tunala This change was a quick experiment that I'd wanted to try that works quite 2001-02-12 02:28:29 +00:00
b64.c There have been a number of complaints from a number of sources that names 2000-06-01 22:19:21 +00:00
b64.pl Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
privkey.pem Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
README Submitted by: 1999-04-24 00:53:29 +00:00
selfsign.c Modernise 'selfsign.c' to use new X509_NAME code 2000-02-13 00:28:26 +00:00
spkigen.c Change #include filenames from <foo.h> to <openssl.h>. 1999-04-23 22:13:45 +00:00

NOTE: Don't expect any of these programs to work with current
OpenSSL releases, or even with later SSLeay releases.

Original README:
=============================================================================

Some demo programs sent to me by various people

eric