diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-12-01 17:40:46 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-12-01 17:40:46 +0000 |
commit | 82e448b92b856ba610b5f92a714c66d60f93b1c1 (patch) | |
tree | 127ef0f44a419a79f11abd6b30699f777514a1d1 /ssl/d1_both.c | |
parent | b172352b52f224de091651bc80e67791664fb961 (diff) |
PR: 2115
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Approved by: steve@openssl.org
Add Renegotiation extension to DTLS, fix DTLS ClientHello processing bug.
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r-- | ssl/d1_both.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 1d271c1bfa..3b9c7567b5 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -765,6 +765,24 @@ int dtls1_send_finished(SSL *s, int a, int b, const char *sender, int slen) p+=i; l=i; + /* Copy the finished so we can use it for + * renegotiation checks + */ + if(s->type == SSL_ST_CONNECT) + { + OPENSSL_assert(i <= EVP_MAX_MD_SIZE); + memcpy(s->s3->previous_client_finished, + s->s3->tmp.finish_md, i); + s->s3->previous_client_finished_len=i; + } + else + { + OPENSSL_assert(i <= EVP_MAX_MD_SIZE); + memcpy(s->s3->previous_server_finished, + s->s3->tmp.finish_md, i); + s->s3->previous_server_finished_len=i; + } + #ifdef OPENSSL_SYS_WIN16 /* MSVC 1.5 does not clear the top bytes of the word unless * I do this. |