1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-01 22:28:02 +02:00
This commit is contained in:
Werner Koch 1998-09-15 19:56:30 +00:00
parent d8b888e732
commit 8c80bcf9f0
10 changed files with 52 additions and 15 deletions

5
TODO
View File

@ -1,4 +1,9 @@
* localize asctime()
* if --libdir is used, the extensions are put in a wrong place.
How does GNOME handle this or make a new option for this directory.
* Should we use the ElGamal subkey if the DSA keyid is given? * Should we use the ElGamal subkey if the DSA keyid is given?
What about an option --loose-keyid-match? What about an option --loose-keyid-match?

View File

@ -1 +1 @@
0.3.5 0.3.5a

View File

@ -182,7 +182,7 @@ dnl Checks for library functions.
AC_FUNC_VPRINTF AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror stpcpy strlwr tcgetattr rand strtoul mlock mmap) AC_CHECK_FUNCS(strerror stpcpy strlwr tcgetattr rand strtoul mlock mmap)
AC_CHECK_FUNCS(memmove gettimeofday getrusage gethrtime setrlimit) AC_CHECK_FUNCS(memmove gettimeofday getrusage gethrtime setrlimit)
AC_CHECK_FUNCS(atexit raise getpagesize) AC_CHECK_FUNCS(atexit raise getpagesize strftime)
WK_CHECK_IPC WK_CHECK_IPC
if test "$ac_cv_header_sys_shm_h" = "yes"; then if test "$ac_cv_header_sys_shm_h" = "yes"; then

View File

@ -1,3 +1,7 @@
Tue Sep 15 17:52:55 1998 Werner Koch (wk@(none))
* mainproc.c (check_sig_and_print): Replaced ascime by asctimestamp.
Mon Sep 14 11:40:52 1998 Werner Koch (wk@(none)) Mon Sep 14 11:40:52 1998 Werner Koch (wk@(none))
* seskey.c (make_session_key): Now detects weak keys. * seskey.c (make_session_key): Now detects weak keys.

View File

@ -382,6 +382,7 @@ i18n_init(void)
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
#ifdef HAVE_LC_MESSAGES #ifdef HAVE_LC_MESSAGES
setlocale( LC_MESSAGES, "" ); setlocale( LC_MESSAGES, "" );
setlocale( LC_TIME, "" );
#else #else
setlocale( LC_ALL, "" ); setlocale( LC_ALL, "" );
#endif #endif

View File

@ -829,7 +829,6 @@ static int
check_sig_and_print( CTX c, KBNODE node ) check_sig_and_print( CTX c, KBNODE node )
{ {
PKT_signature *sig = node->pkt->pkt.signature; PKT_signature *sig = node->pkt->pkt.signature;
time_t stamp = sig->timestamp;
const char *astr, *tstr; const char *astr, *tstr;
int rc; int rc;
@ -838,7 +837,7 @@ check_sig_and_print( CTX c, KBNODE node )
return 0; return 0;
} }
tstr = asctime(localtime (&stamp)); tstr = asctimestamp(sig->timestamp);
astr = pubkey_algo_to_string( sig->pubkey_algo ); astr = pubkey_algo_to_string( sig->pubkey_algo );
log_info(_("Signature made %.*s using %s key ID %08lX\n"), log_info(_("Signature made %.*s using %s key ID %08lX\n"),
(int)strlen(tstr)-1, tstr, astr? astr: "?", (ulong)sig->keyid[1] ); (int)strlen(tstr)-1, tstr, astr? astr: "?", (ulong)sig->keyid[1] );

View File

@ -134,7 +134,8 @@ const char *print_fname_stdout( const char *s );
/*-- miscutil.c --*/ /*-- miscutil.c --*/
u32 make_timestamp(void); u32 make_timestamp(void);
u32 add_days_to_timestamp( u32 stamp, u16 days ); u32 add_days_to_timestamp( u32 stamp, u16 days );
const char *strtimestamp( u32 stamp ); const char *strtimestamp( u32 stamp ); /* GMT */
const char *asctimestamp( u32 stamp ); /* localized */
void print_string( FILE *fp, byte *p, size_t n, int delim ); void print_string( FILE *fp, byte *p, size_t n, int delim );
int answer_is_yes( const char *s ); int answer_is_yes( const char *s );

View File

@ -1,3 +1,7 @@
Tue Sep 15 17:52:21 1998 Werner Koch (wk@(none))
* miscutil.c (asctimestamp): New.
Mon Sep 14 09:38:18 1998 Werner Koch (wk@(none)) Mon Sep 14 09:38:18 1998 Werner Koch (wk@(none))
* secmem.c (init_pool): Now mmaps /dev/zero if we do not have MAP_ANON. * secmem.c (init_pool): Now mmaps /dev/zero if we do not have MAP_ANON.

View File

@ -39,6 +39,9 @@ add_days_to_timestamp( u32 stamp, u16 days )
return stamp + days*86400L; return stamp + days*86400L;
} }
/****************
* Note: this function returns GMT
*/
const char * const char *
strtimestamp( u32 stamp ) strtimestamp( u32 stamp )
{ {
@ -52,6 +55,26 @@ strtimestamp( u32 stamp )
return buffer; return buffer;
} }
/****************
* Note: this function returns local time
*/
const char *
asctimestamp( u32 stamp )
{
static char buffer[30];
struct tm *tp;
time_t atime = stamp;
tp = localtime( &atime );
#ifdef HAVE_STRFTIME
mem2str( buffer, asctime(tp), DIM(buffer) );
#else
strftime( buffer, DIM(buffer)-1, "%c", tp );
buffer[DIM(buffer)-1] = 0;
#endif
return buffer;
}
/**************** /****************
* Print a string to FP, but filter all control characters out. * Print a string to FP, but filter all control characters out.
*/ */

View File

@ -66,13 +66,13 @@ host_alias = i586-pc-linux-gnu
host_triplet = i586-pc-linux-gnu host_triplet = i586-pc-linux-gnu
target_alias = i586-pc-linux-gnu target_alias = i586-pc-linux-gnu
target_triplet = i586-pc-linux-gnu target_triplet = i586-pc-linux-gnu
CATALOGS = en.mo de.mo it.mo fr.mo CATALOGS = en.gmo de.gmo it.gmo fr.gmo
CATOBJEXT = .mo CATOBJEXT = .gmo
CC = gcc CC = gcc
CPP = gcc -E CPP = gcc -E
DATADIRNAME = lib DATADIRNAME = share
DYNLINK_LDFLAGS = -rdynamic DYNLINK_LDFLAGS = -rdynamic
G10_LOCALEDIR = /usr/local/lib/locale G10_LOCALEDIR = /usr/local/share/locale
GENCAT = GENCAT =
GMOFILES = en.gmo de.gmo it.gmo fr.gmo GMOFILES = en.gmo de.gmo it.gmo fr.gmo
GMSGFMT = /usr/local/bin/msgfmt GMSGFMT = /usr/local/bin/msgfmt
@ -80,9 +80,9 @@ GT_NO =
GT_YES = #YES# GT_YES = #YES#
INCLUDE_LOCALE_H = #include <locale.h> INCLUDE_LOCALE_H = #include <locale.h>
INSTOBJEXT = .mo INSTOBJEXT = .mo
INTLDEPS = INTLDEPS = $(top_builddir)/intl/libintl.a
INTLLIBS = INTLLIBS = $(top_builddir)/intl/libintl.a
INTLOBJS = INTLOBJS = $(GETTOBJS)
MKINSTALLDIRS = scripts/mkinstalldirs MKINSTALLDIRS = scripts/mkinstalldirs
MPI_EXTRA_ASM_OBJS = MPI_EXTRA_ASM_OBJS =
MSGFMT = /usr/local/bin/msgfmt MSGFMT = /usr/local/bin/msgfmt
@ -90,9 +90,9 @@ PACKAGE = gnupg
POFILES = en.po de.po it.po fr.po POFILES = en.po de.po it.po fr.po
POSUB = po POSUB = po
RANLIB = ranlib RANLIB = ranlib
USE_INCLUDED_LIBINTL = no USE_INCLUDED_LIBINTL = yes
USE_NLS = yes USE_NLS = yes
VERSION = 0.3.5 VERSION = 0.3.5a
ZLIBS = ZLIBS =
l = l =
@ -122,7 +122,7 @@ LIBRARIES = $(noinst_LIBRARIES)
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
CPPFLAGS = CPPFLAGS =
LDFLAGS = LDFLAGS =
LIBS = -ldl -lz LIBS = -ldl -lz
libzlib_a_LIBADD = libzlib_a_LIBADD =
libzlib_a_OBJECTS = adler32.o compress.o crc32.o gzio.o uncompr.o \ libzlib_a_OBJECTS = adler32.o compress.o crc32.o gzio.o uncompr.o \
deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o infcodes.o \ deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o infcodes.o \