diff options
Diffstat (limited to 'src/lib/libssl/s3_both.c')
-rw-r--r-- | src/lib/libssl/s3_both.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c index 5a1d1e7443..6448f27a03 100644 --- a/src/lib/libssl/s3_both.c +++ b/src/lib/libssl/s3_both.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_both.c,v 1.43 2015/07/18 19:41:54 doug Exp $ */ | 1 | /* $OpenBSD: s3_both.c,v 1.44 2015/09/11 15:59:21 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -155,13 +155,12 @@ ssl3_do_write(SSL *s, int type) | |||
155 | int | 155 | int |
156 | ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) | 156 | ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) |
157 | { | 157 | { |
158 | unsigned char *p, *d; | 158 | unsigned char *p; |
159 | unsigned long l; | 159 | unsigned long l; |
160 | int md_len; | 160 | int md_len; |
161 | 161 | ||
162 | if (s->state == a) { | 162 | if (s->state == a) { |
163 | d = (unsigned char *)s->init_buf->data; | 163 | p = ssl3_handshake_msg_start(s, SSL3_MT_FINISHED); |
164 | p = &(d[4]); | ||
165 | 164 | ||
166 | md_len = s->method->ssl3_enc->finish_mac_length; | 165 | md_len = s->method->ssl3_enc->finish_mac_length; |
167 | if (s->method->ssl3_enc->final_finish_mac(s, sender, slen, | 166 | if (s->method->ssl3_enc->final_finish_mac(s, sender, slen, |
@@ -184,16 +183,12 @@ ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) | |||
184 | s->s3->previous_server_finished_len = md_len; | 183 | s->s3->previous_server_finished_len = md_len; |
185 | } | 184 | } |
186 | 185 | ||
187 | *(d++) = SSL3_MT_FINISHED; | 186 | ssl3_handshake_msg_finish(s, l); |
188 | l2n3(l, d); | ||
189 | s->init_num = (int)l + 4; | ||
190 | s->init_off = 0; | ||
191 | 187 | ||
192 | s->state = b; | 188 | s->state = b; |
193 | } | 189 | } |
194 | 190 | ||
195 | /* SSL3_ST_SEND_xxxxxx_HELLO_B */ | 191 | return (ssl3_handshake_write(s)); |
196 | return (ssl3_do_write(s, SSL3_RT_HANDSHAKE)); | ||
197 | } | 192 | } |
198 | 193 | ||
199 | /* ssl3_take_mac calculates the Finished MAC for the handshakes messages seen to far. */ | 194 | /* ssl3_take_mac calculates the Finished MAC for the handshakes messages seen to far. */ |