aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memfile.c
diff options
context:
space:
mode:
authorJohn Schmidt <john.schmidt.h@gmail.com>2014-05-07 18:04:54 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-05-20 08:31:06 -0300
commit85338fe1d5a56f82546e16c305c2048c081771e0 (patch)
tree1a14dcf2a4aa6c5276a4ea7802f4cbe576e9a6e3 /src/nvim/memfile.c
parent32d018b57edbc75d6a70c5cd3e8012d7f924f460 (diff)
downloadrneovim-85338fe1d5a56f82546e16c305c2048c081771e0.tar.gz
rneovim-85338fe1d5a56f82546e16c305c2048c081771e0.tar.bz2
rneovim-85338fe1d5a56f82546e16c305c2048c081771e0.zip
Remove cryptography
As discussed in #694, vim encryption uses old, obsolete algorithms that are poorly implemented. Since insecure cryptography is worse than no cryptgraphy, the community voted in favor of removing all crypto. Various alternatives to the old crypto is being discussed in #701. Closes #694.
Diffstat (limited to 'src/nvim/memfile.c')
-rw-r--r--src/nvim/memfile.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/nvim/memfile.c b/src/nvim/memfile.c
index 77468bb855..bf40d27502 100644
--- a/src/nvim/memfile.c
+++ b/src/nvim/memfile.c
@@ -132,7 +132,6 @@ memfile_T *mf_open(char_u *fname, int flags)
mf_hash_init(&mfp->mf_hash);
mf_hash_init(&mfp->mf_trans);
mfp->mf_page_size = MEMFILE_PAGE_SIZE;
- mfp->mf_old_key = NULL;
/*
* Try to set the page size equal to the block size of the device.
@@ -814,10 +813,6 @@ static int mf_read(memfile_T *mfp, bhdr_T *hp)
return FAIL;
}
- /* Decrypt if 'key' is set and this is a data block. */
- if (*mfp->mf_buffer->b_p_key != NUL)
- ml_decrypt_data(mfp, hp->bh_data, offset, size);
-
return OK;
}
@@ -894,7 +889,6 @@ static int mf_write(memfile_T *mfp, bhdr_T *hp)
/*
* Write block "hp" with data size "size" to file "mfp->mf_fd".
- * Takes care of encryption.
* Return FAIL or OK.
*/
static int mf_write_block(memfile_T *mfp, bhdr_T *hp, off_t offset, unsigned size)
@@ -902,17 +896,9 @@ static int mf_write_block(memfile_T *mfp, bhdr_T *hp, off_t offset, unsigned siz
char_u *data = hp->bh_data;
int result = OK;
- /* Encrypt if 'key' is set and this is a data block. */
- if (*mfp->mf_buffer->b_p_key != NUL) {
- data = ml_encrypt_data(mfp, data, offset, size);
- }
-
if ((unsigned)write_eintr(mfp->mf_fd, data, size) != size)
result = FAIL;
- if (data != hp->bh_data)
- free(data);
-
return result;
}