From bf4c677d6d03111cd2f82906993a4f8c16915e8c Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 13 Jun 2014 14:32:35 +0000 Subject: Swap compress/expand around so they are in the correct order - these ended up in the wrong order when the code was refactored. --- src/lib/libssl/src/ssl/t1_enc.c | 28 ++++++++++++++-------------- src/lib/libssl/t1_enc.c | 28 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'src') 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 @@ -/* $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 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 @@ -/* $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 -- cgit v1.2.3-55-g6feb