]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
*** empty log message ***
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 20 Mar 2002 21:55:44 +0000 (21:55 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 20 Mar 2002 21:55:44 +0000 (21:55 +0000)
lib/gnutls_constate.c

index 40e66aa2b8a731e44b05efa714e8225db24b1deb..f31aeda4fac8d4b19320830533f66b82a775ca33 100644 (file)
@@ -466,14 +466,6 @@ int rc;
                        return GNUTLS_E_UNKNOWN_CIPHER;
                }
 
-               state->connection_state.write_compression_state =
-                   gnutls_comp_init(state->security_parameters.write_compression_algorithm, 0);
-
-               if (state->connection_state.write_compression_state == GNUTLS_COMP_FAILED) {
-                       gnutls_assert();
-                       return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM;
-               }
-
 
                /* copy mac secrets from cipherspecs, to connection
                 * state.
@@ -503,15 +495,6 @@ int rc;
                        return GNUTLS_E_UNKNOWN_CIPHER;
                }
 
-               state->connection_state.write_compression_state =
-                   gnutls_comp_init(state->security_parameters.write_compression_algorithm, 0);
-
-               if (state->connection_state.write_compression_state ==
-                   GNUTLS_COMP_FAILED) {
-                       gnutls_assert();
-                       return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM;
-               }
-
                /* copy mac secret to connection state
                 */
                if (mac_size > 0) {
@@ -527,6 +510,15 @@ int rc;
                return GNUTLS_E_UNKNOWN_ERROR;
        }
 
+
+       state->connection_state.write_compression_state =
+           gnutls_comp_init(state->security_parameters.write_compression_algorithm, 0);
+
+       if (state->connection_state.write_compression_state == GNUTLS_COMP_FAILED) {
+               gnutls_assert();
+               return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM;
+       }
+
        return 0;
 }