aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-11-24 00:50:14 +0000
committerDavid Shaw <[email protected]>2002-11-24 00:50:14 +0000
commit0cd879cd9c8ef9363aa97e3d30090bd06fc3d215 (patch)
tree06b085f8c8adfd330b269c374c0a5a60827ddb9d
parent* gpg.sgml: Add an interoperability section. (diff)
downloadgnupg-0cd879cd9c8ef9363aa97e3d30090bd06fc3d215.tar.gz
gnupg-0cd879cd9c8ef9363aa97e3d30090bd06fc3d215.zip
* encode.c (encode_simple), passphrase.c (passphrase_to_dek), sign.c
(sign_symencrypt_file): Use --s2k-digest-algo for passphrase mangling rather than --digest-algo.
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog6
-rw-r--r--g10/encode.c3
-rw-r--r--g10/passphrase.c5
-rw-r--r--g10/sign.c3
4 files changed, 9 insertions, 8 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index ad2e66e7a..0e238c41b 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,9 @@
+2002-11-23 David Shaw <[email protected]>
+
+ * encode.c (encode_simple), passphrase.c (passphrase_to_dek),
+ sign.c (sign_symencrypt_file): Use --s2k-digest-algo for
+ passphrase mangling rather than --digest-algo.
+
2002-11-21 David Shaw <[email protected]>
* keygen.c (keygen_set_std_prefs): Properly handle an empty
diff --git a/g10/encode.c b/g10/encode.c
index a814544e9..a2ca43fb1 100644
--- a/g10/encode.c
+++ b/g10/encode.c
@@ -192,8 +192,7 @@ encode_simple( const char *filename, int mode, int compat )
if( mode ) {
s2k = m_alloc_clear( sizeof *s2k );
s2k->mode = opt.rfc1991? 0:opt.s2k_mode;
- s2k->hash_algo = opt.def_digest_algo ? opt.def_digest_algo
- : opt.s2k_digest_algo;
+ s2k->hash_algo = opt.s2k_digest_algo;
cfx.dek = passphrase_to_dek( NULL, 0,
opt.def_cipher_algo ? opt.def_cipher_algo
: opt.s2k_cipher_algo , s2k, 2, NULL );
diff --git a/g10/passphrase.c b/g10/passphrase.c
index 77fa15cc3..ac3f0311e 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -956,12 +956,9 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo,
if( !s2k ) {
/* This is used for the old rfc1991 mode
* Note: This must match the code in encode.c with opt.rfc1991 set */
- int algo = opt.def_digest_algo ? opt.def_digest_algo
- : opt.s2k_digest_algo;
-
s2k = &help_s2k;
s2k->mode = 0;
- s2k->hash_algo = algo;
+ s2k->hash_algo = opt.s2k_digest_algo;
}
if( !next_pw && is_status_enabled() ) {
diff --git a/g10/sign.c b/g10/sign.c
index 2c85f232a..047dd13fc 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1022,8 +1022,7 @@ sign_symencrypt_file (const char *fname, STRLIST locusr)
/* prepare key */
s2k = m_alloc_clear( sizeof *s2k );
s2k->mode = opt.rfc1991? 0:opt.s2k_mode;
- s2k->hash_algo = opt.def_digest_algo ? opt.def_digest_algo
- : opt.s2k_digest_algo;
+ s2k->hash_algo = opt.s2k_digest_algo;
algo = opt.def_cipher_algo ? opt.def_cipher_algo : opt.s2k_cipher_algo;
if (!opt.quiet || !opt.batch)