summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_both.c
diff options
context:
space:
mode:
authortedu <>2014-05-30 14:30:50 +0000
committertedu <>2014-05-30 14:30:50 +0000
commitd970fd597dc43c71716f5ce1db8f102515a73ad8 (patch)
treecbf937e75b5dc1f5e8f2452d45ad4d6942a9b1d4 /src/lib/libssl/d1_both.c
parentd7bb67cc99974281f55641afa52a0f9e8f1ff938 (diff)
downloadopenbsd-d970fd597dc43c71716f5ce1db8f102515a73ad8.tar.gz
openbsd-d970fd597dc43c71716f5ce1db8f102515a73ad8.tar.bz2
openbsd-d970fd597dc43c71716f5ce1db8f102515a73ad8.zip
remove some #if 0 code. we don't need any more reminders that we're using
a not quite appropriate data structure. ok jsing
Diffstat (limited to 'src/lib/libssl/d1_both.c')
-rw-r--r--src/lib/libssl/d1_both.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c
index 59987bc1d8..d62362e69a 100644
--- a/src/lib/libssl/d1_both.c
+++ b/src/lib/libssl/d1_both.c
@@ -146,14 +146,6 @@
146 if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; ii >= 0 ; ii--) \ 146 if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; ii >= 0 ; ii--) \
147 if (bitmask[ii] != 0xff) { is_complete = 0; break; } } 147 if (bitmask[ii] != 0xff) { is_complete = 0; break; } }
148 148
149#if 0
150#define RSMBLY_BITMASK_PRINT(bitmask, msg_len) { \
151 long ii; \
152 printf("bitmask: "); for (ii = 0; ii < (msg_len); ii++) \
153 printf("%d ", (bitmask[ii >> 3] & (1 << (ii & 7))) >> (ii & 7)); \
154 printf("\n"); }
155#endif
156
157static unsigned char bitmask_start_values[] = { 149static unsigned char bitmask_start_values[] = {
158 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80 150 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80
159}; 151};
@@ -250,28 +242,6 @@ dtls1_do_write(SSL *s, int type)
250 s->d1->mtu, NULL); 242 s->d1->mtu, NULL);
251 } 243 }
252 } 244 }
253#if 0
254 mtu = s->d1->mtu;
255
256 fprintf(stderr, "using MTU = %d\n", mtu);
257
258 mtu -= (DTLS1_HM_HEADER_LENGTH + DTLS1_RT_HEADER_LENGTH);
259
260 curr_mtu = mtu - BIO_wpending(SSL_get_wbio(s));
261
262 if (curr_mtu > 0)
263 mtu = curr_mtu;
264 else if (( ret = BIO_flush(SSL_get_wbio(s))) <= 0)
265 return ret;
266
267 if (BIO_wpending(SSL_get_wbio(s)) + s->init_num >= mtu) {
268 ret = BIO_flush(SSL_get_wbio(s));
269 if (ret <= 0)
270 return ret;
271 mtu = s->d1->mtu - (DTLS1_HM_HEADER_LENGTH +
272 DTLS1_RT_HEADER_LENGTH);
273 }
274#endif
275 245
276 OPENSSL_assert(s->d1->mtu >= dtls1_min_mtu()); 246 OPENSSL_assert(s->d1->mtu >= dtls1_min_mtu());
277 /* should have something reasonable now */ 247 /* should have something reasonable now */
@@ -1064,19 +1034,6 @@ dtls1_read_failed(SSL *s, int code)
1064 return code; 1034 return code;
1065 } 1035 }
1066 1036
1067#if 0 /* for now, each alert contains only one record number */
1068 item = pqueue_peek(state->rcvd_records);
1069 if (item ) {
1070 /* send an alert immediately for all the missing records */
1071 } else
1072#endif
1073
1074#if 0 /* no more alert sending, just retransmit the last set of messages */
1075 if (state->timeout.read_timeouts >= DTLS1_TMO_READ_COUNT)
1076 ssl3_send_alert(s, SSL3_AL_WARNING,
1077 DTLS1_AD_MISSING_HANDSHAKE_MESSAGE);
1078#endif
1079
1080 return dtls1_handle_timeout(s); 1037 return dtls1_handle_timeout(s);
1081} 1038}
1082 1039
@@ -1172,12 +1129,6 @@ dtls1_buffer_message(SSL *s, int is_ccs)
1172 return 0; 1129 return 0;
1173 } 1130 }
1174 1131
1175#if 0
1176 fprintf(stderr, "buffered messge: \ttype = %xx\n", msg_buf->type);
1177 fprintf(stderr, "\t\t\t\t\tlen = %d\n", msg_buf->len);
1178 fprintf(stderr, "\t\t\t\t\tseq_num = %d\n", msg_buf->seq_num);
1179#endif
1180
1181 pqueue_insert(s->d1->sent_messages, item); 1132 pqueue_insert(s->d1->sent_messages, item);
1182 return 1; 1133 return 1;
1183} 1134}