diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/src/ssl/t1_enc.c | 28 | ||||
-rw-r--r-- | src/lib/libssl/t1_enc.c | 28 |
2 files changed, 28 insertions, 28 deletions
diff --git a/src/lib/libssl/src/ssl/t1_enc.c b/src/lib/libssl/src/ssl/t1_enc.c index d6324fa831..7b6c9b7ac6 100644 --- a/src/lib/libssl/src/ssl/t1_enc.c +++ b/src/lib/libssl/src/ssl/t1_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t1_enc.c,v 1.57 2014/06/13 12:49:10 jsing Exp $ */ | 1 | /* $OpenBSD: t1_enc.c,v 1.58 2014/06/13 14:32:35 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -546,19 +546,6 @@ tls1_change_cipher_state(SSL *s, int which) | |||
546 | #ifndef OPENSSL_NO_COMP | 546 | #ifndef OPENSSL_NO_COMP |
547 | comp = s->s3->tmp.new_compression; | 547 | comp = s->s3->tmp.new_compression; |
548 | if (is_read) { | 548 | if (is_read) { |
549 | if (s->compress != NULL) { | ||
550 | COMP_CTX_free(s->compress); | ||
551 | s->compress = NULL; | ||
552 | } | ||
553 | if (comp != NULL) { | ||
554 | s->compress = COMP_CTX_new(comp->method); | ||
555 | if (s->compress == NULL) { | ||
556 | SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, | ||
557 | SSL_R_COMPRESSION_LIBRARY_ERROR); | ||
558 | goto err2; | ||
559 | } | ||
560 | } | ||
561 | } else { | ||
562 | if (s->expand != NULL) { | 549 | if (s->expand != NULL) { |
563 | COMP_CTX_free(s->expand); | 550 | COMP_CTX_free(s->expand); |
564 | s->expand = NULL; | 551 | s->expand = NULL; |
@@ -576,6 +563,19 @@ tls1_change_cipher_state(SSL *s, int which) | |||
576 | if (s->s3->rrec.comp == NULL) | 563 | if (s->s3->rrec.comp == NULL) |
577 | goto err; | 564 | goto err; |
578 | } | 565 | } |
566 | } else { | ||
567 | if (s->compress != NULL) { | ||
568 | COMP_CTX_free(s->compress); | ||
569 | s->compress = NULL; | ||
570 | } | ||
571 | if (comp != NULL) { | ||
572 | s->compress = COMP_CTX_new(comp->method); | ||
573 | if (s->compress == NULL) { | ||
574 | SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, | ||
575 | SSL_R_COMPRESSION_LIBRARY_ERROR); | ||
576 | goto err2; | ||
577 | } | ||
578 | } | ||
579 | } | 579 | } |
580 | #endif | 580 | #endif |
581 | 581 | ||
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c index d6324fa831..7b6c9b7ac6 100644 --- a/src/lib/libssl/t1_enc.c +++ b/src/lib/libssl/t1_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t1_enc.c,v 1.57 2014/06/13 12:49:10 jsing Exp $ */ | 1 | /* $OpenBSD: t1_enc.c,v 1.58 2014/06/13 14:32:35 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -546,19 +546,6 @@ tls1_change_cipher_state(SSL *s, int which) | |||
546 | #ifndef OPENSSL_NO_COMP | 546 | #ifndef OPENSSL_NO_COMP |
547 | comp = s->s3->tmp.new_compression; | 547 | comp = s->s3->tmp.new_compression; |
548 | if (is_read) { | 548 | if (is_read) { |
549 | if (s->compress != NULL) { | ||
550 | COMP_CTX_free(s->compress); | ||
551 | s->compress = NULL; | ||
552 | } | ||
553 | if (comp != NULL) { | ||
554 | s->compress = COMP_CTX_new(comp->method); | ||
555 | if (s->compress == NULL) { | ||
556 | SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, | ||
557 | SSL_R_COMPRESSION_LIBRARY_ERROR); | ||
558 | goto err2; | ||
559 | } | ||
560 | } | ||
561 | } else { | ||
562 | if (s->expand != NULL) { | 549 | if (s->expand != NULL) { |
563 | COMP_CTX_free(s->expand); | 550 | COMP_CTX_free(s->expand); |
564 | s->expand = NULL; | 551 | s->expand = NULL; |
@@ -576,6 +563,19 @@ tls1_change_cipher_state(SSL *s, int which) | |||
576 | if (s->s3->rrec.comp == NULL) | 563 | if (s->s3->rrec.comp == NULL) |
577 | goto err; | 564 | goto err; |
578 | } | 565 | } |
566 | } else { | ||
567 | if (s->compress != NULL) { | ||
568 | COMP_CTX_free(s->compress); | ||
569 | s->compress = NULL; | ||
570 | } | ||
571 | if (comp != NULL) { | ||
572 | s->compress = COMP_CTX_new(comp->method); | ||
573 | if (s->compress == NULL) { | ||
574 | SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, | ||
575 | SSL_R_COMPRESSION_LIBRARY_ERROR); | ||
576 | goto err2; | ||
577 | } | ||
578 | } | ||
579 | } | 579 | } |
580 | #endif | 580 | #endif |
581 | 581 | ||