summaryrefslogtreecommitdiffstats
path: root/lib/libssl/d1_both.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-04-13 15:25:20 +0000
committermiod <miod@openbsd.org>2014-04-13 15:25:20 +0000
commit97222edd40cad3a6e51530425068b83c51d308b1 (patch)
tree50438b2fbea63f81d6ac96e9bf4aa302b9538333 /lib/libssl/d1_both.c
parentImport OpenSSL 1.0.1g (diff)
downloadwireguard-openbsd-97222edd40cad3a6e51530425068b83c51d308b1.tar.xz
wireguard-openbsd-97222edd40cad3a6e51530425068b83c51d308b1.zip
Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.
Diffstat (limited to 'lib/libssl/d1_both.c')
-rw-r--r--lib/libssl/d1_both.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c
index e4b718efa76..2e8cf681ed0 100644
--- a/lib/libssl/d1_both.c
+++ b/lib/libssl/d1_both.c
@@ -220,7 +220,6 @@ dtls1_hm_fragment_free(hm_fragment *frag)
EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash);
}
-
if (frag->fragment) OPENSSL_free(frag->fragment);
if (frag->reassembly) OPENSSL_free(frag->reassembly);
OPENSSL_free(frag);
@@ -320,9 +319,10 @@ int dtls1_do_write(SSL *s, int type)
s->init_off -= DTLS1_HM_HEADER_LENGTH;
s->init_num += DTLS1_HM_HEADER_LENGTH;
- /* write atleast DTLS1_HM_HEADER_LENGTH bytes */
- if ( len <= DTLS1_HM_HEADER_LENGTH)
- len += DTLS1_HM_HEADER_LENGTH;
+ if ( s->init_num > curr_mtu)
+ len = curr_mtu;
+ else
+ len = s->init_num;
}
dtls1_fix_message_header(s, frag_off,