mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
* g10.c (main): Use 3DES instead of CAST5 if we don't have CAST5 support.
Use 3DES for the s2k cipher in --openpgp mode. (print_mds): #ifdef all of the optional digest algorithms.
This commit is contained in:
parent
d691cf8d10
commit
5511e3870d
@ -1,3 +1,9 @@
|
|||||||
|
2003-02-21 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* g10.c (main): Use 3DES instead of CAST5 if we don't have CAST5
|
||||||
|
support. Use 3DES for the s2k cipher in --openpgp mode.
|
||||||
|
(print_mds): #ifdef all of the optional digest algorithms.
|
||||||
|
|
||||||
2003-02-12 David Shaw <dshaw@jabberwocky.com>
|
2003-02-12 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* keydb.h, getkey.c (classify_user_id, classify_user_id2): Make
|
* keydb.h, getkey.c (classify_user_id, classify_user_id2): Make
|
||||||
|
33
g10/g10.c
33
g10/g10.c
@ -1147,7 +1147,11 @@ main( int argc, char **argv )
|
|||||||
opt.def_compress_algo = -1;
|
opt.def_compress_algo = -1;
|
||||||
opt.s2k_mode = 3; /* iterated+salted */
|
opt.s2k_mode = 3; /* iterated+salted */
|
||||||
opt.s2k_digest_algo = DIGEST_ALGO_SHA1;
|
opt.s2k_digest_algo = DIGEST_ALGO_SHA1;
|
||||||
|
#ifdef USE_CAST5
|
||||||
opt.s2k_cipher_algo = CIPHER_ALGO_CAST5;
|
opt.s2k_cipher_algo = CIPHER_ALGO_CAST5;
|
||||||
|
#else
|
||||||
|
opt.s2k_cipher_algo = CIPHER_ALGO_3DES;
|
||||||
|
#endif
|
||||||
opt.completes_needed = 1;
|
opt.completes_needed = 1;
|
||||||
opt.marginals_needed = 3;
|
opt.marginals_needed = 3;
|
||||||
opt.max_cert_depth = 5;
|
opt.max_cert_depth = 5;
|
||||||
@ -1533,7 +1537,7 @@ main( int argc, char **argv )
|
|||||||
opt.def_compress_algo = -1;
|
opt.def_compress_algo = -1;
|
||||||
opt.s2k_mode = 3; /* iterated+salted */
|
opt.s2k_mode = 3; /* iterated+salted */
|
||||||
opt.s2k_digest_algo = DIGEST_ALGO_SHA1;
|
opt.s2k_digest_algo = DIGEST_ALGO_SHA1;
|
||||||
opt.s2k_cipher_algo = CIPHER_ALGO_CAST5;
|
opt.s2k_cipher_algo = CIPHER_ALGO_3DES;
|
||||||
break;
|
break;
|
||||||
case oPGP2: opt.pgp2 = 1; break;
|
case oPGP2: opt.pgp2 = 1; break;
|
||||||
case oNoPGP2: opt.pgp2 = 0; break;
|
case oNoPGP2: opt.pgp2 = 0; break;
|
||||||
@ -2824,13 +2828,16 @@ print_mds( const char *fname, int algo )
|
|||||||
md_enable( md, DIGEST_ALGO_MD5 );
|
md_enable( md, DIGEST_ALGO_MD5 );
|
||||||
md_enable( md, DIGEST_ALGO_SHA1 );
|
md_enable( md, DIGEST_ALGO_SHA1 );
|
||||||
md_enable( md, DIGEST_ALGO_RMD160 );
|
md_enable( md, DIGEST_ALGO_RMD160 );
|
||||||
if( !check_digest_algo(DIGEST_ALGO_TIGER) )
|
#ifdef USE_TIGER192
|
||||||
md_enable( md, DIGEST_ALGO_TIGER );
|
md_enable( md, DIGEST_ALGO_TIGER );
|
||||||
|
#endif
|
||||||
|
#ifdef USE_SHA256
|
||||||
md_enable( md, DIGEST_ALGO_SHA256 );
|
md_enable( md, DIGEST_ALGO_SHA256 );
|
||||||
if( !check_digest_algo(DIGEST_ALGO_SHA384) )
|
#endif
|
||||||
|
#ifdef USE_SHA512
|
||||||
md_enable( md, DIGEST_ALGO_SHA384 );
|
md_enable( md, DIGEST_ALGO_SHA384 );
|
||||||
if( !check_digest_algo(DIGEST_ALGO_SHA512) )
|
|
||||||
md_enable( md, DIGEST_ALGO_SHA512 );
|
md_enable( md, DIGEST_ALGO_SHA512 );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
while( (n=fread( buf, 1, DIM(buf), fp )) )
|
while( (n=fread( buf, 1, DIM(buf), fp )) )
|
||||||
@ -2846,13 +2853,16 @@ print_mds( const char *fname, int algo )
|
|||||||
print_hashline( md, DIGEST_ALGO_MD5, fname );
|
print_hashline( md, DIGEST_ALGO_MD5, fname );
|
||||||
print_hashline( md, DIGEST_ALGO_SHA1, fname );
|
print_hashline( md, DIGEST_ALGO_SHA1, fname );
|
||||||
print_hashline( md, DIGEST_ALGO_RMD160, fname );
|
print_hashline( md, DIGEST_ALGO_RMD160, fname );
|
||||||
if( !check_digest_algo(DIGEST_ALGO_TIGER) )
|
#ifdef USE_TIGER192
|
||||||
print_hashline( md, DIGEST_ALGO_TIGER, fname );
|
print_hashline( md, DIGEST_ALGO_TIGER, fname );
|
||||||
|
#endif
|
||||||
|
#ifdef USE_SHA256
|
||||||
print_hashline( md, DIGEST_ALGO_SHA256, fname );
|
print_hashline( md, DIGEST_ALGO_SHA256, fname );
|
||||||
if( !check_digest_algo(DIGEST_ALGO_SHA384) )
|
#endif
|
||||||
|
#ifdef USE_SHA512
|
||||||
print_hashline( md, DIGEST_ALGO_SHA384, fname );
|
print_hashline( md, DIGEST_ALGO_SHA384, fname );
|
||||||
if( !check_digest_algo(DIGEST_ALGO_SHA512) )
|
|
||||||
print_hashline( md, DIGEST_ALGO_SHA512, fname );
|
print_hashline( md, DIGEST_ALGO_SHA512, fname );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -2862,13 +2872,16 @@ print_mds( const char *fname, int algo )
|
|||||||
print_hex( md, DIGEST_ALGO_MD5, fname );
|
print_hex( md, DIGEST_ALGO_MD5, fname );
|
||||||
print_hex( md, DIGEST_ALGO_SHA1, fname );
|
print_hex( md, DIGEST_ALGO_SHA1, fname );
|
||||||
print_hex( md, DIGEST_ALGO_RMD160, fname );
|
print_hex( md, DIGEST_ALGO_RMD160, fname );
|
||||||
if( !check_digest_algo(DIGEST_ALGO_TIGER) )
|
#ifdef USE_TIGER192
|
||||||
print_hex( md, DIGEST_ALGO_TIGER, fname );
|
print_hex( md, DIGEST_ALGO_TIGER, fname );
|
||||||
|
#endif
|
||||||
|
#ifdef USE_SHA256
|
||||||
print_hex( md, DIGEST_ALGO_SHA256, fname );
|
print_hex( md, DIGEST_ALGO_SHA256, fname );
|
||||||
if( !check_digest_algo(DIGEST_ALGO_SHA384) )
|
#endif
|
||||||
|
#ifdef USE_SHA512
|
||||||
print_hex( md, DIGEST_ALGO_SHA384, fname );
|
print_hex( md, DIGEST_ALGO_SHA384, fname );
|
||||||
if( !check_digest_algo(DIGEST_ALGO_SHA512) )
|
|
||||||
print_hex( md, DIGEST_ALGO_SHA512, fname );
|
print_hex( md, DIGEST_ALGO_SHA512, fname );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user