diff options
author | 2014-06-13 14:32:35 +0000 | |
---|---|---|
committer | 2014-06-13 14:32:35 +0000 | |
commit | baf68c0a8ae4e6a284d510b43ceb0e38cdc23934 (patch) | |
tree | 85d82ede0ac2ad624f852510b1176979af566c38 /lib/libssl/src | |
parent | The export_key/export_iv variables are only used in the is_export case. (diff) | |
download | wireguard-openbsd-baf68c0a8ae4e6a284d510b43ceb0e38cdc23934.tar.xz wireguard-openbsd-baf68c0a8ae4e6a284d510b43ceb0e38cdc23934.zip |
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/libssl/src')
-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 |