]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dcrypt: Removed dead code.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 30 Jun 2016 22:14:34 +0000 (01:14 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 30 Jun 2016 22:14:34 +0000 (01:14 +0300)
src/lib-dcrypt/ostream-encrypt.c

index d5c20a728df3a92218356600e9256405af01683c..a18fc2bc38886eda3510c6b556cdbb3d6c8e0e2b 100644 (file)
@@ -203,18 +203,11 @@ int o_stream_encrypt_keydata_create_v1(struct encrypt_ostream *stream)
                return -1;
        }
 
-       if (ec == 0) {
-               /* same as above */
-               dcrypt_ctx_sym_set_iv(stream->ctx_sym, (const unsigned char*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16);
-               dcrypt_ctx_sym_set_key(stream->ctx_sym, seed, sizeof(seed));
-       }
+       /* same as above */
+       dcrypt_ctx_sym_set_iv(stream->ctx_sym, (const unsigned char*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16);
+       dcrypt_ctx_sym_set_key(stream->ctx_sym, seed, sizeof(seed));
        safe_memset(seed, 0, sizeof(seed));
 
-       if (ec != 0) {
-               io_stream_set_error(&stream->ostream.iostream, "Encryption init error: %s", error);
-               return -1;
-       }
-
        if (!dcrypt_ctx_sym_init(stream->ctx_sym, &error)) {
                io_stream_set_error(&stream->ostream.iostream, "Encryption init error: %s", error);
                return -1;