diff options
| author | tedu <> | 2014-05-30 14:30:50 +0000 |
|---|---|---|
| committer | tedu <> | 2014-05-30 14:30:50 +0000 |
| commit | d970fd597dc43c71716f5ce1db8f102515a73ad8 (patch) | |
| tree | cbf937e75b5dc1f5e8f2452d45ad4d6942a9b1d4 | |
| parent | d7bb67cc99974281f55641afa52a0f9e8f1ff938 (diff) | |
| download | openbsd-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 '')
38 files changed, 2 insertions, 802 deletions
diff --git a/src/lib/libssl/bio_ssl.c b/src/lib/libssl/bio_ssl.c index 8ffbe0a67a..3cd462e06f 100644 --- a/src/lib/libssl/bio_ssl.c +++ b/src/lib/libssl/bio_ssl.c | |||
| @@ -152,18 +152,6 @@ ssl_read(BIO *b, char *out, int outl) | |||
| 152 | 152 | ||
| 153 | BIO_clear_retry_flags(b); | 153 | BIO_clear_retry_flags(b); |
| 154 | 154 | ||
| 155 | #if 0 | ||
| 156 | if (!SSL_is_init_finished(ssl)) { | ||
| 157 | /* ret=SSL_do_handshake(ssl); */ | ||
| 158 | if (ret > 0) { | ||
| 159 | |||
| 160 | outflags = (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY); | ||
| 161 | ret = -1; | ||
| 162 | goto end; | ||
| 163 | } | ||
| 164 | } | ||
| 165 | #endif | ||
| 166 | /* if (ret > 0) */ | ||
| 167 | ret = SSL_read(ssl, out, outl); | 155 | ret = SSL_read(ssl, out, outl); |
| 168 | 156 | ||
| 169 | switch (SSL_get_error(ssl, ret)) { | 157 | switch (SSL_get_error(ssl, ret)) { |
| @@ -448,12 +436,7 @@ ssl_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
| 448 | break; | 436 | break; |
| 449 | case BIO_CTRL_SET_CALLBACK: | 437 | case BIO_CTRL_SET_CALLBACK: |
| 450 | { | 438 | { |
| 451 | #if 0 /* FIXME: Should this be used? -- Richard Levitte */ | ||
| 452 | SSLerr(SSL_F_SSL_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); | ||
| 453 | ret = -1; | ||
| 454 | #else | ||
| 455 | ret = 0; | 439 | ret = 0; |
| 456 | #endif | ||
| 457 | } | 440 | } |
| 458 | break; | 441 | break; |
| 459 | case BIO_CTRL_GET_CALLBACK: | 442 | case BIO_CTRL_GET_CALLBACK: |
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 | |||
| 157 | static unsigned char bitmask_start_values[] = { | 149 | static 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 | } |
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c index 4b8a11426f..e8b43f3268 100644 --- a/src/lib/libssl/d1_clnt.c +++ b/src/lib/libssl/d1_clnt.c | |||
| @@ -703,13 +703,6 @@ dtls1_connect(SSL *s) | |||
| 703 | /* clean a few things up */ | 703 | /* clean a few things up */ |
| 704 | ssl3_cleanup_key_block(s); | 704 | ssl3_cleanup_key_block(s); |
| 705 | 705 | ||
| 706 | #if 0 | ||
| 707 | if (s->init_buf != NULL) { | ||
| 708 | BUF_MEM_free(s->init_buf); | ||
| 709 | s->init_buf = NULL; | ||
| 710 | } | ||
| 711 | #endif | ||
| 712 | |||
| 713 | /* If we are not 'joining' the last two packets, | 706 | /* If we are not 'joining' the last two packets, |
| 714 | * remove the buffering now */ | 707 | * remove the buffering now */ |
| 715 | if (!(s->s3->flags & SSL3_FLAGS_POP_BUFFER)) | 708 | if (!(s->s3->flags & SSL3_FLAGS_POP_BUFFER)) |
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index d2f63b890b..87916eb763 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
| @@ -181,10 +181,6 @@ static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap); | |||
| 181 | static void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap); | 181 | static void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap); |
| 182 | static DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, | 182 | static DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, |
| 183 | unsigned int *is_next_epoch); | 183 | unsigned int *is_next_epoch); |
| 184 | #if 0 | ||
| 185 | static int dtls1_record_needs_buffering(SSL *s, SSL3_RECORD *rr, | ||
| 186 | unsigned short *priority, unsigned long *offset); | ||
| 187 | #endif | ||
| 188 | static int dtls1_buffer_record(SSL *s, record_pqueue *q, | 184 | static int dtls1_buffer_record(SSL *s, record_pqueue *q, |
| 189 | unsigned char *priority); | 185 | unsigned char *priority); |
| 190 | static int dtls1_process_record(SSL *s); | 186 | static int dtls1_process_record(SSL *s); |
| @@ -323,50 +319,6 @@ dtls1_process_buffered_records(SSL *s) | |||
| 323 | return (1); | 319 | return (1); |
| 324 | } | 320 | } |
| 325 | 321 | ||
| 326 | |||
| 327 | #if 0 | ||
| 328 | |||
| 329 | static int | ||
| 330 | dtls1_get_buffered_record(SSL *s) | ||
| 331 | { | ||
| 332 | pitem *item; | ||
| 333 | PQ_64BIT priority = | ||
| 334 | (((PQ_64BIT)s->d1->handshake_read_seq) << 32) | | ||
| 335 | ((PQ_64BIT)s->d1->r_msg_hdr.frag_off); | ||
| 336 | |||
| 337 | if (!SSL_in_init(s)) /* if we're not (re)negotiating, | ||
| 338 | nothing buffered */ | ||
| 339 | return 0; | ||
| 340 | |||
| 341 | |||
| 342 | item = pqueue_peek(s->d1->rcvd_records); | ||
| 343 | if (item && item->priority == priority) { | ||
| 344 | /* Check if we've received the record of interest. It must be | ||
| 345 | * a handshake record, since data records as passed up without | ||
| 346 | * buffering */ | ||
| 347 | DTLS1_RECORD_DATA *rdata; | ||
| 348 | item = pqueue_pop(s->d1->rcvd_records); | ||
| 349 | rdata = (DTLS1_RECORD_DATA *)item->data; | ||
| 350 | |||
| 351 | free(s->s3->rbuf.buf); | ||
| 352 | |||
| 353 | s->packet = rdata->packet; | ||
| 354 | s->packet_length = rdata->packet_length; | ||
| 355 | memcpy(&(s->s3->rbuf), &(rdata->rbuf), sizeof(SSL3_BUFFER)); | ||
| 356 | memcpy(&(s->s3->rrec), &(rdata->rrec), sizeof(SSL3_RECORD)); | ||
| 357 | |||
| 358 | free(item->data); | ||
| 359 | pitem_free(item); | ||
| 360 | |||
| 361 | /* s->d1->next_expected_seq_num++; */ | ||
| 362 | return (1); | ||
| 363 | } | ||
| 364 | |||
| 365 | return 0; | ||
| 366 | } | ||
| 367 | |||
| 368 | #endif | ||
| 369 | |||
| 370 | static int | 322 | static int |
| 371 | dtls1_process_record(SSL *s) | 323 | dtls1_process_record(SSL *s) |
| 372 | { | 324 | { |
| @@ -1069,29 +1021,6 @@ start: | |||
| 1069 | s->shutdown |= SSL_RECEIVED_SHUTDOWN; | 1021 | s->shutdown |= SSL_RECEIVED_SHUTDOWN; |
| 1070 | return (0); | 1022 | return (0); |
| 1071 | } | 1023 | } |
| 1072 | #if 0 | ||
| 1073 | /* XXX: this is a possible improvement in the future */ | ||
| 1074 | /* now check if it's a missing record */ | ||
| 1075 | if (alert_descr == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE) { | ||
| 1076 | unsigned short seq; | ||
| 1077 | unsigned int frag_off; | ||
| 1078 | unsigned char *p = &(s->d1->alert_fragment[2]); | ||
| 1079 | |||
| 1080 | n2s(p, seq); | ||
| 1081 | n2l3(p, frag_off); | ||
| 1082 | |||
| 1083 | dtls1_retransmit_message(s, | ||
| 1084 | dtls1_get_queue_priority(frag->msg_header.seq, 0), | ||
| 1085 | frag_off, &found); | ||
| 1086 | if (!found && SSL_in_init(s)) { | ||
| 1087 | /* fprintf( stderr,"in init = %d\n", SSL_in_init(s)); */ | ||
| 1088 | /* requested a message not yet sent, | ||
| 1089 | send an alert ourselves */ | ||
| 1090 | ssl3_send_alert(s, SSL3_AL_WARNING, | ||
| 1091 | DTLS1_AD_MISSING_HANDSHAKE_MESSAGE); | ||
| 1092 | } | ||
| 1093 | } | ||
| 1094 | #endif | ||
| 1095 | } else if (alert_level == 2) /* fatal */ | 1024 | } else if (alert_level == 2) /* fatal */ |
| 1096 | { | 1025 | { |
| 1097 | s->rwstate = SSL_NOTHING; | 1026 | s->rwstate = SSL_NOTHING; |
| @@ -1506,13 +1435,6 @@ do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len) | |||
| 1506 | wr->type=type; /* not needed but helps for debugging */ | 1435 | wr->type=type; /* not needed but helps for debugging */ |
| 1507 | wr->length += DTLS1_RT_HEADER_LENGTH; | 1436 | wr->length += DTLS1_RT_HEADER_LENGTH; |
| 1508 | 1437 | ||
| 1509 | #if 0 /* this is now done at the message layer */ | ||
| 1510 | /* buffer the record, making it easy to handle retransmits */ | ||
| 1511 | if (type == SSL3_RT_HANDSHAKE || type == SSL3_RT_CHANGE_CIPHER_SPEC) | ||
| 1512 | dtls1_buffer_record(s, wr->data, wr->length, | ||
| 1513 | *((PQ_64BIT *)&(s->s3->write_sequence[0]))); | ||
| 1514 | #endif | ||
| 1515 | |||
| 1516 | ssl3_record_sequence_update(&(s->s3->write_sequence[0])); | 1438 | ssl3_record_sequence_update(&(s->s3->write_sequence[0])); |
| 1517 | 1439 | ||
| 1518 | /* now let's set up wb */ | 1440 | /* now let's set up wb */ |
| @@ -1596,16 +1518,6 @@ dtls1_dispatch_alert(SSL *s) | |||
| 1596 | #ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE | 1518 | #ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE |
| 1597 | if (s->s3->send_alert[1] == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE) { | 1519 | if (s->s3->send_alert[1] == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE) { |
| 1598 | s2n(s->d1->handshake_read_seq, ptr); | 1520 | s2n(s->d1->handshake_read_seq, ptr); |
| 1599 | #if 0 | ||
| 1600 | if ( s->d1->r_msg_hdr.frag_off == 0) /* waiting for a new msg */ | ||
| 1601 | |||
| 1602 | else | ||
| 1603 | s2n(s->d1->r_msg_hdr.seq, ptr); /* partial msg read */ | ||
| 1604 | #endif | ||
| 1605 | |||
| 1606 | #if 0 | ||
| 1607 | fprintf(stderr, "s->d1->handshake_read_seq = %d, s->d1->r_msg_hdr.seq = %d\n", s->d1->handshake_read_seq, s->d1->r_msg_hdr.seq); | ||
| 1608 | #endif | ||
| 1609 | l2n3(s->d1->r_msg_hdr.frag_off, ptr); | 1521 | l2n3(s->d1->r_msg_hdr.frag_off, ptr); |
| 1610 | } | 1522 | } |
| 1611 | #endif | 1523 | #endif |
| @@ -1660,64 +1572,6 @@ dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, unsigned int *is_next_epoch) | |||
| 1660 | return NULL; | 1572 | return NULL; |
| 1661 | } | 1573 | } |
| 1662 | 1574 | ||
| 1663 | #if 0 | ||
| 1664 | static int | ||
| 1665 | dtls1_record_needs_buffering(SSL *s, SSL3_RECORD *rr, unsigned short *priority, | ||
| 1666 | unsigned long *offset) | ||
| 1667 | { | ||
| 1668 | |||
| 1669 | /* alerts are passed up immediately */ | ||
| 1670 | if (rr->type == SSL3_RT_APPLICATION_DATA || rr->type == SSL3_RT_ALERT) | ||
| 1671 | return 0; | ||
| 1672 | |||
| 1673 | /* Only need to buffer if a handshake is underway. | ||
| 1674 | * (this implies that Hello Request and Client Hello are passed up | ||
| 1675 | * immediately) */ | ||
| 1676 | if (SSL_in_init(s)) { | ||
| 1677 | unsigned char *data = rr->data; | ||
| 1678 | /* need to extract the HM/CCS sequence number here */ | ||
| 1679 | if (rr->type == SSL3_RT_HANDSHAKE || | ||
| 1680 | rr->type == SSL3_RT_CHANGE_CIPHER_SPEC) { | ||
| 1681 | unsigned short seq_num; | ||
| 1682 | struct hm_header_st msg_hdr; | ||
| 1683 | struct ccs_header_st ccs_hdr; | ||
| 1684 | |||
| 1685 | if (rr->type == SSL3_RT_HANDSHAKE) { | ||
| 1686 | dtls1_get_message_header(data, &msg_hdr); | ||
| 1687 | seq_num = msg_hdr.seq; | ||
| 1688 | *offset = msg_hdr.frag_off; | ||
| 1689 | } else { | ||
| 1690 | dtls1_get_ccs_header(data, &ccs_hdr); | ||
| 1691 | seq_num = ccs_hdr.seq; | ||
| 1692 | *offset = 0; | ||
| 1693 | } | ||
| 1694 | |||
| 1695 | /* this is either a record we're waiting for, or a | ||
| 1696 | * retransmit of something we happened to previously | ||
| 1697 | * receive (higher layers will drop the repeat silently */ | ||
| 1698 | if (seq_num < s->d1->handshake_read_seq) | ||
| 1699 | return 0; | ||
| 1700 | if (rr->type == SSL3_RT_HANDSHAKE && | ||
| 1701 | seq_num == s->d1->handshake_read_seq && | ||
| 1702 | msg_hdr.frag_off < s->d1->r_msg_hdr.frag_off) | ||
| 1703 | return 0; | ||
| 1704 | else if (seq_num == s->d1->handshake_read_seq && | ||
| 1705 | (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC || | ||
| 1706 | msg_hdr.frag_off == s->d1->r_msg_hdr.frag_off)) | ||
| 1707 | return 0; | ||
| 1708 | else { | ||
| 1709 | *priority = seq_num; | ||
| 1710 | return 1; | ||
| 1711 | } | ||
| 1712 | } | ||
| 1713 | else /* unknown record type */ | ||
| 1714 | return 0; | ||
| 1715 | } | ||
| 1716 | |||
| 1717 | return 0; | ||
| 1718 | } | ||
| 1719 | #endif | ||
| 1720 | |||
| 1721 | void | 1575 | void |
| 1722 | dtls1_reset_seq_numbers(SSL *s, int rw) | 1576 | dtls1_reset_seq_numbers(SSL *s, int rw) |
| 1723 | { | 1577 | { |
diff --git a/src/lib/libssl/d1_srtp.c b/src/lib/libssl/d1_srtp.c index 146ce321c8..f069848b7e 100644 --- a/src/lib/libssl/d1_srtp.c +++ b/src/lib/libssl/d1_srtp.c | |||
| @@ -133,16 +133,6 @@ static SRTP_PROTECTION_PROFILE srtp_known_profiles[]= { | |||
| 133 | "SRTP_AES128_CM_SHA1_32", | 133 | "SRTP_AES128_CM_SHA1_32", |
| 134 | SRTP_AES128_CM_SHA1_32, | 134 | SRTP_AES128_CM_SHA1_32, |
| 135 | }, | 135 | }, |
| 136 | #if 0 | ||
| 137 | { | ||
| 138 | "SRTP_NULL_SHA1_80", | ||
| 139 | SRTP_NULL_SHA1_80, | ||
| 140 | }, | ||
| 141 | { | ||
| 142 | "SRTP_NULL_SHA1_32", | ||
| 143 | SRTP_NULL_SHA1_32, | ||
| 144 | }, | ||
| 145 | #endif | ||
| 146 | {0} | 136 | {0} |
| 147 | }; | 137 | }; |
| 148 | 138 | ||
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c index 3f872de48b..368afda77a 100644 --- a/src/lib/libssl/d1_srvr.c +++ b/src/lib/libssl/d1_srvr.c | |||
| @@ -782,11 +782,6 @@ dtls1_accept(SSL *s) | |||
| 782 | /* clean a few things up */ | 782 | /* clean a few things up */ |
| 783 | ssl3_cleanup_key_block(s); | 783 | ssl3_cleanup_key_block(s); |
| 784 | 784 | ||
| 785 | #if 0 | ||
| 786 | BUF_MEM_free(s->init_buf); | ||
| 787 | s->init_buf = NULL; | ||
| 788 | #endif | ||
| 789 | |||
| 790 | /* remove buffering on output */ | 785 | /* remove buffering on output */ |
| 791 | ssl_free_wbio_buffer(s); | 786 | ssl_free_wbio_buffer(s); |
| 792 | 787 | ||
diff --git a/src/lib/libssl/dtls1.h b/src/lib/libssl/dtls1.h index 2fbb815b6d..b0cf839b78 100644 --- a/src/lib/libssl/dtls1.h +++ b/src/lib/libssl/dtls1.h | |||
| @@ -73,11 +73,6 @@ extern "C" { | |||
| 73 | #define DTLS1_VERSION 0xFEFF | 73 | #define DTLS1_VERSION 0xFEFF |
| 74 | #define DTLS1_BAD_VER 0x0100 | 74 | #define DTLS1_BAD_VER 0x0100 |
| 75 | 75 | ||
| 76 | #if 0 | ||
| 77 | /* this alert description is not specified anywhere... */ | ||
| 78 | #define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 110 | ||
| 79 | #endif | ||
| 80 | |||
| 81 | /* lengths of messages */ | 76 | /* lengths of messages */ |
| 82 | #define DTLS1_COOKIE_LENGTH 256 | 77 | #define DTLS1_COOKIE_LENGTH 256 |
| 83 | 78 | ||
diff --git a/src/lib/libssl/s23_clnt.c b/src/lib/libssl/s23_clnt.c index 897ac7efe3..5361d5bea8 100644 --- a/src/lib/libssl/s23_clnt.c +++ b/src/lib/libssl/s23_clnt.c | |||
| @@ -351,13 +351,6 @@ ssl23_client_hello(SSL *s) | |||
| 351 | 351 | ||
| 352 | buf = (unsigned char *)s->init_buf->data; | 352 | buf = (unsigned char *)s->init_buf->data; |
| 353 | if (s->state == SSL23_ST_CW_CLNT_HELLO_A) { | 353 | if (s->state == SSL23_ST_CW_CLNT_HELLO_A) { |
| 354 | #if 0 | ||
| 355 | /* don't reuse session-id's */ | ||
| 356 | if (!ssl_get_new_session(s, 0)) { | ||
| 357 | return (-1); | ||
| 358 | } | ||
| 359 | #endif | ||
| 360 | |||
| 361 | p = s->s3->client_random; | 354 | p = s->s3->client_random; |
| 362 | if (ssl_fill_hello_random(s, 0, p, SSL3_RANDOM_SIZE) <= 0) | 355 | if (ssl_fill_hello_random(s, 0, p, SSL3_RANDOM_SIZE) <= 0) |
| 363 | return -1; | 356 | return -1; |
diff --git a/src/lib/libssl/s23_srvr.c b/src/lib/libssl/s23_srvr.c index 53e06706e3..a6c5d1b8a9 100644 --- a/src/lib/libssl/s23_srvr.c +++ b/src/lib/libssl/s23_srvr.c | |||
| @@ -490,14 +490,6 @@ ssl23_get_client_hello(SSL *s) | |||
| 490 | *(d++) = 1; | 490 | *(d++) = 1; |
| 491 | *(d++) = 0; | 491 | *(d++) = 0; |
| 492 | 492 | ||
| 493 | #if 0 | ||
| 494 | /* copy any remaining data with may be extensions */ | ||
| 495 | p = p + csl + sil + cl; | ||
| 496 | while (p < s->packet + s->packet_length) { | ||
| 497 | *(d++)=*(p++); | ||
| 498 | } | ||
| 499 | #endif | ||
| 500 | |||
| 501 | i = (d - (unsigned char *)s->init_buf->data) - 4; | 493 | i = (d - (unsigned char *)s->init_buf->data) - 4; |
| 502 | l2n3((long)i, d_len); | 494 | l2n3((long)i, d_len); |
| 503 | 495 | ||
| @@ -550,9 +542,6 @@ ssl23_get_client_hello(SSL *s) | |||
| 550 | s->method = TLSv1_server_method(); | 542 | s->method = TLSv1_server_method(); |
| 551 | else | 543 | else |
| 552 | s->method = SSLv3_server_method(); | 544 | s->method = SSLv3_server_method(); |
| 553 | #if 0 /* ssl3_get_client_hello does this */ | ||
| 554 | s->client_version = (v[0]<<8)|v[1]; | ||
| 555 | #endif | ||
| 556 | s->handshake_func = s->method->ssl_accept; | 545 | s->handshake_func = s->method->ssl_accept; |
| 557 | } | 546 | } |
| 558 | 547 | ||
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index abe5c5a86b..bda14069c1 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
| @@ -730,14 +730,8 @@ ssl3_client_hello(SSL *s) | |||
| 730 | * client_version in client hello and not resetting it to | 730 | * client_version in client hello and not resetting it to |
| 731 | * the negotiated version. | 731 | * the negotiated version. |
| 732 | */ | 732 | */ |
| 733 | #if 0 | ||
| 734 | *(p++) = s->version >> 8; | ||
| 735 | *(p++) = s->version&0xff; | ||
| 736 | s->client_version = s->version; | ||
| 737 | #else | ||
| 738 | *(p++) = s->client_version >> 8; | 733 | *(p++) = s->client_version >> 8; |
| 739 | *(p++) = s->client_version & 0xff; | 734 | *(p++) = s->client_version & 0xff; |
| 740 | #endif | ||
| 741 | 735 | ||
| 742 | /* Random stuff */ | 736 | /* Random stuff */ |
| 743 | memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE); | 737 | memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE); |
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index da69caa6dd..477c53b15b 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
| @@ -2999,17 +2999,12 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
| 2999 | /* Let's see which ciphers we can support */ | 2999 | /* Let's see which ciphers we can support */ |
| 3000 | cert = s->cert; | 3000 | cert = s->cert; |
| 3001 | 3001 | ||
| 3002 | #if 0 | ||
| 3003 | /* | 3002 | /* |
| 3004 | * Do not set the compare functions, because this may lead to a | 3003 | * Do not set the compare functions, because this may lead to a |
| 3005 | * reordering by "id". We want to keep the original ordering. | 3004 | * reordering by "id". We want to keep the original ordering. |
| 3006 | * We may pay a price in performance during sk_SSL_CIPHER_find(), | 3005 | * We may pay a price in performance during sk_SSL_CIPHER_find(), |
| 3007 | * but would have to pay with the price of sk_SSL_CIPHER_dup(). | 3006 | * but would have to pay with the price of sk_SSL_CIPHER_dup(). |
| 3008 | */ | 3007 | */ |
| 3009 | sk_SSL_CIPHER_set_cmp_func(srvr, ssl_cipher_ptr_id_cmp); | ||
| 3010 | sk_SSL_CIPHER_set_cmp_func(clnt, ssl_cipher_ptr_id_cmp); | ||
| 3011 | #endif | ||
| 3012 | |||
| 3013 | 3008 | ||
| 3014 | if (s->options & SSL_OP_CIPHER_SERVER_PREFERENCE) { | 3009 | if (s->options & SSL_OP_CIPHER_SERVER_PREFERENCE) { |
| 3015 | prio = srvr; | 3010 | prio = srvr; |
| @@ -3267,9 +3262,7 @@ ssl3_shutdown(SSL *s) | |||
| 3267 | 3262 | ||
| 3268 | if (!(s->shutdown & SSL_SENT_SHUTDOWN)) { | 3263 | if (!(s->shutdown & SSL_SENT_SHUTDOWN)) { |
| 3269 | s->shutdown|=SSL_SENT_SHUTDOWN; | 3264 | s->shutdown|=SSL_SENT_SHUTDOWN; |
| 3270 | #if 1 | ||
| 3271 | ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_CLOSE_NOTIFY); | 3265 | ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_CLOSE_NOTIFY); |
| 3272 | #endif | ||
| 3273 | /* | 3266 | /* |
| 3274 | * Our shutdown alert has been sent now, and if it still needs | 3267 | * Our shutdown alert has been sent now, and if it still needs |
| 3275 | * to be written, s->s3->alert_dispatch will be true | 3268 | * to be written, s->s3->alert_dispatch will be true |
| @@ -3278,7 +3271,6 @@ ssl3_shutdown(SSL *s) | |||
| 3278 | return(-1); /* return WANT_WRITE */ | 3271 | return(-1); /* return WANT_WRITE */ |
| 3279 | } else if (s->s3->alert_dispatch) { | 3272 | } else if (s->s3->alert_dispatch) { |
| 3280 | /* resend it if not sent */ | 3273 | /* resend it if not sent */ |
| 3281 | #if 1 | ||
| 3282 | ret = s->method->ssl_dispatch_alert(s); | 3274 | ret = s->method->ssl_dispatch_alert(s); |
| 3283 | if (ret == -1) { | 3275 | if (ret == -1) { |
| 3284 | /* | 3276 | /* |
| @@ -3289,7 +3281,6 @@ ssl3_shutdown(SSL *s) | |||
| 3289 | */ | 3281 | */ |
| 3290 | return (ret); | 3282 | return (ret); |
| 3291 | } | 3283 | } |
| 3292 | #endif | ||
| 3293 | } else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) { | 3284 | } else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) { |
| 3294 | /* If we are waiting for a close from our peer, we are closed */ | 3285 | /* If we are waiting for a close from our peer, we are closed */ |
| 3295 | s->method->ssl_read_bytes(s, 0, NULL, 0, 0); | 3286 | s->method->ssl_read_bytes(s, 0, NULL, 0, 0); |
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c index b8be8b5255..f8f31f2a4a 100644 --- a/src/lib/libssl/s3_pkt.c +++ b/src/lib/libssl/s3_pkt.c | |||
| @@ -645,11 +645,7 @@ do_ssl3_write(SSL *s, int type, const unsigned char *buf, | |||
| 645 | 645 | ||
| 646 | if ((sess == NULL) || (s->enc_write_ctx == NULL) || | 646 | if ((sess == NULL) || (s->enc_write_ctx == NULL) || |
| 647 | (EVP_MD_CTX_md(s->write_hash) == NULL)) { | 647 | (EVP_MD_CTX_md(s->write_hash) == NULL)) { |
| 648 | #if 1 | ||
| 649 | clear = s->enc_write_ctx ? 0 : 1; /* must be AEAD cipher */ | 648 | clear = s->enc_write_ctx ? 0 : 1; /* must be AEAD cipher */ |
| 650 | #else | ||
| 651 | clear = 1; | ||
| 652 | #endif | ||
| 653 | mac_size = 0; | 649 | mac_size = 0; |
| 654 | } else { | 650 | } else { |
| 655 | mac_size = EVP_MD_CTX_size(s->write_hash); | 651 | mac_size = EVP_MD_CTX_size(s->write_hash); |
diff --git a/src/lib/libssl/src/ssl/bio_ssl.c b/src/lib/libssl/src/ssl/bio_ssl.c index 8ffbe0a67a..3cd462e06f 100644 --- a/src/lib/libssl/src/ssl/bio_ssl.c +++ b/src/lib/libssl/src/ssl/bio_ssl.c | |||
| @@ -152,18 +152,6 @@ ssl_read(BIO *b, char *out, int outl) | |||
| 152 | 152 | ||
| 153 | BIO_clear_retry_flags(b); | 153 | BIO_clear_retry_flags(b); |
| 154 | 154 | ||
| 155 | #if 0 | ||
| 156 | if (!SSL_is_init_finished(ssl)) { | ||
| 157 | /* ret=SSL_do_handshake(ssl); */ | ||
| 158 | if (ret > 0) { | ||
| 159 | |||
| 160 | outflags = (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY); | ||
| 161 | ret = -1; | ||
| 162 | goto end; | ||
| 163 | } | ||
| 164 | } | ||
| 165 | #endif | ||
| 166 | /* if (ret > 0) */ | ||
| 167 | ret = SSL_read(ssl, out, outl); | 155 | ret = SSL_read(ssl, out, outl); |
| 168 | 156 | ||
| 169 | switch (SSL_get_error(ssl, ret)) { | 157 | switch (SSL_get_error(ssl, ret)) { |
| @@ -448,12 +436,7 @@ ssl_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
| 448 | break; | 436 | break; |
| 449 | case BIO_CTRL_SET_CALLBACK: | 437 | case BIO_CTRL_SET_CALLBACK: |
| 450 | { | 438 | { |
| 451 | #if 0 /* FIXME: Should this be used? -- Richard Levitte */ | ||
| 452 | SSLerr(SSL_F_SSL_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); | ||
| 453 | ret = -1; | ||
| 454 | #else | ||
| 455 | ret = 0; | 439 | ret = 0; |
| 456 | #endif | ||
| 457 | } | 440 | } |
| 458 | break; | 441 | break; |
| 459 | case BIO_CTRL_GET_CALLBACK: | 442 | case BIO_CTRL_GET_CALLBACK: |
diff --git a/src/lib/libssl/src/ssl/d1_both.c b/src/lib/libssl/src/ssl/d1_both.c index 59987bc1d8..d62362e69a 100644 --- a/src/lib/libssl/src/ssl/d1_both.c +++ b/src/lib/libssl/src/ssl/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 | |||
| 157 | static unsigned char bitmask_start_values[] = { | 149 | static 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 | } |
diff --git a/src/lib/libssl/src/ssl/d1_clnt.c b/src/lib/libssl/src/ssl/d1_clnt.c index 4b8a11426f..e8b43f3268 100644 --- a/src/lib/libssl/src/ssl/d1_clnt.c +++ b/src/lib/libssl/src/ssl/d1_clnt.c | |||
| @@ -703,13 +703,6 @@ dtls1_connect(SSL *s) | |||
| 703 | /* clean a few things up */ | 703 | /* clean a few things up */ |
| 704 | ssl3_cleanup_key_block(s); | 704 | ssl3_cleanup_key_block(s); |
| 705 | 705 | ||
| 706 | #if 0 | ||
| 707 | if (s->init_buf != NULL) { | ||
| 708 | BUF_MEM_free(s->init_buf); | ||
| 709 | s->init_buf = NULL; | ||
| 710 | } | ||
| 711 | #endif | ||
| 712 | |||
| 713 | /* If we are not 'joining' the last two packets, | 706 | /* If we are not 'joining' the last two packets, |
| 714 | * remove the buffering now */ | 707 | * remove the buffering now */ |
| 715 | if (!(s->s3->flags & SSL3_FLAGS_POP_BUFFER)) | 708 | if (!(s->s3->flags & SSL3_FLAGS_POP_BUFFER)) |
diff --git a/src/lib/libssl/src/ssl/d1_pkt.c b/src/lib/libssl/src/ssl/d1_pkt.c index d2f63b890b..87916eb763 100644 --- a/src/lib/libssl/src/ssl/d1_pkt.c +++ b/src/lib/libssl/src/ssl/d1_pkt.c | |||
| @@ -181,10 +181,6 @@ static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap); | |||
| 181 | static void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap); | 181 | static void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap); |
| 182 | static DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, | 182 | static DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, |
| 183 | unsigned int *is_next_epoch); | 183 | unsigned int *is_next_epoch); |
| 184 | #if 0 | ||
| 185 | static int dtls1_record_needs_buffering(SSL *s, SSL3_RECORD *rr, | ||
| 186 | unsigned short *priority, unsigned long *offset); | ||
| 187 | #endif | ||
| 188 | static int dtls1_buffer_record(SSL *s, record_pqueue *q, | 184 | static int dtls1_buffer_record(SSL *s, record_pqueue *q, |
| 189 | unsigned char *priority); | 185 | unsigned char *priority); |
| 190 | static int dtls1_process_record(SSL *s); | 186 | static int dtls1_process_record(SSL *s); |
| @@ -323,50 +319,6 @@ dtls1_process_buffered_records(SSL *s) | |||
| 323 | return (1); | 319 | return (1); |
| 324 | } | 320 | } |
| 325 | 321 | ||
| 326 | |||
| 327 | #if 0 | ||
| 328 | |||
| 329 | static int | ||
| 330 | dtls1_get_buffered_record(SSL *s) | ||
| 331 | { | ||
| 332 | pitem *item; | ||
| 333 | PQ_64BIT priority = | ||
| 334 | (((PQ_64BIT)s->d1->handshake_read_seq) << 32) | | ||
| 335 | ((PQ_64BIT)s->d1->r_msg_hdr.frag_off); | ||
| 336 | |||
| 337 | if (!SSL_in_init(s)) /* if we're not (re)negotiating, | ||
| 338 | nothing buffered */ | ||
| 339 | return 0; | ||
| 340 | |||
| 341 | |||
| 342 | item = pqueue_peek(s->d1->rcvd_records); | ||
| 343 | if (item && item->priority == priority) { | ||
| 344 | /* Check if we've received the record of interest. It must be | ||
| 345 | * a handshake record, since data records as passed up without | ||
| 346 | * buffering */ | ||
| 347 | DTLS1_RECORD_DATA *rdata; | ||
| 348 | item = pqueue_pop(s->d1->rcvd_records); | ||
| 349 | rdata = (DTLS1_RECORD_DATA *)item->data; | ||
| 350 | |||
| 351 | free(s->s3->rbuf.buf); | ||
| 352 | |||
| 353 | s->packet = rdata->packet; | ||
| 354 | s->packet_length = rdata->packet_length; | ||
| 355 | memcpy(&(s->s3->rbuf), &(rdata->rbuf), sizeof(SSL3_BUFFER)); | ||
| 356 | memcpy(&(s->s3->rrec), &(rdata->rrec), sizeof(SSL3_RECORD)); | ||
| 357 | |||
| 358 | free(item->data); | ||
| 359 | pitem_free(item); | ||
| 360 | |||
| 361 | /* s->d1->next_expected_seq_num++; */ | ||
| 362 | return (1); | ||
| 363 | } | ||
| 364 | |||
| 365 | return 0; | ||
| 366 | } | ||
| 367 | |||
| 368 | #endif | ||
| 369 | |||
| 370 | static int | 322 | static int |
| 371 | dtls1_process_record(SSL *s) | 323 | dtls1_process_record(SSL *s) |
| 372 | { | 324 | { |
| @@ -1069,29 +1021,6 @@ start: | |||
| 1069 | s->shutdown |= SSL_RECEIVED_SHUTDOWN; | 1021 | s->shutdown |= SSL_RECEIVED_SHUTDOWN; |
| 1070 | return (0); | 1022 | return (0); |
| 1071 | } | 1023 | } |
| 1072 | #if 0 | ||
| 1073 | /* XXX: this is a possible improvement in the future */ | ||
| 1074 | /* now check if it's a missing record */ | ||
| 1075 | if (alert_descr == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE) { | ||
| 1076 | unsigned short seq; | ||
| 1077 | unsigned int frag_off; | ||
| 1078 | unsigned char *p = &(s->d1->alert_fragment[2]); | ||
| 1079 | |||
| 1080 | n2s(p, seq); | ||
| 1081 | n2l3(p, frag_off); | ||
| 1082 | |||
| 1083 | dtls1_retransmit_message(s, | ||
| 1084 | dtls1_get_queue_priority(frag->msg_header.seq, 0), | ||
| 1085 | frag_off, &found); | ||
| 1086 | if (!found && SSL_in_init(s)) { | ||
| 1087 | /* fprintf( stderr,"in init = %d\n", SSL_in_init(s)); */ | ||
| 1088 | /* requested a message not yet sent, | ||
| 1089 | send an alert ourselves */ | ||
| 1090 | ssl3_send_alert(s, SSL3_AL_WARNING, | ||
| 1091 | DTLS1_AD_MISSING_HANDSHAKE_MESSAGE); | ||
| 1092 | } | ||
| 1093 | } | ||
| 1094 | #endif | ||
| 1095 | } else if (alert_level == 2) /* fatal */ | 1024 | } else if (alert_level == 2) /* fatal */ |
| 1096 | { | 1025 | { |
| 1097 | s->rwstate = SSL_NOTHING; | 1026 | s->rwstate = SSL_NOTHING; |
| @@ -1506,13 +1435,6 @@ do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len) | |||
| 1506 | wr->type=type; /* not needed but helps for debugging */ | 1435 | wr->type=type; /* not needed but helps for debugging */ |
| 1507 | wr->length += DTLS1_RT_HEADER_LENGTH; | 1436 | wr->length += DTLS1_RT_HEADER_LENGTH; |
| 1508 | 1437 | ||
| 1509 | #if 0 /* this is now done at the message layer */ | ||
| 1510 | /* buffer the record, making it easy to handle retransmits */ | ||
| 1511 | if (type == SSL3_RT_HANDSHAKE || type == SSL3_RT_CHANGE_CIPHER_SPEC) | ||
| 1512 | dtls1_buffer_record(s, wr->data, wr->length, | ||
| 1513 | *((PQ_64BIT *)&(s->s3->write_sequence[0]))); | ||
| 1514 | #endif | ||
| 1515 | |||
| 1516 | ssl3_record_sequence_update(&(s->s3->write_sequence[0])); | 1438 | ssl3_record_sequence_update(&(s->s3->write_sequence[0])); |
| 1517 | 1439 | ||
| 1518 | /* now let's set up wb */ | 1440 | /* now let's set up wb */ |
| @@ -1596,16 +1518,6 @@ dtls1_dispatch_alert(SSL *s) | |||
| 1596 | #ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE | 1518 | #ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE |
| 1597 | if (s->s3->send_alert[1] == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE) { | 1519 | if (s->s3->send_alert[1] == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE) { |
| 1598 | s2n(s->d1->handshake_read_seq, ptr); | 1520 | s2n(s->d1->handshake_read_seq, ptr); |
| 1599 | #if 0 | ||
| 1600 | if ( s->d1->r_msg_hdr.frag_off == 0) /* waiting for a new msg */ | ||
| 1601 | |||
| 1602 | else | ||
| 1603 | s2n(s->d1->r_msg_hdr.seq, ptr); /* partial msg read */ | ||
| 1604 | #endif | ||
| 1605 | |||
| 1606 | #if 0 | ||
| 1607 | fprintf(stderr, "s->d1->handshake_read_seq = %d, s->d1->r_msg_hdr.seq = %d\n", s->d1->handshake_read_seq, s->d1->r_msg_hdr.seq); | ||
| 1608 | #endif | ||
| 1609 | l2n3(s->d1->r_msg_hdr.frag_off, ptr); | 1521 | l2n3(s->d1->r_msg_hdr.frag_off, ptr); |
| 1610 | } | 1522 | } |
| 1611 | #endif | 1523 | #endif |
| @@ -1660,64 +1572,6 @@ dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, unsigned int *is_next_epoch) | |||
| 1660 | return NULL; | 1572 | return NULL; |
| 1661 | } | 1573 | } |
| 1662 | 1574 | ||
| 1663 | #if 0 | ||
| 1664 | static int | ||
| 1665 | dtls1_record_needs_buffering(SSL *s, SSL3_RECORD *rr, unsigned short *priority, | ||
| 1666 | unsigned long *offset) | ||
| 1667 | { | ||
| 1668 | |||
| 1669 | /* alerts are passed up immediately */ | ||
| 1670 | if (rr->type == SSL3_RT_APPLICATION_DATA || rr->type == SSL3_RT_ALERT) | ||
| 1671 | return 0; | ||
| 1672 | |||
| 1673 | /* Only need to buffer if a handshake is underway. | ||
| 1674 | * (this implies that Hello Request and Client Hello are passed up | ||
| 1675 | * immediately) */ | ||
| 1676 | if (SSL_in_init(s)) { | ||
| 1677 | unsigned char *data = rr->data; | ||
| 1678 | /* need to extract the HM/CCS sequence number here */ | ||
| 1679 | if (rr->type == SSL3_RT_HANDSHAKE || | ||
| 1680 | rr->type == SSL3_RT_CHANGE_CIPHER_SPEC) { | ||
| 1681 | unsigned short seq_num; | ||
| 1682 | struct hm_header_st msg_hdr; | ||
| 1683 | struct ccs_header_st ccs_hdr; | ||
| 1684 | |||
| 1685 | if (rr->type == SSL3_RT_HANDSHAKE) { | ||
| 1686 | dtls1_get_message_header(data, &msg_hdr); | ||
| 1687 | seq_num = msg_hdr.seq; | ||
| 1688 | *offset = msg_hdr.frag_off; | ||
| 1689 | } else { | ||
| 1690 | dtls1_get_ccs_header(data, &ccs_hdr); | ||
| 1691 | seq_num = ccs_hdr.seq; | ||
| 1692 | *offset = 0; | ||
| 1693 | } | ||
| 1694 | |||
| 1695 | /* this is either a record we're waiting for, or a | ||
| 1696 | * retransmit of something we happened to previously | ||
| 1697 | * receive (higher layers will drop the repeat silently */ | ||
| 1698 | if (seq_num < s->d1->handshake_read_seq) | ||
| 1699 | return 0; | ||
| 1700 | if (rr->type == SSL3_RT_HANDSHAKE && | ||
| 1701 | seq_num == s->d1->handshake_read_seq && | ||
| 1702 | msg_hdr.frag_off < s->d1->r_msg_hdr.frag_off) | ||
| 1703 | return 0; | ||
| 1704 | else if (seq_num == s->d1->handshake_read_seq && | ||
| 1705 | (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC || | ||
| 1706 | msg_hdr.frag_off == s->d1->r_msg_hdr.frag_off)) | ||
| 1707 | return 0; | ||
| 1708 | else { | ||
| 1709 | *priority = seq_num; | ||
| 1710 | return 1; | ||
| 1711 | } | ||
| 1712 | } | ||
| 1713 | else /* unknown record type */ | ||
| 1714 | return 0; | ||
| 1715 | } | ||
| 1716 | |||
| 1717 | return 0; | ||
| 1718 | } | ||
| 1719 | #endif | ||
| 1720 | |||
| 1721 | void | 1575 | void |
| 1722 | dtls1_reset_seq_numbers(SSL *s, int rw) | 1576 | dtls1_reset_seq_numbers(SSL *s, int rw) |
| 1723 | { | 1577 | { |
diff --git a/src/lib/libssl/src/ssl/d1_srtp.c b/src/lib/libssl/src/ssl/d1_srtp.c index 146ce321c8..f069848b7e 100644 --- a/src/lib/libssl/src/ssl/d1_srtp.c +++ b/src/lib/libssl/src/ssl/d1_srtp.c | |||
| @@ -133,16 +133,6 @@ static SRTP_PROTECTION_PROFILE srtp_known_profiles[]= { | |||
| 133 | "SRTP_AES128_CM_SHA1_32", | 133 | "SRTP_AES128_CM_SHA1_32", |
| 134 | SRTP_AES128_CM_SHA1_32, | 134 | SRTP_AES128_CM_SHA1_32, |
| 135 | }, | 135 | }, |
| 136 | #if 0 | ||
| 137 | { | ||
| 138 | "SRTP_NULL_SHA1_80", | ||
| 139 | SRTP_NULL_SHA1_80, | ||
| 140 | }, | ||
| 141 | { | ||
| 142 | "SRTP_NULL_SHA1_32", | ||
| 143 | SRTP_NULL_SHA1_32, | ||
| 144 | }, | ||
| 145 | #endif | ||
| 146 | {0} | 136 | {0} |
| 147 | }; | 137 | }; |
| 148 | 138 | ||
diff --git a/src/lib/libssl/src/ssl/d1_srvr.c b/src/lib/libssl/src/ssl/d1_srvr.c index 3f872de48b..368afda77a 100644 --- a/src/lib/libssl/src/ssl/d1_srvr.c +++ b/src/lib/libssl/src/ssl/d1_srvr.c | |||
| @@ -782,11 +782,6 @@ dtls1_accept(SSL *s) | |||
| 782 | /* clean a few things up */ | 782 | /* clean a few things up */ |
| 783 | ssl3_cleanup_key_block(s); | 783 | ssl3_cleanup_key_block(s); |
| 784 | 784 | ||
| 785 | #if 0 | ||
| 786 | BUF_MEM_free(s->init_buf); | ||
| 787 | s->init_buf = NULL; | ||
| 788 | #endif | ||
| 789 | |||
| 790 | /* remove buffering on output */ | 785 | /* remove buffering on output */ |
| 791 | ssl_free_wbio_buffer(s); | 786 | ssl_free_wbio_buffer(s); |
| 792 | 787 | ||
diff --git a/src/lib/libssl/src/ssl/dtls1.h b/src/lib/libssl/src/ssl/dtls1.h index 2fbb815b6d..b0cf839b78 100644 --- a/src/lib/libssl/src/ssl/dtls1.h +++ b/src/lib/libssl/src/ssl/dtls1.h | |||
| @@ -73,11 +73,6 @@ extern "C" { | |||
| 73 | #define DTLS1_VERSION 0xFEFF | 73 | #define DTLS1_VERSION 0xFEFF |
| 74 | #define DTLS1_BAD_VER 0x0100 | 74 | #define DTLS1_BAD_VER 0x0100 |
| 75 | 75 | ||
| 76 | #if 0 | ||
| 77 | /* this alert description is not specified anywhere... */ | ||
| 78 | #define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 110 | ||
| 79 | #endif | ||
| 80 | |||
| 81 | /* lengths of messages */ | 76 | /* lengths of messages */ |
| 82 | #define DTLS1_COOKIE_LENGTH 256 | 77 | #define DTLS1_COOKIE_LENGTH 256 |
| 83 | 78 | ||
diff --git a/src/lib/libssl/src/ssl/s23_clnt.c b/src/lib/libssl/src/ssl/s23_clnt.c index 897ac7efe3..5361d5bea8 100644 --- a/src/lib/libssl/src/ssl/s23_clnt.c +++ b/src/lib/libssl/src/ssl/s23_clnt.c | |||
| @@ -351,13 +351,6 @@ ssl23_client_hello(SSL *s) | |||
| 351 | 351 | ||
| 352 | buf = (unsigned char *)s->init_buf->data; | 352 | buf = (unsigned char *)s->init_buf->data; |
| 353 | if (s->state == SSL23_ST_CW_CLNT_HELLO_A) { | 353 | if (s->state == SSL23_ST_CW_CLNT_HELLO_A) { |
| 354 | #if 0 | ||
| 355 | /* don't reuse session-id's */ | ||
| 356 | if (!ssl_get_new_session(s, 0)) { | ||
| 357 | return (-1); | ||
| 358 | } | ||
| 359 | #endif | ||
| 360 | |||
| 361 | p = s->s3->client_random; | 354 | p = s->s3->client_random; |
| 362 | if (ssl_fill_hello_random(s, 0, p, SSL3_RANDOM_SIZE) <= 0) | 355 | if (ssl_fill_hello_random(s, 0, p, SSL3_RANDOM_SIZE) <= 0) |
| 363 | return -1; | 356 | return -1; |
diff --git a/src/lib/libssl/src/ssl/s23_srvr.c b/src/lib/libssl/src/ssl/s23_srvr.c index 53e06706e3..a6c5d1b8a9 100644 --- a/src/lib/libssl/src/ssl/s23_srvr.c +++ b/src/lib/libssl/src/ssl/s23_srvr.c | |||
| @@ -490,14 +490,6 @@ ssl23_get_client_hello(SSL *s) | |||
| 490 | *(d++) = 1; | 490 | *(d++) = 1; |
| 491 | *(d++) = 0; | 491 | *(d++) = 0; |
| 492 | 492 | ||
| 493 | #if 0 | ||
| 494 | /* copy any remaining data with may be extensions */ | ||
| 495 | p = p + csl + sil + cl; | ||
| 496 | while (p < s->packet + s->packet_length) { | ||
| 497 | *(d++)=*(p++); | ||
| 498 | } | ||
| 499 | #endif | ||
| 500 | |||
| 501 | i = (d - (unsigned char *)s->init_buf->data) - 4; | 493 | i = (d - (unsigned char *)s->init_buf->data) - 4; |
| 502 | l2n3((long)i, d_len); | 494 | l2n3((long)i, d_len); |
| 503 | 495 | ||
| @@ -550,9 +542,6 @@ ssl23_get_client_hello(SSL *s) | |||
| 550 | s->method = TLSv1_server_method(); | 542 | s->method = TLSv1_server_method(); |
| 551 | else | 543 | else |
| 552 | s->method = SSLv3_server_method(); | 544 | s->method = SSLv3_server_method(); |
| 553 | #if 0 /* ssl3_get_client_hello does this */ | ||
| 554 | s->client_version = (v[0]<<8)|v[1]; | ||
| 555 | #endif | ||
| 556 | s->handshake_func = s->method->ssl_accept; | 545 | s->handshake_func = s->method->ssl_accept; |
| 557 | } | 546 | } |
| 558 | 547 | ||
diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c index abe5c5a86b..bda14069c1 100644 --- a/src/lib/libssl/src/ssl/s3_clnt.c +++ b/src/lib/libssl/src/ssl/s3_clnt.c | |||
| @@ -730,14 +730,8 @@ ssl3_client_hello(SSL *s) | |||
| 730 | * client_version in client hello and not resetting it to | 730 | * client_version in client hello and not resetting it to |
| 731 | * the negotiated version. | 731 | * the negotiated version. |
| 732 | */ | 732 | */ |
| 733 | #if 0 | ||
| 734 | *(p++) = s->version >> 8; | ||
| 735 | *(p++) = s->version&0xff; | ||
| 736 | s->client_version = s->version; | ||
| 737 | #else | ||
| 738 | *(p++) = s->client_version >> 8; | 733 | *(p++) = s->client_version >> 8; |
| 739 | *(p++) = s->client_version & 0xff; | 734 | *(p++) = s->client_version & 0xff; |
| 740 | #endif | ||
| 741 | 735 | ||
| 742 | /* Random stuff */ | 736 | /* Random stuff */ |
| 743 | memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE); | 737 | memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE); |
diff --git a/src/lib/libssl/src/ssl/s3_lib.c b/src/lib/libssl/src/ssl/s3_lib.c index da69caa6dd..477c53b15b 100644 --- a/src/lib/libssl/src/ssl/s3_lib.c +++ b/src/lib/libssl/src/ssl/s3_lib.c | |||
| @@ -2999,17 +2999,12 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
| 2999 | /* Let's see which ciphers we can support */ | 2999 | /* Let's see which ciphers we can support */ |
| 3000 | cert = s->cert; | 3000 | cert = s->cert; |
| 3001 | 3001 | ||
| 3002 | #if 0 | ||
| 3003 | /* | 3002 | /* |
| 3004 | * Do not set the compare functions, because this may lead to a | 3003 | * Do not set the compare functions, because this may lead to a |
| 3005 | * reordering by "id". We want to keep the original ordering. | 3004 | * reordering by "id". We want to keep the original ordering. |
| 3006 | * We may pay a price in performance during sk_SSL_CIPHER_find(), | 3005 | * We may pay a price in performance during sk_SSL_CIPHER_find(), |
| 3007 | * but would have to pay with the price of sk_SSL_CIPHER_dup(). | 3006 | * but would have to pay with the price of sk_SSL_CIPHER_dup(). |
| 3008 | */ | 3007 | */ |
| 3009 | sk_SSL_CIPHER_set_cmp_func(srvr, ssl_cipher_ptr_id_cmp); | ||
| 3010 | sk_SSL_CIPHER_set_cmp_func(clnt, ssl_cipher_ptr_id_cmp); | ||
| 3011 | #endif | ||
| 3012 | |||
| 3013 | 3008 | ||
| 3014 | if (s->options & SSL_OP_CIPHER_SERVER_PREFERENCE) { | 3009 | if (s->options & SSL_OP_CIPHER_SERVER_PREFERENCE) { |
| 3015 | prio = srvr; | 3010 | prio = srvr; |
| @@ -3267,9 +3262,7 @@ ssl3_shutdown(SSL *s) | |||
| 3267 | 3262 | ||
| 3268 | if (!(s->shutdown & SSL_SENT_SHUTDOWN)) { | 3263 | if (!(s->shutdown & SSL_SENT_SHUTDOWN)) { |
| 3269 | s->shutdown|=SSL_SENT_SHUTDOWN; | 3264 | s->shutdown|=SSL_SENT_SHUTDOWN; |
| 3270 | #if 1 | ||
| 3271 | ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_CLOSE_NOTIFY); | 3265 | ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_CLOSE_NOTIFY); |
| 3272 | #endif | ||
| 3273 | /* | 3266 | /* |
| 3274 | * Our shutdown alert has been sent now, and if it still needs | 3267 | * Our shutdown alert has been sent now, and if it still needs |
| 3275 | * to be written, s->s3->alert_dispatch will be true | 3268 | * to be written, s->s3->alert_dispatch will be true |
| @@ -3278,7 +3271,6 @@ ssl3_shutdown(SSL *s) | |||
| 3278 | return(-1); /* return WANT_WRITE */ | 3271 | return(-1); /* return WANT_WRITE */ |
| 3279 | } else if (s->s3->alert_dispatch) { | 3272 | } else if (s->s3->alert_dispatch) { |
| 3280 | /* resend it if not sent */ | 3273 | /* resend it if not sent */ |
| 3281 | #if 1 | ||
| 3282 | ret = s->method->ssl_dispatch_alert(s); | 3274 | ret = s->method->ssl_dispatch_alert(s); |
| 3283 | if (ret == -1) { | 3275 | if (ret == -1) { |
| 3284 | /* | 3276 | /* |
| @@ -3289,7 +3281,6 @@ ssl3_shutdown(SSL *s) | |||
| 3289 | */ | 3281 | */ |
| 3290 | return (ret); | 3282 | return (ret); |
| 3291 | } | 3283 | } |
| 3292 | #endif | ||
| 3293 | } else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) { | 3284 | } else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) { |
| 3294 | /* If we are waiting for a close from our peer, we are closed */ | 3285 | /* If we are waiting for a close from our peer, we are closed */ |
| 3295 | s->method->ssl_read_bytes(s, 0, NULL, 0, 0); | 3286 | s->method->ssl_read_bytes(s, 0, NULL, 0, 0); |
diff --git a/src/lib/libssl/src/ssl/s3_pkt.c b/src/lib/libssl/src/ssl/s3_pkt.c index b8be8b5255..f8f31f2a4a 100644 --- a/src/lib/libssl/src/ssl/s3_pkt.c +++ b/src/lib/libssl/src/ssl/s3_pkt.c | |||
| @@ -645,11 +645,7 @@ do_ssl3_write(SSL *s, int type, const unsigned char *buf, | |||
| 645 | 645 | ||
| 646 | if ((sess == NULL) || (s->enc_write_ctx == NULL) || | 646 | if ((sess == NULL) || (s->enc_write_ctx == NULL) || |
| 647 | (EVP_MD_CTX_md(s->write_hash) == NULL)) { | 647 | (EVP_MD_CTX_md(s->write_hash) == NULL)) { |
| 648 | #if 1 | ||
| 649 | clear = s->enc_write_ctx ? 0 : 1; /* must be AEAD cipher */ | 648 | clear = s->enc_write_ctx ? 0 : 1; /* must be AEAD cipher */ |
| 650 | #else | ||
| 651 | clear = 1; | ||
| 652 | #endif | ||
| 653 | mac_size = 0; | 649 | mac_size = 0; |
| 654 | } else { | 650 | } else { |
| 655 | mac_size = EVP_MD_CTX_size(s->write_hash); | 651 | mac_size = EVP_MD_CTX_size(s->write_hash); |
diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h index ac2030a0a5..45968ce16a 100644 --- a/src/lib/libssl/src/ssl/ssl.h +++ b/src/lib/libssl/src/ssl/ssl.h | |||
| @@ -827,11 +827,6 @@ struct ssl_ctx_st { | |||
| 827 | 827 | ||
| 828 | X509_VERIFY_PARAM *param; | 828 | X509_VERIFY_PARAM *param; |
| 829 | 829 | ||
| 830 | #if 0 | ||
| 831 | int purpose; /* Purpose setting */ | ||
| 832 | int trust; /* Trust setting */ | ||
| 833 | #endif | ||
| 834 | |||
| 835 | int quiet_shutdown; | 830 | int quiet_shutdown; |
| 836 | 831 | ||
| 837 | /* Maximum amount of data to send in one fragment. | 832 | /* Maximum amount of data to send in one fragment. |
| @@ -1109,11 +1104,6 @@ struct ssl_st { | |||
| 1109 | 1104 | ||
| 1110 | X509_VERIFY_PARAM *param; | 1105 | X509_VERIFY_PARAM *param; |
| 1111 | 1106 | ||
| 1112 | #if 0 | ||
| 1113 | int purpose; /* Purpose setting */ | ||
| 1114 | int trust; /* Trust setting */ | ||
| 1115 | #endif | ||
| 1116 | |||
| 1117 | /* crypto */ | 1107 | /* crypto */ |
| 1118 | STACK_OF(SSL_CIPHER) *cipher_list; | 1108 | STACK_OF(SSL_CIPHER) *cipher_list; |
| 1119 | STACK_OF(SSL_CIPHER) *cipher_list_by_id; | 1109 | STACK_OF(SSL_CIPHER) *cipher_list_by_id; |
diff --git a/src/lib/libssl/src/ssl/ssl3.h b/src/lib/libssl/src/ssl/ssl3.h index 2840b1320f..8633dae521 100644 --- a/src/lib/libssl/src/ssl/ssl3.h +++ b/src/lib/libssl/src/ssl/ssl3.h | |||
| @@ -162,16 +162,6 @@ extern "C" { | |||
| 162 | #define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A | 162 | #define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A |
| 163 | #define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B | 163 | #define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B |
| 164 | 164 | ||
| 165 | #if 0 | ||
| 166 | #define SSL3_CK_FZA_DMS_NULL_SHA 0x0300001C | ||
| 167 | #define SSL3_CK_FZA_DMS_FZA_SHA 0x0300001D | ||
| 168 | #if 0 /* Because it clashes with KRB5, is never used any more, and is safe | ||
| 169 | to remove according to David Hopwood <david.hopwood@zetnet.co.uk> | ||
| 170 | of the ietf-tls list */ | ||
| 171 | #define SSL3_CK_FZA_DMS_RC4_SHA 0x0300001E | ||
| 172 | #endif | ||
| 173 | #endif | ||
| 174 | |||
| 175 | /* VRS Additional Kerberos5 entries | 165 | /* VRS Additional Kerberos5 entries |
| 176 | */ | 166 | */ |
| 177 | #define SSL3_CK_KRB5_DES_64_CBC_SHA 0x0300001E | 167 | #define SSL3_CK_KRB5_DES_64_CBC_SHA 0x0300001E |
| @@ -221,12 +211,6 @@ extern "C" { | |||
| 221 | #define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA" | 211 | #define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA" |
| 222 | #define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA" | 212 | #define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA" |
| 223 | 213 | ||
| 224 | #if 0 | ||
| 225 | #define SSL3_TXT_FZA_DMS_NULL_SHA "FZA-NULL-SHA" | ||
| 226 | #define SSL3_TXT_FZA_DMS_FZA_SHA "FZA-FZA-CBC-SHA" | ||
| 227 | #define SSL3_TXT_FZA_DMS_RC4_SHA "FZA-RC4-SHA" | ||
| 228 | #endif | ||
| 229 | |||
| 230 | #define SSL3_TXT_KRB5_DES_64_CBC_SHA "KRB5-DES-CBC-SHA" | 214 | #define SSL3_TXT_KRB5_DES_64_CBC_SHA "KRB5-DES-CBC-SHA" |
| 231 | #define SSL3_TXT_KRB5_DES_192_CBC3_SHA "KRB5-DES-CBC3-SHA" | 215 | #define SSL3_TXT_KRB5_DES_192_CBC3_SHA "KRB5-DES-CBC3-SHA" |
| 232 | #define SSL3_TXT_KRB5_RC4_128_SHA "KRB5-RC4-SHA" | 216 | #define SSL3_TXT_KRB5_RC4_128_SHA "KRB5-RC4-SHA" |
diff --git a/src/lib/libssl/src/ssl/ssl_cert.c b/src/lib/libssl/src/ssl/ssl_cert.c index c4099ca24f..3a16644cf4 100644 --- a/src/lib/libssl/src/ssl/ssl_cert.c +++ b/src/lib/libssl/src/ssl/ssl_cert.c | |||
| @@ -340,10 +340,6 @@ ssl_cert_free(CERT *c) | |||
| 340 | X509_free(c->pkeys[i].x509); | 340 | X509_free(c->pkeys[i].x509); |
| 341 | if (c->pkeys[i].privatekey != NULL) | 341 | if (c->pkeys[i].privatekey != NULL) |
| 342 | EVP_PKEY_free(c->pkeys[i].privatekey); | 342 | EVP_PKEY_free(c->pkeys[i].privatekey); |
| 343 | #if 0 | ||
| 344 | if (c->pkeys[i].publickey != NULL) | ||
| 345 | EVP_PKEY_free(c->pkeys[i].publickey); | ||
| 346 | #endif | ||
| 347 | } | 343 | } |
| 348 | free(c); | 344 | free(c); |
| 349 | } | 345 | } |
| @@ -409,12 +405,6 @@ ssl_sess_cert_free(SESS_CERT *sc) | |||
| 409 | for (i = 0; i < SSL_PKEY_NUM; i++) { | 405 | for (i = 0; i < SSL_PKEY_NUM; i++) { |
| 410 | if (sc->peer_pkeys[i].x509 != NULL) | 406 | if (sc->peer_pkeys[i].x509 != NULL) |
| 411 | X509_free(sc->peer_pkeys[i].x509); | 407 | X509_free(sc->peer_pkeys[i].x509); |
| 412 | #if 0 /* We don't have the peer's private key. These lines are just | ||
| 413 | * here as a reminder that we're still using a not-quite-appropriate | ||
| 414 | * data structure. */ | ||
| 415 | if (sc->peer_pkeys[i].privatekey != NULL) | ||
| 416 | EVP_PKEY_free(sc->peer_pkeys[i].privatekey); | ||
| 417 | #endif | ||
| 418 | } | 408 | } |
| 419 | 409 | ||
| 420 | if (sc->peer_rsa_tmp != NULL) | 410 | if (sc->peer_rsa_tmp != NULL) |
| @@ -449,10 +439,6 @@ ssl_verify_cert_chain(SSL *s, STACK_OF(X509) *sk) | |||
| 449 | SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN, ERR_R_X509_LIB); | 439 | SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN, ERR_R_X509_LIB); |
| 450 | return (0); | 440 | return (0); |
| 451 | } | 441 | } |
| 452 | #if 0 | ||
| 453 | if (SSL_get_verify_depth(s) >= 0) | ||
| 454 | X509_STORE_CTX_set_depth(&ctx, SSL_get_verify_depth(s)); | ||
| 455 | #endif | ||
| 456 | X509_STORE_CTX_set_ex_data(&ctx, SSL_get_ex_data_X509_STORE_CTX_idx(), s); | 442 | X509_STORE_CTX_set_ex_data(&ctx, SSL_get_ex_data_X509_STORE_CTX_idx(), s); |
| 457 | 443 | ||
| 458 | /* We need to inherit the verify parameters. These can be determined by | 444 | /* We need to inherit the verify parameters. These can be determined by |
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index e3b67817cc..94792c6d51 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
| @@ -215,9 +215,6 @@ SSL_clear(SSL *s) | |||
| 215 | s->client_version = s->version; | 215 | s->client_version = s->version; |
| 216 | s->rwstate = SSL_NOTHING; | 216 | s->rwstate = SSL_NOTHING; |
| 217 | s->rstate = SSL_ST_READ_HEADER; | 217 | s->rstate = SSL_ST_READ_HEADER; |
| 218 | #if 0 | ||
| 219 | s->read_ahead = s->ctx->read_ahead; | ||
| 220 | #endif | ||
| 221 | 218 | ||
| 222 | if (s->init_buf != NULL) { | 219 | if (s->init_buf != NULL) { |
| 223 | BUF_MEM_free(s->init_buf); | 220 | BUF_MEM_free(s->init_buf); |
| @@ -230,7 +227,6 @@ SSL_clear(SSL *s) | |||
| 230 | 227 | ||
| 231 | s->first_packet = 0; | 228 | s->first_packet = 0; |
| 232 | 229 | ||
| 233 | #if 1 | ||
| 234 | /* | 230 | /* |
| 235 | * Check to see if we were changed into a different method, if | 231 | * Check to see if we were changed into a different method, if |
| 236 | * so, revert back if we are not doing session-id reuse. | 232 | * so, revert back if we are not doing session-id reuse. |
| @@ -242,7 +238,6 @@ SSL_clear(SSL *s) | |||
| 242 | if (!s->method->ssl_new(s)) | 238 | if (!s->method->ssl_new(s)) |
| 243 | return (0); | 239 | return (0); |
| 244 | } else | 240 | } else |
| 245 | #endif | ||
| 246 | s->method->ssl_clear(s); | 241 | s->method->ssl_clear(s); |
| 247 | return (1); | 242 | return (1); |
| 248 | } | 243 | } |
| @@ -312,9 +307,6 @@ SSL_new(SSL_CTX *ctx) | |||
| 312 | s->msg_callback = ctx->msg_callback; | 307 | s->msg_callback = ctx->msg_callback; |
| 313 | s->msg_callback_arg = ctx->msg_callback_arg; | 308 | s->msg_callback_arg = ctx->msg_callback_arg; |
| 314 | s->verify_mode = ctx->verify_mode; | 309 | s->verify_mode = ctx->verify_mode; |
| 315 | #if 0 | ||
| 316 | s->verify_depth = ctx->verify_depth; | ||
| 317 | #endif | ||
| 318 | s->sid_ctx_length = ctx->sid_ctx_length; | 310 | s->sid_ctx_length = ctx->sid_ctx_length; |
| 319 | OPENSSL_assert(s->sid_ctx_length <= sizeof s->sid_ctx); | 311 | OPENSSL_assert(s->sid_ctx_length <= sizeof s->sid_ctx); |
| 320 | memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx)); | 312 | memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx)); |
| @@ -325,10 +317,6 @@ SSL_new(SSL_CTX *ctx) | |||
| 325 | if (!s->param) | 317 | if (!s->param) |
| 326 | goto err; | 318 | goto err; |
| 327 | X509_VERIFY_PARAM_inherit(s->param, ctx->param); | 319 | X509_VERIFY_PARAM_inherit(s->param, ctx->param); |
| 328 | #if 0 | ||
| 329 | s->purpose = ctx->purpose; | ||
| 330 | s->trust = ctx->trust; | ||
| 331 | #endif | ||
| 332 | s->quiet_shutdown = ctx->quiet_shutdown; | 320 | s->quiet_shutdown = ctx->quiet_shutdown; |
| 333 | s->max_send_fragment = ctx->max_send_fragment; | 321 | s->max_send_fragment = ctx->max_send_fragment; |
| 334 | 322 | ||
| @@ -1766,9 +1754,6 @@ SSL_CTX_new(const SSL_METHOD *meth) | |||
| 1766 | ret->msg_callback = 0; | 1754 | ret->msg_callback = 0; |
| 1767 | ret->msg_callback_arg = NULL; | 1755 | ret->msg_callback_arg = NULL; |
| 1768 | ret->verify_mode = SSL_VERIFY_NONE; | 1756 | ret->verify_mode = SSL_VERIFY_NONE; |
| 1769 | #if 0 | ||
| 1770 | ret->verify_depth=-1; /* Don't impose a limit (but x509_lu.c does) */ | ||
| 1771 | #endif | ||
| 1772 | ret->sid_ctx_length = 0; | 1757 | ret->sid_ctx_length = 0; |
| 1773 | ret->default_verify_callback = NULL; | 1758 | ret->default_verify_callback = NULL; |
| 1774 | if ((ret->cert = ssl_cert_new()) == NULL) | 1759 | if ((ret->cert = ssl_cert_new()) == NULL) |
| @@ -1881,14 +1866,6 @@ err2: | |||
| 1881 | return (NULL); | 1866 | return (NULL); |
| 1882 | } | 1867 | } |
| 1883 | 1868 | ||
| 1884 | #if 0 | ||
| 1885 | static void | ||
| 1886 | SSL_COMP_free(SSL_COMP *comp) | ||
| 1887 | { | ||
| 1888 | free(comp); | ||
| 1889 | } | ||
| 1890 | #endif | ||
| 1891 | |||
| 1892 | void | 1869 | void |
| 1893 | SSL_CTX_free(SSL_CTX *a) | 1870 | SSL_CTX_free(SSL_CTX *a) |
| 1894 | { | 1871 | { |
| @@ -1933,12 +1910,8 @@ SSL_CTX_free(SSL_CTX *a) | |||
| 1933 | sk_X509_NAME_pop_free(a->client_CA, X509_NAME_free); | 1910 | sk_X509_NAME_pop_free(a->client_CA, X509_NAME_free); |
| 1934 | if (a->extra_certs != NULL) | 1911 | if (a->extra_certs != NULL) |
| 1935 | sk_X509_pop_free(a->extra_certs, X509_free); | 1912 | sk_X509_pop_free(a->extra_certs, X509_free); |
| 1936 | #if 0 /* This should never be done, since it removes a global database */ | 1913 | /* Don't free, since it removes a global database */ |
| 1937 | if (a->comp_methods != NULL) | ||
| 1938 | sk_SSL_COMP_pop_free(a->comp_methods, SSL_COMP_free); | ||
| 1939 | #else | ||
| 1940 | a->comp_methods = NULL; | 1914 | a->comp_methods = NULL; |
| 1941 | #endif | ||
| 1942 | 1915 | ||
| 1943 | #ifndef OPENSSL_NO_SRTP | 1916 | #ifndef OPENSSL_NO_SRTP |
| 1944 | if (a->srtp_profiles) | 1917 | if (a->srtp_profiles) |
| @@ -2056,16 +2029,6 @@ ssl_set_cert_masks(CERT *c, const SSL_CIPHER *cipher) | |||
| 2056 | if (rsa_enc_export || (rsa_tmp_export && (rsa_sign || rsa_enc))) | 2029 | if (rsa_enc_export || (rsa_tmp_export && (rsa_sign || rsa_enc))) |
| 2057 | emask_k|=SSL_kRSA; | 2030 | emask_k|=SSL_kRSA; |
| 2058 | 2031 | ||
| 2059 | #if 0 | ||
| 2060 | /* The match needs to be both kEDH and aRSA or aDSA, so don't worry */ | ||
| 2061 | if ((dh_tmp || dh_rsa || dh_dsa) && | ||
| 2062 | (rsa_enc || rsa_sign || dsa_sign)) | ||
| 2063 | mask_k|=SSL_kEDH; | ||
| 2064 | if ((dh_tmp_export || dh_rsa_export || dh_dsa_export) && | ||
| 2065 | (rsa_enc || rsa_sign || dsa_sign)) | ||
| 2066 | emask_k|=SSL_kEDH; | ||
| 2067 | #endif | ||
| 2068 | |||
| 2069 | if (dh_tmp_export) | 2032 | if (dh_tmp_export) |
| 2070 | emask_k|=SSL_kEDH; | 2033 | emask_k|=SSL_kEDH; |
| 2071 | 2034 | ||
diff --git a/src/lib/libssl/src/ssl/t1_enc.c b/src/lib/libssl/src/ssl/t1_enc.c index 9d47bde6c6..96c28e14cf 100644 --- a/src/lib/libssl/src/ssl/t1_enc.c +++ b/src/lib/libssl/src/ssl/t1_enc.c | |||
| @@ -1108,10 +1108,6 @@ tls1_alert_code(int code) | |||
| 1108 | return (TLS1_AD_BAD_CERTIFICATE_HASH_VALUE); | 1108 | return (TLS1_AD_BAD_CERTIFICATE_HASH_VALUE); |
| 1109 | case SSL_AD_UNKNOWN_PSK_IDENTITY: | 1109 | case SSL_AD_UNKNOWN_PSK_IDENTITY: |
| 1110 | return (TLS1_AD_UNKNOWN_PSK_IDENTITY); | 1110 | return (TLS1_AD_UNKNOWN_PSK_IDENTITY); |
| 1111 | #if 0 /* not appropriate for TLS, not used for DTLS */ | ||
| 1112 | case DTLS1_AD_MISSING_HANDSHAKE_MESSAGE : return | ||
| 1113 | (DTLS1_AD_MISSING_HANDSHAKE_MESSAGE); | ||
| 1114 | #endif | ||
| 1115 | default: | 1111 | default: |
| 1116 | return (-1); | 1112 | return (-1); |
| 1117 | } | 1113 | } |
diff --git a/src/lib/libssl/src/ssl/t1_lib.c b/src/lib/libssl/src/ssl/t1_lib.c index fa70f21f95..5ad69f5ce9 100644 --- a/src/lib/libssl/src/ssl/t1_lib.c +++ b/src/lib/libssl/src/ssl/t1_lib.c | |||
| @@ -998,9 +998,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 998 | 998 | ||
| 999 | if (data + size > (d + n)) | 999 | if (data + size > (d + n)) |
| 1000 | goto ri_check; | 1000 | goto ri_check; |
| 1001 | #if 0 | ||
| 1002 | fprintf(stderr, "Received extension type %d size %d\n", type, size); | ||
| 1003 | #endif | ||
| 1004 | if (s->tlsext_debug_cb) | 1001 | if (s->tlsext_debug_cb) |
| 1005 | s->tlsext_debug_cb(s, 0, type, data, size, | 1002 | s->tlsext_debug_cb(s, 0, type, data, size, |
| 1006 | s->tlsext_debug_arg); | 1003 | s->tlsext_debug_arg); |
| @@ -1124,13 +1121,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1124 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; | 1121 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; |
| 1125 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); | 1122 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); |
| 1126 | } | 1123 | } |
| 1127 | #if 0 | ||
| 1128 | fprintf(stderr, "ssl_parse_clienthello_tlsext s->session->tlsext_ecpointformatlist (length=%i) ", s->session->tlsext_ecpointformatlist_length); | ||
| 1129 | sdata = s->session->tlsext_ecpointformatlist; | ||
| 1130 | for (i = 0; i < s->session->tlsext_ecpointformatlist_length; i++) | ||
| 1131 | fprintf(stderr, "%i ", *(sdata++)); | ||
| 1132 | fprintf(stderr, "\n"); | ||
| 1133 | #endif | ||
| 1134 | } else if (type == TLSEXT_TYPE_elliptic_curves && | 1124 | } else if (type == TLSEXT_TYPE_elliptic_curves && |
| 1135 | s->version != DTLS1_VERSION) { | 1125 | s->version != DTLS1_VERSION) { |
| 1136 | unsigned char *sdata = data; | 1126 | unsigned char *sdata = data; |
| @@ -1156,13 +1146,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1156 | s->session->tlsext_ellipticcurvelist_length = ellipticcurvelist_length; | 1146 | s->session->tlsext_ellipticcurvelist_length = ellipticcurvelist_length; |
| 1157 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); | 1147 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); |
| 1158 | } | 1148 | } |
| 1159 | #if 0 | ||
| 1160 | fprintf(stderr, "ssl_parse_clienthello_tlsext s->session->tlsext_ellipticcurvelist (length=%i) ", s->session->tlsext_ellipticcurvelist_length); | ||
| 1161 | sdata = s->session->tlsext_ellipticcurvelist; | ||
| 1162 | for (i = 0; i < s->session->tlsext_ellipticcurvelist_length; i++) | ||
| 1163 | fprintf(stderr, "%i ", *(sdata++)); | ||
| 1164 | fprintf(stderr, "\n"); | ||
| 1165 | #endif | ||
| 1166 | } | 1149 | } |
| 1167 | #endif /* OPENSSL_NO_EC */ | 1150 | #endif /* OPENSSL_NO_EC */ |
| 1168 | #ifdef TLSEXT_TYPE_opaque_prf_input | 1151 | #ifdef TLSEXT_TYPE_opaque_prf_input |
| @@ -1451,13 +1434,6 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1451 | } | 1434 | } |
| 1452 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; | 1435 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; |
| 1453 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); | 1436 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); |
| 1454 | #if 0 | ||
| 1455 | fprintf(stderr, "ssl_parse_serverhello_tlsext s->session->tlsext_ecpointformatlist "); | ||
| 1456 | sdata = s->session->tlsext_ecpointformatlist; | ||
| 1457 | for (i = 0; i < s->session->tlsext_ecpointformatlist_length; i++) | ||
| 1458 | fprintf(stderr, "%i ", *(sdata++)); | ||
| 1459 | fprintf(stderr, "\n"); | ||
| 1460 | #endif | ||
| 1461 | } | 1437 | } |
| 1462 | #endif /* OPENSSL_NO_EC */ | 1438 | #endif /* OPENSSL_NO_EC */ |
| 1463 | else if (type == TLSEXT_TYPE_session_ticket) { | 1439 | else if (type == TLSEXT_TYPE_session_ticket) { |
| @@ -2230,18 +2206,6 @@ tls12_find_id(int nid, tls12_lookup *table, size_t tlen) | |||
| 2230 | } | 2206 | } |
| 2231 | return -1; | 2207 | return -1; |
| 2232 | } | 2208 | } |
| 2233 | #if 0 | ||
| 2234 | static int | ||
| 2235 | tls12_find_nid(int id, tls12_lookup *table, size_t tlen) | ||
| 2236 | { | ||
| 2237 | size_t i; | ||
| 2238 | for (i = 0; i < tlen; i++) { | ||
| 2239 | if (table[i].id == id) | ||
| 2240 | return table[i].nid; | ||
| 2241 | } | ||
| 2242 | return -1; | ||
| 2243 | } | ||
| 2244 | #endif | ||
| 2245 | 2209 | ||
| 2246 | int | 2210 | int |
| 2247 | tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, const EVP_MD *md) | 2211 | tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, const EVP_MD *md) |
diff --git a/src/lib/libssl/src/ssl/tls1.h b/src/lib/libssl/src/ssl/tls1.h index e05168cffe..400deca6d4 100644 --- a/src/lib/libssl/src/ssl/tls1.h +++ b/src/lib/libssl/src/ssl/tls1.h | |||
| @@ -239,13 +239,6 @@ extern "C" { | |||
| 239 | /* ExtensionType value from RFC4507 */ | 239 | /* ExtensionType value from RFC4507 */ |
| 240 | #define TLSEXT_TYPE_session_ticket 35 | 240 | #define TLSEXT_TYPE_session_ticket 35 |
| 241 | 241 | ||
| 242 | /* ExtensionType value from draft-rescorla-tls-opaque-prf-input-00.txt */ | ||
| 243 | #if 0 /* will have to be provided externally for now , | ||
| 244 | * i.e. build with - DTLSEXT_TYPE_opaque_prf_input = 38183 | ||
| 245 | * using whatever extension number you'd like to try */ | ||
| 246 | # define TLSEXT_TYPE_opaque_prf_input ?? */ | ||
| 247 | #endif | ||
| 248 | |||
| 249 | /* Temporary extension type */ | 242 | /* Temporary extension type */ |
| 250 | #define TLSEXT_TYPE_renegotiate 0xff01 | 243 | #define TLSEXT_TYPE_renegotiate 0xff01 |
| 251 | 244 | ||
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index ac2030a0a5..45968ce16a 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
| @@ -827,11 +827,6 @@ struct ssl_ctx_st { | |||
| 827 | 827 | ||
| 828 | X509_VERIFY_PARAM *param; | 828 | X509_VERIFY_PARAM *param; |
| 829 | 829 | ||
| 830 | #if 0 | ||
| 831 | int purpose; /* Purpose setting */ | ||
| 832 | int trust; /* Trust setting */ | ||
| 833 | #endif | ||
| 834 | |||
| 835 | int quiet_shutdown; | 830 | int quiet_shutdown; |
| 836 | 831 | ||
| 837 | /* Maximum amount of data to send in one fragment. | 832 | /* Maximum amount of data to send in one fragment. |
| @@ -1109,11 +1104,6 @@ struct ssl_st { | |||
| 1109 | 1104 | ||
| 1110 | X509_VERIFY_PARAM *param; | 1105 | X509_VERIFY_PARAM *param; |
| 1111 | 1106 | ||
| 1112 | #if 0 | ||
| 1113 | int purpose; /* Purpose setting */ | ||
| 1114 | int trust; /* Trust setting */ | ||
| 1115 | #endif | ||
| 1116 | |||
| 1117 | /* crypto */ | 1107 | /* crypto */ |
| 1118 | STACK_OF(SSL_CIPHER) *cipher_list; | 1108 | STACK_OF(SSL_CIPHER) *cipher_list; |
| 1119 | STACK_OF(SSL_CIPHER) *cipher_list_by_id; | 1109 | STACK_OF(SSL_CIPHER) *cipher_list_by_id; |
diff --git a/src/lib/libssl/ssl3.h b/src/lib/libssl/ssl3.h index 2840b1320f..8633dae521 100644 --- a/src/lib/libssl/ssl3.h +++ b/src/lib/libssl/ssl3.h | |||
| @@ -162,16 +162,6 @@ extern "C" { | |||
| 162 | #define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A | 162 | #define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A |
| 163 | #define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B | 163 | #define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B |
| 164 | 164 | ||
| 165 | #if 0 | ||
| 166 | #define SSL3_CK_FZA_DMS_NULL_SHA 0x0300001C | ||
| 167 | #define SSL3_CK_FZA_DMS_FZA_SHA 0x0300001D | ||
| 168 | #if 0 /* Because it clashes with KRB5, is never used any more, and is safe | ||
| 169 | to remove according to David Hopwood <david.hopwood@zetnet.co.uk> | ||
| 170 | of the ietf-tls list */ | ||
| 171 | #define SSL3_CK_FZA_DMS_RC4_SHA 0x0300001E | ||
| 172 | #endif | ||
| 173 | #endif | ||
| 174 | |||
| 175 | /* VRS Additional Kerberos5 entries | 165 | /* VRS Additional Kerberos5 entries |
| 176 | */ | 166 | */ |
| 177 | #define SSL3_CK_KRB5_DES_64_CBC_SHA 0x0300001E | 167 | #define SSL3_CK_KRB5_DES_64_CBC_SHA 0x0300001E |
| @@ -221,12 +211,6 @@ extern "C" { | |||
| 221 | #define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA" | 211 | #define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA" |
| 222 | #define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA" | 212 | #define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA" |
| 223 | 213 | ||
| 224 | #if 0 | ||
| 225 | #define SSL3_TXT_FZA_DMS_NULL_SHA "FZA-NULL-SHA" | ||
| 226 | #define SSL3_TXT_FZA_DMS_FZA_SHA "FZA-FZA-CBC-SHA" | ||
| 227 | #define SSL3_TXT_FZA_DMS_RC4_SHA "FZA-RC4-SHA" | ||
| 228 | #endif | ||
| 229 | |||
| 230 | #define SSL3_TXT_KRB5_DES_64_CBC_SHA "KRB5-DES-CBC-SHA" | 214 | #define SSL3_TXT_KRB5_DES_64_CBC_SHA "KRB5-DES-CBC-SHA" |
| 231 | #define SSL3_TXT_KRB5_DES_192_CBC3_SHA "KRB5-DES-CBC3-SHA" | 215 | #define SSL3_TXT_KRB5_DES_192_CBC3_SHA "KRB5-DES-CBC3-SHA" |
| 232 | #define SSL3_TXT_KRB5_RC4_128_SHA "KRB5-RC4-SHA" | 216 | #define SSL3_TXT_KRB5_RC4_128_SHA "KRB5-RC4-SHA" |
diff --git a/src/lib/libssl/ssl_cert.c b/src/lib/libssl/ssl_cert.c index c4099ca24f..3a16644cf4 100644 --- a/src/lib/libssl/ssl_cert.c +++ b/src/lib/libssl/ssl_cert.c | |||
| @@ -340,10 +340,6 @@ ssl_cert_free(CERT *c) | |||
| 340 | X509_free(c->pkeys[i].x509); | 340 | X509_free(c->pkeys[i].x509); |
| 341 | if (c->pkeys[i].privatekey != NULL) | 341 | if (c->pkeys[i].privatekey != NULL) |
| 342 | EVP_PKEY_free(c->pkeys[i].privatekey); | 342 | EVP_PKEY_free(c->pkeys[i].privatekey); |
| 343 | #if 0 | ||
| 344 | if (c->pkeys[i].publickey != NULL) | ||
| 345 | EVP_PKEY_free(c->pkeys[i].publickey); | ||
| 346 | #endif | ||
| 347 | } | 343 | } |
| 348 | free(c); | 344 | free(c); |
| 349 | } | 345 | } |
| @@ -409,12 +405,6 @@ ssl_sess_cert_free(SESS_CERT *sc) | |||
| 409 | for (i = 0; i < SSL_PKEY_NUM; i++) { | 405 | for (i = 0; i < SSL_PKEY_NUM; i++) { |
| 410 | if (sc->peer_pkeys[i].x509 != NULL) | 406 | if (sc->peer_pkeys[i].x509 != NULL) |
| 411 | X509_free(sc->peer_pkeys[i].x509); | 407 | X509_free(sc->peer_pkeys[i].x509); |
| 412 | #if 0 /* We don't have the peer's private key. These lines are just | ||
| 413 | * here as a reminder that we're still using a not-quite-appropriate | ||
| 414 | * data structure. */ | ||
| 415 | if (sc->peer_pkeys[i].privatekey != NULL) | ||
| 416 | EVP_PKEY_free(sc->peer_pkeys[i].privatekey); | ||
| 417 | #endif | ||
| 418 | } | 408 | } |
| 419 | 409 | ||
| 420 | if (sc->peer_rsa_tmp != NULL) | 410 | if (sc->peer_rsa_tmp != NULL) |
| @@ -449,10 +439,6 @@ ssl_verify_cert_chain(SSL *s, STACK_OF(X509) *sk) | |||
| 449 | SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN, ERR_R_X509_LIB); | 439 | SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN, ERR_R_X509_LIB); |
| 450 | return (0); | 440 | return (0); |
| 451 | } | 441 | } |
| 452 | #if 0 | ||
| 453 | if (SSL_get_verify_depth(s) >= 0) | ||
| 454 | X509_STORE_CTX_set_depth(&ctx, SSL_get_verify_depth(s)); | ||
| 455 | #endif | ||
| 456 | X509_STORE_CTX_set_ex_data(&ctx, SSL_get_ex_data_X509_STORE_CTX_idx(), s); | 442 | X509_STORE_CTX_set_ex_data(&ctx, SSL_get_ex_data_X509_STORE_CTX_idx(), s); |
| 457 | 443 | ||
| 458 | /* We need to inherit the verify parameters. These can be determined by | 444 | /* We need to inherit the verify parameters. These can be determined by |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index e3b67817cc..94792c6d51 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
| @@ -215,9 +215,6 @@ SSL_clear(SSL *s) | |||
| 215 | s->client_version = s->version; | 215 | s->client_version = s->version; |
| 216 | s->rwstate = SSL_NOTHING; | 216 | s->rwstate = SSL_NOTHING; |
| 217 | s->rstate = SSL_ST_READ_HEADER; | 217 | s->rstate = SSL_ST_READ_HEADER; |
| 218 | #if 0 | ||
| 219 | s->read_ahead = s->ctx->read_ahead; | ||
| 220 | #endif | ||
| 221 | 218 | ||
| 222 | if (s->init_buf != NULL) { | 219 | if (s->init_buf != NULL) { |
| 223 | BUF_MEM_free(s->init_buf); | 220 | BUF_MEM_free(s->init_buf); |
| @@ -230,7 +227,6 @@ SSL_clear(SSL *s) | |||
| 230 | 227 | ||
| 231 | s->first_packet = 0; | 228 | s->first_packet = 0; |
| 232 | 229 | ||
| 233 | #if 1 | ||
| 234 | /* | 230 | /* |
| 235 | * Check to see if we were changed into a different method, if | 231 | * Check to see if we were changed into a different method, if |
| 236 | * so, revert back if we are not doing session-id reuse. | 232 | * so, revert back if we are not doing session-id reuse. |
| @@ -242,7 +238,6 @@ SSL_clear(SSL *s) | |||
| 242 | if (!s->method->ssl_new(s)) | 238 | if (!s->method->ssl_new(s)) |
| 243 | return (0); | 239 | return (0); |
| 244 | } else | 240 | } else |
| 245 | #endif | ||
| 246 | s->method->ssl_clear(s); | 241 | s->method->ssl_clear(s); |
| 247 | return (1); | 242 | return (1); |
| 248 | } | 243 | } |
| @@ -312,9 +307,6 @@ SSL_new(SSL_CTX *ctx) | |||
| 312 | s->msg_callback = ctx->msg_callback; | 307 | s->msg_callback = ctx->msg_callback; |
| 313 | s->msg_callback_arg = ctx->msg_callback_arg; | 308 | s->msg_callback_arg = ctx->msg_callback_arg; |
| 314 | s->verify_mode = ctx->verify_mode; | 309 | s->verify_mode = ctx->verify_mode; |
| 315 | #if 0 | ||
| 316 | s->verify_depth = ctx->verify_depth; | ||
| 317 | #endif | ||
| 318 | s->sid_ctx_length = ctx->sid_ctx_length; | 310 | s->sid_ctx_length = ctx->sid_ctx_length; |
| 319 | OPENSSL_assert(s->sid_ctx_length <= sizeof s->sid_ctx); | 311 | OPENSSL_assert(s->sid_ctx_length <= sizeof s->sid_ctx); |
| 320 | memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx)); | 312 | memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx)); |
| @@ -325,10 +317,6 @@ SSL_new(SSL_CTX *ctx) | |||
| 325 | if (!s->param) | 317 | if (!s->param) |
| 326 | goto err; | 318 | goto err; |
| 327 | X509_VERIFY_PARAM_inherit(s->param, ctx->param); | 319 | X509_VERIFY_PARAM_inherit(s->param, ctx->param); |
| 328 | #if 0 | ||
| 329 | s->purpose = ctx->purpose; | ||
| 330 | s->trust = ctx->trust; | ||
| 331 | #endif | ||
| 332 | s->quiet_shutdown = ctx->quiet_shutdown; | 320 | s->quiet_shutdown = ctx->quiet_shutdown; |
| 333 | s->max_send_fragment = ctx->max_send_fragment; | 321 | s->max_send_fragment = ctx->max_send_fragment; |
| 334 | 322 | ||
| @@ -1766,9 +1754,6 @@ SSL_CTX_new(const SSL_METHOD *meth) | |||
| 1766 | ret->msg_callback = 0; | 1754 | ret->msg_callback = 0; |
| 1767 | ret->msg_callback_arg = NULL; | 1755 | ret->msg_callback_arg = NULL; |
| 1768 | ret->verify_mode = SSL_VERIFY_NONE; | 1756 | ret->verify_mode = SSL_VERIFY_NONE; |
| 1769 | #if 0 | ||
| 1770 | ret->verify_depth=-1; /* Don't impose a limit (but x509_lu.c does) */ | ||
| 1771 | #endif | ||
| 1772 | ret->sid_ctx_length = 0; | 1757 | ret->sid_ctx_length = 0; |
| 1773 | ret->default_verify_callback = NULL; | 1758 | ret->default_verify_callback = NULL; |
| 1774 | if ((ret->cert = ssl_cert_new()) == NULL) | 1759 | if ((ret->cert = ssl_cert_new()) == NULL) |
| @@ -1881,14 +1866,6 @@ err2: | |||
| 1881 | return (NULL); | 1866 | return (NULL); |
| 1882 | } | 1867 | } |
| 1883 | 1868 | ||
| 1884 | #if 0 | ||
| 1885 | static void | ||
| 1886 | SSL_COMP_free(SSL_COMP *comp) | ||
| 1887 | { | ||
| 1888 | free(comp); | ||
| 1889 | } | ||
| 1890 | #endif | ||
| 1891 | |||
| 1892 | void | 1869 | void |
| 1893 | SSL_CTX_free(SSL_CTX *a) | 1870 | SSL_CTX_free(SSL_CTX *a) |
| 1894 | { | 1871 | { |
| @@ -1933,12 +1910,8 @@ SSL_CTX_free(SSL_CTX *a) | |||
| 1933 | sk_X509_NAME_pop_free(a->client_CA, X509_NAME_free); | 1910 | sk_X509_NAME_pop_free(a->client_CA, X509_NAME_free); |
| 1934 | if (a->extra_certs != NULL) | 1911 | if (a->extra_certs != NULL) |
| 1935 | sk_X509_pop_free(a->extra_certs, X509_free); | 1912 | sk_X509_pop_free(a->extra_certs, X509_free); |
| 1936 | #if 0 /* This should never be done, since it removes a global database */ | 1913 | /* Don't free, since it removes a global database */ |
| 1937 | if (a->comp_methods != NULL) | ||
| 1938 | sk_SSL_COMP_pop_free(a->comp_methods, SSL_COMP_free); | ||
| 1939 | #else | ||
| 1940 | a->comp_methods = NULL; | 1914 | a->comp_methods = NULL; |
| 1941 | #endif | ||
| 1942 | 1915 | ||
| 1943 | #ifndef OPENSSL_NO_SRTP | 1916 | #ifndef OPENSSL_NO_SRTP |
| 1944 | if (a->srtp_profiles) | 1917 | if (a->srtp_profiles) |
| @@ -2056,16 +2029,6 @@ ssl_set_cert_masks(CERT *c, const SSL_CIPHER *cipher) | |||
| 2056 | if (rsa_enc_export || (rsa_tmp_export && (rsa_sign || rsa_enc))) | 2029 | if (rsa_enc_export || (rsa_tmp_export && (rsa_sign || rsa_enc))) |
| 2057 | emask_k|=SSL_kRSA; | 2030 | emask_k|=SSL_kRSA; |
| 2058 | 2031 | ||
| 2059 | #if 0 | ||
| 2060 | /* The match needs to be both kEDH and aRSA or aDSA, so don't worry */ | ||
| 2061 | if ((dh_tmp || dh_rsa || dh_dsa) && | ||
| 2062 | (rsa_enc || rsa_sign || dsa_sign)) | ||
| 2063 | mask_k|=SSL_kEDH; | ||
| 2064 | if ((dh_tmp_export || dh_rsa_export || dh_dsa_export) && | ||
| 2065 | (rsa_enc || rsa_sign || dsa_sign)) | ||
| 2066 | emask_k|=SSL_kEDH; | ||
| 2067 | #endif | ||
| 2068 | |||
| 2069 | if (dh_tmp_export) | 2032 | if (dh_tmp_export) |
| 2070 | emask_k|=SSL_kEDH; | 2033 | emask_k|=SSL_kEDH; |
| 2071 | 2034 | ||
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c index 9d47bde6c6..96c28e14cf 100644 --- a/src/lib/libssl/t1_enc.c +++ b/src/lib/libssl/t1_enc.c | |||
| @@ -1108,10 +1108,6 @@ tls1_alert_code(int code) | |||
| 1108 | return (TLS1_AD_BAD_CERTIFICATE_HASH_VALUE); | 1108 | return (TLS1_AD_BAD_CERTIFICATE_HASH_VALUE); |
| 1109 | case SSL_AD_UNKNOWN_PSK_IDENTITY: | 1109 | case SSL_AD_UNKNOWN_PSK_IDENTITY: |
| 1110 | return (TLS1_AD_UNKNOWN_PSK_IDENTITY); | 1110 | return (TLS1_AD_UNKNOWN_PSK_IDENTITY); |
| 1111 | #if 0 /* not appropriate for TLS, not used for DTLS */ | ||
| 1112 | case DTLS1_AD_MISSING_HANDSHAKE_MESSAGE : return | ||
| 1113 | (DTLS1_AD_MISSING_HANDSHAKE_MESSAGE); | ||
| 1114 | #endif | ||
| 1115 | default: | 1111 | default: |
| 1116 | return (-1); | 1112 | return (-1); |
| 1117 | } | 1113 | } |
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c index fa70f21f95..5ad69f5ce9 100644 --- a/src/lib/libssl/t1_lib.c +++ b/src/lib/libssl/t1_lib.c | |||
| @@ -998,9 +998,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 998 | 998 | ||
| 999 | if (data + size > (d + n)) | 999 | if (data + size > (d + n)) |
| 1000 | goto ri_check; | 1000 | goto ri_check; |
| 1001 | #if 0 | ||
| 1002 | fprintf(stderr, "Received extension type %d size %d\n", type, size); | ||
| 1003 | #endif | ||
| 1004 | if (s->tlsext_debug_cb) | 1001 | if (s->tlsext_debug_cb) |
| 1005 | s->tlsext_debug_cb(s, 0, type, data, size, | 1002 | s->tlsext_debug_cb(s, 0, type, data, size, |
| 1006 | s->tlsext_debug_arg); | 1003 | s->tlsext_debug_arg); |
| @@ -1124,13 +1121,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1124 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; | 1121 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; |
| 1125 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); | 1122 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); |
| 1126 | } | 1123 | } |
| 1127 | #if 0 | ||
| 1128 | fprintf(stderr, "ssl_parse_clienthello_tlsext s->session->tlsext_ecpointformatlist (length=%i) ", s->session->tlsext_ecpointformatlist_length); | ||
| 1129 | sdata = s->session->tlsext_ecpointformatlist; | ||
| 1130 | for (i = 0; i < s->session->tlsext_ecpointformatlist_length; i++) | ||
| 1131 | fprintf(stderr, "%i ", *(sdata++)); | ||
| 1132 | fprintf(stderr, "\n"); | ||
| 1133 | #endif | ||
| 1134 | } else if (type == TLSEXT_TYPE_elliptic_curves && | 1124 | } else if (type == TLSEXT_TYPE_elliptic_curves && |
| 1135 | s->version != DTLS1_VERSION) { | 1125 | s->version != DTLS1_VERSION) { |
| 1136 | unsigned char *sdata = data; | 1126 | unsigned char *sdata = data; |
| @@ -1156,13 +1146,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1156 | s->session->tlsext_ellipticcurvelist_length = ellipticcurvelist_length; | 1146 | s->session->tlsext_ellipticcurvelist_length = ellipticcurvelist_length; |
| 1157 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); | 1147 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); |
| 1158 | } | 1148 | } |
| 1159 | #if 0 | ||
| 1160 | fprintf(stderr, "ssl_parse_clienthello_tlsext s->session->tlsext_ellipticcurvelist (length=%i) ", s->session->tlsext_ellipticcurvelist_length); | ||
| 1161 | sdata = s->session->tlsext_ellipticcurvelist; | ||
| 1162 | for (i = 0; i < s->session->tlsext_ellipticcurvelist_length; i++) | ||
| 1163 | fprintf(stderr, "%i ", *(sdata++)); | ||
| 1164 | fprintf(stderr, "\n"); | ||
| 1165 | #endif | ||
| 1166 | } | 1149 | } |
| 1167 | #endif /* OPENSSL_NO_EC */ | 1150 | #endif /* OPENSSL_NO_EC */ |
| 1168 | #ifdef TLSEXT_TYPE_opaque_prf_input | 1151 | #ifdef TLSEXT_TYPE_opaque_prf_input |
| @@ -1451,13 +1434,6 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1451 | } | 1434 | } |
| 1452 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; | 1435 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; |
| 1453 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); | 1436 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); |
| 1454 | #if 0 | ||
| 1455 | fprintf(stderr, "ssl_parse_serverhello_tlsext s->session->tlsext_ecpointformatlist "); | ||
| 1456 | sdata = s->session->tlsext_ecpointformatlist; | ||
| 1457 | for (i = 0; i < s->session->tlsext_ecpointformatlist_length; i++) | ||
| 1458 | fprintf(stderr, "%i ", *(sdata++)); | ||
| 1459 | fprintf(stderr, "\n"); | ||
| 1460 | #endif | ||
| 1461 | } | 1437 | } |
| 1462 | #endif /* OPENSSL_NO_EC */ | 1438 | #endif /* OPENSSL_NO_EC */ |
| 1463 | else if (type == TLSEXT_TYPE_session_ticket) { | 1439 | else if (type == TLSEXT_TYPE_session_ticket) { |
| @@ -2230,18 +2206,6 @@ tls12_find_id(int nid, tls12_lookup *table, size_t tlen) | |||
| 2230 | } | 2206 | } |
| 2231 | return -1; | 2207 | return -1; |
| 2232 | } | 2208 | } |
| 2233 | #if 0 | ||
| 2234 | static int | ||
| 2235 | tls12_find_nid(int id, tls12_lookup *table, size_t tlen) | ||
| 2236 | { | ||
| 2237 | size_t i; | ||
| 2238 | for (i = 0; i < tlen; i++) { | ||
| 2239 | if (table[i].id == id) | ||
| 2240 | return table[i].nid; | ||
| 2241 | } | ||
| 2242 | return -1; | ||
| 2243 | } | ||
| 2244 | #endif | ||
| 2245 | 2209 | ||
| 2246 | int | 2210 | int |
| 2247 | tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, const EVP_MD *md) | 2211 | tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, const EVP_MD *md) |
diff --git a/src/lib/libssl/tls1.h b/src/lib/libssl/tls1.h index e05168cffe..400deca6d4 100644 --- a/src/lib/libssl/tls1.h +++ b/src/lib/libssl/tls1.h | |||
| @@ -239,13 +239,6 @@ extern "C" { | |||
| 239 | /* ExtensionType value from RFC4507 */ | 239 | /* ExtensionType value from RFC4507 */ |
| 240 | #define TLSEXT_TYPE_session_ticket 35 | 240 | #define TLSEXT_TYPE_session_ticket 35 |
| 241 | 241 | ||
| 242 | /* ExtensionType value from draft-rescorla-tls-opaque-prf-input-00.txt */ | ||
| 243 | #if 0 /* will have to be provided externally for now , | ||
| 244 | * i.e. build with - DTLSEXT_TYPE_opaque_prf_input = 38183 | ||
| 245 | * using whatever extension number you'd like to try */ | ||
| 246 | # define TLSEXT_TYPE_opaque_prf_input ?? */ | ||
| 247 | #endif | ||
| 248 | |||
| 249 | /* Temporary extension type */ | 242 | /* Temporary extension type */ |
| 250 | #define TLSEXT_TYPE_renegotiate 0xff01 | 243 | #define TLSEXT_TYPE_renegotiate 0xff01 |
| 251 | 244 | ||
