summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_both.c
diff options
context:
space:
mode:
authorjsing <>2015-09-10 17:57:50 +0000
committerjsing <>2015-09-10 17:57:50 +0000
commitc4c220a34fb8ef8921b6629e0de8a0761a7d8a66 (patch)
treeb6e132390b9936d3bc45c6b7e5f7567e5fabce5b /src/lib/libssl/d1_both.c
parent3de7aa268622f5ee3cfe2831d0da81edc27f1d24 (diff)
downloadopenbsd-c4c220a34fb8ef8921b6629e0de8a0761a7d8a66.tar.gz
openbsd-c4c220a34fb8ef8921b6629e0de8a0761a7d8a66.tar.bz2
openbsd-c4c220a34fb8ef8921b6629e0de8a0761a7d8a66.zip
Remove support for DTLS_BAD_VER. We do not support non-standard and
incomplete implementations just so that we can interoperate with products from vendors who have not bothered to fix things in the last ~10 years. ok bcook@ miod@
Diffstat (limited to 'src/lib/libssl/d1_both.c')
-rw-r--r--src/lib/libssl/d1_both.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c
index b479c61322..567a074535 100644
--- a/src/lib/libssl/d1_both.c
+++ b/src/lib/libssl/d1_both.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_both.c,v 1.34 2015/07/19 20:32:18 doug Exp $ */ 1/* $OpenBSD: d1_both.c,v 1.35 2015/09/10 17:57:50 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -346,8 +346,7 @@ dtls1_do_write(SSL *s, int type)
346 const struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; 346 const struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr;
347 int xlen; 347 int xlen;
348 348
349 if (frag_off == 0 && 349 if (frag_off == 0) {
350 s->version != DTLS1_BAD_VER) {
351 /* 350 /*
352 * Reconstruct message header is if it 351 * Reconstruct message header is if it
353 * is being sent in single fragment 352 * is being sent in single fragment
@@ -441,10 +440,9 @@ again:
441 s2n (msg_hdr->seq, p); 440 s2n (msg_hdr->seq, p);
442 l2n3(0, p); 441 l2n3(0, p);
443 l2n3(msg_len, p); 442 l2n3(msg_len, p);
444 if (s->version != DTLS1_BAD_VER) { 443
445 p -= DTLS1_HM_HEADER_LENGTH; 444 p -= DTLS1_HM_HEADER_LENGTH;
446 msg_len += DTLS1_HM_HEADER_LENGTH; 445 msg_len += DTLS1_HM_HEADER_LENGTH;
447 }
448 446
449 ssl3_finish_mac(s, p, msg_len); 447 ssl3_finish_mac(s, p, msg_len);
450 if (s->msg_callback) 448 if (s->msg_callback)
@@ -971,12 +969,6 @@ dtls1_send_change_cipher_spec(SSL *s, int a, int b)
971 s->d1->handshake_write_seq = s->d1->next_handshake_write_seq; 969 s->d1->handshake_write_seq = s->d1->next_handshake_write_seq;
972 s->init_num = DTLS1_CCS_HEADER_LENGTH; 970 s->init_num = DTLS1_CCS_HEADER_LENGTH;
973 971
974 if (s->version == DTLS1_BAD_VER) {
975 s->d1->next_handshake_write_seq++;
976 s2n(s->d1->handshake_write_seq, p);
977 s->init_num += 2;
978 }
979
980 s->init_off = 0; 972 s->init_off = 0;
981 973
982 dtls1_set_message_header_int(s, SSL3_MT_CCS, 0, 974 dtls1_set_message_header_int(s, SSL3_MT_CCS, 0,