comparison src/option.c @ 32299:3d4e28569a6d v9.0.1481

patch 9.0.1481: decrypting with libsodium may fail if the library changes Commit: https://github.com/vim/vim/commit/aae583441bcdbb0bfef3b8a1d193e04ae09ca95d Author: Christian Brabandt <cb@256bit.org> Date: Sun Apr 23 17:50:22 2023 +0100 patch 9.0.1481: decrypting with libsodium may fail if the library changes Problem: Decrypting with libsodium may fail if the library changes. Solution: Add parameters used to the encrypted file header. (Christian Brabandt, closes #12279)
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Apr 2023 19:00:05 +0200
parents 46c32a9a1312
children 3efec53797f3
comparison
equal deleted inserted replaced
32298:dace7bf9cd79 32299:3d4e28569a6d
4272 || (args->os_flags & OPT_GLOBAL) 4272 || (args->os_flags & OPT_GLOBAL)
4273 || args->os_flags == 0) 4273 || args->os_flags == 0)
4274 && !curbufIsChanged() && curbuf->b_ml.ml_mfp != NULL) 4274 && !curbufIsChanged() && curbuf->b_ml.ml_mfp != NULL)
4275 { 4275 {
4276 #ifdef FEAT_CRYPT 4276 #ifdef FEAT_CRYPT
4277 if (crypt_get_method_nr(curbuf) == CRYPT_M_SOD) 4277 if (crypt_method_is_sodium(crypt_get_method_nr(curbuf)))
4278 continue; 4278 continue;
4279 #endif 4279 #endif
4280 u_compute_hash(hash); 4280 u_compute_hash(hash);
4281 u_read_undo(NULL, hash, curbuf->b_fname); 4281 u_read_undo(NULL, hash, curbuf->b_fname);
4282 } 4282 }