summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2017-01-29 15:20:18 +0000
committerjsing <>2017-01-29 15:20:18 +0000
commit55d7ec4ac77dda8d4fa627436ac5f1be61c74d3b (patch)
treea52da917dd31e80b04cac0479a8bf2620cd83015 /src
parent2ffb17410eb84352a4207850a977dbc50163119d (diff)
downloadopenbsd-55d7ec4ac77dda8d4fa627436ac5f1be61c74d3b.tar.gz
openbsd-55d7ec4ac77dda8d4fa627436ac5f1be61c74d3b.tar.bz2
openbsd-55d7ec4ac77dda8d4fa627436ac5f1be61c74d3b.zip
Avoid clearing the mac_packet flag in the wrong place.
In many cases we got away with this, however if a server sends multiple handshake messages in the same record only the first message would be added to the MAC. Should fix breakage reported by various people.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/ssl_both.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_both.c b/src/lib/libssl/ssl_both.c
index 0a33002809..2d79c24c86 100644
--- a/src/lib/libssl/ssl_both.c
+++ b/src/lib/libssl/ssl_both.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_both.c,v 1.4 2017/01/26 12:16:13 beck Exp $ */ 1/* $OpenBSD: ssl_both.c,v 1.5 2017/01/29 15:20:18 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 *
@@ -523,7 +523,6 @@ ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
523 if (s->internal->mac_packet) { 523 if (s->internal->mac_packet) {
524 tls1_finish_mac(s, (unsigned char *)s->internal->init_buf->data, 524 tls1_finish_mac(s, (unsigned char *)s->internal->init_buf->data,
525 s->internal->init_num + 4); 525 s->internal->init_num + 4);
526 s->internal->mac_packet = 0;
527 526
528 if (s->internal->msg_callback) 527 if (s->internal->msg_callback)
529 s->internal->msg_callback(0, s->version, 528 s->internal->msg_callback(0, s->version,