Lines 1-48
Link Here
|
1 |
Index: include/cipher.h |
|
|
2 |
=================================================================== |
3 |
RCS file: /cvs/gnupg/gnupg/include/cipher.h,v |
4 |
retrieving revision 1.63 |
5 |
diff -u -r1.63 cipher.h |
6 |
--- include/cipher.h 29 Nov 2004 21:14:18 -0000 1.63 |
7 |
+++ include/cipher.h 8 Feb 2005 04:10:29 -0000 |
8 |
@@ -75,6 +75,7 @@ |
9 |
int keylen; |
10 |
int algo_info_printed; |
11 |
int use_mdc; |
12 |
+ int symmetric; |
13 |
byte key[32]; /* this is the largest used keylen (256 bit) */ |
14 |
} DEK; |
15 |
|
16 |
Index: g10/mainproc.c |
17 |
=================================================================== |
18 |
RCS file: /cvs/gnupg/gnupg/g10/mainproc.c,v |
19 |
retrieving revision 1.161 |
20 |
diff -u -r1.161 mainproc.c |
21 |
--- g10/mainproc.c 21 Oct 2004 19:18:47 -0000 1.161 |
22 |
+++ g10/mainproc.c 8 Feb 2005 04:10:30 -0000 |
23 |
@@ -330,6 +330,8 @@ |
24 |
|
25 |
if(c->dek) |
26 |
{ |
27 |
+ c->dek->symmetric=1; |
28 |
+ |
29 |
/* FIXME: This doesn't work perfectly if a symmetric |
30 |
key comes before a public key in the message - if |
31 |
the user doesn't know the passphrase, then there is |
32 |
Index: g10/encr-data.c |
33 |
=================================================================== |
34 |
RCS file: /cvs/gnupg/gnupg/g10/encr-data.c,v |
35 |
retrieving revision 1.30 |
36 |
diff -u -r1.30 encr-data.c |
37 |
--- g10/encr-data.c 8 Oct 2004 21:54:26 -0000 1.30 |
38 |
+++ g10/encr-data.c 8 Feb 2005 04:10:30 -0000 |
39 |
@@ -125,7 +125,7 @@ |
40 |
cipher_sync( dfx.cipher_hd ); |
41 |
p = temp; |
42 |
/* log_hexdump( "prefix", temp, nprefix+2 ); */ |
43 |
- if( p[nprefix-2] != p[nprefix] || p[nprefix-1] != p[nprefix+1] ) { |
44 |
+ if( dek->symmetric && (p[nprefix-2] != p[nprefix] || p[nprefix-1] != p[nprefix+1]) ) { |
45 |
rc = G10ERR_BAD_KEY; |
46 |
goto leave; |
47 |
} |
48 |
|