diff options
author | jsing <> | 2015-09-10 17:57:50 +0000 |
---|---|---|
committer | jsing <> | 2015-09-10 17:57:50 +0000 |
commit | c4c220a34fb8ef8921b6629e0de8a0761a7d8a66 (patch) | |
tree | b6e132390b9936d3bc45c6b7e5f7567e5fabce5b /src | |
parent | 3de7aa268622f5ee3cfe2831d0da81edc27f1d24 (diff) | |
download | openbsd-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')
-rw-r--r-- | src/lib/libssl/d1_both.c | 18 | ||||
-rw-r--r-- | src/lib/libssl/d1_clnt.c | 7 | ||||
-rw-r--r-- | src/lib/libssl/d1_lib.c | 8 | ||||
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 9 | ||||
-rw-r--r-- | src/lib/libssl/d1_srvr.c | 10 | ||||
-rw-r--r-- | src/lib/libssl/dtls1.h | 3 | ||||
-rw-r--r-- | src/lib/libssl/s3_srvr.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/d1_both.c | 18 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/d1_clnt.c | 7 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/d1_lib.c | 8 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/d1_pkt.c | 9 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/d1_srvr.c | 10 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/dtls1.h | 3 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s3_srvr.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl.h | 6 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_lib.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_sess.c | 3 | ||||
-rw-r--r-- | src/lib/libssl/ssl.h | 6 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/ssl_sess.c | 3 |
20 files changed, 46 insertions, 98 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, |
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c index 2b736b9243..5a755c3bbe 100644 --- a/src/lib/libssl/d1_clnt.c +++ b/src/lib/libssl/d1_clnt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_clnt.c,v 1.49 2015/09/10 15:56:26 jsing Exp $ */ | 1 | /* $OpenBSD: d1_clnt.c,v 1.50 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. |
@@ -171,7 +171,7 @@ DTLSv1_client_method(void) | |||
171 | static const SSL_METHOD * | 171 | static const SSL_METHOD * |
172 | dtls1_get_client_method(int ver) | 172 | dtls1_get_client_method(int ver) |
173 | { | 173 | { |
174 | if (ver == DTLS1_VERSION || ver == DTLS1_BAD_VER) | 174 | if (ver == DTLS1_VERSION) |
175 | return (DTLSv1_client_method()); | 175 | return (DTLSv1_client_method()); |
176 | return (NULL); | 176 | return (NULL); |
177 | } | 177 | } |
@@ -214,8 +214,7 @@ dtls1_connect(SSL *s) | |||
214 | if (cb != NULL) | 214 | if (cb != NULL) |
215 | cb(s, SSL_CB_HANDSHAKE_START, 1); | 215 | cb(s, SSL_CB_HANDSHAKE_START, 1); |
216 | 216 | ||
217 | if ((s->version & 0xff00 ) != (DTLS1_VERSION & 0xff00) && | 217 | if ((s->version & 0xff00 ) != (DTLS1_VERSION & 0xff00)) { |
218 | (s->version & 0xff00 ) != (DTLS1_BAD_VER & 0xff00)) { | ||
219 | SSLerr(SSL_F_DTLS1_CONNECT, | 218 | SSLerr(SSL_F_DTLS1_CONNECT, |
220 | ERR_R_INTERNAL_ERROR); | 219 | ERR_R_INTERNAL_ERROR); |
221 | ret = -1; | 220 | ret = -1; |
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c index e7eca4a8cd..708f3d7206 100644 --- a/src/lib/libssl/d1_lib.c +++ b/src/lib/libssl/d1_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_lib.c,v 1.30 2015/09/10 15:56:26 jsing Exp $ */ | 1 | /* $OpenBSD: d1_lib.c,v 1.31 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. |
@@ -246,10 +246,8 @@ dtls1_clear(SSL *s) | |||
246 | } | 246 | } |
247 | 247 | ||
248 | ssl3_clear(s); | 248 | ssl3_clear(s); |
249 | if (s->options & SSL_OP_CISCO_ANYCONNECT) | 249 | |
250 | s->version = DTLS1_BAD_VER; | 250 | s->version = DTLS1_VERSION; |
251 | else | ||
252 | s->version = DTLS1_VERSION; | ||
253 | } | 251 | } |
254 | 252 | ||
255 | long | 253 | long |
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index c3574b43bd..ca716a2222 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.46 2015/07/19 01:07:40 doug Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.47 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. |
@@ -971,9 +971,6 @@ start: | |||
971 | 971 | ||
972 | dtls1_get_ccs_header(rr->data, &ccs_hdr); | 972 | dtls1_get_ccs_header(rr->data, &ccs_hdr); |
973 | 973 | ||
974 | if (s->version == DTLS1_BAD_VER) | ||
975 | ccs_hdr_len = 3; | ||
976 | |||
977 | /* 'Change Cipher Spec' is just a single byte, so we know | 974 | /* 'Change Cipher Spec' is just a single byte, so we know |
978 | * exactly what the record payload has to look like */ | 975 | * exactly what the record payload has to look like */ |
979 | /* XDTLS: check that epoch is consistent */ | 976 | /* XDTLS: check that epoch is consistent */ |
@@ -1006,10 +1003,6 @@ start: | |||
1006 | /* do this whenever CCS is processed */ | 1003 | /* do this whenever CCS is processed */ |
1007 | dtls1_reset_seq_numbers(s, SSL3_CC_READ); | 1004 | dtls1_reset_seq_numbers(s, SSL3_CC_READ); |
1008 | 1005 | ||
1009 | if (s->version == DTLS1_BAD_VER) | ||
1010 | s->d1->handshake_read_seq++; | ||
1011 | |||
1012 | |||
1013 | goto start; | 1006 | goto start; |
1014 | } | 1007 | } |
1015 | 1008 | ||
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c index 698292f33f..e41c119b9c 100644 --- a/src/lib/libssl/d1_srvr.c +++ b/src/lib/libssl/d1_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_srvr.c,v 1.55 2015/06/18 22:51:05 doug Exp $ */ | 1 | /* $OpenBSD: d1_srvr.c,v 1.56 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. |
@@ -335,11 +335,9 @@ dtls1_accept(SSL *s) | |||
335 | s->s3->tmp.next_state = SSL3_ST_SR_CLNT_HELLO_A; | 335 | s->s3->tmp.next_state = SSL3_ST_SR_CLNT_HELLO_A; |
336 | 336 | ||
337 | /* HelloVerifyRequest resets Finished MAC */ | 337 | /* HelloVerifyRequest resets Finished MAC */ |
338 | if (s->version != DTLS1_BAD_VER) { | 338 | if (!ssl3_init_finished_mac(s)) { |
339 | if (!ssl3_init_finished_mac(s)) { | 339 | ret = -1; |
340 | ret = -1; | 340 | goto end; |
341 | goto end; | ||
342 | } | ||
343 | } | 341 | } |
344 | break; | 342 | break; |
345 | 343 | ||
diff --git a/src/lib/libssl/dtls1.h b/src/lib/libssl/dtls1.h index 1d65dc5821..5aed28e99a 100644 --- a/src/lib/libssl/dtls1.h +++ b/src/lib/libssl/dtls1.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dtls1.h,v 1.17 2015/02/09 10:53:28 jsing Exp $ */ | 1 | /* $OpenBSD: dtls1.h,v 1.18 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. |
@@ -73,7 +73,6 @@ extern "C" { | |||
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | #define DTLS1_VERSION 0xFEFF | 75 | #define DTLS1_VERSION 0xFEFF |
76 | #define DTLS1_BAD_VER 0x0100 | ||
77 | 76 | ||
78 | /* lengths of messages */ | 77 | /* lengths of messages */ |
79 | #define DTLS1_COOKIE_LENGTH 256 | 78 | #define DTLS1_COOKIE_LENGTH 256 |
diff --git a/src/lib/libssl/s3_srvr.c b/src/lib/libssl/s3_srvr.c index b2c4f8e0d2..4bbc160d58 100644 --- a/src/lib/libssl/s3_srvr.c +++ b/src/lib/libssl/s3_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_srvr.c,v 1.116 2015/09/10 15:56:26 jsing Exp $ */ | 1 | /* $OpenBSD: s3_srvr.c,v 1.117 2015/09/10 17:57:50 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 | * |
@@ -1650,7 +1650,7 @@ ssl3_get_client_key_exchange(SSL *s) | |||
1650 | rsa = pkey->pkey.rsa; | 1650 | rsa = pkey->pkey.rsa; |
1651 | 1651 | ||
1652 | /* TLS and [incidentally] DTLS{0xFEFF} */ | 1652 | /* TLS and [incidentally] DTLS{0xFEFF} */ |
1653 | if (s->version > SSL3_VERSION && s->version != DTLS1_BAD_VER) { | 1653 | if (s->version > SSL3_VERSION) { |
1654 | if (2 > n) | 1654 | if (2 > n) |
1655 | goto truncated; | 1655 | goto truncated; |
1656 | n2s(p, i); | 1656 | n2s(p, i); |
diff --git a/src/lib/libssl/src/ssl/d1_both.c b/src/lib/libssl/src/ssl/d1_both.c index b479c61322..567a074535 100644 --- a/src/lib/libssl/src/ssl/d1_both.c +++ b/src/lib/libssl/src/ssl/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, |
diff --git a/src/lib/libssl/src/ssl/d1_clnt.c b/src/lib/libssl/src/ssl/d1_clnt.c index 2b736b9243..5a755c3bbe 100644 --- a/src/lib/libssl/src/ssl/d1_clnt.c +++ b/src/lib/libssl/src/ssl/d1_clnt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_clnt.c,v 1.49 2015/09/10 15:56:26 jsing Exp $ */ | 1 | /* $OpenBSD: d1_clnt.c,v 1.50 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. |
@@ -171,7 +171,7 @@ DTLSv1_client_method(void) | |||
171 | static const SSL_METHOD * | 171 | static const SSL_METHOD * |
172 | dtls1_get_client_method(int ver) | 172 | dtls1_get_client_method(int ver) |
173 | { | 173 | { |
174 | if (ver == DTLS1_VERSION || ver == DTLS1_BAD_VER) | 174 | if (ver == DTLS1_VERSION) |
175 | return (DTLSv1_client_method()); | 175 | return (DTLSv1_client_method()); |
176 | return (NULL); | 176 | return (NULL); |
177 | } | 177 | } |
@@ -214,8 +214,7 @@ dtls1_connect(SSL *s) | |||
214 | if (cb != NULL) | 214 | if (cb != NULL) |
215 | cb(s, SSL_CB_HANDSHAKE_START, 1); | 215 | cb(s, SSL_CB_HANDSHAKE_START, 1); |
216 | 216 | ||
217 | if ((s->version & 0xff00 ) != (DTLS1_VERSION & 0xff00) && | 217 | if ((s->version & 0xff00 ) != (DTLS1_VERSION & 0xff00)) { |
218 | (s->version & 0xff00 ) != (DTLS1_BAD_VER & 0xff00)) { | ||
219 | SSLerr(SSL_F_DTLS1_CONNECT, | 218 | SSLerr(SSL_F_DTLS1_CONNECT, |
220 | ERR_R_INTERNAL_ERROR); | 219 | ERR_R_INTERNAL_ERROR); |
221 | ret = -1; | 220 | ret = -1; |
diff --git a/src/lib/libssl/src/ssl/d1_lib.c b/src/lib/libssl/src/ssl/d1_lib.c index e7eca4a8cd..708f3d7206 100644 --- a/src/lib/libssl/src/ssl/d1_lib.c +++ b/src/lib/libssl/src/ssl/d1_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_lib.c,v 1.30 2015/09/10 15:56:26 jsing Exp $ */ | 1 | /* $OpenBSD: d1_lib.c,v 1.31 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. |
@@ -246,10 +246,8 @@ dtls1_clear(SSL *s) | |||
246 | } | 246 | } |
247 | 247 | ||
248 | ssl3_clear(s); | 248 | ssl3_clear(s); |
249 | if (s->options & SSL_OP_CISCO_ANYCONNECT) | 249 | |
250 | s->version = DTLS1_BAD_VER; | 250 | s->version = DTLS1_VERSION; |
251 | else | ||
252 | s->version = DTLS1_VERSION; | ||
253 | } | 251 | } |
254 | 252 | ||
255 | long | 253 | long |
diff --git a/src/lib/libssl/src/ssl/d1_pkt.c b/src/lib/libssl/src/ssl/d1_pkt.c index c3574b43bd..ca716a2222 100644 --- a/src/lib/libssl/src/ssl/d1_pkt.c +++ b/src/lib/libssl/src/ssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.46 2015/07/19 01:07:40 doug Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.47 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. |
@@ -971,9 +971,6 @@ start: | |||
971 | 971 | ||
972 | dtls1_get_ccs_header(rr->data, &ccs_hdr); | 972 | dtls1_get_ccs_header(rr->data, &ccs_hdr); |
973 | 973 | ||
974 | if (s->version == DTLS1_BAD_VER) | ||
975 | ccs_hdr_len = 3; | ||
976 | |||
977 | /* 'Change Cipher Spec' is just a single byte, so we know | 974 | /* 'Change Cipher Spec' is just a single byte, so we know |
978 | * exactly what the record payload has to look like */ | 975 | * exactly what the record payload has to look like */ |
979 | /* XDTLS: check that epoch is consistent */ | 976 | /* XDTLS: check that epoch is consistent */ |
@@ -1006,10 +1003,6 @@ start: | |||
1006 | /* do this whenever CCS is processed */ | 1003 | /* do this whenever CCS is processed */ |
1007 | dtls1_reset_seq_numbers(s, SSL3_CC_READ); | 1004 | dtls1_reset_seq_numbers(s, SSL3_CC_READ); |
1008 | 1005 | ||
1009 | if (s->version == DTLS1_BAD_VER) | ||
1010 | s->d1->handshake_read_seq++; | ||
1011 | |||
1012 | |||
1013 | goto start; | 1006 | goto start; |
1014 | } | 1007 | } |
1015 | 1008 | ||
diff --git a/src/lib/libssl/src/ssl/d1_srvr.c b/src/lib/libssl/src/ssl/d1_srvr.c index 698292f33f..e41c119b9c 100644 --- a/src/lib/libssl/src/ssl/d1_srvr.c +++ b/src/lib/libssl/src/ssl/d1_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_srvr.c,v 1.55 2015/06/18 22:51:05 doug Exp $ */ | 1 | /* $OpenBSD: d1_srvr.c,v 1.56 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. |
@@ -335,11 +335,9 @@ dtls1_accept(SSL *s) | |||
335 | s->s3->tmp.next_state = SSL3_ST_SR_CLNT_HELLO_A; | 335 | s->s3->tmp.next_state = SSL3_ST_SR_CLNT_HELLO_A; |
336 | 336 | ||
337 | /* HelloVerifyRequest resets Finished MAC */ | 337 | /* HelloVerifyRequest resets Finished MAC */ |
338 | if (s->version != DTLS1_BAD_VER) { | 338 | if (!ssl3_init_finished_mac(s)) { |
339 | if (!ssl3_init_finished_mac(s)) { | 339 | ret = -1; |
340 | ret = -1; | 340 | goto end; |
341 | goto end; | ||
342 | } | ||
343 | } | 341 | } |
344 | break; | 342 | break; |
345 | 343 | ||
diff --git a/src/lib/libssl/src/ssl/dtls1.h b/src/lib/libssl/src/ssl/dtls1.h index 1d65dc5821..5aed28e99a 100644 --- a/src/lib/libssl/src/ssl/dtls1.h +++ b/src/lib/libssl/src/ssl/dtls1.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dtls1.h,v 1.17 2015/02/09 10:53:28 jsing Exp $ */ | 1 | /* $OpenBSD: dtls1.h,v 1.18 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. |
@@ -73,7 +73,6 @@ extern "C" { | |||
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | #define DTLS1_VERSION 0xFEFF | 75 | #define DTLS1_VERSION 0xFEFF |
76 | #define DTLS1_BAD_VER 0x0100 | ||
77 | 76 | ||
78 | /* lengths of messages */ | 77 | /* lengths of messages */ |
79 | #define DTLS1_COOKIE_LENGTH 256 | 78 | #define DTLS1_COOKIE_LENGTH 256 |
diff --git a/src/lib/libssl/src/ssl/s3_srvr.c b/src/lib/libssl/src/ssl/s3_srvr.c index b2c4f8e0d2..4bbc160d58 100644 --- a/src/lib/libssl/src/ssl/s3_srvr.c +++ b/src/lib/libssl/src/ssl/s3_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_srvr.c,v 1.116 2015/09/10 15:56:26 jsing Exp $ */ | 1 | /* $OpenBSD: s3_srvr.c,v 1.117 2015/09/10 17:57:50 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 | * |
@@ -1650,7 +1650,7 @@ ssl3_get_client_key_exchange(SSL *s) | |||
1650 | rsa = pkey->pkey.rsa; | 1650 | rsa = pkey->pkey.rsa; |
1651 | 1651 | ||
1652 | /* TLS and [incidentally] DTLS{0xFEFF} */ | 1652 | /* TLS and [incidentally] DTLS{0xFEFF} */ |
1653 | if (s->version > SSL3_VERSION && s->version != DTLS1_BAD_VER) { | 1653 | if (s->version > SSL3_VERSION) { |
1654 | if (2 > n) | 1654 | if (2 > n) |
1655 | goto truncated; | 1655 | goto truncated; |
1656 | n2s(p, i); | 1656 | n2s(p, i); |
diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h index e7873f5ed4..7c815df8e1 100644 --- a/src/lib/libssl/src/ssl/ssl.h +++ b/src/lib/libssl/src/ssl/ssl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl.h,v 1.93 2015/08/27 06:21:15 doug Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.94 2015/09/10 17:57:50 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 | * |
@@ -302,7 +302,6 @@ extern "C" { | |||
302 | #define SSL_TXT_STREEBOG512 "STREEBOG512" | 302 | #define SSL_TXT_STREEBOG512 "STREEBOG512" |
303 | 303 | ||
304 | #define SSL_TXT_DTLS1 "DTLSv1" | 304 | #define SSL_TXT_DTLS1 "DTLSv1" |
305 | #define SSL_TXT_DTLS1_BAD "DTLSv1-bad" | ||
306 | #define SSL_TXT_SSLV2 "SSLv2" | 305 | #define SSL_TXT_SSLV2 "SSLv2" |
307 | #define SSL_TXT_SSLV3 "SSLv3" | 306 | #define SSL_TXT_SSLV3 "SSLv3" |
308 | #define SSL_TXT_TLSV1 "TLSv1" | 307 | #define SSL_TXT_TLSV1 "TLSv1" |
@@ -535,8 +534,6 @@ struct ssl_session_st { | |||
535 | #define SSL_OP_COOKIE_EXCHANGE 0x00002000L | 534 | #define SSL_OP_COOKIE_EXCHANGE 0x00002000L |
536 | /* Don't use RFC4507 ticket extension */ | 535 | /* Don't use RFC4507 ticket extension */ |
537 | #define SSL_OP_NO_TICKET 0x00004000L | 536 | #define SSL_OP_NO_TICKET 0x00004000L |
538 | /* Use Cisco's "speshul" version of DTLS_BAD_VER (as client) */ | ||
539 | #define SSL_OP_CISCO_ANYCONNECT 0x00008000L | ||
540 | 537 | ||
541 | /* As server, disallow session resumption on renegotiation */ | 538 | /* As server, disallow session resumption on renegotiation */ |
542 | #define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L | 539 | #define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L |
@@ -590,6 +587,7 @@ struct ssl_session_st { | |||
590 | #define SSL_OP_TLS_BLOCK_PADDING_BUG 0x0 | 587 | #define SSL_OP_TLS_BLOCK_PADDING_BUG 0x0 |
591 | #define SSL_OP_TLS_D5_BUG 0x0 | 588 | #define SSL_OP_TLS_D5_BUG 0x0 |
592 | #define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x0 | 589 | #define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x0 |
590 | #define SSL_OP_CISCO_ANYCONNECT 0x0 | ||
593 | 591 | ||
594 | /* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success | 592 | /* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success |
595 | * when just a single record has been written): */ | 593 | * when just a single record has been written): */ |
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index 8df885e9f7..7ace9fe688 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.107 2015/09/09 19:42:39 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.108 2015/09/10 17:57:50 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 | * |
@@ -2545,8 +2545,6 @@ const char * | |||
2545 | ssl_version_string(int ver) | 2545 | ssl_version_string(int ver) |
2546 | { | 2546 | { |
2547 | switch (ver) { | 2547 | switch (ver) { |
2548 | case DTLS1_BAD_VER: | ||
2549 | return (SSL_TXT_DTLS1_BAD); | ||
2550 | case DTLS1_VERSION: | 2548 | case DTLS1_VERSION: |
2551 | return (SSL_TXT_DTLS1); | 2549 | return (SSL_TXT_DTLS1); |
2552 | case TLS1_VERSION: | 2550 | case TLS1_VERSION: |
diff --git a/src/lib/libssl/src/ssl/ssl_sess.c b/src/lib/libssl/src/ssl/ssl_sess.c index 5d18c8a0b4..7052e8aa56 100644 --- a/src/lib/libssl/src/ssl/ssl_sess.c +++ b/src/lib/libssl/src/ssl/ssl_sess.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_sess.c,v 1.47 2015/09/10 15:56:26 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.48 2015/09/10 17:57:50 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 | * |
@@ -303,7 +303,6 @@ ssl_get_new_session(SSL *s, int session) | |||
303 | case TLS1_VERSION: | 303 | case TLS1_VERSION: |
304 | case TLS1_1_VERSION: | 304 | case TLS1_1_VERSION: |
305 | case TLS1_2_VERSION: | 305 | case TLS1_2_VERSION: |
306 | case DTLS1_BAD_VER: | ||
307 | case DTLS1_VERSION: | 306 | case DTLS1_VERSION: |
308 | ss->ssl_version = s->version; | 307 | ss->ssl_version = s->version; |
309 | ss->session_id_length = SSL3_SSL_SESSION_ID_LENGTH; | 308 | ss->session_id_length = SSL3_SSL_SESSION_ID_LENGTH; |
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index e7873f5ed4..7c815df8e1 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl.h,v 1.93 2015/08/27 06:21:15 doug Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.94 2015/09/10 17:57:50 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 | * |
@@ -302,7 +302,6 @@ extern "C" { | |||
302 | #define SSL_TXT_STREEBOG512 "STREEBOG512" | 302 | #define SSL_TXT_STREEBOG512 "STREEBOG512" |
303 | 303 | ||
304 | #define SSL_TXT_DTLS1 "DTLSv1" | 304 | #define SSL_TXT_DTLS1 "DTLSv1" |
305 | #define SSL_TXT_DTLS1_BAD "DTLSv1-bad" | ||
306 | #define SSL_TXT_SSLV2 "SSLv2" | 305 | #define SSL_TXT_SSLV2 "SSLv2" |
307 | #define SSL_TXT_SSLV3 "SSLv3" | 306 | #define SSL_TXT_SSLV3 "SSLv3" |
308 | #define SSL_TXT_TLSV1 "TLSv1" | 307 | #define SSL_TXT_TLSV1 "TLSv1" |
@@ -535,8 +534,6 @@ struct ssl_session_st { | |||
535 | #define SSL_OP_COOKIE_EXCHANGE 0x00002000L | 534 | #define SSL_OP_COOKIE_EXCHANGE 0x00002000L |
536 | /* Don't use RFC4507 ticket extension */ | 535 | /* Don't use RFC4507 ticket extension */ |
537 | #define SSL_OP_NO_TICKET 0x00004000L | 536 | #define SSL_OP_NO_TICKET 0x00004000L |
538 | /* Use Cisco's "speshul" version of DTLS_BAD_VER (as client) */ | ||
539 | #define SSL_OP_CISCO_ANYCONNECT 0x00008000L | ||
540 | 537 | ||
541 | /* As server, disallow session resumption on renegotiation */ | 538 | /* As server, disallow session resumption on renegotiation */ |
542 | #define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L | 539 | #define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L |
@@ -590,6 +587,7 @@ struct ssl_session_st { | |||
590 | #define SSL_OP_TLS_BLOCK_PADDING_BUG 0x0 | 587 | #define SSL_OP_TLS_BLOCK_PADDING_BUG 0x0 |
591 | #define SSL_OP_TLS_D5_BUG 0x0 | 588 | #define SSL_OP_TLS_D5_BUG 0x0 |
592 | #define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x0 | 589 | #define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x0 |
590 | #define SSL_OP_CISCO_ANYCONNECT 0x0 | ||
593 | 591 | ||
594 | /* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success | 592 | /* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success |
595 | * when just a single record has been written): */ | 593 | * when just a single record has been written): */ |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 8df885e9f7..7ace9fe688 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.107 2015/09/09 19:42:39 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.108 2015/09/10 17:57:50 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 | * |
@@ -2545,8 +2545,6 @@ const char * | |||
2545 | ssl_version_string(int ver) | 2545 | ssl_version_string(int ver) |
2546 | { | 2546 | { |
2547 | switch (ver) { | 2547 | switch (ver) { |
2548 | case DTLS1_BAD_VER: | ||
2549 | return (SSL_TXT_DTLS1_BAD); | ||
2550 | case DTLS1_VERSION: | 2548 | case DTLS1_VERSION: |
2551 | return (SSL_TXT_DTLS1); | 2549 | return (SSL_TXT_DTLS1); |
2552 | case TLS1_VERSION: | 2550 | case TLS1_VERSION: |
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index 5d18c8a0b4..7052e8aa56 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_sess.c,v 1.47 2015/09/10 15:56:26 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.48 2015/09/10 17:57:50 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 | * |
@@ -303,7 +303,6 @@ ssl_get_new_session(SSL *s, int session) | |||
303 | case TLS1_VERSION: | 303 | case TLS1_VERSION: |
304 | case TLS1_1_VERSION: | 304 | case TLS1_1_VERSION: |
305 | case TLS1_2_VERSION: | 305 | case TLS1_2_VERSION: |
306 | case DTLS1_BAD_VER: | ||
307 | case DTLS1_VERSION: | 306 | case DTLS1_VERSION: |
308 | ss->ssl_version = s->version; | 307 | ss->ssl_version = s->version; |
309 | ss->session_id_length = SSL3_SSL_SESSION_ID_LENGTH; | 308 | ss->session_id_length = SSL3_SSL_SESSION_ID_LENGTH; |