diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 11 | ||||
-rw-r--r-- | g10/g10.c | 35 | ||||
-rw-r--r-- | g10/hkp.c | 6 | ||||
-rw-r--r-- | g10/mainproc.c | 2 | ||||
-rw-r--r-- | g10/options.h | 1 | ||||
-rw-r--r-- | g10/options.skel | 5 | ||||
-rw-r--r-- | g10/pkclist.c | 2 | ||||
-rw-r--r-- | g10/plaintext.c | 2 | ||||
-rw-r--r-- | g10/ringedit.c | 2 |
9 files changed, 40 insertions, 26 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index acfed581d..b1cb693a9 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,14 @@ +Fri Oct 8 20:32:01 CEST 1999 Werner Koch <[email protected]> + + * ringedit.c (enum_keyblocks): Zero the entire kbpos out on open. + + * g10.c (oEntropyDLL): Removed option. + (main): Made the warning on development versions more verbose. + + * g10.c (oHonorHttpProxy): New option. + * hkp.c (hkp_ask_import,hkp_export): Implement this option. + * options.skel: Enable this option for new installations + Mon Oct 4 21:23:04 CEST 1999 Werner Koch <[email protected]> * import.c (import_keys): Changed calling interface, adjusted caller. @@ -178,7 +178,7 @@ enum cmd_and_opt_values { aNull = 0, oAllowNonSelfsignedUID, oNoLiteral, oSetFilesize, - oEntropyDLLName, + oHonorHttpProxy, oEmu3DESS2KBug, /* will be removed in 1.1 */ aTest }; @@ -346,7 +346,7 @@ static ARGPARSE_OPTS opts[] = { { oAllowNonSelfsignedUID, "allow-non-selfsigned-uid", 0, "@" }, { oNoLiteral, "no-literal", 0, "@" }, { oSetFilesize, "set-filesize", 20, "@" }, - { oEntropyDLLName, "entropy-dll-name", 2, "@" }, + { oHonorHttpProxy,"honor-http-proxy", 0, "@" }, { oEmu3DESS2KBug, "emulate-3des-s2k-bug", 0, "@"}, {0} }; @@ -586,7 +586,11 @@ main( int argc, char **argv ) opt.completes_needed = 1; opt.marginals_needed = 3; opt.max_cert_depth = 5; + #ifdef __MINGW32__ + opt.homedir = read_w32_registry_string( NULL, "Software\\GNU\\GnuPG", "HomeDir" ); + #else opt.homedir = getenv("GNUPGHOME"); + #endif if( !opt.homedir || !*opt.homedir ) { #ifdef HAVE_DRIVE_LETTERS opt.homedir = "c:/gnupg"; @@ -865,22 +869,10 @@ main( int argc, char **argv ) case oDisablePubkeyAlgo: disable_pubkey_algo( string_to_pubkey_algo(pargs.r.ret_str) ); break; - case oAllowNonSelfsignedUID: - opt.allow_non_selfsigned_uid = 1; - break; - case oNoLiteral: - opt.no_literal = 1; - break; - case oSetFilesize: - opt.set_filesize = pargs.r.ret_ulong; - break; - - case oEntropyDLLName: - #ifdef USE_STATIC_RNDW32 - log_info("set dllname to `%s'\n", pargs.r.ret_str ); - rndw32_set_dll_name( pargs.r.ret_str ); - #endif - break; + case oAllowNonSelfsignedUID: opt.allow_non_selfsigned_uid = 1; break; + case oNoLiteral: opt.no_literal = 1; break; + case oSetFilesize: opt.set_filesize = pargs.r.ret_ulong; break; + case oHonorHttpProxy: opt.honor_http_proxy = 1; break; default : pargs.err = configfp? 1:2; break; } @@ -903,8 +895,11 @@ main( int argc, char **argv ) fprintf(stderr, "%s\n", strusage(15) ); } #ifdef IS_DEVELOPMENT_VERSION - if( !opt.batch ) - log_info("NOTE: this is a development version!\n"); + if( !opt.batch ) { + log_info("NOTE: THIS IS A DEVELOPMENT VERSION!\n"); + log_info("It is only intended for test purposes and should NOT be\n"); + log_info("used in a production environment or with production keys!\n"); + } #endif if( opt.force_mdc ) { log_info("--force-mdc ignored because" @@ -55,6 +55,7 @@ hkp_ask_import( u32 *keyid ) struct http_context hd; char *request; int rc; + unsigned int hflags = opt.honor_http_proxy? HTTP_FLAG_TRY_PROXY : 0; if( !opt.keyserver_name ) return -1; @@ -65,7 +66,7 @@ hkp_ask_import( u32 *keyid ) * nicer one */ sprintf( request, "x-hkp://%s:11371/pks/lookup?op=get&search=0x%08lX", opt.keyserver_name, (ulong)keyid[1] ); - rc = http_open_document( &hd, request, 0 ); + rc = http_open_document( &hd, request, hflags ); if( rc ) { log_info("can't get key from keyserver: %s\n", rc == G10ERR_NETWORK? strerror(errno) @@ -120,6 +121,7 @@ hkp_export( STRLIST users ) struct http_context hd; char *request; unsigned int status; + unsigned int hflags = opt.honor_http_proxy? HTTP_FLAG_TRY_PROXY : 0; if( !opt.keyserver_name ) { log_error("no keyserver known (use option --keyserver)\n"); @@ -142,7 +144,7 @@ hkp_export( STRLIST users ) request = m_alloc( strlen( opt.keyserver_name ) + 100 ); sprintf( request, "x-hkp://%s:11371/pks/add", opt.keyserver_name ); - rc = http_open( &hd, HTTP_REQ_POST, request , 0 ); + rc = http_open( &hd, HTTP_REQ_POST, request , hflags ); if( rc ) { log_error("can't connect to `%s': %s\n", opt.keyserver_name, diff --git a/g10/mainproc.c b/g10/mainproc.c index 59b460c81..1299c7a24 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -509,7 +509,7 @@ do_check_sig( CTX c, KBNODE node, int *is_selfsig ) } else if( sig->sig_class == 0x20 ) { log_info(_("standalone revocation - " - "use \"gpg --import\" to apply\n"), sig->sig_class); + "use \"gpg --import\" to apply\n")); return G10ERR_NOT_PROCESSED; } else { diff --git a/g10/options.h b/g10/options.h index 650df8d88..f6f044f80 100644 --- a/g10/options.h +++ b/g10/options.h @@ -83,6 +83,7 @@ struct { int allow_non_selfsigned_uid; int no_literal; ulong set_filesize; + int honor_http_proxy; } opt; diff --git a/g10/options.skel b/g10/options.skel index fa4ac3f28..646e0152b 100644 --- a/g10/options.skel +++ b/g10/options.skel @@ -79,3 +79,8 @@ lock-once # Use "host -l pgp.net | grep www" to figure out a keyserver. #keyserver wwwkeys.eu.pgp.net +# The environment variable http_proxy is only used when the +# this option is set. + +honor-http-proxy + diff --git a/g10/pkclist.c b/g10/pkclist.c index 1e382ccff..0cf2942a3 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -194,7 +194,7 @@ do_edit_ownertrust( ulong lid, int mode, unsigned *new_trust, int defer_help ) for(;;) { /* a string with valid answers */ - char *ans = _("sSmMqQ"); + const char *ans = _("sSmMqQ"); if( !did_help ) { if( !mode ) { diff --git a/g10/plaintext.c b/g10/plaintext.c index f8f4dcaf7..9deda8652 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -308,7 +308,7 @@ ask_for_detached_datafile( MD_HANDLE md, MD_HANDLE md2, fp = open_sigfile( inname ); /* open default file */ if( !fp && !opt.batch ) { int any=0; - tty_printf("Detached signature.\n"); + tty_printf(_("Detached signature.\n")); do { m_free(answer); answer = cpr_get("detached_signature.filename", diff --git a/g10/ringedit.c b/g10/ringedit.c index 04d6753de..e333c9e25 100644 --- a/g10/ringedit.c +++ b/g10/ringedit.c @@ -737,7 +737,7 @@ enum_keyblocks( int mode, KBPOS *kbpos, KBNODE *ret_root ) if( !mode || mode == 5 || mode == 100 ) { int i; - kbpos->fp = NULL; + memset( kbpos, 0, sizeof *kbpos ); if( !mode ) { kbpos->secret = 0; i = 0; |