aboutsummaryrefslogtreecommitdiffstats
path: root/demos
Commit message (Collapse)AuthorAgeFilesLines
* Make all configuration macros available for application by makingRichard Levitte2001-02-191-3/+3
| | | | | | | | | | | | sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
* Re-order a couple of static functions and "#if 0" out unused ones - thisGeoff Thorpe2001-02-121-14/+16
| | | | gets rid of gcc warnings.
* This change was a quick experiment that I'd wanted to try that works quiteGeoff Thorpe2001-02-121-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. :-)
* Improve the state machine.Ben Laurie2001-02-061-13/+34
|
* format stringsUlf Möller2001-02-061-4/+3
|
* Re-order the options in tunala and add command switches like s_server forGeoff Thorpe2000-12-211-23/+42
| | | | disabling different SSL/TLS protocol versions.
* This adds support to 'tunala' for supplying DH parameters (without which itGeoff Thorpe2000-12-201-9/+136
| | | | | | | will not support EDH cipher suites). The parameters can either be loaded from a file (via "-dh_file"), generated by the application on start-up ("-dh_special generate"), or be standard DH parameters (as used in s_server, etc).
* Some minor changes to the "tunala" demo.Geoff Thorpe2000-12-204-19/+88
| | | | | | | | | | | | | | | | | | | | | | * Seal off some buffer functions so that only the higher-level IO functions are exposed. * Using the above change to buffer, add support to tunala for displaying traffic totals when a tunnel closes. Useful in debugging and analysis - you get to see the total encrypted traffic versus the total tunneled traffic. This shows not only how much expansion your data suffers from SSL (a lot if you send/receive a few bytes at a time), but also the overhead of SSL handshaking relative to the payload sent through the tunnel. This is controlled by the "-out_totals" switch to tunala. * Fix and tweak some bits in the README. Eg. sample output of "-out_totals" from a tunnel client when tunneling a brief "telnet" session. Tunnel closing, traffic stats follow SSL (network) traffic to/from server; 7305 bytes in, 3475 bytes out tunnelled data to/from server; 4295 bytes in, 186 bytes out
* Merge from the ASN1 branch of new ASN1 codeDr. Stephen Henson2000-12-082-0/+373
| | | | | | to main trunk. Lets see if the makes it to openssl-cvs :-)
* * Fix a slight bug in the state-machine. This caused the client end of aGeoff Thorpe2000-11-303-35/+86
| | | | | | | | | | | tunnel to not pro-actively close down when failing an SSL handshake. * Change the cert-chain callback - originally this was the same one used in s_client and s_server but the output's as ugly as sin, so I've prettied tunala's copy output up a bit (and made the output level configurable). * Remove the superfluous "errors" from the SSL state callback - these are just non-blocking side-effects.
* More little changes to the tunala demo;Geoff Thorpe2000-11-293-90/+166
| | | | | | | * A little bit of code-cleanup * Reformat the usage string (not so wide) * Allow adding an alternative (usually DSA) cert/key pair (a la s_server) * Allow control over cert-chain verify depth
* Make s_client/s_server-style cert verification output configurable byGeoff Thorpe2000-11-293-9/+100
| | | | command line, and make the peer-authentication similarly configurable.
* Minor tweaks and improvements to the tunala demo.Geoff Thorpe2000-11-286-23/+144
| | | | | | | | | - Add "-cipher" and "-out_state" command line arguments to control SSL cipher-suites and handshake debug output respectively. - Implemented error handling for SSL handshakes that break down. This uses a cheat - storing a non-NULL pointer as "app_data" in the SSL structure when the SSL should be killed.
* A typo and a couple of logic errors fixed. I think there may still be oneGeoff Thorpe2000-11-283-4/+7
| | | | | or two kinks lurking around, but it now appears to deal with the basic test cases ok.
* Oops! Read a full buffer instead of some spurious number from elswhere.Ben Laurie2000-11-211-1/+1
|
* oops, remove comments that are no longer true.Geoff Thorpe2000-11-011-9/+0
|
* Explanation, tips, etc.Geoff Thorpe2000-11-011-0/+233
|
* This is a demo that performs SSL tunneling (client and/or server) and isGeoff Thorpe2000-11-019-0/+1555
| | | | | built using an abstracted state machine with a non-blocking IP wrapper around it. README will follow in the next commit.
* John Denney <jdenney@ca.mdis.com> reports that we forgot to convertRichard Levitte2000-10-183-6/+6
| | | | Free to OPENSSL_free in the SSL demos.
* Two new PKCS#12 demo programs.Dr. Stephen Henson2000-09-073-0/+110
| | | | | | Update PKCS12_parse(). Make the keyid in certificate aux info more usable.
* Ignore executable.Ben Laurie2000-09-051-0/+1
|
* Handle WANT_READ more correctly (thanks to Bodo).Ben Laurie2000-09-051-5/+24
|
* Distinguish between assertions and conditions that should cause death.Ben Laurie2000-09-051-5/+10
|
* -Wall insists that main return an int.Bodo Möller2000-09-041-1/+3
|
* Add demo state machine.Ben Laurie2000-08-302-0/+378
|
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-5/+5
| | | | | | | | | like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
* Modernise 'selfsign.c' to use new X509_NAME codeDr. Stephen Henson2000-02-131-21/+33
| | | | | and add example of extension aliasing. Also fix the extension aliasing because it didn't work :-)
* Rename SSLeay_add_all_algorithms() et al toDr. Stephen Henson2000-02-042-2/+2
| | | | | OpenSSL_add_all_algorithms(). Move these into separate files so they work properly.
* Fix to the -revoke option in ca. It was leaking memory, crashing and justDr. Stephen Henson1999-11-081-1/+0
| | | | | | | | | plain not working :-( Also fix some memory leaks in the new X509_NAME code. Fix so new app_rand code doesn't crash 'x509' and move #include so it compiles under Win32.
* SSL_shutdown was done too early.Bodo Möller1999-08-011-2/+1
|
* don't prematurely shut down socket -- use SSL_shutdownBodo Möller1999-08-011-1/+1
|
* Reformat and "modernise" the sign.c demo.Dr. Stephen Henson1999-06-091-25/+40
|
* Change the PEM function implementation to use a common set of macros: thisDr. Stephen Henson1999-06-091-27/+27
| | | | | | should make modifying them easier. Fix the selfsign demo: it was rather ancient and used deleted functions.
* Survive pedanticism.Ben Laurie1999-06-081-1/+1
|
* Stack.Ben Laurie1999-05-311-1/+1
|
* Updated C++ SSL demos.Bodo Möller1999-05-272-17/+53
| | | | Submitted (a month ago) by: Wade Scholine
* Updated some demos.Bodo Möller1999-05-2711-14/+126
| | | | Submitted by: Sean O Riordain <Sean.ORiordain@cyrona.com>
* Change function call according to current API.Bodo Möller1999-05-271-2/+3
|
* Submitted by:Bodo Möller1999-04-242-1/+7
| | | | | Reviewed by: PR:
* Submitted by:Bodo Möller1999-04-233-15/+15
| | | | | Reviewed by: PR:
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-2314-58/+58
| | | | | | Submitted by: Reviewed by: PR:
* Don't confuse matters by using the wrong library.Ben Laurie1999-01-021-2/+1
|
* Import of old SSLeay release: SSLeay 0.9.1b (unreleased)Ralf S. Engelschall1998-12-214-1/+208
|
* Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1998-12-214-4/+4
|
* Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1998-12-2129-0/+2541