aboutsummaryrefslogtreecommitdiffstats
path: root/g10/passphrase.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-05-15 18:49:19 +0000
committerWerner Koch <[email protected]>1998-05-15 18:49:19 +0000
commitf9a70437820d05f7f98ffd1c9003edd83872e9b5 (patch)
treedc17bdc0dea76ddc28ae651a3dc341b83784dd12 /g10/passphrase.c
parentcan create v4 signatures (diff)
downloadgnupg-f9a70437820d05f7f98ffd1c9003edd83872e9b5.tar.gz
gnupg-f9a70437820d05f7f98ffd1c9003edd83872e9b5.zip
new releaseV0-2-18
Diffstat (limited to 'g10/passphrase.c')
-rw-r--r--g10/passphrase.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c
index 5bd3eacbd..d3b882fa8 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -30,6 +30,7 @@
#include "ttyio.h"
#include "cipher.h"
#include "keydb.h"
+#include "main.h"
static int pwfd = -1;
@@ -69,10 +70,11 @@ passphrase_to_dek( u32 *keyid, int cipher_algo, STRING2KEY *s2k, int mode )
s2k = &help_s2k;
s2k->mode = 0;
/* this should be MD5 if cipher is IDEA, but because we do
- * not have IDEA, we use the default one, the the user
+ * not have IDEA, we use the default one, the user
* can select it from the commandline
*/
- s2k->hash_algo = opt.def_digest_algo;
+ s2k->hash_algo = opt.def_digest_algo?opt.def_digest_algo
+ :DEFAULT_DIGEST_ALGO;
}
if( keyid && !opt.batch ) {