From 27ec3d920162edc2b4f3a3a2a5691df52b60461d Mon Sep 17 00:00:00 2001 From: David Shaw Date: Sun, 1 Jun 2003 15:36:13 +0000 Subject: [PATCH] * g10.c (main), keylist.c (show_policy_url, show_notation), mainproc.c (check_sig_and_print): Emulate the old policy and notation behavior (display by default). Send to status-fd whether it is displayed on the screen or not. * g10.c (main): Since we now have some options in devel that won't work in a stable branch gpg.conf file, try for a version-specific gpg.conf-VERSION file before falling back to gpg.conf. * main.h, options.h: Move various option flags to options.h. --- g10/ChangeLog | 13 ++++++++ g10/g10.c | 11 ++++++- g10/keylist.c | 91 +++++++++++++++++++++++++++++++-------------------- g10/main.h | 19 ----------- g10/options.h | 21 ++++++++++++ 5 files changed, 100 insertions(+), 55 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index 8968b83e1..eb8a0fc87 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,16 @@ +2003-06-01 David Shaw + + * g10.c (main), keylist.c (show_policy_url, show_notation), + mainproc.c (check_sig_and_print): Emulate the old policy and + notation behavior (display by default). Send to status-fd whether + it is displayed on the screen or not. + + * g10.c (main): Since we now have some options in devel that won't + work in a stable branch gpg.conf file, try for a version-specific + gpg.conf-VERSION file before falling back to gpg.conf. + + * main.h, options.h: Move various option flags to options.h. + 2003-05-31 David Shaw * mainproc.c (check_sig_and_print), main.h, keylist.c diff --git a/g10/g10.c b/g10/g10.c index 13fb11d2a..ecd9c9b46 100644 --- a/g10/g10.c +++ b/g10/g10.c @@ -1175,6 +1175,7 @@ main( int argc, char **argv ) opt.keyserver_options.include_subkeys=1; opt.keyserver_options.include_revoked=1; opt.keyserver_options.try_dns_srv=1; + opt.verify_options=VERIFY_SHOW_POLICY|VERIFY_SHOW_NOTATION; opt.trust_model=TM_AUTO; opt.mangle_dos_filenames = 1; @@ -1257,7 +1258,15 @@ main( int argc, char **argv ) if( default_config ) { - configname = make_filename(opt.homedir, "gpg" EXTSEP_S "conf", NULL ); + /* Try for a version specific config file first */ + configname = make_filename(opt.homedir, + "gpg" EXTSEP_S "conf-" VERSION, NULL ); + if(access(configname,R_OK)) + { + m_free(configname); + configname = make_filename(opt.homedir, + "gpg" EXTSEP_S "conf", NULL ); + } if (!access (configname, R_OK)) { /* Print a warning when both config files are present. */ char *p = make_filename(opt.homedir, "options", NULL ); diff --git a/g10/keylist.c b/g10/keylist.c index 312c8de23..e151d8872 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -114,6 +114,11 @@ print_pubkey_info (PKT_public_key *pk) tty_printf ("\n\n"); } +/* + mode=0 for stdout. + mode=1 for log_info + status messages + mode=2 for status messages only +*/ void show_policy_url(PKT_signature *sig,int indent,int mode) @@ -125,27 +130,38 @@ show_policy_url(PKT_signature *sig,int indent,int mode) while((p=enum_sig_subpkt(sig->hashed,SIGSUBPKT_POLICY,&len,&seq,&crit))) { - int i; - char *str; + if(mode!=2) + { + int i; + char *str; - for(i=0;ihashed,SIGSUBPKT_NOTATION,&len,&seq,&crit))) if(len>=8) { - int n1,n2,i; - char *str; + int n1,n2; n1=(p[4]<<8)|p[5]; n2=(p[6]<<8)|p[7]; @@ -171,27 +186,33 @@ show_notation(PKT_signature *sig,int indent,int mode) return; } - for(i=0;i