diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-13 14:32:36 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-13 14:32:36 +0000 |
commit | 8d57d94553d10849db0c7f9a567e038935a39ad4 (patch) | |
tree | ce5e7d7f50ec5c50995ff720f523129e0a0d99ee /lib | |
parent | 704feaa106a9a95347c08293485ac9b895ae4fd7 (diff) |
Swap compress/expand around so they are in the correct order - these ended
up in the wrong order when the code was refactored.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/src/ssl/t1_enc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/libssl/src/ssl/t1_enc.c b/lib/libssl/src/ssl/t1_enc.c index d6324fa831d..7b6c9b7ac68 100644 --- a/lib/libssl/src/ssl/t1_enc.c +++ b/lib/libssl/src/ssl/t1_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_enc.c,v 1.57 2014/06/13 12:49:10 jsing Exp $ */ +/* $OpenBSD: t1_enc.c,v 1.58 2014/06/13 14:32:35 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -546,19 +546,6 @@ tls1_change_cipher_state(SSL *s, int which) #ifndef OPENSSL_NO_COMP comp = s->s3->tmp.new_compression; if (is_read) { - if (s->compress != NULL) { - COMP_CTX_free(s->compress); - s->compress = NULL; - } - if (comp != NULL) { - s->compress = COMP_CTX_new(comp->method); - if (s->compress == NULL) { - SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, - SSL_R_COMPRESSION_LIBRARY_ERROR); - goto err2; - } - } - } else { if (s->expand != NULL) { COMP_CTX_free(s->expand); s->expand = NULL; @@ -576,6 +563,19 @@ tls1_change_cipher_state(SSL *s, int which) if (s->s3->rrec.comp == NULL) goto err; } + } else { + if (s->compress != NULL) { + COMP_CTX_free(s->compress); + s->compress = NULL; + } + if (comp != NULL) { + s->compress = COMP_CTX_new(comp->method); + if (s->compress == NULL) { + SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, + SSL_R_COMPRESSION_LIBRARY_ERROR); + goto err2; + } + } } #endif |