aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog11
-rw-r--r--g10/encode.c2
-rw-r--r--g10/g10.c3
-rw-r--r--g10/keygen.c6
-rw-r--r--g10/options.h1
-rw-r--r--g10/sig-check.c6
-rw-r--r--g10/sign.c3
-rw-r--r--g10/trustdb.c3
8 files changed, 28 insertions, 7 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index a428b72d5..c054268ca 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,14 @@
+Wed Feb 9 15:33:44 CET 2000 Werner Koch <[email protected]>
+
+ * gpg.c: New option --ignore-time-conflict
+ * sig-check.c (do_check): Implemented this option.
+ * trustdb.c (check_trust): Ditto.
+ * sign.c (do_sign): Ditto.
+ * keygen.c (generate_subkeypair): Ditto.
+
+ * encode.c (encode_simple): use iobuf_cancel after open failure.
+ Reported by Huy Le.
+
Fri Jan 14 18:32:01 CET 2000 Werner Koch <[email protected]>
* packet.h (STRING2KEY): Changed mode from byte to int.
diff --git a/g10/encode.c b/g10/encode.c
index 50d696e2f..e1311f2d9 100644
--- a/g10/encode.c
+++ b/g10/encode.c
@@ -116,7 +116,7 @@ encode_simple( const char *filename, int mode )
}
if( (rc = open_outfile( filename, opt.armor? 1:0, &out )) ) {
- iobuf_close(inp);
+ iobuf_cancel(inp);
m_free(cfx.dek);
m_free(s2k);
return rc;
diff --git a/g10/g10.c b/g10/g10.c
index ff50b7aeb..bfa75eff2 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -182,6 +182,7 @@ enum cmd_and_opt_values { aNull = 0,
oHonorHttpProxy,
oFastListMode,
oListOnly,
+ oIgnoreTimeConflict,
oEmu3DESS2KBug, /* will be removed in 1.1 */
aTest };
@@ -354,6 +355,7 @@ static ARGPARSE_OPTS opts[] = {
{ oHonorHttpProxy,"honor-http-proxy", 0, "@" },
{ oFastListMode,"fast-list-mode", 0, "@" },
{ oListOnly, "list-only", 0, "@"},
+ { oIgnoreTimeConflict, "ignore-time-conflict", 0, "@" },
{ oEmu3DESS2KBug, "emulate-3des-s2k-bug", 0, "@"},
{0} };
@@ -890,6 +892,7 @@ main( int argc, char **argv )
case oHonorHttpProxy: opt.honor_http_proxy = 1; break;
case oFastListMode: opt.fast_list_mode = 1; break;
case oListOnly: opt.list_only=1; break;
+ case oIgnoreTimeConflict: opt.ignore_time_conflict = 1; break;
default : pargs.err = configfp? 1:2; break;
}
diff --git a/g10/keygen.c b/g10/keygen.c
index 11d79d0fd..11c840786 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -1023,8 +1023,10 @@ generate_subkeypair( KBNODE pub_keyblock, KBNODE sec_keyblock )
"in future (time warp or clock problem)\n")
: _("key has been created %lu seconds "
"in future (time warp or clock problem)\n"), d );
- rc = G10ERR_TIME_CONFLICT;
- goto leave;
+ if( !opt.ignore_time_conflict ) {
+ rc = G10ERR_TIME_CONFLICT;
+ goto leave;
+ }
}
diff --git a/g10/options.h b/g10/options.h
index d98241c29..1da1120be 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -87,6 +87,7 @@ struct {
ulong set_filesize;
int honor_http_proxy;
int fast_list_mode;
+ int ignore_time_conflict;
} opt;
diff --git a/g10/sig-check.c b/g10/sig-check.c
index 742727c99..d9e4c3983 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -303,7 +303,8 @@ do_check( PKT_public_key *pk, PKT_signature *sig, MD_HANDLE digest )
? _("public key is %lu second newer than the signature\n")
: _("public key is %lu seconds newer than the signature\n"),
d );
- return G10ERR_TIME_CONFLICT; /* pubkey newer than signature */
+ if( !opt.ignore_time_conflict )
+ return G10ERR_TIME_CONFLICT; /* pubkey newer than signature */
}
cur_time = make_timestamp();
@@ -313,7 +314,8 @@ do_check( PKT_public_key *pk, PKT_signature *sig, MD_HANDLE digest )
"in future (time warp or clock problem)\n")
: _("key has been created %lu seconds "
"in future (time warp or clock problem)\n"), d );
- return G10ERR_TIME_CONFLICT;
+ if( !opt.ignore_time_conflict )
+ return G10ERR_TIME_CONFLICT;
}
if( pk->expiredate && pk->expiredate < cur_time ) {
diff --git a/g10/sign.c b/g10/sign.c
index 0d3e50372..4a2bd3ec1 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -112,7 +112,8 @@ do_sign( PKT_secret_key *sk, PKT_signature *sig,
"in future (time warp or clock problem)\n")
: _("key has been created %lu seconds "
"in future (time warp or clock problem)\n"), d );
- return G10ERR_TIME_CONFLICT;
+ if( !opt.ignore_time_conflict )
+ return G10ERR_TIME_CONFLICT;
}
diff --git a/g10/trustdb.c b/g10/trustdb.c
index 1791f2882..eb244143e 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -2326,7 +2326,8 @@ check_trust( PKT_public_key *pk, unsigned *r_trustlevel,
log_info(_("key %08lX.%lu: created in future "
"(time warp or clock problem)\n"),
(ulong)keyid[1], pk->local_id );
- return G10ERR_TIME_CONFLICT;
+ if( !opt.ignore_time_conflict )
+ return G10ERR_TIME_CONFLICT;
}
if( !(rec.r.dir.dirflags & DIRF_CHECKED) )