aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog14
-rw-r--r--g10/g10.c16
-rw-r--r--g10/main.h2
-rw-r--r--g10/misc.c13
4 files changed, 33 insertions, 12 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 4dd7ad675..b82b7d9f9 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,17 @@
+Thu Sep 14 14:20:38 CEST 2000 Werner Koch <[email protected]>
+
+ * g10.c (main): Default S2K algorithms are now SHA1 and CAST5 - this
+ should solve a lot of compatibility problems with other OpenPGP
+ apps because those algorithms are SHOULD and not optional. The old
+ way to force it was by using the --openpgp option whith the drawback
+ that this would disable a couple of workarounds for PGP.
+
+ * g10.c (main): Don't set --quite along with --no-tty. By Frank Tobin.
+
+ * misc.c (disable_core_dump): Don't display a warning here but a return
+ a status value and ...
+ * g10.c (main): ...print warnining here. Suggested by Sam Roberts.
+
Wed Sep 13 18:12:34 CEST 2000 Werner Koch <[email protected]>
* keyedit.c (keyedit_menu): Allow to use "debug" on the secret key.
diff --git a/g10/g10.c b/g10/g10.c
index c831ba41d..3414d812d 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -580,6 +580,7 @@ main( int argc, char **argv )
char **orig_argv;
const char *fname;
char *username;
+ int may_coredump;
STRLIST sl, remusr= NULL, locusr=NULL;
STRLIST nrings=NULL, sec_nrings=NULL;
armor_filter_context_t afx;
@@ -613,7 +614,7 @@ main( int argc, char **argv )
*/
log_set_name("gpg");
secure_random_alloc(); /* put random number into secure memory */
- disable_core_dumps();
+ may_coredump = disable_core_dumps();
init_signals();
create_dotlock(NULL); /* register locking cleanup */
i18n_init();
@@ -624,8 +625,8 @@ main( int argc, char **argv )
opt.def_digest_algo = 0;
opt.def_compress_algo = 2;
opt.s2k_mode = 3; /* iterated+salted */
- opt.s2k_digest_algo = DIGEST_ALGO_RMD160;
- opt.s2k_cipher_algo = CIPHER_ALGO_BLOWFISH;
+ opt.s2k_digest_algo = DIGEST_ALGO_SHA1;
+ opt.s2k_cipher_algo = CIPHER_ALGO_CAST5;
opt.completes_needed = 1;
opt.marginals_needed = 3;
opt.max_cert_depth = 5;
@@ -767,7 +768,7 @@ main( int argc, char **argv )
case oArmor: opt.armor = 1; opt.no_armor=0; break;
case oOutput: opt.outfile = pargs.r.ret_str; break;
case oQuiet: opt.quiet = 1; break;
- case oNoTTY: opt.quiet = 1; tty_no_terminal(1); break;
+ case oNoTTY: tty_no_terminal(1); break;
case oDryRun: opt.dry_run = 1; break;
case oInteractive: opt.interactive = 1; break;
case oVerbose: g10_opt_verbose++;
@@ -853,7 +854,7 @@ main( int argc, char **argv )
opt.def_cipher_algo = 0;
opt.def_digest_algo = 0;
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_cipher_algo = CIPHER_ALGO_CAST5;
break;
@@ -964,6 +965,11 @@ main( int argc, char **argv )
log_info("used in a production environment or with production keys!\n");
}
#endif
+
+ if( may_coredump && !opt.quiet )
+ log_info(_("WARNING: program may create a core file!\n"));
+
+
if (opt.no_literal) {
log_info(_("NOTE: %s is not for normal use!\n"), "--no-literal");
if (opt.textmode)
diff --git a/g10/main.h b/g10/main.h
index 54e68db18..13178c735 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -54,7 +54,7 @@ char *make_radix64_string( const byte *data, size_t len );
/*-- misc.c --*/
void trap_unaligned(void);
-void disable_core_dumps(void);
+int disable_core_dumps(void);
u16 checksum_u16( unsigned n );
u16 checksum( byte *p, unsigned n );
u16 checksum_mpi( MPI a );
diff --git a/g10/misc.c b/g10/misc.c
index 1e4f4916d..9669af574 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -79,22 +79,23 @@ trap_unaligned(void)
#endif
-void
+int
disable_core_dumps()
{
- #ifndef HAVE_DOSISH_SYSTEM
+ #ifdef HAVE_DOSISH_SYSTEM
+ return 0;
+ #else
#ifdef HAVE_SETRLIMIT
struct rlimit limit;
limit.rlim_cur = 0;
limit.rlim_max = 0;
if( !setrlimit( RLIMIT_CORE, &limit ) )
- return;
- if( errno != EINVAL )
+ return 0;
+ if( errno != EINVAL && errno != ENOSYS )
log_fatal(_("can't disable core dumps: %s\n"), strerror(errno) );
#endif
- if( !opt.quiet )
- log_info(_("WARNING: program may create a core file!\n"));
+ return 1;
#endif
}