mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* card-util.c (card_status): Use isotimestamp and not the
localized asctimestamp to match the timezone used in the key information. * miscutil.c (isotimestamp): New.
This commit is contained in:
parent
a043c14d22
commit
a177090f37
@ -1,5 +1,9 @@
|
||||
2005-03-14 Werner Koch <wk@g10code.com>
|
||||
|
||||
* card-util.c (card_status): Use isotimestamp and not the
|
||||
localized asctimestamp to match the timezone used in the key
|
||||
information.
|
||||
|
||||
* cardglue.c (pin_cb): Disable debug output.
|
||||
|
||||
2005-03-11 Werner Koch <wk@g10code.com>
|
||||
|
@ -426,17 +426,17 @@ card_status (FILE *fp, char *serialno, size_t serialnobuflen)
|
||||
print_sha1_fpr (fp, info.fpr1valid? info.fpr1:NULL);
|
||||
if (info.fpr1valid && info.fpr1time)
|
||||
tty_fprintf (fp, " created ....: %s\n",
|
||||
asctimestamp (info.fpr1time));
|
||||
isotimestamp (info.fpr1time));
|
||||
tty_fprintf (fp, "Encryption key....:");
|
||||
print_sha1_fpr (fp, info.fpr2valid? info.fpr2:NULL);
|
||||
if (info.fpr2valid && info.fpr2time)
|
||||
tty_fprintf (fp, " created ....: %s\n",
|
||||
asctimestamp (info.fpr2time));
|
||||
isotimestamp (info.fpr2time));
|
||||
tty_fprintf (fp, "Authentication key:");
|
||||
print_sha1_fpr (fp, info.fpr3valid? info.fpr3:NULL);
|
||||
if (info.fpr3valid && info.fpr3time)
|
||||
tty_fprintf (fp, " created ....: %s\n",
|
||||
asctimestamp (info.fpr3time));
|
||||
isotimestamp (info.fpr3time));
|
||||
tty_fprintf (fp, "General key info..: ");
|
||||
|
||||
thefpr = (info.fpr1valid? info.fpr1 : info.fpr2valid? info.fpr2 :
|
||||
|
@ -152,6 +152,7 @@ u32 scan_isodatestr( const char *string );
|
||||
u32 add_days_to_timestamp( u32 stamp, u16 days );
|
||||
const char *strtimevalue( u32 stamp );
|
||||
const char *strtimestamp( u32 stamp ); /* GMT */
|
||||
const char *isotimestamp( u32 stamp ); /* GMT with hh:mm:ss */
|
||||
const char *asctimestamp( u32 stamp ); /* localized */
|
||||
void print_string( FILE *fp, const byte *p, size_t n, int delim );
|
||||
void print_string2( FILE *fp, const byte *p, size_t n, int delim, int delim2 );
|
||||
|
2
scripts/conf-w32/README
Normal file
2
scripts/conf-w32/README
Normal file
@ -0,0 +1,2 @@
|
||||
Files useful for building W32 versions.
|
||||
|
39
scripts/conf-w32/bzip2-1.diff
Normal file
39
scripts/conf-w32/bzip2-1.diff
Normal file
@ -0,0 +1,39 @@
|
||||
To include support for BZIP2 compression in GunPG for W32, the patch
|
||||
below should be applied to a stock bzip2-1.0.2 source. The Build as
|
||||
usual using the mingw32 cross compiler package from Debian and install
|
||||
the library and header file on top of the cross compiler installation
|
||||
(/usr/i586-mingw32msvc/lib/). Note that for ease of maintenance we
|
||||
don't used a DLL. [wk 2005-03-14]
|
||||
|
||||
|
||||
diff -u orig/bzip2-1.0.2/Makefile bzip2-1.0.2/Makefile
|
||||
--- orig/bzip2-1.0.2/Makefile 2002-01-26 00:34:53.000000000 +0100
|
||||
+++ bzip2-1.0.2/Makefile 2004-11-03 14:10:45.000000000 +0100
|
||||
@@ -2,9 +2,9 @@
|
||||
SHELL=/bin/sh
|
||||
|
||||
# To assist in cross-compiling
|
||||
-CC=gcc
|
||||
-AR=ar
|
||||
-RANLIB=ranlib
|
||||
+CC=i586-mingw32msvc-gcc
|
||||
+AR=i586-mingw32msvc-ar
|
||||
+RANLIB=i586-mingw32msvc-ranlib
|
||||
LDFLAGS=
|
||||
|
||||
# Suitably paranoid flags to avoid bugs in gcc-2.7
|
||||
diff -u orig/bzip2-1.0.2/bzlib.h bzip2-1.0.2/bzlib.h
|
||||
--- orig/bzip2-1.0.2/bzlib.h 2001-12-30 03:19:45.000000000 +0100
|
||||
+++ bzip2-1.0.2/bzlib.h 2004-11-03 14:32:41.000000000 +0100
|
||||
@@ -113,7 +114,7 @@
|
||||
/* Need a definitition for FILE */
|
||||
#include <stdio.h>
|
||||
|
||||
-#ifdef _WIN32
|
||||
+#if defined( _WIN32 ) && 0
|
||||
# include <windows.h>
|
||||
# ifdef small
|
||||
/* windows.h define small to char */
|
||||
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-03-14 Werner Koch <wk@g10code.com>
|
||||
|
||||
* miscutil.c (isotimestamp): New.
|
||||
|
||||
2005-03-10 Werner Koch <wk@g10code.com>
|
||||
|
||||
* secmem.c (secmem_realloc): Take control information into account
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* miscutil.c - miscellaneous utilities
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2003,
|
||||
* 2004 Free Software Foundation, Inc.
|
||||
* 2004, 2005 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
@ -137,6 +137,29 @@ strtimestamp( u32 stamp )
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
/****************
|
||||
* Note: this function returns GMT
|
||||
*/
|
||||
const char *
|
||||
isotimestamp (u32 stamp)
|
||||
{
|
||||
static char buffer[25+5];
|
||||
struct tm *tp;
|
||||
time_t atime = stamp;
|
||||
|
||||
if (atime < 0) {
|
||||
strcpy (buffer, "????" "-??" "-??" " " "??" ":" "??" ":" "??");
|
||||
}
|
||||
else {
|
||||
tp = gmtime( &atime );
|
||||
sprintf(buffer,"%04d-%02d-%02d %02d:%02d:%02d",
|
||||
1900+tp->tm_year, tp->tm_mon+1, tp->tm_mday,
|
||||
tp->tm_hour, tp->tm_min, tp->tm_sec);
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/****************
|
||||
* Note: this function returns local time
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user