aboutsummaryrefslogtreecommitdiffstats
path: root/demos/state_machine
Commit message (Collapse)AuthorAgeFilesLines
* Remove really old demo'sRich Salz2016-03-072-415/+0
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove some old makefile targetsRich Salz2016-01-171-0/+1
| | | | | | | | Remove lint, tags, dclean, tests. This is prep for a new makedepend scheme. This is temporary pending unified makefile, and might help it. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Move Makefiles to Makefile.inRich Salz2016-01-121-0/+0
| | | | | | | | | | Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Server side version negotiation rewriteMatt Caswell2015-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the way that we do server side protocol version negotiation. Previously we had a whole set of code that had an "up front" state machine dedicated to the negotiating the protocol version. This adds significant complexity to the state machine. Historically the justification for doing this was the support of SSLv2 which works quite differently to SSLv3+. However, we have now removed support for SSLv2 so there is little reason to maintain this complexity. The one slight difficulty is that, although we no longer support SSLv2, we do still support an SSLv3+ ClientHello in an SSLv2 backward compatible ClientHello format. This is generally only used by legacy clients. This commit adds support within the SSLv3 code for these legacy format ClientHellos. Server side version negotiation now works in much the same was as DTLS, i.e. we introduce the concept of TLS_ANY_VERSION. If s->version is set to that then when a ClientHello is received it will work out the most appropriate version to respond with. Also, SSLv23_method and SSLv23_server_method have been replaced with TLS_method and TLS_server_method respectively. The old SSLv23* names still exist as macros pointing at the new name, although they are deprecated. Subsequent commits will look at client side version negotiation, as well of removal of the old s23* code. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* memset, memcpy, sizeof consistency fixesRich Salz2015-05-051-1/+1
| | | | | | | | Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr) for memset and memcpy. Remove needless casts for those functions. For memset, replace alternative forms of zero with 0. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Use safer sizeof variant in mallocRich Salz2015-05-041-1/+1
| | | | | | | | | | | | | For a local variable: TYPE *p; Allocations like this are "risky": p = OPENSSL_malloc(sizeof(TYPE)); if the type of p changes, and the malloc call isn't updated, you could get memory corruption. Instead do this: p = OPENSSL_malloc(sizeof(*p)); Also fixed a few memset() calls that I noticed while doing this. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-255/+246
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove all .cvsignore filesRich Salz2014-11-281-3/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3142: Extra initialization in state_machineJeffrey Walton2014-08-211-2/+0
| | | | | | Remove extra initialization calls in the sample program. Reviewed-by: Emilia Kasper <emilia@openssl.org>
* Add emacs cache files to .cvsignore.Richard Levitte2005-04-111-0/+2
|
* Improve the state machine.Ben Laurie2001-02-061-13/+34
|
* Oops! Read a full buffer instead of some spurious number from elswhere.Ben Laurie2000-11-211-1/+1
|
* 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