mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-23 15:07:03 +01:00
* options.h, g10.c (main), mainproc.c (proc_encrypted): Return a
decryption failed error if a MDC does not verify. Warn if a MDC is not present (can disable via --no-mdc-warning). * exec.c (exec_write), g10.c (main), keyserver.c (keyserver_spawn): Use new DISABLE_KEYSERVER_PATH rather than FIXED_EXEC_PATH.
This commit is contained in:
parent
1f703dadd1
commit
928dba9e70
@ -1,3 +1,13 @@
|
|||||||
|
2002-07-30 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* options.h, g10.c (main), mainproc.c (proc_encrypted): Return a
|
||||||
|
decryption failed error if a MDC does not verify. Warn if a MDC
|
||||||
|
is not present (can disable via --no-mdc-warning).
|
||||||
|
|
||||||
|
* exec.c (exec_write), g10.c (main), keyserver.c
|
||||||
|
(keyserver_spawn): Use new DISABLE_KEYSERVER_PATH rather than
|
||||||
|
FIXED_EXEC_PATH.
|
||||||
|
|
||||||
2002-07-28 David Shaw <dshaw@jabberwocky.com>
|
2002-07-28 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* sig-check.c (do_check): Properly validate v4 sigs with no hashed
|
* sig-check.c (do_check): Properly validate v4 sigs with no hashed
|
||||||
|
@ -330,10 +330,6 @@ int exec_write(struct exec_info **info,const char *program,
|
|||||||
if(program==NULL && args_in==NULL)
|
if(program==NULL && args_in==NULL)
|
||||||
BUG();
|
BUG();
|
||||||
|
|
||||||
#ifdef FIXED_EXEC_PATH
|
|
||||||
set_exec_path(FIXED_EXEC_PATH,0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
*info=m_alloc_clear(sizeof(struct exec_info));
|
*info=m_alloc_clear(sizeof(struct exec_info));
|
||||||
|
|
||||||
if(name)
|
if(name)
|
||||||
|
@ -186,6 +186,7 @@ enum cmd_and_opt_values { aNull = 0,
|
|||||||
oTrustDBName,
|
oTrustDBName,
|
||||||
oNoSecmemWarn,
|
oNoSecmemWarn,
|
||||||
oNoPermissionWarn,
|
oNoPermissionWarn,
|
||||||
|
oNoMDCWarn,
|
||||||
oNoArmor,
|
oNoArmor,
|
||||||
oNoDefKeyring,
|
oNoDefKeyring,
|
||||||
oNoGreeting,
|
oNoGreeting,
|
||||||
@ -491,6 +492,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
{ oTrustDBName, "trustdb-name", 2, "@" },
|
{ oTrustDBName, "trustdb-name", 2, "@" },
|
||||||
{ oNoSecmemWarn, "no-secmem-warning", 0, "@" }, /* used only by regression tests */
|
{ oNoSecmemWarn, "no-secmem-warning", 0, "@" }, /* used only by regression tests */
|
||||||
{ oNoPermissionWarn, "no-permission-warning", 0, "@" },
|
{ oNoPermissionWarn, "no-permission-warning", 0, "@" },
|
||||||
|
{ oNoMDCWarn, "no-mdc-warning", 0, "@" },
|
||||||
{ oNoArmor, "no-armor", 0, "@"},
|
{ oNoArmor, "no-armor", 0, "@"},
|
||||||
{ oNoArmor, "no-armour", 0, "@"},
|
{ oNoArmor, "no-armour", 0, "@"},
|
||||||
{ oNoDefKeyring, "no-default-keyring", 0, "@" },
|
{ oNoDefKeyring, "no-default-keyring", 0, "@" },
|
||||||
@ -1315,6 +1317,7 @@ main( int argc, char **argv )
|
|||||||
case oCertDigestAlgo: cert_digest_string = m_strdup(pargs.r.ret_str); break;
|
case oCertDigestAlgo: cert_digest_string = m_strdup(pargs.r.ret_str); break;
|
||||||
case oNoSecmemWarn: secmem_set_flags( secmem_get_flags() | 1 ); break;
|
case oNoSecmemWarn: secmem_set_flags( secmem_get_flags() | 1 ); break;
|
||||||
case oNoPermissionWarn: opt.no_perm_warn=1; break;
|
case oNoPermissionWarn: opt.no_perm_warn=1; break;
|
||||||
|
case oNoMDCWarn: opt.no_mdc_warn=1; break;
|
||||||
case oCharset:
|
case oCharset:
|
||||||
if( set_native_charset( pargs.r.ret_str ) )
|
if( set_native_charset( pargs.r.ret_str ) )
|
||||||
log_error(_("%s is not a valid character set\n"),
|
log_error(_("%s is not a valid character set\n"),
|
||||||
@ -1362,12 +1365,10 @@ main( int argc, char **argv )
|
|||||||
break;
|
break;
|
||||||
case oTempDir: opt.temp_dir=pargs.r.ret_str; break;
|
case oTempDir: opt.temp_dir=pargs.r.ret_str; break;
|
||||||
case oExecPath:
|
case oExecPath:
|
||||||
#ifndef FIXED_EXEC_PATH
|
|
||||||
if(set_exec_path(pargs.r.ret_str,0))
|
if(set_exec_path(pargs.r.ret_str,0))
|
||||||
log_error(_("unable to set exec-path to %s\n"),pargs.r.ret_str);
|
log_error(_("unable to set exec-path to %s\n"),pargs.r.ret_str);
|
||||||
else
|
else
|
||||||
opt.exec_path_set=1;
|
opt.exec_path_set=1;
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case oNotation:
|
case oNotation:
|
||||||
add_notation_data( pargs.r.ret_str, 0 );
|
add_notation_data( pargs.r.ret_str, 0 );
|
||||||
|
@ -339,13 +339,16 @@ keyserver_spawn(int action,STRLIST list,
|
|||||||
opt.keyserver_options.use_temp_files=1;
|
opt.keyserver_options.use_temp_files=1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FIXED_EXEC_PATH
|
/* Push the libexecdir into path. If DISABLE_KEYSERVER_PATH is set,
|
||||||
/* Push the libdir into path */
|
use the 0 arg to replace the path. */
|
||||||
|
#ifdef DISABLE_KEYSERVER_PATH
|
||||||
|
set_exec_path(GNUPG_LIBEXECDIR,0);
|
||||||
|
#else
|
||||||
set_exec_path(GNUPG_LIBEXECDIR,opt.exec_path_set);
|
set_exec_path(GNUPG_LIBEXECDIR,opt.exec_path_set);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Build the filename for the helper to execute */
|
|
||||||
|
|
||||||
|
/* Build the filename for the helper to execute */
|
||||||
command=m_alloc(strlen("gpgkeys_")+strlen(opt.keyserver_scheme)+1);
|
command=m_alloc(strlen("gpgkeys_")+strlen(opt.keyserver_scheme)+1);
|
||||||
strcpy(command,"gpgkeys_");
|
strcpy(command,"gpgkeys_");
|
||||||
strcat(command,opt.keyserver_scheme);
|
strcat(command,opt.keyserver_scheme);
|
||||||
|
@ -498,10 +498,13 @@ proc_encrypted( CTX c, PACKET *pkt )
|
|||||||
log_info(_("decryption okay\n"));
|
log_info(_("decryption okay\n"));
|
||||||
if( pkt->pkt.encrypted->mdc_method )
|
if( pkt->pkt.encrypted->mdc_method )
|
||||||
write_status( STATUS_GOODMDC );
|
write_status( STATUS_GOODMDC );
|
||||||
|
else if(!opt.no_mdc_warn)
|
||||||
|
log_info ("WARNING: message was not integrity protected\n");
|
||||||
}
|
}
|
||||||
else if( result == G10ERR_BAD_SIGN ) {
|
else if( result == G10ERR_BAD_SIGN ) {
|
||||||
log_error(_("WARNING: encrypted message has been manipulated!\n"));
|
log_error(_("WARNING: encrypted message has been manipulated!\n"));
|
||||||
write_status( STATUS_BADMDC );
|
write_status( STATUS_BADMDC );
|
||||||
|
write_status( STATUS_DECRYPTION_FAILED );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
write_status( STATUS_DECRYPTION_FAILED );
|
write_status( STATUS_DECRYPTION_FAILED );
|
||||||
|
@ -141,6 +141,7 @@ struct {
|
|||||||
*personal_digest_prefs,
|
*personal_digest_prefs,
|
||||||
*personal_compress_prefs;
|
*personal_compress_prefs;
|
||||||
int no_perm_warn;
|
int no_perm_warn;
|
||||||
|
int no_mdc_warn;
|
||||||
char *temp_dir;
|
char *temp_dir;
|
||||||
int no_encrypt_to;
|
int no_encrypt_to;
|
||||||
int interactive;
|
int interactive;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user