mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
New option, doc fix, typo fix.
This commit is contained in:
parent
c59e59069c
commit
83dd513710
25 changed files with 77 additions and 34 deletions
|
@ -1,3 +1,12 @@
|
|||
2000-10-19 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* g10.c: New option --ignore-crc-error
|
||||
* armor.c (invalid_crc): New.
|
||||
(radix64_read): Act on new option.
|
||||
|
||||
* openfile.c (try_make_homedir): Klaus Singvogel fixed a stupid
|
||||
error introduced on Sep 6th.
|
||||
|
||||
2000-10-18 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* misc.c (print_cipher_algo_note): Don't print the note for AES.
|
||||
|
|
23
g10/armor.c
23
g10/armor.c
|
@ -590,6 +590,15 @@ fake_packet( armor_filter_context_t *afx, IOBUF a,
|
|||
}
|
||||
|
||||
|
||||
static int
|
||||
invalid_crc(void)
|
||||
{
|
||||
if ( opt.ignore_crc_error )
|
||||
return 0;
|
||||
log_inc_errorcount();
|
||||
return G10ERR_INVALID_ARMOR;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
|
||||
|
@ -728,17 +737,17 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
|
|||
break; /* eof */
|
||||
} while( ++idx < 4 );
|
||||
if( c == -1 ) {
|
||||
log_error(_("premature eof (in CRC)\n"));
|
||||
rc = G10ERR_INVALID_ARMOR;
|
||||
}
|
||||
log_info(_("premature eof (in CRC)\n"));
|
||||
rc = invalid_crc();
|
||||
}
|
||||
else if( idx != 4 ) {
|
||||
log_error(_("malformed CRC\n"));
|
||||
rc = G10ERR_INVALID_ARMOR;
|
||||
log_info(_("malformed CRC\n"));
|
||||
rc = invalid_crc();
|
||||
}
|
||||
else if( mycrc != afx->crc ) {
|
||||
log_error(_("CRC error; %06lx - %06lx\n"),
|
||||
log_info (_("CRC error; %06lx - %06lx\n"),
|
||||
(ulong)afx->crc, (ulong)mycrc);
|
||||
rc = G10ERR_INVALID_ARMOR;
|
||||
rc = invalid_crc();
|
||||
}
|
||||
else {
|
||||
rc = 0;
|
||||
|
|
|
@ -189,6 +189,7 @@ enum cmd_and_opt_values { aNull = 0,
|
|||
oFastListMode,
|
||||
oListOnly,
|
||||
oIgnoreTimeConflict,
|
||||
oIgnoreCrcError,
|
||||
oShowSessionKey,
|
||||
oOverrideSessionKey,
|
||||
oNoRandomSeedFile,
|
||||
|
@ -378,6 +379,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
{ oFastListMode,"fast-list-mode", 0, "@" },
|
||||
{ oListOnly, "list-only", 0, "@"},
|
||||
{ oIgnoreTimeConflict, "ignore-time-conflict", 0, "@" },
|
||||
{ oIgnoreCrcError, "ignore-crc-error", 0,"@" },
|
||||
{ oShowSessionKey, "show-session-key", 0, "@" },
|
||||
{ oOverrideSessionKey, "override-session-key", 2, "@" },
|
||||
{ oNoRandomSeedFile, "no-random-seed-file", 0, "@" },
|
||||
|
@ -928,6 +930,7 @@ main( int argc, char **argv )
|
|||
case oFastListMode: opt.fast_list_mode = 1; break;
|
||||
case oListOnly: opt.list_only=1; break;
|
||||
case oIgnoreTimeConflict: opt.ignore_time_conflict = 1; break;
|
||||
case oIgnoreCrcError: opt.ignore_crc_error = 1; break;
|
||||
case oNoRandomSeedFile: use_random_seed = 0; break;
|
||||
case oNoAutoKeyRetrieve: opt.auto_key_retrieve = 0; break;
|
||||
case oShowSessionKey: opt.show_session_key = 1; break;
|
||||
|
|
|
@ -329,7 +329,7 @@ try_make_homedir( const char *fname )
|
|||
|
||||
if ( ( *defhome == '~'
|
||||
&& ( strlen(fname) >= strlen (defhome+1)
|
||||
&& !strcmp(fname+strlen(defhome+1)-strlen(defhome+1),
|
||||
&& !strcmp(fname+strlen(fname)-strlen(defhome+1),
|
||||
defhome+1 ) ))
|
||||
|| ( *defhome != '~'
|
||||
&& !compare_filenames( fname, defhome ) )
|
||||
|
@ -345,7 +345,3 @@ try_make_homedir( const char *fname )
|
|||
g10_exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ struct {
|
|||
int honor_http_proxy;
|
||||
int fast_list_mode;
|
||||
int ignore_time_conflict;
|
||||
int ignore_crc_error;
|
||||
int command_fd;
|
||||
int auto_key_retrieve;
|
||||
const char *override_session_key;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue