summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_pkt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/d1_pkt.c')
-rw-r--r--src/lib/libssl/d1_pkt.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c
index 56e6939aed..c9ffab1f3c 100644
--- a/src/lib/libssl/d1_pkt.c
+++ b/src/lib/libssl/d1_pkt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_pkt.c,v 1.31 2014/07/09 16:06:14 miod Exp $ */ 1/* $OpenBSD: d1_pkt.c,v 1.32 2014/07/10 08:51:14 tedu Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -427,20 +427,6 @@ dtls1_process_record(SSL *s)
427 goto err; 427 goto err;
428 } 428 }
429 429
430 /* r->length is now just compressed */
431 if (s->expand != NULL) {
432 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH) {
433 al = SSL_AD_RECORD_OVERFLOW;
434 SSLerr(SSL_F_DTLS1_PROCESS_RECORD, SSL_R_COMPRESSED_LENGTH_TOO_LONG);
435 goto f_err;
436 }
437 if (!ssl3_do_uncompress(s)) {
438 al = SSL_AD_DECOMPRESSION_FAILURE;
439 SSLerr(SSL_F_DTLS1_PROCESS_RECORD, SSL_R_BAD_DECOMPRESSION);
440 goto f_err;
441 }
442 }
443
444 if (rr->length > SSL3_RT_MAX_PLAIN_LENGTH) { 430 if (rr->length > SSL3_RT_MAX_PLAIN_LENGTH) {
445 al = SSL_AD_RECORD_OVERFLOW; 431 al = SSL_AD_RECORD_OVERFLOW;
446 SSLerr(SSL_F_DTLS1_PROCESS_RECORD, SSL_R_DATA_LENGTH_TOO_LONG); 432 SSLerr(SSL_F_DTLS1_PROCESS_RECORD, SSL_R_DATA_LENGTH_TOO_LONG);
@@ -1373,16 +1359,8 @@ do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len)
1373 /* we now 'read' from wr->input, wr->length bytes into 1359 /* we now 'read' from wr->input, wr->length bytes into
1374 * wr->data */ 1360 * wr->data */
1375 1361
1376 /* first we compress */ 1362 memcpy(wr->data, wr->input, wr->length);
1377 if (s->compress != NULL) { 1363 wr->input = wr->data;
1378 if (!ssl3_do_compress(s)) {
1379 SSLerr(SSL_F_DO_DTLS1_WRITE, SSL_R_COMPRESSION_FAILURE);
1380 goto err;
1381 }
1382 } else {
1383 memcpy(wr->data, wr->input, wr->length);
1384 wr->input = wr->data;
1385 }
1386 1364
1387 /* we should still have the output to wr->data and the input 1365 /* we should still have the output to wr->data and the input
1388 * from wr->input. Length should be wr->length. 1366 * from wr->input. Length should be wr->length.