diff options
author | Matt Caswell <matt@openssl.org> | 2015-07-29 14:23:56 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-10-30 08:27:59 +0000 |
commit | f8e0a5573820bd7318782d4954c6643ff7e58102 (patch) | |
tree | 4b6a7fa073da7a0c12fbf856eb2ea58c526a627d /ssl/s3_lib.c | |
parent | 9ab930b27d51a13362e6647074f13589a8ac004d (diff) |
Add initial state machine rewrite code
This is the first drop of the new state machine code.
The rewrite has the following objectives:
- Remove duplication of state code between client and server
- Remove duplication of state code between TLS and DTLS
- Simplify transitions and bring the logic together in a single location
so that it is easier to validate
- Remove duplication of code between each of the message handling functions
- Receive a message first and then work out whether that is a valid
transition - not the other way around (the other way causes lots of issues
where we are expecting one type of message next but actually get something
else)
- Separate message flow state from handshake state (in order to better
understand each)
- message flow state = when to flush buffers; handling restarts in the
event of NBIO events; handling the common flow of steps for reading a
message and the common flow of steps for writing a message etc
- handshake state = what handshake message are we working on now
- Control complexity: only the state machine can change state: keep all
the state changes local to a file
This builds on previous state machine related work:
- Surface CCS processing in the state machine
- Version negotiation rewrite
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r-- | ssl/s3_lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 5e7b618e49..292fb1b3cc 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -5132,6 +5132,7 @@ int ssl3_renegotiate_check(SSL *s) */ /* SSL_ST_ACCEPT */ s->state = SSL_ST_RENEGOTIATE; + statem_set_renegotiate(s); s->s3->renegotiate = 0; s->s3->num_renegotiations++; s->s3->total_renegotiations++; |