From: Nikos Mavrogiannopoulos Date: Wed, 20 Mar 2002 21:52:30 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: gnutls_0_3_92~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4405cfc1b021ffd2fe8be596b324c54838a68e7;p=thirdparty%2Fgnutls.git *** empty log message *** --- diff --git a/lib/gnutls_constate.c b/lib/gnutls_constate.c index a41379b2bb..40e66aa2b8 100644 --- a/lib/gnutls_constate.c +++ b/lib/gnutls_constate.c @@ -311,15 +311,6 @@ int rc; return GNUTLS_E_UNKNOWN_CIPHER; } - state->connection_state.read_compression_state = - gnutls_comp_init(state->security_parameters. - read_compression_algorithm, 1); - if (state->connection_state.read_compression_state == - GNUTLS_COMP_FAILED) { - gnutls_assert(); - return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM; - } - /* copy mac secrets from cipherspecs, to connection * state. */ @@ -330,7 +321,6 @@ int rc; } - break; case GNUTLS_CLIENT: @@ -349,16 +339,6 @@ int rc; return GNUTLS_E_UNKNOWN_CIPHER; } - state->connection_state.read_compression_state = - gnutls_comp_init(state->security_parameters. - read_compression_algorithm, 1); - - if (state->connection_state.read_compression_state == - GNUTLS_COMP_FAILED) { - gnutls_assert(); - return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM; - } - /* copy mac secret to connection state */ @@ -370,11 +350,21 @@ int rc; break; - default: + default: /* this check is useless */ gnutls_assert(); return GNUTLS_E_UNKNOWN_ERROR; } + state->connection_state.read_compression_state = + gnutls_comp_init(state->security_parameters. + read_compression_algorithm, 1); + + if (state->connection_state.read_compression_state == + GNUTLS_COMP_FAILED) { + gnutls_assert(); + return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM; + } + return 0; }