[svn] GnuPG - r5233 - in trunk: doc g10 kbx sm
svn author wk
cvs at cvs.gnupg.org
Thu Dec 17 18:25:28 CET 2009
Author: wk
Date: 2009-12-17 18:25:26 +0100 (Thu, 17 Dec 2009)
New Revision: 5233
Modified:
trunk/doc/DETAILS
trunk/doc/gpg.texi
trunk/doc/gpgsm.texi
trunk/g10/ChangeLog
trunk/g10/gpg.c
trunk/g10/server.c
trunk/kbx/keybox-blob.c
trunk/sm/certchain.c
Log:
Implement --faked-systrem-time for gpg.
Typo and comment fixes.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2009-12-15 11:07:43 UTC (rev 5232)
+++ trunk/g10/ChangeLog 2009-12-17 17:25:26 UTC (rev 5233)
@@ -1,3 +1,7 @@
+2009-12-17 Werner Koch <wk at g10code.com>
+
+ * gpg.c: Add new option --faked-system-time.
+
2009-12-15 Werner Koch <wk at g10code.com>
* keydb.c (keydb_add_resource): s/readonly/read_only/g.
Modified: trunk/doc/DETAILS
===================================================================
--- trunk/doc/DETAILS 2009-12-15 11:07:43 UTC (rev 5232)
+++ trunk/doc/DETAILS 2009-12-17 17:25:26 UTC (rev 5233)
@@ -221,12 +221,13 @@
GOODSIG <long_keyid_or_fpr> <username>
The signature with the keyid is good. For each signature only
- one of the three codes GOODSIG, BADSIG or ERRSIG will be
- emitted and they may be used as a marker for a new signature.
- The username is the primary one encoded in UTF-8 and %XX
- escaped. The fingerprint may be used instead of the long keyid
- if it is available. This is the case with CMS and might
- eventually also be available for OpenPGP.
+ one of the codes GOODSIG, BADSIG, EXPSIG, EXPKEYSIG, REVKEYSIG
+ or ERRSIG will be emitted. In the past they were used as a
+ marker for a new signature; new code should use the NEWSIG
+ status instead. The username is the primary one encoded in
+ UTF-8 and %XX escaped. The fingerprint may be used instead of
+ the long keyid if it is available. This is the case with CMS
+ and might eventually also be available for OpenPGP.
EXPSIG <long_keyid_or_fpr> <username>
The signature with the keyid is good, but the signature is
Modified: trunk/doc/gpg.texi
===================================================================
--- trunk/doc/gpg.texi 2009-12-15 11:07:43 UTC (rev 5232)
+++ trunk/doc/gpg.texi 2009-12-17 17:25:26 UTC (rev 5233)
@@ -2188,6 +2188,13 @@
Note that this option is only available on some system.
@end ifset
+ at item --faked-system-time @var{epoch}
+ at opindex faked-system-time
+This option is only useful for testing; it sets the system time back or
+forth to @var{epoch} which is the number of seconds elapsed since the year
+1970. Alternatively @var{epoch} may be given as a full ISO time string
+(e.g. "20070924T154812").
+
@item --enable-progress-filter
Enable certain PROGRESS status outputs. This option allows frontends
to display a progress indicator while gpg is processing larger files.
Modified: trunk/doc/gpgsm.texi
===================================================================
--- trunk/doc/gpgsm.texi 2009-12-15 11:07:43 UTC (rev 5232)
+++ trunk/doc/gpgsm.texi 2009-12-17 17:25:26 UTC (rev 5233)
@@ -450,7 +450,7 @@
@opindex ignore-cert-extension
Add @var{oid} to the list of ignored certificate extensions. The
@var{oid} is expected to be in dotted decimal form, like
- at code{2.5.29.3}. This option may used more than once. Critical
+ at code{2.5.29.3}. This option may be used more than once. Critical
flagged certificate extensions matching one of the OIDs in the list
are treated as if they are actually handled and thus the certificate
won't be rejected due to an unknown critical extension. Use this
Modified: trunk/g10/gpg.c
===================================================================
--- trunk/g10/gpg.c 2009-12-15 11:07:43 UTC (rev 5232)
+++ trunk/g10/gpg.c 2009-12-17 17:25:26 UTC (rev 5233)
@@ -362,6 +362,7 @@
oDisableDSA2,
oAllowMultipleMessages,
oNoAllowMultipleMessages,
+ oFakedSystemTime,
oNoop
};
@@ -704,6 +705,7 @@
ARGPARSE_s_s (oPersonalDigestPreferences, "personal-digest-preferences","@"),
ARGPARSE_s_s (oPersonalCompressPreferences,
"personal-compress-preferences", "@"),
+ ARGPARSE_s_s (oFakedSystemTime, "faked-system-time", "@"),
/* Aliases. I constantly mistype these, and assume other people do
as well. */
@@ -2963,6 +2965,15 @@
opt.flags.allow_multiple_messages=0;
break;
+ case oFakedSystemTime:
+ {
+ time_t faked_time = isotime2epoch (pargs.r.ret_str);
+ if (faked_time == (time_t)(-1))
+ faked_time = (time_t)strtoul (pargs.r.ret_str, NULL, 10);
+ gnupg_set_time (faked_time, 0);
+ }
+ break;
+
case oNoop: break;
default:
@@ -3069,6 +3080,17 @@
if( opt.batch )
tty_batchmode( 1 );
+ if (gnupg_faked_time_p ())
+ {
+ gnupg_isotime_t tbuf;
+
+ log_info (_("WARNING: running with faked system time: "));
+ gnupg_get_isotime (tbuf);
+ dump_isotime (tbuf);
+ log_printf ("\n");
+ }
+
+
gcry_control (GCRYCTL_RESUME_SECMEM_WARN);
if(require_secmem && !got_secmem)
Modified: trunk/g10/server.c
===================================================================
--- trunk/g10/server.c 2009-12-15 11:07:43 UTC (rev 5232)
+++ trunk/g10/server.c 2009-12-17 17:25:26 UTC (rev 5233)
@@ -608,7 +608,7 @@
static gpg_error_t
cmd_passwd (assuan_context_t ctx, char *line)
{
- ctrl_t ctrl = assuan_get_pointer (ctx);
+ /* ctrl_t ctrl = assuan_get_pointer (ctx); */
gpg_error_t err;
line = skip_options (line);
@@ -629,7 +629,7 @@
{
const char *name;
assuan_handler_t handler;
- assuan_handler_t help;
+ const char * const help;
} table[] = {
{ "RECIPIENT", cmd_recipient },
{ "SIGNER", cmd_signer },
Modified: trunk/kbx/keybox-blob.c
===================================================================
--- trunk/kbx/keybox-blob.c 2009-12-15 11:07:43 UTC (rev 5232)
+++ trunk/kbx/keybox-blob.c 2009-12-17 17:25:26 UTC (rev 5233)
@@ -315,6 +315,9 @@
static u32
make_timestamp (void)
{
+#ifdef __GNUC__
+#warning using time and not gnupg_get_time
+#endif
return time(NULL);
}
Modified: trunk/sm/certchain.c
===================================================================
--- trunk/sm/certchain.c 2009-12-15 11:07:43 UTC (rev 5232)
+++ trunk/sm/certchain.c 2009-12-17 17:25:26 UTC (rev 5233)
@@ -241,9 +241,9 @@
;
unsupported = !known[i];
- /* If this critical extension is not supoported, check the list
- of to be ignored extensions to se whether we claim that it is
- supported. */
+ /* If this critical extension is not supported. Check the list
+ of to be ignored extensions to see whether we claim that it
+ is supported. */
if (unsupported && opt.ignored_cert_extensions)
{
for (sl=opt.ignored_cert_extensions;
More information about the Gnupg-commits
mailing list