diff options
author | 2015-09-11 15:59:21 +0000 | |
---|---|---|
committer | 2015-09-11 15:59:21 +0000 | |
commit | 63a53d337569d1b1fc573a60e6afe9866fe8a075 (patch) | |
tree | d87597deed856d7d6a131426d36b4ce1838d8fd5 /lib/libssl/d1_both.c | |
parent | fter fixing poll(2) semantics in dynamic TCP buffer size update, (diff) | |
download | wireguard-openbsd-63a53d337569d1b1fc573a60e6afe9866fe8a075.tar.xz wireguard-openbsd-63a53d337569d1b1fc573a60e6afe9866fe8a075.zip |
Convert dtls1_send_finished() and ssl3_send_finished() to
ssl3_handshake_msg_start()/ssl3_handshake_msg_finish().
ok beck@
Diffstat (limited to 'lib/libssl/d1_both.c')
-rw-r--r-- | lib/libssl/d1_both.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c index 567a0745358..4d2827a2c0b 100644 --- a/lib/libssl/d1_both.c +++ b/lib/libssl/d1_both.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_both.c,v 1.35 2015/09/10 17:57:50 jsing Exp $ */ +/* $OpenBSD: d1_both.c,v 1.36 2015/09/11 15:59:21 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -905,13 +905,12 @@ f_err: int dtls1_send_finished(SSL *s, int a, int b, const char *sender, int slen) { - unsigned char *p, *d; + unsigned char *p; int i; unsigned long l; if (s->state == a) { - d = (unsigned char *)s->init_buf->data; - p = &(d[DTLS1_HM_HEADER_LENGTH]); + 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); @@ -936,18 +935,12 @@ dtls1_send_finished(SSL *s, int a, int b, const char *sender, int slen) s->s3->previous_server_finished_len = i; } - d = dtls1_set_message_header(s, d, SSL3_MT_FINISHED, l, 0, l); - s->init_num = (int)l + DTLS1_HM_HEADER_LENGTH; - s->init_off = 0; - - /* buffer the message to handle re-xmits */ - dtls1_buffer_message(s, 0); + ssl3_handshake_msg_finish(s, l); s->state = b; } - /* SSL3_ST_SEND_xxxxxx_HELLO_B */ - return (dtls1_do_write(s, SSL3_RT_HANDSHAKE)); + return (ssl3_handshake_write(s)); } /* |