summaryrefslogtreecommitdiffstats
path: root/lib/libssl/d1_both.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-05-30 14:30:50 +0000
committertedu <tedu@openbsd.org>2014-05-30 14:30:50 +0000
commit1b294d8e2fcbdb25d1f046b2cbb9cbb644d23597 (patch)
tree2b58d1129172016074a403c60651f50bc02be631 /lib/libssl/d1_both.c
parentMake use of SSL_IS_DTLS, SSL_USE_EXPLICIT_IV, SSL_USE_SIGALGS and (diff)
downloadwireguard-openbsd-1b294d8e2fcbdb25d1f046b2cbb9cbb644d23597.tar.xz
wireguard-openbsd-1b294d8e2fcbdb25d1f046b2cbb9cbb644d23597.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 'lib/libssl/d1_both.c')
-rw-r--r--lib/libssl/d1_both.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c
index 59987bc1d8a..d62362e69a1 100644
--- a/lib/libssl/d1_both.c
+++ b/lib/libssl/d1_both.c
@@ -146,14 +146,6 @@
if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; ii >= 0 ; ii--) \
if (bitmask[ii] != 0xff) { is_complete = 0; break; } }
-#if 0
-#define RSMBLY_BITMASK_PRINT(bitmask, msg_len) { \
- long ii; \
- printf("bitmask: "); for (ii = 0; ii < (msg_len); ii++) \
- printf("%d ", (bitmask[ii >> 3] & (1 << (ii & 7))) >> (ii & 7)); \
- printf("\n"); }
-#endif
-
static unsigned char bitmask_start_values[] = {
0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80
};
@@ -250,28 +242,6 @@ dtls1_do_write(SSL *s, int type)
s->d1->mtu, NULL);
}
}
-#if 0
- mtu = s->d1->mtu;
-
- fprintf(stderr, "using MTU = %d\n", mtu);
-
- mtu -= (DTLS1_HM_HEADER_LENGTH + DTLS1_RT_HEADER_LENGTH);
-
- curr_mtu = mtu - BIO_wpending(SSL_get_wbio(s));
-
- if (curr_mtu > 0)
- mtu = curr_mtu;
- else if (( ret = BIO_flush(SSL_get_wbio(s))) <= 0)
- return ret;
-
- if (BIO_wpending(SSL_get_wbio(s)) + s->init_num >= mtu) {
- ret = BIO_flush(SSL_get_wbio(s));
- if (ret <= 0)
- return ret;
- mtu = s->d1->mtu - (DTLS1_HM_HEADER_LENGTH +
- DTLS1_RT_HEADER_LENGTH);
- }
-#endif
OPENSSL_assert(s->d1->mtu >= dtls1_min_mtu());
/* should have something reasonable now */
@@ -1064,19 +1034,6 @@ dtls1_read_failed(SSL *s, int code)
return code;
}
-#if 0 /* for now, each alert contains only one record number */
- item = pqueue_peek(state->rcvd_records);
- if (item ) {
- /* send an alert immediately for all the missing records */
- } else
-#endif
-
-#if 0 /* no more alert sending, just retransmit the last set of messages */
- if (state->timeout.read_timeouts >= DTLS1_TMO_READ_COUNT)
- ssl3_send_alert(s, SSL3_AL_WARNING,
- DTLS1_AD_MISSING_HANDSHAKE_MESSAGE);
-#endif
-
return dtls1_handle_timeout(s);
}
@@ -1172,12 +1129,6 @@ dtls1_buffer_message(SSL *s, int is_ccs)
return 0;
}
-#if 0
- fprintf(stderr, "buffered messge: \ttype = %xx\n", msg_buf->type);
- fprintf(stderr, "\t\t\t\t\tlen = %d\n", msg_buf->len);
- fprintf(stderr, "\t\t\t\t\tseq_num = %d\n", msg_buf->seq_num);
-#endif
-
pqueue_insert(s->d1->sent_messages, item);
return 1;
}