1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
To: vim_dev@googlegroups.com
Subject: Patch 7.3.133
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.133
Problem: When using encryption it's not clear what method was used.
Solution: In the file message show "blowfish" when using blowfish.
Files: src/fileio.c
*** ../vim-7.3.132/src/fileio.c 2011-02-15 17:39:14.000000000 +0100
--- src/fileio.c 2011-02-25 16:30:19.000000000 +0100
***************
*** 250,255 ****
--- 250,256 ----
#ifdef FEAT_CRYPT
char_u *cryptkey = NULL;
int did_ask_for_key = FALSE;
+ int crypt_method_used;
#endif
#ifdef FEAT_PERSISTENT_UNDO
context_sha256_T sha_ctx;
***************
*** 2289,2294 ****
--- 2290,2296 ----
save_file_ff(curbuf); /* remember the current file format */
#ifdef FEAT_CRYPT
+ crypt_method_used = use_crypt_method;
if (cryptkey != NULL)
{
crypt_pop_state();
***************
*** 2483,2489 ****
#ifdef FEAT_CRYPT
if (cryptkey != NULL)
{
! STRCAT(IObuff, _("[crypted]"));
c = TRUE;
}
#endif
--- 2485,2494 ----
#ifdef FEAT_CRYPT
if (cryptkey != NULL)
{
! if (crypt_method_used == 1)
! STRCAT(IObuff, _("[blowfish]"));
! else
! STRCAT(IObuff, _("[crypted]"));
c = TRUE;
}
#endif
***************
*** 3199,3204 ****
--- 3204,3212 ----
int write_undo_file = FALSE;
context_sha256_T sha_ctx;
#endif
+ #ifdef FEAT_CRYPT
+ int crypt_method_used;
+ #endif
if (fname == NULL || *fname == NUL) /* safety check */
return FAIL;
***************
*** 4728,4733 ****
--- 4736,4742 ----
mch_set_acl(wfname, acl);
#endif
#ifdef FEAT_CRYPT
+ crypt_method_used = use_crypt_method;
if (wb_flags & FIO_ENCRYPTED)
crypt_pop_state();
#endif
***************
*** 4882,4888 ****
#ifdef FEAT_CRYPT
if (wb_flags & FIO_ENCRYPTED)
{
! STRCAT(IObuff, _("[crypted]"));
c = TRUE;
}
#endif
--- 4891,4900 ----
#ifdef FEAT_CRYPT
if (wb_flags & FIO_ENCRYPTED)
{
! if (crypt_method_used == 1)
! STRCAT(IObuff, _("[blowfish]"));
! else
! STRCAT(IObuff, _("[crypted]"));
c = TRUE;
}
#endif
*** ../vim-7.3.132/src/version.c 2011-02-25 15:18:46.000000000 +0100
--- src/version.c 2011-02-25 16:42:58.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
{ /* Add new patch number below this line */
+ /**/
+ 133,
/**/
--
[clop clop]
GUARD #1: Halt! Who goes there?
ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of
Camelot. King of the Britons, defeator of the Saxons, sovereign of
all England!
GUARD #1: Pull the other one!
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|