1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-27 21:41:23 +02:00

* 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.
This commit is contained in:
David Shaw 2002-11-24 00:50:14 +00:00
parent 2bb29764af
commit 0cd879cd9c
4 changed files with 9 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2002-11-23 David Shaw <dshaw@jabberwocky.com>
* 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 <dshaw@jabberwocky.com>
* keygen.c (keygen_set_std_prefs): Properly handle an empty

View File

@ -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 );

View File

@ -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() ) {

View File

@ -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)