diff options
author | jsing <> | 2014-06-13 14:32:35 +0000 |
---|---|---|
committer | jsing <> | 2014-06-13 14:32:35 +0000 |
commit | bf4c677d6d03111cd2f82906993a4f8c16915e8c (patch) | |
tree | ca70ef6099b18faa2fbb4a8ed3d325191f321695 | |
parent | cb80be8ff44b1d20a4df76193e41656c8864d57a (diff) | |
download | openbsd-bf4c677d6d03111cd2f82906993a4f8c16915e8c.tar.gz openbsd-bf4c677d6d03111cd2f82906993a4f8c16915e8c.tar.bz2 openbsd-bf4c677d6d03111cd2f82906993a4f8c16915e8c.zip |
Swap compress/expand around so they are in the correct order - these ended
up in the wrong order when the code was refactored.
-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 | ||