diff options
author | 2015-09-11 16:28:37 +0000 | |
---|---|---|
committer | 2015-09-11 16:28:37 +0000 | |
commit | 184c4dac6c8c4e1b4245566d03445d706de88bfc (patch) | |
tree | df67040ed28b97cd6ace00a1edb182d12120c781 /lib/libssl/d1_both.c | |
parent | style(9), fix comments, wrap long lines and tweak whitespace. (diff) | |
download | wireguard-openbsd-184c4dac6c8c4e1b4245566d03445d706de88bfc.tar.xz wireguard-openbsd-184c4dac6c8c4e1b4245566d03445d706de88bfc.zip |
Replace dtls1_send_finished() with ssl3_send_finished() - they're now
both essentially the same (in fact DTLS benefits from improvements
previously made to the ssl3_send_finished() function).
ok beck@
Diffstat (limited to 'lib/libssl/d1_both.c')
-rw-r--r-- | lib/libssl/d1_both.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c index 4d2827a2c0b..dd67028a38d 100644 --- a/lib/libssl/d1_both.c +++ b/lib/libssl/d1_both.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_both.c,v 1.36 2015/09/11 15:59:21 jsing Exp $ */ +/* $OpenBSD: d1_both.c,v 1.37 2015/09/11 16:28:37 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -902,47 +902,6 @@ f_err: return (-1); } -int -dtls1_send_finished(SSL *s, int a, int b, const char *sender, int slen) -{ - unsigned char *p; - int i; - unsigned long l; - - if (s->state == a) { - p = ssl3_handshake_msg_start(s, SSL3_MT_FINISHED); - - i = s->method->ssl3_enc->final_finish_mac(s, sender, slen, - s->s3->tmp.finish_md); - s->s3->tmp.finish_md_len = i; - memcpy(p, s->s3->tmp.finish_md, i); - 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; - } - - ssl3_handshake_msg_finish(s, l); - - s->state = b; - } - - return (ssl3_handshake_write(s)); -} - /* * for these 2 messages, we need to * ssl->enc_read_ctx re-init |