aboutsummaryrefslogtreecommitdiffstats
path: root/g10/main.h
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-09-24 20:34:38 +0000
committerDavid Shaw <[email protected]>2004-09-24 20:34:38 +0000
commit4d26ab92cc852f73e97ff4f977f2efd1f6808e14 (patch)
tree09ee9cbb6119e60870929c668963f3d2164f4845 /g10/main.h
parent* keyedit.c (keyedit_menu), gpgv.c (agent_scd_getattr (stub)), keygen.c (diff)
downloadgnupg-4d26ab92cc852f73e97ff4f977f2efd1f6808e14.tar.gz
gnupg-4d26ab92cc852f73e97ff4f977f2efd1f6808e14.zip
* main.h: Create S2K_DIGEST_ALGO macro so we do not need to always set
opt.s2k_digest_algo. This helps fix a problem with PGP 2.x encrypted symmetric messages. Change all callers (encode.c, g10.c, keyedit.c, keygen.c, passphrase.c, sign.c). * armor.c, cardglue.c, getkey.c, import.c, keygen.c: Be consistent in some more quoted strings. Always use 'user ID', not 'user id', "quotes" for user IDs, etc.
Diffstat (limited to 'g10/main.h')
-rw-r--r--g10/main.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/g10/main.h b/g10/main.h
index 1326bd442..71c1a2b3e 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -28,10 +28,15 @@
/* It could be argued that the default cipher should be 3DES rather
than CAST5, and the default compression should be 0
- (i.e. uncompressed) rather than 1 (zip). */
-#define DEFAULT_CIPHER_ALGO CIPHER_ALGO_CAST5
-#define DEFAULT_DIGEST_ALGO DIGEST_ALGO_SHA1
-#define DEFAULT_COMPRESS_ALGO COMPRESS_ALGO_ZIP
+ (i.e. uncompressed) rather than 1 (zip). However, the real world
+ issues of speed and size come into play here. */
+
+#define DEFAULT_CIPHER_ALGO CIPHER_ALGO_CAST5
+#define DEFAULT_DIGEST_ALGO DIGEST_ALGO_SHA1
+#define DEFAULT_COMPRESS_ALGO COMPRESS_ALGO_ZIP
+#define DEFAULT_S2K_DIGEST_ALGO DIGEST_ALGO_SHA1
+
+#define S2K_DIGEST_ALGO (opt.s2k_digest_algo?opt.s2k_digest_algo:DEFAULT_S2K_DIGEST_ALGO)
typedef struct
{