From cvs at cvs.gnupg.org Wed Jun 1 17:22:07 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Wed Jun 1 17:22:10 2005 Subject: gnupg/gl [new] Message-ID: Date: Wednesday, June 1, 2005 @ 17:43:11 Author: wk Path: /cvs/gnupg/gnupg/gl Directory /cvs/gnupg/gnupg/gl added to the repository --> Using per-directory sticky tag `GNUPG-1-9-BRANCH' From cvs at cvs.gnupg.org Wed Jun 1 17:23:21 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Wed Jun 1 17:23:24 2005 Subject: gnupg/gl/m4 [new] Message-ID: Date: Wednesday, June 1, 2005 @ 17:44:27 Author: wk Path: /cvs/gnupg/gnupg/gl/m4 Directory /cvs/gnupg/gnupg/gl/m4 added to the repository --> Using per-directory sticky tag `GNUPG-1-9-BRANCH' From cvs at cvs.gnupg.org Wed Jun 1 17:24:58 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Wed Jun 1 17:25:01 2005 Subject: GNUPG-1-9-BRANCH gnupg (34 files) Message-ID: Date: Wednesday, June 1, 2005 @ 17:46:01 Author: wk Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: ChangeLog Makefile.am agent/ChangeLog agent/Makefile.am agent/gpg-agent.c autogen.sh common/ChangeLog common/Makefile.am common/util.h common/xasprintf.c configure.ac g10/ChangeLog g10/Makefile.am g10/exec.c kbx/ChangeLog kbx/Makefile.am kbx/keybox-file.c kbx/keybox-update.c scd/ChangeLog scd/Makefile.am scd/scdaemon.c sm/ChangeLog sm/Makefile.am sm/misc.c tools/ChangeLog tools/Makefile.am tools/symcryptrun.c Removed: common/fseeko.c common/ftello.c common/mkdtemp.c common/putc_unlocked.c common/strsep.c common/ttyname.c g10/mkdtemp.c * configure.ac (gl_INIT): Add gnulib stuff. (fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS by a simple check. (putc_unlocked): Removed check. Not used. (strsep, mkdtemp, asprintf): Replaced checks by gnulib checks. (xsize): Added will probably come handy soon. (CFLAGS): Use -Wformat-security instead of -Wformat-nonliteral. Add --Wno-format-y2k. * gl/, gl/m4/: New. * gpg-agent.c: Include setenv.h. * Makefile.am (AM_CPPFLAGS): Added. * util.h: Add some includes for gnulib. (ttyname, isascii): Define them inline. * fseeko.c, ftello.c: Removed. * strsep.c, mkdtemp.c: Removed. * ttyname.c, isascii.c: Removed. * mkdtemp.c: Removed. * exec.c: Include mkdtemp.h * keybox-file.c (ftello) [!HAVE_FSEEKO]: New replacement function. Copied from ../common/ftello.c. * keybox-update.c (fseeko) [!HAVE_FSEEKO]: New replacement function. Copied from ../common/iobuf.c. * scdaemon.c: Include mkdtemp.h. * misc.c: Include setenv.h. * symcryptrun.c: Include mkdtemp.h. ------------------------+ ChangeLog | 12 +++++ Makefile.am | 4 - agent/ChangeLog | 4 + agent/Makefile.am | 4 - agent/gpg-agent.c | 1 autogen.sh | 4 - common/ChangeLog | 10 ++++ common/Makefile.am | 16 +------ common/fseeko.c | 41 ------------------- common/ftello.c | 46 ---------------------- common/mkdtemp.c | 97 ---------------------------------------------- common/putc_unlocked.c | 31 -------------- common/strsep.c | 76 ------------------------------------ common/ttyname.c | 32 --------------- common/util.h | 40 +++++++++++-------- common/xasprintf.c | 2 configure.ac | 20 ++++----- g10/ChangeLog | 5 ++ g10/Makefile.am | 6 +- g10/exec.c | 5 -- g10/mkdtemp.c | 98 ----------------------------------------------- kbx/ChangeLog | 7 +++ kbx/Makefile.am | 5 +- kbx/keybox-file.c | 16 +++++++ kbx/keybox-update.c | 32 +++++++++++++++ scd/ChangeLog | 4 + scd/Makefile.am | 4 - scd/scdaemon.c | 2 sm/ChangeLog | 4 + sm/Makefile.am | 4 - sm/misc.c | 1 tools/ChangeLog | 4 + tools/Makefile.am | 14 ++++-- tools/symcryptrun.c | 1 34 files changed, 166 insertions(+), 486 deletions(-) Index: gnupg/ChangeLog diff -u gnupg/ChangeLog:1.131.2.75 gnupg/ChangeLog:1.131.2.76 --- gnupg/ChangeLog:1.131.2.75 Wed May 18 12:48:06 2005 +++ gnupg/ChangeLog Wed Jun 1 17:46:01 2005 @@ -1,3 +1,15 @@ +2005-06-01 Werner Koch + + * configure.ac (gl_INIT): Add gnulib stuff. + (fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS + by a simple check. + (putc_unlocked): Removed check. Not used. + (strsep, mkdtemp, asprintf): Replaced checks by gnulib checks. + (xsize): Added will probably come handy soon. + (CFLAGS): Use -Wformat-security instead of + -Wformat-nonliteral. Add --Wno-format-y2k. + * gl/, gl/m4/: New. + 2005-05-15 Werner Koch * configure.ac: Remove option --disable-threads; require the use Index: gnupg/Makefile.am diff -u gnupg/Makefile.am:1.46.4.12 gnupg/Makefile.am:1.46.4.13 --- gnupg/Makefile.am:1.46.4.12 Wed Dec 15 15:15:09 2004 +++ gnupg/Makefile.am Wed Jun 1 17:46:01 2005 @@ -19,7 +19,7 @@ ## Process this file with automake to produce Makefile.in -ACLOCAL_AMFLAGS = -I m4 +ACLOCAL_AMFLAGS = -I m4 -I gl/m4 AUTOMAKE_OPTIONS = dist-bzip2 EXTRA_DIST = scripts/config.rpath autogen.sh README.CVS @@ -59,7 +59,7 @@ tests = tests endif -SUBDIRS = m4 intl jnlib common ${kbx} \ +SUBDIRS = m4 intl gl jnlib common ${kbx} \ ${gpg} ${sm} ${agent} ${scd} tools po doc ${tests} dist-hook: Index: gnupg/agent/ChangeLog diff -u gnupg/agent/ChangeLog:1.59.2.82 gnupg/agent/ChangeLog:1.59.2.83 --- gnupg/agent/ChangeLog:1.59.2.82 Tue May 31 22:03:04 2005 +++ gnupg/agent/ChangeLog Wed Jun 1 17:46:01 2005 @@ -1,3 +1,7 @@ +2005-06-01 Werner Koch + + * gpg-agent.c: Include setenv.h. + 2005-05-31 Werner Koch * agent.h (out_of_core): s/__inline__/inine. Noted by Ray Link. Index: gnupg/agent/Makefile.am diff -u gnupg/agent/Makefile.am:1.22.2.6 gnupg/agent/Makefile.am:1.22.2.7 --- gnupg/agent/Makefile.am:1.22.2.6 Wed Jan 26 23:20:21 2005 +++ gnupg/agent/Makefile.am Wed Jun 1 17:46:01 2005 @@ -21,7 +21,7 @@ bin_PROGRAMS = gpg-agent libexec_PROGRAMS = gpg-protect-tool gpg-preset-passphrase -AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/intl +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl include $(top_srcdir)/am/cmacros.am @@ -44,7 +44,7 @@ learncard.c -gpg_agent_LDADD = ../jnlib/libjnlib.a ../common/libcommon.a \ +gpg_agent_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a ../common/libcommon.a \ $(LIBGCRYPT_LIBS) $(PTH_LIBS) $(LIBASSUAN_LIBS) \ -lgpg-error @LIBINTL@ Index: gnupg/agent/gpg-agent.c diff -u gnupg/agent/gpg-agent.c:1.31.2.39 gnupg/agent/gpg-agent.c:1.31.2.40 --- gnupg/agent/gpg-agent.c:1.31.2.39 Tue May 31 22:03:04 2005 +++ gnupg/agent/gpg-agent.c Wed Jun 1 17:46:01 2005 @@ -48,6 +48,7 @@ #ifdef HAVE_W32_SYSTEM #include "../jnlib/w32-afunix.h" #endif +#include "setenv.h" enum cmd_and_opt_values Index: gnupg/autogen.sh diff -u gnupg/autogen.sh:1.2.4.8 gnupg/autogen.sh:1.2.4.9 --- gnupg/autogen.sh:1.2.4.8 Thu Jan 13 19:00:46 2005 +++ gnupg/autogen.sh Wed Jun 1 17:46:01 2005 @@ -152,8 +152,8 @@ fi -echo "Running aclocal -I m4 ${ACLOCAL_FLAGS:+$ACLOCAL_FLAGS }..." -$ACLOCAL -I m4 $ACLOCAL_FLAGS +echo "Running aclocal -I m4 -I gl/m4 ${ACLOCAL_FLAGS:+$ACLOCAL_FLAGS }..." +$ACLOCAL -I m4 -I gl/m4 $ACLOCAL_FLAGS echo "Running autoheader..." $AUTOHEADER echo "Running automake --gnu ..." Index: gnupg/common/ChangeLog diff -u gnupg/common/ChangeLog:1.30.2.51 gnupg/common/ChangeLog:1.30.2.52 --- gnupg/common/ChangeLog:1.30.2.51 Tue May 31 22:03:04 2005 +++ gnupg/common/ChangeLog Wed Jun 1 17:46:01 2005 @@ -1,3 +1,13 @@ +2005-06-01 Werner Koch + + * Makefile.am (AM_CPPFLAGS): Added. + + * util.h: Add some includes for gnulib. + (ttyname, isascii): Define them inline. + * fseeko.c, ftello.c: Removed. + * strsep.c, mkdtemp.c: Removed. + * ttyname.c, isascii.c: Removed. + 2005-05-31 Werner Koch * dynload.h: s/__inline__/inline/. Index: gnupg/common/Makefile.am diff -u gnupg/common/Makefile.am:1.15.2.14 gnupg/common/Makefile.am:1.15.2.15 --- gnupg/common/Makefile.am:1.15.2.14 Mon Apr 11 18:10:03 2005 +++ gnupg/common/Makefile.am Wed Jun 1 17:46:01 2005 @@ -21,7 +21,9 @@ noinst_LIBRARIES = libcommon.a libsimple-pwquery.a -AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(PTH_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/gl + +AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(PTH_CFLAGS) libcommon_a_SOURCES = \ util.h i18n.h \ @@ -49,18 +51,6 @@ estream.c estream.h -libcommon_a_LIBADD = @LIBOBJS@ - libsimple_pwquery_a_SOURCES = \ simple-pwquery.c simple-pwquery.h asshelp.c asshelp.h -libsimple_pwquery_a_LIBADD = @LIBOBJS@ - - - - - - - - - Index: gnupg/common/fseeko.c diff -u gnupg/common/fseeko.c:1.1.2.1 gnupg/common/fseeko.c:removed --- gnupg/common/fseeko.c:1.1.2.1 Thu Dec 2 08:48:09 2004 +++ gnupg/common/fseeko.c Wed Jun 1 17:46:02 2005 @@ -1,41 +0,0 @@ -/* fseeko.c - libc replacement function - * Copyright (C) 2001 Free Software Foundation, Inc. - * - * This file is part of GnuPG. - * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GnuPG is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include /* Defines off_t under W32. */ - -int -fseeko (FILE *stream, off_t off, int whence) -{ - return fseek (stream, off, whence); -} - - - - - - - - - - Index: gnupg/common/ftello.c diff -u gnupg/common/ftello.c:1.1.2.1 gnupg/common/ftello.c:removed --- gnupg/common/ftello.c:1.1.2.1 Thu Dec 2 08:48:09 2004 +++ gnupg/common/ftello.c Wed Jun 1 17:46:02 2005 @@ -1,46 +0,0 @@ -/* ftello.c - libc replacement function - * Copyright (C) 2001 Free Software Foundation, Inc. - * - * This file is part of GnuPG. - * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GnuPG is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include /* Defines off_t under W32. */ - -off_t -ftello (FILE *stream) -{ - long int off; - - off = ftell (stream); - if (off == -1) - return (off_t)-1; - return off; -} - - - - - - - - - - Index: gnupg/common/mkdtemp.c diff -u gnupg/common/mkdtemp.c:1.2.2.2 gnupg/common/mkdtemp.c:removed --- gnupg/common/mkdtemp.c:1.2.2.2 Mon Dec 20 17:17:24 2004 +++ gnupg/common/mkdtemp.c Wed Jun 1 17:46:02 2005 @@ -1,97 +0,0 @@ -/* mkdtemp.c - libc replacement function - * Copyright (C) 2001 Free Software Foundation, Inc. - * - * This file is part of GnuPG. - * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GnuPG is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -/* This is a replacement function for mkdtemp in case the platform - we're building on (like mine!) doesn't have it. */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef MKDIR_TAKES_ONE_ARG -# undef mkdir -# define mkdir(a,b) mkdir(a) -#endif - -char * -mkdtemp (char *template) -{ - int attempts,idx,count=0; - unsigned char *ch; - - idx=strlen(template); - - /* Walk backwards to count all the Xes */ - while(idx>0 && template[idx-1]=='X') - { - count++; - idx--; - } - - if(count==0) - { - errno=EINVAL; - return NULL; - } - - ch=&template[idx]; - - /* Try 4 times to make the temp directory */ - for(attempts=0;attempts<4;attempts++) - { - int remaining=count; - char *marker=ch; - unsigned char *randombits; - - idx=0; - - randombits = gcry_xmalloc (4*remaining); - gcry_create_nonce (randombits, 4*remaining); - - while(remaining>1) - { - sprintf(marker,"%02X",randombits[idx++]); - marker+=2; - remaining-=2; - } - - /* Any leftover Xes? get_random_bits rounds up to full bytes, - so this is safe. */ - if(remaining>0) - sprintf(marker,"%X",randombits[idx]&0xF); - - gcry_free (randombits); - - if(mkdir(template,0700)==0) - break; - } - - if(attempts==4) - return NULL; /* keeps the errno from mkdir, whatever it is */ - - return template; -} - - Index: gnupg/common/putc_unlocked.c diff -u gnupg/common/putc_unlocked.c:1.1 gnupg/common/putc_unlocked.c:removed --- gnupg/common/putc_unlocked.c:1.1 Thu Jan 9 13:53:52 2003 +++ gnupg/common/putc_unlocked.c Wed Jun 1 17:46:02 2005 @@ -1,31 +0,0 @@ -/* putc_unlocked.c - Replacement for putc_unlocked. - * Copyright (C) 2002 Free Software Foundation, Inc. - * - * This file is part of GnuPG. - * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GnuPG is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -int -putc_unlocked (int c, FILE *stream) -{ - return putc (c, stream); -} Index: gnupg/common/strsep.c diff -u gnupg/common/strsep.c:1.1.2.2 gnupg/common/strsep.c:removed --- gnupg/common/strsep.c:1.1.2.2 Fri Dec 3 19:38:23 2004 +++ gnupg/common/strsep.c Wed Jun 1 17:46:02 2005 @@ -1,76 +0,0 @@ -/* strsep.c - Replacement for strsep(). - * Copyright (C) 1992, 1993, 1996, 1997, 1998, 1999, - * 2004 Free Software Foundation, Inc. - * - * This file is part of the GNU C Library. - * - * The GNU C Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * The GNU C Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the GNU C Library; if not, write to the Free - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - * 02111-1307 USA. - */ - -/* Code taken from glibc-2.3.2/sysdeps/generic/strsep.c and slightly - modified for use with GnuPG. */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -char * -strsep (char **stringp, const char *delim) -{ - char *begin, *end; - - begin = *stringp; - if (begin == NULL) - return NULL; - - /* A frequent case is when the delimiter string contains only one - character. Here we don't need to call the expensive `strpbrk' - function and instead work using `strchr'. */ - if (delim[0] == '\0' || delim[1] == '\0') - { - char ch = delim[0]; - - if (ch == '\0') - end = NULL; - else - { - if (*begin == ch) - end = begin; - else if (*begin == '\0') - end = NULL; - else - end = strchr (begin + 1, ch); - } - } - else - /* Find the end of the token. */ - end = strpbrk (begin, delim); - - if (end) - { - /* Terminate the token and set *STRINGP past NUL character. */ - *end++ = '\0'; - *stringp = end; - } - else - /* No more delimiters; this is the last token. */ - *stringp = NULL; - - return begin; -} - Index: gnupg/common/ttyname.c diff -u gnupg/common/ttyname.c:1.1.2.1 gnupg/common/ttyname.c:removed --- gnupg/common/ttyname.c:1.1.2.1 Wed Dec 15 15:15:09 2004 +++ gnupg/common/ttyname.c Wed Jun 1 17:46:02 2005 @@ -1,32 +0,0 @@ -/* ttyname.c - Replacement for ttyname. - * Copyright (C) 2004 Free Software Foundation, Inc. - * - * This file is part of GnuPG. - * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GnuPG is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -/* This one is a simple dummy and suitable for Dosish systems. */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include - -char * -ttyname (int fd) -{ - return NULL; -} Index: gnupg/common/util.h diff -u gnupg/common/util.h:1.12.2.17 gnupg/common/util.h:1.12.2.18 --- gnupg/common/util.h:1.12.2.17 Mon Apr 18 12:44:45 2005 +++ gnupg/common/util.h Wed Jun 1 17:46:01 2005 @@ -25,7 +25,13 @@ #include /* We need time_t. */ #include /* we need gpg-error_t. */ -/* to pass hash functions to libksba we need to cast it */ +/* Common GNUlib includes (-I ../gl/). */ +#include "strpbrk.h" +#include "strsep.h" +#include "vasprintf.h" + + +/* Hash function used with libksba. */ #define HASH_FNC ((void (*)(void *, const void*,size_t))gcry_md_write) /* get all the stuff from jnlib */ @@ -152,24 +158,26 @@ int is_file_compressed (const char *s, int *ret_rc); -/*-- replacement functions from funcname.c --*/ -#if !HAVE_VASPRINTF -#include -int vasprintf (char **result, const char *format, va_list args); -int asprintf (char **result, const char *format, ...) JNLIB_GCC_A_PRINTF(2,3); -#endif -#ifndef HAVE_STRSEP -char *strsep (char **stringp, const char *delim); -#endif + +/*-- Simple replacement functions. */ #ifndef HAVE_TTYNAME -char *ttyname (int fd); -#endif -#ifndef HAVE_MKDTEMP -char *mkdtemp (char *template); -#endif +/* Systems without ttyname (W32) will merely return NULL. */ +static inline char * +ttyname (int fd) +{ + return NULL +}; +#endif /* !HAVE_TTYNAME */ +#ifndef HAVE_ISASCII +static inline int +isascii (int c) +{ + return (((c) & ~0x7f) == 0); +} +#endif /* !HAVE_ISASCII */ -/*-- some macros to replace ctype ones and avoid locale problems --*/ +/*-- Macros to replace ctype ones to avoid locale problems. --*/ #define spacep(p) (*(p) == ' ' || *(p) == '\t') #define digitp(p) (*(p) >= '0' && *(p) <= '9') #define hexdigitp(a) (digitp (a) \ Index: gnupg/common/xasprintf.c diff -u gnupg/common/xasprintf.c:1.1.2.2 gnupg/common/xasprintf.c:1.1.2.3 --- gnupg/common/xasprintf.c:1.1.2.2 Fri Feb 25 17:14:55 2005 +++ gnupg/common/xasprintf.c Wed Jun 1 17:46:01 2005 @@ -43,7 +43,7 @@ return p; } -/* Same as above bit return NULL on memory failure. */ +/* Same as above but return NULL on memory failure. */ char * xtryasprintf (const char *fmt, ...) { Index: gnupg/configure.ac diff -u gnupg/configure.ac:1.36.2.88 gnupg/configure.ac:1.36.2.89 --- gnupg/configure.ac:1.36.2.88 Wed May 18 12:48:06 2005 +++ gnupg/configure.ac Wed Jun 1 17:46:01 2005 @@ -337,6 +337,7 @@ AC_CHECK_TOOL(AR, ar, :) AC_PATH_PROG(PERL,"perl") AC_ISC_POSIX +gl_EARLY AC_SYS_LARGEFILE AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, yes, no) AM_CONDITIONAL(HAVE_DOCBOOK_TO_MAN, test "$ac_cv_prog_DOCBOOK_TO_MAN" = yes) @@ -794,23 +795,21 @@ AC_CHECK_FUNCS(memmove gettimeofday getrusage setrlimit clock_gettime) AC_CHECK_FUNCS(atexit raise getpagesize strftime nl_langinfo setlocale) AC_CHECK_FUNCS(waitpid wait4 sigaction sigprocmask rand pipe stat getaddrinfo) +AC_CHECK_FUNCS(fseeko ftello ttyname isascii) AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include ]) +# gnulib checks +gl_SOURCE_BASE(gl) +gl_M4_BASE(gl/m4) +gl_MODULES(setenv strsep mkdtemp vasprintf xsize) +gl_INIT + # These are needed by libjnlib - fixme: we should have macros for them AC_CHECK_FUNCS(memicmp stpcpy strlwr strtoul memmove stricmp strtol) AC_CHECK_FUNCS(getrusage setrlimit stat setlocale) AC_CHECK_FUNCS(flockfile funlockfile fopencookie funopen) -AC_REPLACE_FUNCS(vasprintf) -AC_REPLACE_FUNCS(mkdtemp) -AC_REPLACE_FUNCS(fseeko ftello) -AC_REPLACE_FUNCS(isascii) -AC_REPLACE_FUNCS(putc_unlocked) -AC_REPLACE_FUNCS(strsep) -AC_REPLACE_FUNCS(ttyname) - - # # check for gethrtime and run a testprogram to see whether @@ -989,7 +988,7 @@ if test "$GCC" = yes; then if test "$USE_MAINTAINER_MODE" = "yes"; then CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" - CFLAGS="$CFLAGS -Wformat-nonliteral" + CFLAGS="$CFLAGS -Wno-format-y2k -Wformat-security" else CFLAGS="$CFLAGS -Wall" fi @@ -1126,6 +1125,7 @@ Makefile po/Makefile.in intl/Makefile +gl/Makefile jnlib/Makefile common/Makefile kbx/Makefile Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.372.2.54 gnupg/g10/ChangeLog:1.372.2.55 --- gnupg/g10/ChangeLog:1.372.2.54 Tue Dec 21 11:03:00 2004 +++ gnupg/g10/ChangeLog Wed Jun 1 17:46:01 2005 @@ -1,3 +1,8 @@ +2005-06-01 Werner Koch + + * mkdtemp.c: Removed. + * exec.c: Include mkdtemp.h + 2004-12-21 Werner Koch * gpgv.c, g10.c (main): Use default_hoemdir (). Index: gnupg/g10/Makefile.am diff -u gnupg/g10/Makefile.am:1.75.2.11 gnupg/g10/Makefile.am:1.75.2.12 --- gnupg/g10/Makefile.am:1.75.2.11 Sat Dec 18 11:22:09 2004 +++ gnupg/g10/Makefile.am Wed Jun 1 17:46:01 2005 @@ -21,14 +21,14 @@ EXTRA_DIST = options.skel -AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/include \ - -I$(top_srcdir)/intl +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common \ + -I$(top_srcdir)/include -I$(top_srcdir)/intl include $(top_srcdir)/am/cmacros.am AM_CFLAGS = $(LIBGCRYPT_CFLAGS) -needed_libs = ../common/libcommon.a ../jnlib/libjnlib.a +needed_libs = ../gl/libgnu.a ../common/libcommon.a ../jnlib/libjnlib.a bin_PROGRAMS = gpg2 gpgv2 Index: gnupg/g10/exec.c diff -u gnupg/g10/exec.c:1.13.2.2 gnupg/g10/exec.c:1.13.2.3 --- gnupg/g10/exec.c:1.13.2.2 Tue Sep 23 19:48:30 2003 +++ gnupg/g10/exec.c Wed Jun 1 17:46:01 2005 @@ -39,6 +39,7 @@ #include "i18n.h" #include "iobuf.h" #include "util.h" +#include "mkdtemp.h" #include "exec.h" #ifdef NO_EXEC @@ -55,10 +56,6 @@ #else /* ! NO_EXEC */ -#ifndef HAVE_MKDTEMP -char *mkdtemp(char *template); -#endif - #if defined (_WIN32) /* This is a nicer system() for windows that waits for programs to return before returning control to the caller. I hate helpful Index: gnupg/g10/mkdtemp.c diff -u gnupg/g10/mkdtemp.c:1.3.4.1 gnupg/g10/mkdtemp.c:removed --- gnupg/g10/mkdtemp.c:1.3.4.1 Wed Jun 18 21:55:55 2003 +++ gnupg/g10/mkdtemp.c Wed Jun 1 17:46:02 2005 @@ -1,98 +0,0 @@ -/* mkdtemp.c - libc replacement function - * Copyright (C) 2001 Free Software Foundation, Inc. - * - * This file is part of GnuPG. - * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GnuPG is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -/* This is a replacement function for mkdtemp in case the platform - we're building on (like mine!) doesn't have it. */ - -#include -#include -#include -#include -#include -#include -#include -#include "types.h" -#include "cipher.h" - -#ifdef MKDIR_TAKES_ONE_ARG -# undef mkdir -# define mkdir(a,b) mkdir(a) -#endif - -char *mkdtemp(char *template) -{ - unsigned int attempts,idx,count=0; - byte *ch; - - idx=strlen(template); - - /* Walk backwards to count all the Xes */ - while(idx>0 && template[idx-1]=='X') - { - count++; - idx--; - } - - if(count==0) - { - errno=EINVAL; - return NULL; - } - - ch=&template[idx]; - - /* Try 4 times to make the temp directory */ - for(attempts=0;attempts<4;attempts++) - { - unsigned int remaining=count; - char *marker=ch; - byte *randombits; - - idx=0; - - /* Using really random bits is probably overkill here. The - worst thing that can happen with a directory name collision - is that the function will return an error. */ - - randombits=get_random_bits(4*remaining,0,0); - - while(remaining>1) - { - sprintf(marker,"%02X",randombits[idx++]); - marker+=2; - remaining-=2; - } - - /* Any leftover Xes? get_random_bits rounds up to full bytes, - so this is safe. */ - if(remaining>0) - sprintf(marker,"%X",randombits[idx]&0xF); - - xfree (randombits); - - if(mkdir(template,0700)==0) - break; - } - - if(attempts==4) - return NULL; /* keeps the errno from mkdir, whatever it is */ - - return template; -} Index: gnupg/kbx/ChangeLog diff -u gnupg/kbx/ChangeLog:1.15.2.11 gnupg/kbx/ChangeLog:1.15.2.12 --- gnupg/kbx/ChangeLog:1.15.2.11 Sat Dec 18 11:22:09 2004 +++ gnupg/kbx/ChangeLog Wed Jun 1 17:46:01 2005 @@ -1,3 +1,10 @@ +2005-06-01 Werner Koch + + * keybox-file.c (ftello) [!HAVE_FSEEKO]: New replacement + function. Copied from ../common/ftello.c. + * keybox-update.c (fseeko) [!HAVE_FSEEKO]: New replacement + function. Copied from ../common/iobuf.c. + 2004-12-18 Werner Koch * keybox-defs.h (map_assuan_err): Define in terms of Index: gnupg/kbx/Makefile.am diff -u gnupg/kbx/Makefile.am:1.8.2.3 gnupg/kbx/Makefile.am:1.8.2.4 --- gnupg/kbx/Makefile.am:1.8.2.3 Thu Dec 2 08:48:08 2004 +++ gnupg/kbx/Makefile.am Wed Jun 1 17:46:01 2005 @@ -23,7 +23,7 @@ INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\" EXTRA_DIST = mkerrors -AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/intl \ +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl \ $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) noinst_LIBRARIES = libkeybox.a @@ -45,6 +45,7 @@ # Note that libcommon is only required to resolve the LIBOBJS. kbxutil_SOURCES = kbxutil.c $(common_sources) -kbxutil_LDADD = ../jnlib/libjnlib.a $(KSBA_LIBS) $(LIBGCRYPT_LIBS) \ +kbxutil_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a \ + $(KSBA_LIBS) $(LIBGCRYPT_LIBS) \ -lgpg-error $(LIBINTL) ../common/libcommon.a Index: gnupg/kbx/keybox-file.c diff -u gnupg/kbx/keybox-file.c:1.5.2.1 gnupg/kbx/keybox-file.c:1.5.2.2 --- gnupg/kbx/keybox-file.c:1.5.2.1 Mon Apr 26 10:09:22 2004 +++ gnupg/kbx/keybox-file.c Wed Jun 1 17:46:01 2005 @@ -27,6 +27,22 @@ #include "keybox-defs.h" + +#if !defined(HAVE_FTELLO) && !defined(ftello) +static off_t +ftello (FILE *stream) +{ + long int off; + + off = ftell (stream); + if (off == -1) + return (off_t)-1; + return off; +} +#endif /* !defined(HAVE_FTELLO) && !defined(ftello) */ + + + /* Read a block at the current postion and return it in r_blob. r_blob may be NULL to simply skip the current block */ int Index: gnupg/kbx/keybox-update.c diff -u gnupg/kbx/keybox-update.c:1.4.2.4 gnupg/kbx/keybox-update.c:1.4.2.5 --- gnupg/kbx/keybox-update.c:1.4.2.4 Thu Dec 2 08:48:08 2004 +++ gnupg/kbx/keybox-update.c Wed Jun 1 17:46:01 2005 @@ -31,6 +31,38 @@ #define EXTSEP_S "." +#if !defined(HAVE_FSEEKO) && !defined(fseeko) + +#ifdef HAVE_LIMITS_H +# include +#endif +#ifndef LONG_MAX +# define LONG_MAX ((long) ((unsigned long) -1 >> 1)) +#endif +#ifndef LONG_MIN +# define LONG_MIN (-1 - LONG_MAX) +#endif + +/**************** + * A substitute for fseeko, for hosts that don't have it. + */ +static int +fseeko (FILE * stream, off_t newpos, int whence) +{ + while (newpos != (long) newpos) + { + long pos = newpos < 0 ? LONG_MIN : LONG_MAX; + if (fseek (stream, pos, whence) != 0) + return -1; + newpos -= pos; + whence = SEEK_CUR; + } + return fseek (stream, (long) newpos, whence); +} +#endif /* !defined(HAVE_FSEEKO) && !defined(fseeko) */ + + + static int create_tmp_file (const char *template, char **r_bakfname, char **r_tmpfname, FILE **r_fp) Index: gnupg/scd/ChangeLog diff -u gnupg/scd/ChangeLog:1.25.2.82 gnupg/scd/ChangeLog:1.25.2.83 --- gnupg/scd/ChangeLog:1.25.2.82 Tue May 31 22:03:03 2005 +++ gnupg/scd/ChangeLog Wed Jun 1 17:46:01 2005 @@ -1,3 +1,7 @@ +2005-06-01 Werner Koch + + * scdaemon.c: Include mkdtemp.h. + 2005-05-31 Werner Koch * tlv.c [GNUPG_MAJOR_VERSION==1]: Define constants instead of Index: gnupg/scd/Makefile.am diff -u gnupg/scd/Makefile.am:1.15.2.14 gnupg/scd/Makefile.am:1.15.2.15 --- gnupg/scd/Makefile.am:1.15.2.14 Mon May 23 22:18:13 2005 +++ gnupg/scd/Makefile.am Wed Jun 1 17:46:01 2005 @@ -23,7 +23,7 @@ pkglib_PROGRAMS = pcsc-wrapper endif -AM_CPPFLAGS = -I$(top_srcdir)/intl -I$(top_srcdir)/common +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common include $(top_srcdir)/am/cmacros.am @@ -43,7 +43,7 @@ app.c app-common.h app-help.c $(card_apps) -scdaemon_LDADD = ../jnlib/libjnlib.a ../common/libcommon.a \ +scdaemon_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a ../common/libcommon.a \ $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(PTH_LIBS) $(LIBASSUAN_LIBS) \ $(LIBUSB_LIBS) -lgpg-error $(LIBINTL) $(DL_LIBS) Index: gnupg/scd/scdaemon.c diff -u gnupg/scd/scdaemon.c:1.12.2.29 gnupg/scd/scdaemon.c:1.12.2.30 --- gnupg/scd/scdaemon.c:1.12.2.29 Sat May 21 20:49:00 2005 +++ gnupg/scd/scdaemon.c Wed Jun 1 17:46:01 2005 @@ -51,7 +51,7 @@ #include "../jnlib/w32-afunix.h" #endif #include "ccid-driver.h" - +#include "mkdtemp.h" enum cmd_and_opt_values { aNull = 0, Index: gnupg/sm/ChangeLog diff -u gnupg/sm/ChangeLog:1.101.2.94 gnupg/sm/ChangeLog:1.101.2.95 --- gnupg/sm/ChangeLog:1.101.2.94 Thu Apr 21 11:33:06 2005 +++ gnupg/sm/ChangeLog Wed Jun 1 17:46:00 2005 @@ -1,3 +1,7 @@ +2005-06-01 Werner Koch + + * misc.c: Include setenv.h. + 2005-04-21 Werner Koch * gpgsm.c: New options --{enable,disable}-trusted-cert-crl-check. Index: gnupg/sm/Makefile.am diff -u gnupg/sm/Makefile.am:1.27.2.6 gnupg/sm/Makefile.am:1.27.2.7 --- gnupg/sm/Makefile.am:1.27.2.6 Thu Apr 21 09:16:41 2005 +++ gnupg/sm/Makefile.am Wed Jun 1 17:46:00 2005 @@ -24,7 +24,7 @@ AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBASSUAN_CFLAGS) $(KSBA_CFLAGS) \ $(PTH_CFLAGS) -AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/intl +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl include $(top_srcdir)/am/cmacros.am @@ -52,7 +52,7 @@ certreqgen.c -gpgsm_LDADD = ../jnlib/libjnlib.a ../kbx/libkeybox.a \ +gpgsm_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a ../kbx/libkeybox.a \ ../common/libcommon.a \ $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(LIBASSUAN_LIBS) -lgpg-error \ $(LIBINTL) $(PTH_LIBS) Index: gnupg/sm/misc.c diff -u gnupg/sm/misc.c:1.3.2.4 gnupg/sm/misc.c:1.3.2.5 --- gnupg/sm/misc.c:1.3.2.4 Tue Dec 7 12:21:40 2004 +++ gnupg/sm/misc.c Wed Jun 1 17:46:00 2005 @@ -31,6 +31,7 @@ #include "gpgsm.h" #include "i18n.h" +#include "setenv.h" /* Setup the environment so that the pinentry is able to get all required information. This is used prior to an exec of the Index: gnupg/tools/ChangeLog diff -u gnupg/tools/ChangeLog:1.25.2.77 gnupg/tools/ChangeLog:1.25.2.78 --- gnupg/tools/ChangeLog:1.25.2.77 Tue May 31 22:03:03 2005 +++ gnupg/tools/ChangeLog Wed Jun 1 17:46:00 2005 @@ -1,3 +1,7 @@ +2005-06-01 Werner Koch + + * symcryptrun.c: Include mkdtemp.h. + 2005-05-31 Werner Koch * watchgnupg.c: Make sure that PF_LCOAL and AF_LOCAL are defines. Index: gnupg/tools/Makefile.am diff -u gnupg/tools/Makefile.am:1.31.2.15 gnupg/tools/Makefile.am:1.31.2.16 --- gnupg/tools/Makefile.am:1.31.2.15 Sat May 28 15:43:21 2005 +++ gnupg/tools/Makefile.am Wed Jun 1 17:46:00 2005 @@ -21,7 +21,7 @@ rfc822parse.c rfc822parse.h gpgparsemail.c \ addgnupghome gpgsm-gencert.sh -AM_CPPFLAGS = -I$(top_srcdir)/intl -I$(top_srcdir)/common +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common include $(top_srcdir)/am/cmacros.am AM_CFLAGS = $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS) @@ -43,19 +43,23 @@ gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c -gpgconf_LDADD = ../jnlib/libjnlib.a ../common/libcommon.a @LIBINTL@ +gpgconf_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a \ + ../common/libcommon.a @LIBINTL@ symcryptrun_SOURCES = symcryptrun.c -symcryptrun_LDADD = $(LIBUTIL_LIBS) ../jnlib/libjnlib.a ../common/libcommon.a \ +symcryptrun_LDADD = $(LIBUTIL_LIBS) ../gl/libgnu.a ../jnlib/libjnlib.a \ + ../common/libcommon.a \ ../common/libsimple-pwquery.a $(LIBGCRYPT_LIBS) \ $(GPG_ERROR_LIBS) $(LIBINTL) watchgnupg_SOURCES = watchgnupg.c gpg_connect_agent_SOURCES = gpg-connect-agent.c no-libgcrypt.c -gpg_connect_agent_LDADD = ../jnlib/libjnlib.a ../common/libcommon.a \ +gpg_connect_agent_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a \ + ../common/libcommon.a \ $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) gpgkey2ssh_SOURCES = gpgkey2ssh.c gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) -gpgkey2ssh_LDADD = ../common/libcommon.a $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) +gpgkey2ssh_LDADD = ../gl/libgnu.a ../common/libcommon.a \ + $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) Index: gnupg/tools/symcryptrun.c diff -u gnupg/tools/symcryptrun.c:1.1.2.8 gnupg/tools/symcryptrun.c:1.1.2.9 --- gnupg/tools/symcryptrun.c:1.1.2.8 Thu Apr 21 12:07:41 2005 +++ gnupg/tools/symcryptrun.c Wed Jun 1 17:46:00 2005 @@ -82,6 +82,7 @@ #define JNLIB_NEED_LOG_LOGV #include "i18n.h" #include "../common/util.h" +#include "mkdtemp.h" /* FIXME: Bah. For spwq_secure_free. */ #define SIMPLE_PWQUERY_IMPLEMENTATION 1 From cvs at cvs.gnupg.org Wed Jun 1 20:47:50 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 1 20:47:52 2005 Subject: gnupg/keyserver (ChangeLog ksutil.c) Message-ID: Date: Wednesday, June 1, 2005 @ 21:08:56 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog ksutil.c * ksutil.c [HAVE_DOSISH_SYSTEM]: Fix warnings on mingw32. Noted by Joe Vender. -----------+ ChangeLog | 5 +++++ ksutil.c | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.128 gnupg/keyserver/ChangeLog:1.129 --- gnupg/keyserver/ChangeLog:1.128 Wed May 4 15:34:25 2005 +++ gnupg/keyserver/ChangeLog Wed Jun 1 21:08:56 2005 @@ -1,3 +1,8 @@ +2005-06-01 David Shaw + + * ksutil.c [HAVE_DOSISH_SYSTEM]: Fix warnings on mingw32. Noted + by Joe Vender. + 2005-05-04 David Shaw * ksutil.h, ksutil.c: #ifdef so we can build without libcurl or Index: gnupg/keyserver/ksutil.c diff -u gnupg/keyserver/ksutil.c:1.10 gnupg/keyserver/ksutil.c:1.11 --- gnupg/keyserver/ksutil.c:1.10 Tue May 31 10:39:14 2005 +++ gnupg/keyserver/ksutil.c Wed Jun 1 21:08:56 2005 @@ -36,6 +36,13 @@ #include "keyserver.h" #include "ksutil.h" +#ifdef HAVE_DOSISH_SYSTEM + +unsigned int set_timeout(unsigned int seconds) {return 0;} +int register_timeout(void) {return 0;} + +#else + static void catch_alarm(int foo) { @@ -45,19 +52,12 @@ unsigned int set_timeout(unsigned int seconds) { -#ifdef HAVE_DOSISH_SYSTEM - return 0; -#else return alarm(seconds); -#endif } int register_timeout(void) { -#ifdef HAVE_DOSISH_SYSTEM - return 0; -#else #if defined(HAVE_SIGACTION) && defined(HAVE_STRUCT_SIGACTION) struct sigaction act; @@ -71,9 +71,10 @@ else return 0; #endif -#endif } +#endif /* !HAVE_DOSISH_SYSTEM */ + struct ks_options * init_ks_options(void) { From cvs at cvs.gnupg.org Wed Jun 1 20:52:00 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 1 20:52:03 2005 Subject: gnupg/g10 (ChangeLog passphrase.c signal.c) Message-ID: Date: Wednesday, June 1, 2005 @ 21:13:05 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog passphrase.c signal.c * signal.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on mingw32. Noted by Joe Vender. * passphrase.c [_WIN32]: Remove unused variables. --------------+ ChangeLog | 7 +++++++ passphrase.c | 11 ++--------- signal.c | 18 ++++++++---------- 3 files changed, 17 insertions(+), 19 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.748 gnupg/g10/ChangeLog:1.749 --- gnupg/g10/ChangeLog:1.748 Tue May 31 21:12:10 2005 +++ gnupg/g10/ChangeLog Wed Jun 1 21:13:05 2005 @@ -1,3 +1,10 @@ +2005-06-01 David Shaw + + * signal.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on + mingw32. Noted by Joe Vender. + + * passphrase.c [_WIN32]: Remove unused variables. + 2005-05-31 David Shaw * keyedit.c (menu_clean_uids_from_key, Index: gnupg/g10/passphrase.c diff -u gnupg/g10/passphrase.c:1.81 gnupg/g10/passphrase.c:1.82 --- gnupg/g10/passphrase.c:1.81 Tue May 31 10:39:16 2005 +++ gnupg/g10/passphrase.c Wed Jun 1 21:13:05 2005 @@ -1,6 +1,6 @@ /* passphrase.c - Get a passphrase - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, - * 2004, 2005 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, + * 2005 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -73,17 +73,10 @@ *(p) <= 'F'? (*(p)-'A'+10):(*(p)-'a'+10)) #define xtoi_2(p) ((xtoi_1(p) * 16) + xtoi_1((p)+1)) - - static char *fd_passwd = NULL; static char *next_pw = NULL; static char *last_pw = NULL; -#if defined (_WIN32) -static int read_fd = 0; -static int write_fd = 0; -#endif - static void hash_passphrase( DEK *dek, char *pw, STRING2KEY *s2k, int create ); int Index: gnupg/g10/signal.c diff -u gnupg/g10/signal.c:1.21 gnupg/g10/signal.c:1.22 --- gnupg/g10/signal.c:1.21 Tue May 31 10:39:15 2005 +++ gnupg/g10/signal.c Wed Jun 1 21:13:05 2005 @@ -1,6 +1,6 @@ /* signal.c - signal handling - * Copyright (C) 1998, 1999, 2000, 2001, 2003, - * 2004 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, + * 2005 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -40,13 +40,16 @@ #include "main.h" #include "ttyio.h" +#ifdef HAVE_DOSISH_SYSTEM +void init_signals(void) {} +void pause_on_sigusr(int which) {} +#else static volatile int caught_fatal_sig = 0; static volatile int caught_sigusr1 = 0; static void init_one_signal (int sig, RETSIGTYPE (*handler)(int), int check_ign ) { -#ifndef HAVE_DOSISH_SYSTEM #if defined(HAVE_SIGACTION) && defined(HAVE_STRUCT_SIGACTION) struct sigaction oact, nact; @@ -70,7 +73,6 @@ signal (sig, SIG_IGN); } #endif -#endif /*!HAVE_DOSISH_SYSTEM*/ } static RETSIGTYPE @@ -129,7 +131,6 @@ void init_signals() { -#ifndef HAVE_DOSISH_SYSTEM init_one_signal (SIGINT, got_fatal_signal, 1 ); init_one_signal (SIGHUP, got_fatal_signal, 1 ); init_one_signal (SIGTERM, got_fatal_signal, 1 ); @@ -137,14 +138,12 @@ init_one_signal (SIGSEGV, got_fatal_signal, 1 ); init_one_signal (SIGUSR1, got_usr_signal, 0 ); init_one_signal (SIGPIPE, SIG_IGN, 0 ); -#endif } void pause_on_sigusr( int which ) { -#ifndef HAVE_DOSISH_SYSTEM #if defined(HAVE_SIGPROCMASK) && defined(HAVE_SIGSET_T) sigset_t mask, oldmask; @@ -165,7 +164,6 @@ caught_sigusr1 = 0; sigrelse(SIGUSR1); #endif /*! HAVE_SIGPROCMASK && HAVE_SIGSET_T */ -#endif } /* Disabled - see comment in tdbio.c:tdbio_begin_transaction() */ @@ -173,7 +171,6 @@ static void do_block( int block ) { -#ifndef HAVE_DOSISH_SYSTEM static int is_blocked; #if defined(HAVE_SIGPROCMASK) && defined(HAVE_SIGSET_T) static sigset_t oldmask; @@ -223,7 +220,6 @@ is_blocked = 0; } #endif /*! HAVE_SIGPROCMASK && HAVE_SIGSET_T */ -#endif /*HAVE_DOSISH_SYSTEM*/ } void @@ -238,3 +234,5 @@ do_block(0); } #endif + +#endif /* !HAVE_DOSISH_SYSTEM */ From cvs at cvs.gnupg.org Thu Jun 2 13:01:12 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Thu Jun 2 13:01:17 2005 Subject: gpgme/gpgme (ChangeLog gpgme.h passphrase.c) Message-ID: Date: Thursday, June 2, 2005 @ 13:22:14 Author: wk Path: /cvs/gpgme/gpgme/gpgme Modified: ChangeLog gpgme.h passphrase.c * passphrase.c (_gpgme_passphrase_status_handler): Take care of GPGME_STATUS_NEED_PASSPHRASE_PIN. (_gpgme_passphrase_command_handler_internal): Also act on the key "passphrase.pin.ask". * gpgme.h: Added status codes GPGME_STATUS_SIG_SUBPACKET, GPGME_STATUS_NEED_PASSPHRASE_PIN, GPGME_STATUS_SC_OP_FAILURE, GPGME_STATUS_SC_OP_SUCCESS, GPGME_STATUS_CARDCTRL, GPGME_STATUS_BACKUP_KEY_CREATED. --------------+ ChangeLog | 12 ++++++++++++ gpgme.h | 8 +++++++- passphrase.c | 7 +++++-- 3 files changed, 24 insertions(+), 3 deletions(-) Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.402 gpgme/gpgme/ChangeLog:1.403 --- gpgme/gpgme/ChangeLog:1.402 Sat May 28 22:03:24 2005 +++ gpgme/gpgme/ChangeLog Thu Jun 2 13:22:14 2005 @@ -1,3 +1,15 @@ +2005-06-02 Werner Koch + + * passphrase.c (_gpgme_passphrase_status_handler): Take care of + GPGME_STATUS_NEED_PASSPHRASE_PIN. + (_gpgme_passphrase_command_handler_internal): Also act on the key + "passphrase.pin.ask". + + * gpgme.h: Added status codes GPGME_STATUS_SIG_SUBPACKET, + GPGME_STATUS_NEED_PASSPHRASE_PIN, GPGME_STATUS_SC_OP_FAILURE, + GPGME_STATUS_SC_OP_SUCCESS, GPGME_STATUS_CARDCTRL, + GPGME_STATUS_BACKUP_KEY_CREATED. + 2005-05-28 Marcus Brinkmann * data-user.c: Include . Index: gpgme/gpgme/gpgme.h diff -u gpgme/gpgme/gpgme.h:1.154 gpgme/gpgme/gpgme.h:1.155 --- gpgme/gpgme/gpgme.h:1.154 Thu Apr 28 18:11:33 2005 +++ gpgme/gpgme/gpgme.h Thu Jun 2 13:22:14 2005 @@ -397,7 +397,13 @@ GPGME_STATUS_TRUNCATED, GPGME_STATUS_ERROR, GPGME_STATUS_NEWSIG, - GPGME_STATUS_REVKEYSIG + GPGME_STATUS_REVKEYSIG, + GPGME_STATUS_SIG_SUBPACKET, + GPGME_STATUS_NEED_PASSPHRASE_PIN, + GPGME_STATUS_SC_OP_FAILURE, + GPGME_STATUS_SC_OP_SUCCESS, + GPGME_STATUS_CARDCTRL, + GPGME_STATUS_BACKUP_KEY_CREATED } gpgme_status_code_t; Index: gpgme/gpgme/passphrase.c diff -u gpgme/gpgme/passphrase.c:1.24 gpgme/gpgme/passphrase.c:1.25 --- gpgme/gpgme/passphrase.c:1.24 Tue Dec 7 22:13:36 2004 +++ gpgme/gpgme/passphrase.c Thu Jun 2 13:22:14 2005 @@ -1,6 +1,6 @@ /* passphrase.c - Passphrase callback. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -90,6 +90,7 @@ case GPGME_STATUS_NEED_PASSPHRASE: case GPGME_STATUS_NEED_PASSPHRASE_SYM: + case GPGME_STATUS_NEED_PASSPHRASE_PIN: if (opd->passphrase_info) free (opd->passphrase_info); opd->passphrase_info = strdup (args); @@ -133,7 +134,9 @@ if (err) return err; - if (code == GPGME_STATUS_GET_HIDDEN && !strcmp (key, "passphrase.enter")) + if (code == GPGME_STATUS_GET_HIDDEN + && (!strcmp (key, "passphrase.enter") + || !strcmp (key, "passphrase.pin.ask"))) { if (processed) *processed = 1; From cvs at cvs.gnupg.org Thu Jun 2 13:07:02 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Thu Jun 2 13:07:04 2005 Subject: gpgme-1-0-branch gpgme/gpgme (ChangeLog gpgme.h passphrase.c) Message-ID: Date: Thursday, June 2, 2005 @ 13:28:12 Author: wk Path: /cvs/gpgme/gpgme/gpgme Tag: gpgme-1-0-branch Modified: ChangeLog gpgme.h passphrase.c * gpgme.h: Add GPGME_STATUS_NEED_PASSPHRASE_PIN. * passphrase.c (_gpgme_passphrase_status_handler): Take care of GPGME_STATUS_NEED_PASSPHRASE_PIN. (_gpgme_passphrase_command_handler_internal): Also act on the key "passphrase.pin.ask". --------------+ ChangeLog | 8 ++++++++ gpgme.h | 3 ++- passphrase.c | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.386.2.4 gpgme/gpgme/ChangeLog:1.386.2.5 --- gpgme/gpgme/ChangeLog:1.386.2.4 Sat May 28 22:10:37 2005 +++ gpgme/gpgme/ChangeLog Thu Jun 2 13:28:11 2005 @@ -1,3 +1,11 @@ +2005-06-02 Werner Koch + + * gpgme.h: Add GPGME_STATUS_NEED_PASSPHRASE_PIN. + * passphrase.c (_gpgme_passphrase_status_handler): Take care of + GPGME_STATUS_NEED_PASSPHRASE_PIN. + (_gpgme_passphrase_command_handler_internal): Also act on the key + "passphrase.pin.ask". + 2005-05-28 Marcus Brinkmann * data-user.c: Include . Index: gpgme/gpgme/gpgme.h diff -u gpgme/gpgme/gpgme.h:1.149.2.4 gpgme/gpgme/gpgme.h:1.149.2.5 --- gpgme/gpgme/gpgme.h:1.149.2.4 Sat May 28 22:10:37 2005 +++ gpgme/gpgme/gpgme.h Thu Jun 2 13:28:11 2005 @@ -399,7 +399,8 @@ GPGME_STATUS_TRUNCATED, GPGME_STATUS_ERROR, GPGME_STATUS_NEWSIG, - GPGME_STATUS_REVKEYSIG + GPGME_STATUS_REVKEYSIG, + GPGME_STATUS_NEED_PASSPHRASE_PIN } gpgme_status_code_t; Index: gpgme/gpgme/passphrase.c diff -u gpgme/gpgme/passphrase.c:1.23.2.1 gpgme/gpgme/passphrase.c:1.23.2.2 --- gpgme/gpgme/passphrase.c:1.23.2.1 Tue Dec 7 22:11:53 2004 +++ gpgme/gpgme/passphrase.c Thu Jun 2 13:28:11 2005 @@ -90,6 +90,7 @@ case GPGME_STATUS_NEED_PASSPHRASE: case GPGME_STATUS_NEED_PASSPHRASE_SYM: + case GPGME_STATUS_NEED_PASSPHRASE_PIN: if (opd->passphrase_info) free (opd->passphrase_info); opd->passphrase_info = strdup (args); @@ -133,7 +134,9 @@ if (err) return err; - if (code == GPGME_STATUS_GET_HIDDEN && !strcmp (key, "passphrase.enter")) + if (code == GPGME_STATUS_GET_HIDDEN + && (!strcmp (key, "passphrase.enter") + || !strcmp (key, "passphrase.pin.ask"))) { if (processed) *processed = 1; From cvs at cvs.gnupg.org Thu Jun 2 23:38:23 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Thu Jun 2 23:38:26 2005 Subject: gpgme/gpgme (6 files) Message-ID: Date: Thursday, June 2, 2005 @ 23:59:34 Author: marcus Path: /cvs/gpgme/gpgme/gpgme Modified: ChangeLog wait-global.c wait-private.c wait-user.c wait.c wait.h 2005-06-02 Marcus Brinkmann * wait.h (_gpgme_run_io_cb): New prototype. * wait.c (_gpgme_run_io_cb): New function. * wait-global.c (gpgme_wait): Call it. * wait-user.c (_gpgme_user_io_cb_handler): Likewise. * wait-private.c (_gpgme_wait_on_condition): Likewise. ----------------+ ChangeLog | 8 ++++++++ wait-global.c | 2 +- wait-private.c | 6 +----- wait-user.c | 5 +---- wait.c | 35 +++++++++++++++++++++++++++++++++++ wait.h | 2 ++ 6 files changed, 48 insertions(+), 10 deletions(-) Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.403 gpgme/gpgme/ChangeLog:1.404 --- gpgme/gpgme/ChangeLog:1.403 Thu Jun 2 13:22:14 2005 +++ gpgme/gpgme/ChangeLog Thu Jun 2 23:59:34 2005 @@ -1,3 +1,11 @@ +2005-06-02 Marcus Brinkmann + + * wait.h (_gpgme_run_io_cb): New prototype. + * wait.c (_gpgme_run_io_cb): New function. + * wait-global.c (gpgme_wait): Call it. + * wait-user.c (_gpgme_user_io_cb_handler): Likewise. + * wait-private.c (_gpgme_wait_on_condition): Likewise. + 2005-06-02 Werner Koch * passphrase.c (_gpgme_passphrase_status_handler): Take care of Index: gpgme/gpgme/wait-global.c diff -u gpgme/gpgme/wait-global.c:1.15 gpgme/gpgme/wait-global.c:1.16 --- gpgme/gpgme/wait-global.c:1.15 Thu Apr 14 10:49:20 2005 +++ gpgme/gpgme/wait-global.c Thu Jun 2 23:59:34 2005 @@ -310,7 +310,7 @@ ictx = item->ctx; assert (ictx); - err = item->handler (item->handler_value, fdt.fds[i].fd); + err = _gpgme_run_io_cb (&fdt.fds[i], 0); if (err) { /* An error occured. Close all fds in this context, Index: gpgme/gpgme/wait-private.c diff -u gpgme/gpgme/wait-private.c:1.11 gpgme/gpgme/wait-private.c:1.12 --- gpgme/gpgme/wait-private.c:1.11 Thu Mar 24 14:05:12 2005 +++ gpgme/gpgme/wait-private.c Thu Jun 2 23:59:34 2005 @@ -101,15 +101,11 @@ { if (ctx->fdt.fds[i].fd != -1 && ctx->fdt.fds[i].signaled) { - struct wait_item_s *item; - ctx->fdt.fds[i].signaled = 0; assert (nr); nr--; - - item = (struct wait_item_s *) ctx->fdt.fds[i].opaque; - err = item->handler (item->handler_value, ctx->fdt.fds[i].fd); + err = _gpgme_run_io_cb (&ctx->fdt.fds[i], 0); if (err) { /* An error occured. Close all fds in this context, Index: gpgme/gpgme/wait-user.c diff -u gpgme/gpgme/wait-user.c:1.7 gpgme/gpgme/wait-user.c:1.8 --- gpgme/gpgme/wait-user.c:1.7 Thu Mar 24 14:05:12 2005 +++ gpgme/gpgme/wait-user.c Thu Jun 2 23:59:34 2005 @@ -42,15 +42,12 @@ gpgme_error_t err; struct tag *tag = (struct tag *) data; gpgme_ctx_t ctx; - struct wait_item_s *item; assert (data); ctx = tag->ctx; assert (ctx); - item = (struct wait_item_s *) ctx->fdt.fds[tag->idx].opaque; - assert (item); - err = (*item->handler) (item->handler_value, fd); + err = _gpgme_run_io_cb (&ctx->fdt.fds[tag->idx], 0); if (err) { unsigned int idx; Index: gpgme/gpgme/wait.c diff -u gpgme/gpgme/wait.c:1.44 gpgme/gpgme/wait.c:1.45 --- gpgme/gpgme/wait.c:1.44 Thu Mar 24 14:05:12 2005 +++ gpgme/gpgme/wait.c Thu Jun 2 23:59:34 2005 @@ -167,3 +167,38 @@ fdt->fds[idx].for_write = 0; fdt->fds[idx].opaque = NULL; } + + +/* This is slightly embarrassing. The problem is that running an I/O + callback _may_ influence the status of other file descriptors. Our + own event loops could compensate for that, but the external event + loops cannot. FIXME: We may still want to optimize this a bit when + we are called from our own event loops. So if CHECKED is 1, the + check is skipped. */ +gpgme_error_t +_gpgme_run_io_cb (struct io_select_fd_s *an_fds, int checked) +{ + struct wait_item_s *item; + item = (struct wait_item_s *) an_fds->opaque; + assert (item); + + if (!checked) + { + int nr; + struct io_select_fd_s fds; + + fds = *an_fds; + fds.signaled = 0; + /* Just give it a quick poll. */ + nr = _gpgme_io_select (&fds, 1, 1); + assert (nr <= 1); + if (nr < 0) + return errno; + else if (nr == 0) + /* The status changed in the meantime, there is nothing left + to do. */ + return 0; + } + + return item->handler (item->handler_value, an_fds->fd); +} Index: gpgme/gpgme/wait.h diff -u gpgme/gpgme/wait.h:1.11 gpgme/gpgme/wait.h:1.12 --- gpgme/gpgme/wait.h:1.11 Tue Dec 7 22:13:36 2004 +++ gpgme/gpgme/wait.h Thu Jun 2 23:59:34 2005 @@ -77,4 +77,6 @@ gpgme_error_t _gpgme_wait_one (gpgme_ctx_t ctx); +gpgme_error_t _gpgme_run_io_cb (struct io_select_fd_s *an_fds, int checked); + #endif /* WAIT_H */ From cvs at cvs.gnupg.org Thu Jun 2 23:40:46 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Thu Jun 2 23:40:48 2005 Subject: gpgme (NEWS) Message-ID: Date: Friday, June 3, 2005 @ 00:01:58 Author: marcus Path: /cvs/gpgme/gpgme Modified: NEWS Add new status codes. ------+ NEWS | 6 ++++++ 1 files changed, 6 insertions(+) Index: gpgme/NEWS diff -u gpgme/NEWS:1.140 gpgme/NEWS:1.141 --- gpgme/NEWS:1.140 Thu Apr 28 18:11:34 2005 +++ gpgme/NEWS Fri Jun 3 00:01:58 2005 @@ -19,6 +19,12 @@ gpgme_ctx_set_engine_info NEW gpgme_set_include_certs CHANGED DEFAULT GPGME_INCLUDE_CERTS_DEFAULT NEW +GPGME_STATUS_SIG_SUBPACKET NEW +GPGME_STATUS_NEED_PASSPHRASE_PIN NEW +GPGME_STATUS_SC_OP_FAILURE NEW +GPGME_STATUS_SC_OP_SUCCESS NEW +GPGME_STATUS_CARDCTRL NEW +GPGME_STATUS_BACKUP_KEY_CREATED NEW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From cvs at cvs.gnupg.org Thu Jun 2 23:42:27 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Thu Jun 2 23:42:30 2005 Subject: gpgme-1-0-branch gpgme (NEWS) Message-ID: Date: Friday, June 3, 2005 @ 00:03:40 Author: marcus Path: /cvs/gpgme/gpgme Tag: gpgme-1-0-branch Modified: NEWS Update items. ------+ NEWS | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: gpgme/NEWS diff -u gpgme/NEWS:1.136.2.4 gpgme/NEWS:1.136.2.5 --- gpgme/NEWS:1.136.2.4 Sat May 28 22:10:38 2005 +++ gpgme/NEWS Fri Jun 3 00:03:40 2005 @@ -11,11 +11,14 @@ semantics. We consider it to be a bug fix. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -gpgme_set_engine_info NEW -gpgme_ctx_get_engine_info NEW -gpgme_ctx_set_engine_info NEW gpgme_set_include_certs CHANGED DEFAULT GPGME_INCLUDE_CERTS_DEFAULT NEW +GPGME_STATUS_SIG_SUBPACKET NEW +GPGME_STATUS_NEED_PASSPHRASE_PIN NEW +GPGME_STATUS_SC_OP_FAILURE NEW +GPGME_STATUS_SC_OP_SUCCESS NEW +GPGME_STATUS_CARDCTRL NEW +GPGME_STATUS_BACKUP_KEY_CREATED NEW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From cvs at cvs.gnupg.org Thu Jun 2 23:44:20 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Thu Jun 2 23:44:22 2005 Subject: gpgme-1-0-branch gpgme/gpgme (6 files) Message-ID: Date: Friday, June 3, 2005 @ 00:05:32 Author: marcus Path: /cvs/gpgme/gpgme/gpgme Tag: gpgme-1-0-branch Modified: ChangeLog wait-global.c wait-private.c wait-user.c wait.c wait.h 2005-06-02 Marcus Brinkmann * wait.h (_gpgme_run_io_cb): New prototype. * wait.c (_gpgme_run_io_cb): New function. * wait-global.c (gpgme_wait): Call it. * wait-user.c (_gpgme_user_io_cb_handler): Likewise. * wait-private.c (_gpgme_wait_on_condition): Likewise. ----------------+ ChangeLog | 8 ++++++++ wait-global.c | 2 +- wait-private.c | 6 +----- wait-user.c | 5 +---- wait.c | 35 +++++++++++++++++++++++++++++++++++ wait.h | 2 ++ 6 files changed, 48 insertions(+), 10 deletions(-) Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.386.2.5 gpgme/gpgme/ChangeLog:1.386.2.6 --- gpgme/gpgme/ChangeLog:1.386.2.5 Thu Jun 2 13:28:11 2005 +++ gpgme/gpgme/ChangeLog Fri Jun 3 00:05:32 2005 @@ -1,3 +1,11 @@ +2005-06-02 Marcus Brinkmann + + * wait.h (_gpgme_run_io_cb): New prototype. + * wait.c (_gpgme_run_io_cb): New function. + * wait-global.c (gpgme_wait): Call it. + * wait-user.c (_gpgme_user_io_cb_handler): Likewise. + * wait-private.c (_gpgme_wait_on_condition): Likewise. + 2005-06-02 Werner Koch * gpgme.h: Add GPGME_STATUS_NEED_PASSPHRASE_PIN. Index: gpgme/gpgme/wait-global.c diff -u gpgme/gpgme/wait-global.c:1.10.2.2 gpgme/gpgme/wait-global.c:1.10.2.3 --- gpgme/gpgme/wait-global.c:1.10.2.2 Sat May 28 22:10:37 2005 +++ gpgme/gpgme/wait-global.c Fri Jun 3 00:05:32 2005 @@ -310,7 +310,7 @@ ictx = item->ctx; assert (ictx); - err = item->handler (item->handler_value, fdt.fds[i].fd); + err = _gpgme_run_io_cb (&fdt.fds[i], 0); if (err) { /* An error occured. Close all fds in this context, Index: gpgme/gpgme/wait-private.c diff -u gpgme/gpgme/wait-private.c:1.9.2.1 gpgme/gpgme/wait-private.c:1.9.2.2 --- gpgme/gpgme/wait-private.c:1.9.2.1 Tue Dec 7 22:11:53 2004 +++ gpgme/gpgme/wait-private.c Fri Jun 3 00:05:32 2005 @@ -101,15 +101,11 @@ { if (ctx->fdt.fds[i].fd != -1 && ctx->fdt.fds[i].signaled) { - struct wait_item_s *item; - ctx->fdt.fds[i].signaled = 0; assert (nr); nr--; - - item = (struct wait_item_s *) ctx->fdt.fds[i].opaque; - err = item->handler (item->handler_value, ctx->fdt.fds[i].fd); + err = _gpgme_run_io_cb (&ctx->fdt.fds[i], 0); if (err) { /* An error occured. Close all fds in this context, Index: gpgme/gpgme/wait-user.c diff -u gpgme/gpgme/wait-user.c:1.5.2.1 gpgme/gpgme/wait-user.c:1.5.2.2 --- gpgme/gpgme/wait-user.c:1.5.2.1 Tue Dec 7 22:11:53 2004 +++ gpgme/gpgme/wait-user.c Fri Jun 3 00:05:32 2005 @@ -42,15 +42,12 @@ gpgme_error_t err; struct tag *tag = (struct tag *) data; gpgme_ctx_t ctx; - struct wait_item_s *item; assert (data); ctx = tag->ctx; assert (ctx); - item = (struct wait_item_s *) ctx->fdt.fds[tag->idx].opaque; - assert (item); - err = (*item->handler) (item->handler_value, fd); + err = _gpgme_run_io_cb (&ctx->fdt.fds[tag->idx], 0); if (err) { unsigned int idx; Index: gpgme/gpgme/wait.c diff -u gpgme/gpgme/wait.c:1.42.2.1 gpgme/gpgme/wait.c:1.42.2.2 --- gpgme/gpgme/wait.c:1.42.2.1 Tue Dec 7 22:11:53 2004 +++ gpgme/gpgme/wait.c Fri Jun 3 00:05:32 2005 @@ -167,3 +167,38 @@ fdt->fds[idx].for_write = 0; fdt->fds[idx].opaque = NULL; } + + +/* This is slightly embarrassing. The problem is that running an I/O + callback _may_ influence the status of other file descriptors. Our + own event loops could compensate for that, but the external event + loops cannot. FIXME: We may still want to optimize this a bit when + we are called from our own event loops. So if CHECKED is 1, the + check is skipped. */ +gpgme_error_t +_gpgme_run_io_cb (struct io_select_fd_s *an_fds, int checked) +{ + struct wait_item_s *item; + item = (struct wait_item_s *) an_fds->opaque; + assert (item); + + if (!checked) + { + int nr; + struct io_select_fd_s fds; + + fds = *an_fds; + fds.signaled = 0; + /* Just give it a quick poll. */ + nr = _gpgme_io_select (&fds, 1, 1); + assert (nr <= 1); + if (nr < 0) + return errno; + else if (nr == 0) + /* The status changed in the meantime, there is nothing left + to do. */ + return 0; + } + + return item->handler (item->handler_value, an_fds->fd); +} Index: gpgme/gpgme/wait.h diff -u gpgme/gpgme/wait.h:1.10.2.1 gpgme/gpgme/wait.h:1.10.2.2 --- gpgme/gpgme/wait.h:1.10.2.1 Tue Dec 7 22:11:53 2004 +++ gpgme/gpgme/wait.h Fri Jun 3 00:05:32 2005 @@ -77,4 +77,6 @@ gpgme_error_t _gpgme_wait_one (gpgme_ctx_t ctx); +gpgme_error_t _gpgme_run_io_cb (struct io_select_fd_s *an_fds, int checked); + #endif /* WAIT_H */ From cvs at cvs.gnupg.org Fri Jun 3 00:38:28 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Jun 3 00:38:32 2005 Subject: gpgme (5 files) Message-ID: Date: Friday, June 3, 2005 @ 00:59:41 Author: marcus Path: /cvs/gpgme/gpgme Added: tests/gpg/t-wait.c Modified: gpgme/ChangeLog gpgme/wait-global.c tests/ChangeLog tests/gpg/Makefile.am gpgme/ 2005-06-03 Marcus Brinkmann * wait-global.c (gpgme_wait): Break out of the fd processing loop after an error. Reported by Igor Belyi . tests/ 2005-06-03 Marcus Brinkmann * gpg/Makefile.am (TESTS): Add t-wait. * gpg/t-wait.c (main): New test. -----------------------+ gpgme/ChangeLog | 6 ++++ gpgme/wait-global.c | 5 +++ tests/ChangeLog | 5 +++ tests/gpg/Makefile.am | 4 +- tests/gpg/t-wait.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 90 insertions(+), 2 deletions(-) Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.404 gpgme/gpgme/ChangeLog:1.405 --- gpgme/gpgme/ChangeLog:1.404 Thu Jun 2 23:59:34 2005 +++ gpgme/gpgme/ChangeLog Fri Jun 3 00:59:41 2005 @@ -1,3 +1,9 @@ +2005-06-03 Marcus Brinkmann + + * wait-global.c (gpgme_wait): Break out of the fd processing loop + after an error. + Reported by Igor Belyi . + 2005-06-02 Marcus Brinkmann * wait.h (_gpgme_run_io_cb): New prototype. Index: gpgme/gpgme/wait-global.c diff -u gpgme/gpgme/wait-global.c:1.16 gpgme/gpgme/wait-global.c:1.17 --- gpgme/gpgme/wait-global.c:1.16 Thu Jun 2 23:59:34 2005 +++ gpgme/gpgme/wait-global.c Fri Jun 3 00:59:41 2005 @@ -322,6 +322,11 @@ _gpgme_io_close (ictx->fdt.fds[idx].fd); _gpgme_engine_io_event (ictx->engine, GPGME_EVENT_DONE, &err); + + /* Break out of the loop, and retry the select() + from scratch, because now all fds should be + gone. */ + break; } } } Index: gpgme/tests/ChangeLog diff -u gpgme/tests/ChangeLog:1.101 gpgme/tests/ChangeLog:1.102 --- gpgme/tests/ChangeLog:1.101 Tue Dec 7 22:13:39 2004 +++ gpgme/tests/ChangeLog Fri Jun 3 00:59:41 2005 @@ -1,3 +1,8 @@ +2005-06-03 Marcus Brinkmann + + * gpg/Makefile.am (TESTS): Add t-wait. + * gpg/t-wait.c (main): New test. + 2004-12-07 Marcus Brinkmann * gpg/mkdemodirs: Add copyright notice. Index: gpgme/tests/gpg/Makefile.am diff -u gpgme/tests/gpg/Makefile.am:1.20 gpgme/tests/gpg/Makefile.am:1.21 --- gpgme/tests/gpg/Makefile.am:1.20 Tue Dec 7 22:13:39 2004 +++ gpgme/tests/gpg/Makefile.am Fri Jun 3 00:59:41 2005 @@ -1,5 +1,5 @@ # Copyright (C) 2000 Werner Koch (dd9jn) -# Copyright (C) 2001, 2004 g10 Code GmbH +# Copyright (C) 2001, 2004, 2005 g10 Code GmbH # # This file is part of GPGME. # @@ -28,7 +28,7 @@ TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers \ t-decrypt t-verify t-decrypt-verify \ t-export t-import t-trustlist t-eventloop t-edit \ - t-keylist t-keylist-sig t-thread1 + t-keylist t-keylist-sig t-thread1 t-wait CLEANFILES = secring.gpg pubring.gpg trustdb.gpg DISTCLEANFILES = pubring.gpg~ random_seed Index: gpgme/tests/gpg/t-wait.c diff -u /dev/null gpgme/tests/gpg/t-wait.c:1.1 --- /dev/null Fri Jun 3 00:59:41 2005 +++ gpgme/tests/gpg/t-wait.c Fri Jun 3 00:59:41 2005 @@ -0,0 +1,72 @@ +/* t-wait.c - Regression test. + Copyright (C) 2000 Werner Koch (dd9jn) + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH + + This file is part of GPGME. + + GPGME is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + GPGME is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include + +#include "t-support.h" + + +int +main (int argc, char *argv[]) +{ + gpgme_ctx_t ctx; + gpgme_error_t err; + gpgme_data_t sig, text; + + init_gpgme (GPGME_PROTOCOL_OpenPGP); + + err = gpgme_new (&ctx); + fail_if_err (err); + + /* Checking a message without a signature. */ + err = gpgme_data_new_from_mem (&sig, "foo\n", 4, 0); + fail_if_err (err); + err = gpgme_data_new (&text); + fail_if_err (err); + err = gpgme_op_verify_start (ctx, sig, NULL, text); + fail_if_err (err); + + while (gpgme_wait (ctx, &err, 0) == NULL && err == 0) + sleep(1); + + if (gpg_err_code (err) != GPG_ERR_NO_DATA) + { + fprintf (stderr, "%s:%d: %s: %s\n", + __FILE__, __LINE__, gpgme_strsource (err), + gpgme_strerror (err)); + exit (1); + } + + gpgme_data_release (sig); + gpgme_data_release (text); + gpgme_release (ctx); + return 0; +} From cvs at cvs.gnupg.org Fri Jun 3 00:48:41 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Jun 3 00:48:44 2005 Subject: gpgme-1-0-branch gpgme (5 files) Message-ID: Date: Friday, June 3, 2005 @ 01:09:54 Author: marcus Path: /cvs/gpgme/gpgme Tag: gpgme-1-0-branch Added: tests/gpg/t-wait.c Modified: gpgme/ChangeLog gpgme/wait-global.c tests/ChangeLog tests/gpg/Makefile.am gpgme/ 2005-06-03 Marcus Brinkmann * wait-global.c (gpgme_wait): Break out of the fd processing loop after an error. Reported by Igor Belyi . tests/ 2005-06-03 Marcus Brinkmann * gpg/Makefile.am (TESTS): Add t-wait. * gpg/t-wait.c (main): New test. -----------------------+ gpgme/ChangeLog | 6 ++++ gpgme/wait-global.c | 5 +++ tests/ChangeLog | 5 +++ tests/gpg/Makefile.am | 4 +- tests/gpg/t-wait.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 90 insertions(+), 2 deletions(-) Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.386.2.6 gpgme/gpgme/ChangeLog:1.386.2.7 --- gpgme/gpgme/ChangeLog:1.386.2.6 Fri Jun 3 00:05:32 2005 +++ gpgme/gpgme/ChangeLog Fri Jun 3 01:09:54 2005 @@ -1,3 +1,9 @@ +2005-06-03 Marcus Brinkmann + + * wait-global.c (gpgme_wait): Break out of the fd processing loop + after an error. + Reported by Igor Belyi . + 2005-06-02 Marcus Brinkmann * wait.h (_gpgme_run_io_cb): New prototype. Index: gpgme/gpgme/wait-global.c diff -u gpgme/gpgme/wait-global.c:1.10.2.3 gpgme/gpgme/wait-global.c:1.10.2.4 --- gpgme/gpgme/wait-global.c:1.10.2.3 Fri Jun 3 00:05:32 2005 +++ gpgme/gpgme/wait-global.c Fri Jun 3 01:09:54 2005 @@ -322,6 +322,11 @@ _gpgme_io_close (ictx->fdt.fds[idx].fd); _gpgme_engine_io_event (ictx->engine, GPGME_EVENT_DONE, &err); + + /* Break out of the loop, and retry the select() + from scratch, because now all fds should be + gone. */ + break; } } } Index: gpgme/tests/ChangeLog diff -u gpgme/tests/ChangeLog:1.100.2.1 gpgme/tests/ChangeLog:1.100.2.2 --- gpgme/tests/ChangeLog:1.100.2.1 Tue Dec 7 22:11:53 2004 +++ gpgme/tests/ChangeLog Fri Jun 3 01:09:54 2005 @@ -1,3 +1,8 @@ +2005-06-03 Marcus Brinkmann + + * gpg/Makefile.am (TESTS): Add t-wait. + * gpg/t-wait.c (main): New test. + 2004-12-07 Marcus Brinkmann * gpg/mkdemodirs: Add copyright notice. Index: gpgme/tests/gpg/Makefile.am diff -u gpgme/tests/gpg/Makefile.am:1.19.2.1 gpgme/tests/gpg/Makefile.am:1.19.2.2 --- gpgme/tests/gpg/Makefile.am:1.19.2.1 Tue Dec 7 22:11:53 2004 +++ gpgme/tests/gpg/Makefile.am Fri Jun 3 01:09:54 2005 @@ -1,5 +1,5 @@ # Copyright (C) 2000 Werner Koch (dd9jn) -# Copyright (C) 2001, 2004 g10 Code GmbH +# Copyright (C) 2001, 2004, 2005 g10 Code GmbH # # This file is part of GPGME. # @@ -28,7 +28,7 @@ TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers \ t-decrypt t-verify t-decrypt-verify \ t-export t-import t-trustlist t-eventloop t-edit \ - t-keylist t-keylist-sig t-thread1 + t-keylist t-keylist-sig t-thread1 t-wait CLEANFILES = secring.gpg pubring.gpg trustdb.gpg DISTCLEANFILES = pubring.gpg~ random_seed Index: gpgme/tests/gpg/t-wait.c diff -u /dev/null gpgme/tests/gpg/t-wait.c:1.1.2.1 --- /dev/null Fri Jun 3 01:09:54 2005 +++ gpgme/tests/gpg/t-wait.c Fri Jun 3 01:09:54 2005 @@ -0,0 +1,72 @@ +/* t-wait.c - Regression test. + Copyright (C) 2000 Werner Koch (dd9jn) + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH + + This file is part of GPGME. + + GPGME is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + GPGME is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include + +#include "t-support.h" + + +int +main (int argc, char *argv[]) +{ + gpgme_ctx_t ctx; + gpgme_error_t err; + gpgme_data_t sig, text; + + init_gpgme (GPGME_PROTOCOL_OpenPGP); + + err = gpgme_new (&ctx); + fail_if_err (err); + + /* Checking a message without a signature. */ + err = gpgme_data_new_from_mem (&sig, "foo\n", 4, 0); + fail_if_err (err); + err = gpgme_data_new (&text); + fail_if_err (err); + err = gpgme_op_verify_start (ctx, sig, NULL, text); + fail_if_err (err); + + while (gpgme_wait (ctx, &err, 0) == NULL && err == 0) + sleep(1); + + if (gpg_err_code (err) != GPG_ERR_NO_DATA) + { + fprintf (stderr, "%s:%d: %s: %s\n", + __FILE__, __LINE__, gpgme_strsource (err), + gpgme_strerror (err)); + exit (1); + } + + gpgme_data_release (sig); + gpgme_data_release (text); + gpgme_release (ctx); + return 0; +} From cvs at cvs.gnupg.org Fri Jun 3 02:20:55 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Jun 3 02:21:02 2005 Subject: gpgme (6 files) Message-ID: Date: Friday, June 3, 2005 @ 02:42:08 Author: marcus Path: /cvs/gpgme/gpgme Modified: NEWS doc/ChangeLog doc/gpgme.texi gpgme/ChangeLog gpgme/decrypt.c gpgme/gpgme.h doc/ 2005-06-03 Marcus Brinkmann * gpgme.texi (Decrypt): Add gpgme_recipient_t. gpgme/ 2005-06-03 Marcus Brinkmann * gpgme.h (struct _gpgme_recipient): New structure. (gpgme_recipient_t): New type. (struct _gpgme_op_decrypt_result): Add member recipients. * decrypt.c (op_data_t): New member last_recipient_p. (_gpgme_op_decrypt_init_result): Initialize last_recipient_p. (parse_enc_to): New function. (_gpgme_decrypt_status_handler): Handle status ENC_TO and NO_SECKEY. -----------------+ NEWS | 5 ++ doc/ChangeLog | 4 ++ doc/gpgme.texi | 34 ++++++++++++++++++ gpgme/ChangeLog | 9 ++++ gpgme/decrypt.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- gpgme/gpgme.h | 21 +++++++++++ 6 files changed, 167 insertions(+), 4 deletions(-) Index: gpgme/NEWS diff -u gpgme/NEWS:1.141 gpgme/NEWS:1.142 --- gpgme/NEWS:1.141 Fri Jun 3 00:01:58 2005 +++ gpgme/NEWS Fri Jun 3 02:42:08 2005 @@ -13,12 +13,17 @@ Because the default changes, this is a slight change of the API semantics. We consider it to be a bug fix. + * Information about the recipients of an encrypted text is now + available at decryption time. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gpgme_set_engine_info NEW gpgme_ctx_get_engine_info NEW gpgme_ctx_set_engine_info NEW gpgme_set_include_certs CHANGED DEFAULT GPGME_INCLUDE_CERTS_DEFAULT NEW +gpgme_recipient_t NEW +gpgme_decrypt_result_t EXTENDED: New field recipients. GPGME_STATUS_SIG_SUBPACKET NEW GPGME_STATUS_NEED_PASSPHRASE_PIN NEW GPGME_STATUS_SC_OP_FAILURE NEW Index: gpgme/doc/ChangeLog diff -u gpgme/doc/ChangeLog:1.137 gpgme/doc/ChangeLog:1.138 --- gpgme/doc/ChangeLog:1.137 Sat May 28 22:09:20 2005 +++ gpgme/doc/ChangeLog Fri Jun 3 02:42:08 2005 @@ -1,3 +1,7 @@ +2005-06-03 Marcus Brinkmann + + * gpgme.texi (Decrypt): Add gpgme_recipient_t. + 2005-05-28 Marcus Brinkmann * gpgme.texi (Key Listing Mode): Fix return type of Index: gpgme/doc/gpgme.texi diff -u gpgme/doc/gpgme.texi:1.139 gpgme/doc/gpgme.texi:1.140 --- gpgme/doc/gpgme.texi:1.139 Sat May 28 22:09:20 2005 +++ gpgme/doc/gpgme.texi Fri Jun 3 02:42:07 2005 @@ -3622,9 +3622,38 @@ if @var{cipher} or @var{plain} is not a valid pointer. @end deftypefun +@deftp {Data type} {gpgme_recipient_t} +This is a pointer to a structure used to store information about the +recipient of an encrypted text which is decrypted in a +@code{gpgme_op_decrypt} operation. This information (except for the +status field) is even available before the operation finished +successfully, for example in a passphrase callback. The structure +contains the following members: + +@table @code +@item gpgme_recipient_t next +This is a pointer to the next recipient structure in the linked list, +or @code{NULL} if this is the last element. + +@item gpgme_pubkey_algo_t +The public key algorithm used in the encryption. + +@item unsigned int wrong_key_usage : 1 +This is true if the key was not used according to its policy. + +@item char *keyid +This is the key ID of the key (in hexadecimal digits) used as +recipient. + +@item gpgme_error_t status +This is an error number with the error code GPG_ERR_NO_SECKEY if the +secret key for this recipient is not available, and 0 otherwise. +@end table +@end deftp + @deftp {Data type} {gpgme_decrypt_result_t} This is a pointer to a structure used to store the result of a -@code{gpgme_op_decrypt} operation. After successfully encrypting +@code{gpgme_op_decrypt} operation. After successfully decrypting data, you can retrieve the pointer to the result with @code{gpgme_op_decrypt_result}. The structure contains the following members: @@ -3636,6 +3665,9 @@ @item unsigned int wrong_key_usage : 1 This is true if the key was not used according to its policy. + +@item gpgme_recipient_t recipient +This is a linked list of recipients to which this message was encrypted. @end table @end deftp Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.405 gpgme/gpgme/ChangeLog:1.406 --- gpgme/gpgme/ChangeLog:1.405 Fri Jun 3 00:59:41 2005 +++ gpgme/gpgme/ChangeLog Fri Jun 3 02:42:07 2005 @@ -1,5 +1,14 @@ 2005-06-03 Marcus Brinkmann + * gpgme.h (struct _gpgme_recipient): New structure. + (gpgme_recipient_t): New type. + (struct _gpgme_op_decrypt_result): Add member recipients. + * decrypt.c (op_data_t): New member last_recipient_p. + (_gpgme_op_decrypt_init_result): Initialize last_recipient_p. + (parse_enc_to): New function. + (_gpgme_decrypt_status_handler): Handle status ENC_TO and + NO_SECKEY. + * wait-global.c (gpgme_wait): Break out of the fd processing loop after an error. Reported by Igor Belyi . Index: gpgme/gpgme/decrypt.c diff -u gpgme/gpgme/decrypt.c:1.42 gpgme/gpgme/decrypt.c:1.43 --- gpgme/gpgme/decrypt.c:1.42 Tue Dec 7 22:13:36 2004 +++ gpgme/gpgme/decrypt.c Fri Jun 3 02:42:07 2005 @@ -38,6 +38,11 @@ int okay; int failed; + + /* A pointer to the next pointer of the last recipient in the list. + This makes appending new invalid signers painless while + preserving the order. */ + gpgme_recipient_t *last_recipient_p; } *op_data_t; @@ -67,6 +72,60 @@ } +static gpgme_error_t +parse_enc_to (char *args, gpgme_recipient_t *recp) +{ + gpgme_recipient_t rec; + char *tail; + int i; + + rec = malloc (sizeof (*rec)); + if (!rec) + return gpg_error_from_errno (errno); + + rec->next = NULL; + rec->keyid = rec->_keyid; + rec->status = 0; + + for (i = 0; i < sizeof (rec->_keyid) - 1; i++) + { + if (args[i] == '\0' || args[i] == ' ') + break; + + rec->_keyid[i] = args[i]; + } + rec->_keyid[i] = '\0'; + + args = &args[i]; + if (*args != '\0' && *args != ' ') + { + free (rec); + return gpg_error (GPG_ERR_INV_ENGINE); + } + + while (*args == ' ') + args++; + + if (*args) + { + errno = 0; + rec->pubkey_algo = strtol (args, &tail, 0); + if (errno || args == tail || *tail != ' ') + { + /* The crypto backend does not behave. */ + free (rec); + return gpg_error (GPG_ERR_INV_ENGINE); + } + } + + /* FIXME: The key length is always 0 right now, so no need to parse + it. */ + + *recp = rec; + return 0; +} + + gpgme_error_t _gpgme_decrypt_status_handler (void *priv, gpgme_status_code_t code, char *args) @@ -151,7 +210,33 @@ } } break; - + + case GPGME_STATUS_ENC_TO: + err = parse_enc_to (args, opd->last_recipient_p); + if (err) + return err; + + opd->last_recipient_p = &(*opd->last_recipient_p)->next; + break; + + case GPGME_STATUS_NO_SECKEY: + { + gpgme_recipient_t rec = opd->result.recipients; + + while (rec) + { + if (!strcmp (rec->keyid, args)) + { + rec->status = gpg_error (GPG_ERR_NO_SECKEY); + break; + } + } + /* FIXME: Is this ok? */ + if (!rec) + return gpg_error (GPG_ERR_INV_ENGINE); + } + break; + default: break; } @@ -175,11 +260,18 @@ gpgme_error_t _gpgme_op_decrypt_init_result (gpgme_ctx_t ctx) { + gpgme_error_t err; void *hook; op_data_t opd; - return _gpgme_op_data_lookup (ctx, OPDATA_DECRYPT, &hook, - sizeof (*opd), release_op_data); + err = _gpgme_op_data_lookup (ctx, OPDATA_DECRYPT, &hook, + sizeof (*opd), release_op_data); + opd = hook; + if (err) + return err; + + opd->last_recipient_p = &opd->result.recipients; + return 0; } Index: gpgme/gpgme/gpgme.h diff -u gpgme/gpgme/gpgme.h:1.155 gpgme/gpgme/gpgme.h:1.156 --- gpgme/gpgme/gpgme.h:1.155 Thu Jun 2 13:22:14 2005 +++ gpgme/gpgme/gpgme.h Fri Jun 3 02:42:07 2005 @@ -1080,6 +1080,25 @@ /* Decryption. */ + +struct _gpgme_recipient +{ + struct _gpgme_recipient *next; + + /* The key ID of key for which the text was encrypted. */ + char *keyid; + + /* Internal to GPGME, do not use. */ + char _keyid[16 + 1]; + + /* The public key algorithm of the recipient key. */ + gpgme_pubkey_algo_t pubkey_algo; + + /* The status of the recipient. */ + gpgme_error_t status; +}; +typedef struct _gpgme_recipient *gpgme_recipient_t; + struct _gpgme_op_decrypt_result { char *unsupported_algorithm; @@ -1089,6 +1108,8 @@ /* Internal to GPGME, do not use. */ int _unused : 31; + + gpgme_recipient_t recipients; }; typedef struct _gpgme_op_decrypt_result *gpgme_decrypt_result_t; From cvs at cvs.gnupg.org Fri Jun 3 16:01:54 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Jun 3 16:01:57 2005 Subject: gpgme/gpgme (ChangeLog decrypt.c) Message-ID: Date: Friday, June 3, 2005 @ 16:23:10 Author: marcus Path: /cvs/gpgme/gpgme/gpgme Modified: ChangeLog decrypt.c 2005-06-03 Marcus Brinkmann (_gpgme_decrypt_status_handler): Fix last change. -----------+ ChangeLog | 2 ++ decrypt.c | 1 + 2 files changed, 3 insertions(+) Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.406 gpgme/gpgme/ChangeLog:1.407 --- gpgme/gpgme/ChangeLog:1.406 Fri Jun 3 02:42:07 2005 +++ gpgme/gpgme/ChangeLog Fri Jun 3 16:23:10 2005 @@ -1,5 +1,7 @@ 2005-06-03 Marcus Brinkmann + (_gpgme_decrypt_status_handler): Fix last change. + * gpgme.h (struct _gpgme_recipient): New structure. (gpgme_recipient_t): New type. (struct _gpgme_op_decrypt_result): Add member recipients. Index: gpgme/gpgme/decrypt.c diff -u gpgme/gpgme/decrypt.c:1.43 gpgme/gpgme/decrypt.c:1.44 --- gpgme/gpgme/decrypt.c:1.43 Fri Jun 3 02:42:07 2005 +++ gpgme/gpgme/decrypt.c Fri Jun 3 16:23:10 2005 @@ -230,6 +230,7 @@ rec->status = gpg_error (GPG_ERR_NO_SECKEY); break; } + rec = rec->next; } /* FIXME: Is this ok? */ if (!rec) From cvs at cvs.gnupg.org Fri Jun 3 21:20:38 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Jun 3 21:20:41 2005 Subject: gpgme (6 files) Message-ID: Date: Friday, June 3, 2005 @ 21:41:56 Author: marcus Path: /cvs/gpgme/gpgme Modified: NEWS doc/ChangeLog doc/gpgme.texi gpgme/ChangeLog gpgme/gpgme.h gpgme/verify.c doc/ 2005-06-03 Marcus Brinkmann * gpgme.texi (Verify): Add information about new fields in gpgme_signature_t. gpgme/ 2005-06-03 Marcus Brinkmann * gpgme.h (struct _gpgme_signature): New members pubkey_algo and hash_algo. * verify.c (parse_valid_sig): Parse pubkey and hash algo numbers. (parse_new_sig): Parse pubkey, hash algo and timestamp for ERRSIG. -----------------+ NEWS | 1 doc/ChangeLog | 3 + doc/gpgme.texi | 5 ++ gpgme/ChangeLog | 5 ++ gpgme/gpgme.h | 6 ++ gpgme/verify.c | 125 +++++++++++++++++++++++++++++++++++++++++------------- 6 files changed, 117 insertions(+), 28 deletions(-) Index: gpgme/NEWS diff -u gpgme/NEWS:1.142 gpgme/NEWS:1.143 --- gpgme/NEWS:1.142 Fri Jun 3 02:42:08 2005 +++ gpgme/NEWS Fri Jun 3 21:41:56 2005 @@ -24,6 +24,7 @@ GPGME_INCLUDE_CERTS_DEFAULT NEW gpgme_recipient_t NEW gpgme_decrypt_result_t EXTENDED: New field recipients. +gpgme_verify_result_t EXTENDED: New fields pubkey_algo, hash_algo. GPGME_STATUS_SIG_SUBPACKET NEW GPGME_STATUS_NEED_PASSPHRASE_PIN NEW GPGME_STATUS_SC_OP_FAILURE NEW Index: gpgme/doc/ChangeLog diff -u gpgme/doc/ChangeLog:1.138 gpgme/doc/ChangeLog:1.139 --- gpgme/doc/ChangeLog:1.138 Fri Jun 3 02:42:08 2005 +++ gpgme/doc/ChangeLog Fri Jun 3 21:41:56 2005 @@ -1,5 +1,8 @@ 2005-06-03 Marcus Brinkmann + * gpgme.texi (Verify): Add information about new fields in + gpgme_signature_t. + * gpgme.texi (Decrypt): Add gpgme_recipient_t. 2005-05-28 Marcus Brinkmann Index: gpgme/doc/gpgme.texi diff -u gpgme/doc/gpgme.texi:1.140 gpgme/doc/gpgme.texi:1.141 --- gpgme/doc/gpgme.texi:1.140 Fri Jun 3 02:42:07 2005 +++ gpgme/doc/gpgme.texi Fri Jun 3 21:41:56 2005 @@ -3861,6 +3861,11 @@ @item gpgme_error_t validity_reason If a signature is not valid, this provides a reason why. +@item gpgme_pubkey_algo_t +The public key algorithm used to create this signature. + +@item gpgme_hash_algo_t +The hash algorithm used to create this signature. @end table @end deftp Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.407 gpgme/gpgme/ChangeLog:1.408 --- gpgme/gpgme/ChangeLog:1.407 Fri Jun 3 16:23:10 2005 +++ gpgme/gpgme/ChangeLog Fri Jun 3 21:41:55 2005 @@ -1,5 +1,10 @@ 2005-06-03 Marcus Brinkmann + * gpgme.h (struct _gpgme_signature): New members pubkey_algo and + hash_algo. + * verify.c (parse_valid_sig): Parse pubkey and hash algo numbers. + (parse_new_sig): Parse pubkey, hash algo and timestamp for ERRSIG. + (_gpgme_decrypt_status_handler): Fix last change. * gpgme.h (struct _gpgme_recipient): New structure. Index: gpgme/gpgme/gpgme.h diff -u gpgme/gpgme/gpgme.h:1.156 gpgme/gpgme/gpgme.h:1.157 --- gpgme/gpgme/gpgme.h:1.156 Fri Jun 3 02:42:07 2005 +++ gpgme/gpgme/gpgme.h Fri Jun 3 21:41:55 2005 @@ -1247,6 +1247,12 @@ gpgme_validity_t validity; gpgme_error_t validity_reason; + + /* The public key algorithm used to create the signature. */ + gpgme_pubkey_algo_t pubkey_algo; + + /* The hash algorithm used to create the signature. */ + gpgme_hash_algo_t hash_algo; }; typedef struct _gpgme_signature *gpgme_signature_t; Index: gpgme/gpgme/verify.c diff -u gpgme/gpgme/verify.c:1.71 gpgme/gpgme/verify.c:1.72 --- gpgme/gpgme/verify.c:1.71 Thu Apr 21 09:13:41 2005 +++ gpgme/gpgme/verify.c Fri Jun 3 21:41:55 2005 @@ -203,6 +203,7 @@ { gpgme_signature_t sig; char *end = strchr (args, ' '); + char *tail; if (end) { @@ -248,39 +249,70 @@ break; case GPGME_STATUS_ERRSIG: - if (end) + /* Parse the pubkey algo. */ + if (!end) + goto parse_err_sig_fail; + errno = 0; + sig->pubkey_algo = strtol (end, &tail, 0); + if (errno || end == tail || *tail != ' ') + goto parse_err_sig_fail; + end = tail; + while (*end == ' ') + end++; + + /* Parse the hash algo. */ + if (!*end) + goto parse_err_sig_fail; + errno = 0; + sig->hash_algo = strtol (end, &tail, 0); + if (errno || end == tail || *tail != ' ') + goto parse_err_sig_fail; + end = tail; + while (*end == ' ') + end++; + + /* Skip the sig class. */ + end = strchr (end, ' '); + if (!end) + goto parse_err_sig_fail; + while (*end == ' ') + end++; + + /* Parse the timestamp. */ + sig->timestamp = _gpgme_parse_timestamp (end, &tail); + if (sig->timestamp == -1 || end == tail || (*tail && *tail != ' ')) + return gpg_error (GPG_ERR_INV_ENGINE); + end = tail; + while (*end == ' ') + end++; + + /* Parse the return code. */ + if (end[0] && (!end[1] || end[1] == ' ')) { - int i = 0; - /* The return code is the 6th argument, if it is 9, the - problem is a missing key. */ - while (end && i < 4) + switch (end[0]) { - end = strchr (end, ' '); - if (end) - end++; - i++; - } - if (end && end[0] && (!end[1] || end[1] == ' ')) - { - switch (end[0]) - { - case '4': - sig->status = gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM); - break; - - case '9': - sig->status = gpg_error (GPG_ERR_NO_PUBKEY); - break; - - default: - sig->status = gpg_error (GPG_ERR_GENERAL); - } + case '4': + sig->status = gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM); + break; + + case '9': + sig->status = gpg_error (GPG_ERR_NO_PUBKEY); + break; + + default: + sig->status = gpg_error (GPG_ERR_GENERAL); } } else - sig->status = gpg_error (GPG_ERR_GENERAL); - break; + goto parse_err_sig_fail; + goto parse_err_sig_ok; + + parse_err_sig_fail: + sig->status = gpg_error (GPG_ERR_GENERAL); + parse_err_sig_ok: + break; + default: return gpg_error (GPG_ERR_GENERAL); } @@ -299,7 +331,6 @@ parse_valid_sig (gpgme_signature_t sig, char *args) { char *end = strchr (args, ' '); - if (end) { *end = '\0'; @@ -316,6 +347,7 @@ if (!sig->fpr) return gpg_error_from_errno (errno); + /* Skip the creation date. */ end = strchr (end, ' '); if (end) { @@ -329,6 +361,43 @@ sig->exp_timestamp = _gpgme_parse_timestamp (end, &tail); if (sig->exp_timestamp == -1 || end == tail || (*tail && *tail != ' ')) return gpg_error (GPG_ERR_INV_ENGINE); + end = tail; + + while (*end == ' ') + end++; + /* Skip the signature version. */ + end = strchr (end, ' '); + if (end) + { + while (*end == ' ') + end++; + + /* Skip the reserved field. */ + end = strchr (end, ' '); + if (end) + { + /* Parse the pubkey algo. */ + errno = 0; + sig->pubkey_algo = strtol (end, &tail, 0); + if (errno || end == tail || *tail != ' ') + return gpg_error (GPG_ERR_INV_ENGINE); + end = tail; + + while (*end == ' ') + end++; + + if (*end) + { + /* Parse the hash algo. */ + + errno = 0; + sig->hash_algo = strtol (end, &tail, 0); + if (errno || end == tail || *tail != ' ') + return gpg_error (GPG_ERR_INV_ENGINE); + end = tail; + } + } + } } return 0; } From cvs at cvs.gnupg.org Sat Jun 4 14:36:06 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Sat Jun 4 14:36:10 2005 Subject: GNUPG-1-9-BRANCH gnupg/tools (ChangeLog symcryptrun.c) Message-ID: Date: Saturday, June 4, 2005 @ 14:57:26 Author: marcus Path: /cvs/gnupg/gnupg/tools Tag: GNUPG-1-9-BRANCH Modified: ChangeLog symcryptrun.c 2005-06-04 Marcus Brinkmann * symcryptrun.c (main): Allow any number of arguments, don't use first argument as input file name. Pass extra arguments to confucius_main. (confucius_main): Accept new arguments argc and argv and pass them to confucius_process. (confucius_process): Accept new arguments argc and argv and pass them to the confucius process. ---------------+ ChangeLog | 10 ++++++++++ symcryptrun.c | 54 +++++++++++++++++++++++++++++------------------------- 2 files changed, 39 insertions(+), 25 deletions(-) Index: gnupg/tools/ChangeLog diff -u gnupg/tools/ChangeLog:1.25.2.78 gnupg/tools/ChangeLog:1.25.2.79 --- gnupg/tools/ChangeLog:1.25.2.78 Wed Jun 1 17:46:00 2005 +++ gnupg/tools/ChangeLog Sat Jun 4 14:57:26 2005 @@ -1,3 +1,13 @@ +2005-06-04 Marcus Brinkmann + + * symcryptrun.c (main): Allow any number of arguments, don't use + first argument as input file name. Pass extra arguments to + confucius_main. + (confucius_main): Accept new arguments argc and argv and pass them + to confucius_process. + (confucius_process): Accept new arguments argc and argv and pass + them to the confucius process. + 2005-06-01 Werner Koch * symcryptrun.c: Include mkdtemp.h. Index: gnupg/tools/symcryptrun.c diff -u gnupg/tools/symcryptrun.c:1.1.2.9 gnupg/tools/symcryptrun.c:1.1.2.10 --- gnupg/tools/symcryptrun.c:1.1.2.9 Wed Jun 1 17:46:00 2005 +++ gnupg/tools/symcryptrun.c Sat Jun 4 14:57:26 2005 @@ -486,15 +486,10 @@ requested. If it is oDecrypt, decryption is requested. INFILE and OUTFILE are the temporary files used in the process. */ int -confucius_process (int mode, char *infile, char *outfile) +confucius_process (int mode, char *infile, char *outfile, + int argc, char *argv[]) { - char *const args[] = { opt.program, - mode == oEncrypt ? "-m1" : "-m2", - "-q", infile, - "-z", outfile, - "-s", opt.keyfile, - mode == oEncrypt ? "-af" : "-f", - NULL }; + char **args; int cstderr[2]; int master; int slave; @@ -523,9 +518,29 @@ return 1; } + args = malloc (sizeof (char *) * (10 + argc)); + if (!args) + { + log_error (_("cannot allocate args vector\n")); + return 1; + } + args[0] = opt.program; + args[1] = (mode == oEncrypt) ? "-m1" : "-m2"; + args[2] = "-q"; + args[3] = infile; + args[4] = "-z"; + args[5] = outfile; + args[6] = "-s"; + args[7] = opt.keyfile; + args[8] = (mode == oEncrypt) ? "-af" : "-f"; + args[9 + argc] = NULL; + while (argc--) + args[9 + argc] = argv[argc]; + if (pipe (cstderr) < 0) { log_error (_("could not create pipe: %s\n"), strerror (errno)); + free (args); return 1; } @@ -534,6 +549,7 @@ log_error (_("could not create pty: %s\n"), strerror (errno)); close (cstderr[0]); close (cstderr[1]); + free (args); return -1; } @@ -551,6 +567,7 @@ close (slave); close (cstderr[0]); close (cstderr[1]); + free (args); return 1; } else if (pid == 0) @@ -587,6 +604,7 @@ close (slave); close (cstderr[1]); + free (args); /* Listen on the output FDs. */ do @@ -753,7 +771,7 @@ requested. If it is oDecrypt, decryption is requested. The other parameters are taken from the global option data. */ int -confucius_main (int mode) +confucius_main (int mode, int argc, char *argv[]) { int res; char *tmpdir; @@ -811,7 +829,7 @@ /* Run the engine and thus create the output file, handling passphrase retrieval. */ - res = confucius_process (mode, infile, outfile); + res = confucius_process (mode, infile, outfile, argc, argv); if (res) { remove_file (outfile, mode == oDecrypt); @@ -962,20 +980,6 @@ xfree (configname); configname = NULL; - /* With --inputfile an argument is not allowed, without only one - optional argument is allowed. */ - if (argc > 1) - log_error (_("too many arguments\n")); - else if (opt.input && argc) - log_error (_("no argument allowed when using option \"%s\"\n"), - "--inputfile"); - - if (argc) - { - opt.input = *argv; - argv++; argc--; - } - if (!mode) log_error (_("either %s or %s must be given\n"), "--decrypt", "--encrypt"); @@ -1001,7 +1005,7 @@ res = 1; } else if (!strcmp (opt.class, "confucius")) - res = confucius_main (mode); + res = confucius_main (mode, argc, argv); else { log_error (_("class %s is not supported\n"), opt.class); From cvs at cvs.gnupg.org Sun Jun 5 00:48:04 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Jun 5 00:48:05 2005 Subject: gnupg/keyserver (ChangeLog gpgkeys_hkp.c gpgkeys_oldhkp.c) Message-ID: Date: Sunday, June 5, 2005 @ 01:09:27 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_hkp.c gpgkeys_oldhkp.c * gpgkeys_hkp.c, gpgkeys_oldhkp.c: Add support for HKP servers that aren't at the root path. Suggested by Jack Bates. ------------------+ ChangeLog | 5 +++++ gpgkeys_hkp.c | 24 ++++++++++++++++-------- gpgkeys_oldhkp.c | 28 +++++++++++++++++++--------- 3 files changed, 40 insertions(+), 17 deletions(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.129 gnupg/keyserver/ChangeLog:1.130 --- gnupg/keyserver/ChangeLog:1.129 Wed Jun 1 21:08:56 2005 +++ gnupg/keyserver/ChangeLog Sun Jun 5 01:09:27 2005 @@ -1,3 +1,8 @@ +2005-06-04 David Shaw + + * gpgkeys_hkp.c, gpgkeys_oldhkp.c: Add support for HKP servers + that aren't at the root path. Suggested by Jack Bates. + 2005-06-01 David Shaw * ksutil.c [HAVE_DOSISH_SYSTEM]: Fix warnings on mingw32. Noted Index: gnupg/keyserver/gpgkeys_hkp.c diff -u gnupg/keyserver/gpgkeys_hkp.c:1.53 gnupg/keyserver/gpgkeys_hkp.c:1.54 --- gnupg/keyserver/gpgkeys_hkp.c:1.53 Tue May 31 10:39:15 2005 +++ gnupg/keyserver/gpgkeys_hkp.c Sun Jun 5 01:09:27 2005 @@ -73,7 +73,7 @@ send_key(int *eof) { CURLcode res; - char request[MAX_URL]; + char request[MAX_URL+15]; int begin=0,end=0,ret=KEYSERVER_INTERNAL_ERROR; char keyid[17]; char line[MAX_LINE]; @@ -162,6 +162,10 @@ strcat(request,opt->port); else strcat(request,"11371"); + if(opt->path) + strcat(request,opt->path); + /* request is MAX_URL+15 bytes long - MAX_URL covers the whole URL, + including any supplied path. The 15 covers /pks/add. */ strcat(request,"/pks/add"); if(opt->verbose>2) @@ -197,7 +201,7 @@ get_key(char *getkey) { CURLcode res; - char request[MAX_URL+100]; + char request[MAX_URL+60]; char *offset; struct curl_writer_ctx ctx; @@ -218,9 +222,6 @@ return KEYSERVER_NOT_SUPPORTED; } - /* Note that the size of request is MAX_URL which already implies a - 1024 byte PATH. MAX_URL+100 is absurdly safe. */ - strcpy(request,"http://"); strcat(request,opt->host); strcat(request,":"); @@ -228,6 +229,11 @@ strcat(request,opt->port); else strcat(request,"11371"); + if(opt->path) + strcat(request,opt->path); + /* request is MAX_URL+55 bytes long - MAX_URL covers the whole URL, + including any supplied path. The 60 overcovers this /pks/... etc + string plus the 8 bytes of key id */ strcat(request,"/pks/lookup?op=get&options=mr&search=0x"); /* fingerprint or long key id. Take the last 8 characters and treat @@ -278,9 +284,7 @@ searchkey_encoded=curl_escape(searchkey,0); - /* Note that MAX_URL already implies a 1024 byte PATH, so this is - safe. */ - request=malloc(MAX_URL+strlen(searchkey_encoded)); + request=malloc(MAX_URL+50+strlen(searchkey_encoded)); if(!request) { fprintf(console,"gpgkeys: out of memory\n"); @@ -297,6 +301,8 @@ strcat(request,opt->port); else strcat(request,"11371"); + if(opt->path) + strcat(request,opt->path); strcat(request,"/pks/lookup?op=index&options=mr&search="); strcat(request,searchkey_encoded); @@ -593,6 +599,8 @@ fprintf(console,"Host:\t\t%s\n",opt->host); if(opt->port) fprintf(console,"Port:\t\t%s\n",opt->port); + if(opt->path) + fprintf(console,"Path:\t\t%s\n",opt->path); fprintf(console,"Command:\t%s\n",ks_action_to_string(opt->action)); } Index: gnupg/keyserver/gpgkeys_oldhkp.c diff -u gnupg/keyserver/gpgkeys_oldhkp.c:1.3 gnupg/keyserver/gpgkeys_oldhkp.c:1.4 --- gnupg/keyserver/gpgkeys_oldhkp.c:1.3 Tue May 31 10:39:15 2005 +++ gnupg/keyserver/gpgkeys_oldhkp.c Sun Jun 5 01:09:27 2005 @@ -47,7 +47,8 @@ static int verbose=0,include_revoked=0,include_disabled=0; static unsigned int http_flags=0; -static char host[MAX_HOST+1]={'\0'},proxy[MAX_PROXY+1]={'\0'},port[MAX_PORT+1]={'\0'}; +static char host[MAX_HOST+1]={'\0'},proxy[MAX_PROXY+1]={'\0'}, + port[MAX_PORT+1]={'\0'},path[URLMAX_PATH+1]; static FILE *input=NULL,*output=NULL,*console=NULL; int @@ -89,7 +90,7 @@ memset(&hd,0,sizeof(hd)); - request=malloc(strlen(host)+100); + request=malloc(strlen(host)+strlen(port)+strlen(path)+100); if(!request) { fprintf(console,"gpgkeys: out of memory\n"); @@ -141,7 +142,8 @@ iobuf_flush_temp(temp); - sprintf(request,"hkp://%s%s%s/pks/add",host,port[0]?":":"",port[0]?port:""); + sprintf(request,"hkp://%s%s%s%s/pks/add", + host,port[0]?":":"",port[0]?port:"",path); if(verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); @@ -237,15 +239,15 @@ fprintf(output,"KEY 0x%s BEGIN\n",getkey); - request=malloc(strlen(host)+100); + request=malloc(strlen(host)+strlen(port)+strlen(path)+100); if(!request) { fprintf(console,"gpgkeys: out of memory\n"); return KEYSERVER_NO_MEMORY; } - sprintf(request,"hkp://%s%s%s/pks/lookup?op=get&options=mr&search=%s", - host,port[0]?":":"",port[0]?port:"", search); + sprintf(request,"hkp://%s%s%s%s/pks/lookup?op=get&options=mr&search=%s", + host,port[0]?":":"",port[0]?port:"",path,search); if(verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); @@ -659,7 +661,7 @@ search[len]='\0'; - request=malloc(strlen(host)+100+strlen(search)); + request=malloc(strlen(host)+strlen(port)+strlen(path)+100+strlen(search)); if(!request) { fprintf(console,"gpgkeys: out of memory\n"); @@ -667,8 +669,8 @@ goto fail; } - sprintf(request,"hkp://%s%s%s/pks/lookup?op=index&options=mr&search=%s", - host,port[0]?":":"",port[0]?port:"",search); + sprintf(request,"hkp://%s%s%s%s/pks/lookup?op=index&options=mr&search=%s", + host,port[0]?":":"",port[0]?port:"",path,search); if(verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); @@ -856,6 +858,12 @@ continue; } + if(sscanf(line,"PATH %" MKSTRING(URLMAX_PATH) "s\n",path)==1) + { + path[URLMAX_PATH]='\0'; + continue; + } + if(sscanf(line,"VERSION %d\n",&version)==1) { if(version!=KEYSERVER_PROTO_VERSION) @@ -1020,6 +1028,8 @@ fprintf(console,"Host:\t\t%s\n",host); if(port[0]) fprintf(console,"Port:\t\t%s\n",port); + if(path[0]) + fprintf(console,"Path:\t\t%s\n",path); fprintf(console,"Command:\t%s\n",action==GET?"GET": action==SEND?"SEND":"SEARCH"); } From cvs at cvs.gnupg.org Sun Jun 5 16:13:20 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Jun 5 16:13:23 2005 Subject: gnupg/keyserver (ChangeLog ksutil.c) Message-ID: Date: Sunday, June 5, 2005 @ 16:34:47 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog ksutil.c * ksutil.c (init_ks_options, parse_ks_options): Provide a default "/" path unless overridden by the config. Allow config to specify items multiple times and take the last specified item. -----------+ ChangeLog | 6 ++++++ ksutil.c | 12 ++++++++++++ 2 files changed, 18 insertions(+) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.130 gnupg/keyserver/ChangeLog:1.131 --- gnupg/keyserver/ChangeLog:1.130 Sun Jun 5 01:09:27 2005 +++ gnupg/keyserver/ChangeLog Sun Jun 5 16:34:47 2005 @@ -1,3 +1,9 @@ +2005-06-05 David Shaw + + * ksutil.c (init_ks_options, parse_ks_options): Provide a default + "/" path unless overridden by the config. Allow config to specify + items multiple times and take the last specified item. + 2005-06-04 David Shaw * gpgkeys_hkp.c, gpgkeys_oldhkp.c: Add support for HKP servers Index: gnupg/keyserver/ksutil.c diff -u gnupg/keyserver/ksutil.c:1.11 gnupg/keyserver/ksutil.c:1.12 --- gnupg/keyserver/ksutil.c:1.11 Wed Jun 1 21:08:56 2005 +++ gnupg/keyserver/ksutil.c Sun Jun 5 16:34:47 2005 @@ -87,6 +87,12 @@ opt->action=KS_UNKNOWN; opt->flags.check_cert=1; opt->timeout=DEFAULT_KEYSERVER_TIMEOUT; + opt->path=strdup("/"); + if(!opt->path) + { + free(opt); + opt=NULL; + } } return opt; @@ -144,6 +150,7 @@ if(sscanf(line,"HOST %" MKSTRING(MAX_HOST) "s\n",host)==1) { host[MAX_HOST]='\0'; + free(opt->host); opt->host=strdup(host); if(!opt->host) return KEYSERVER_NO_MEMORY; @@ -153,6 +160,7 @@ if(sscanf(line,"PORT %" MKSTRING(MAX_PORT) "s\n",port)==1) { port[MAX_PORT]='\0'; + free(opt->port); opt->port=strdup(port); if(!opt->port) return KEYSERVER_NO_MEMORY; @@ -162,6 +170,7 @@ if(sscanf(line,"SCHEME %" MKSTRING(MAX_SCHEME) "s\n",scheme)==1) { scheme[MAX_SCHEME]='\0'; + free(opt->scheme); opt->scheme=strdup(scheme); if(!opt->scheme) return KEYSERVER_NO_MEMORY; @@ -171,6 +180,7 @@ if(sscanf(line,"AUTH %" MKSTRING(MAX_AUTH) "s\n",auth)==1) { auth[MAX_AUTH]='\0'; + free(opt->auth); opt->auth=strdup(auth); if(!opt->auth) return KEYSERVER_NO_MEMORY; @@ -180,6 +190,7 @@ if(sscanf(line,"PATH %" MKSTRING(URLMAX_PATH) "s\n",path)==1) { path[URLMAX_PATH]='\0'; + free(opt->path); opt->path=strdup(path); if(!opt->path) return KEYSERVER_NO_MEMORY; @@ -189,6 +200,7 @@ if(sscanf(line,"OPAQUE %" MKSTRING(MAX_OPAQUE) "s\n",opaque)==1) { opaque[MAX_OPAQUE]='\0'; + free(opt->opaque); opt->opaque=strdup(opaque); if(!opt->opaque) return KEYSERVER_NO_MEMORY; From cvs at cvs.gnupg.org Tue Jun 7 19:41:41 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Tue Jun 7 19:41:44 2005 Subject: gnupg/cipher (ChangeLog random.c) Message-ID: Date: Tuesday, June 7, 2005 @ 20:03:20 Author: dshaw Path: /cvs/gnupg/gnupg/cipher Modified: ChangeLog random.c * random.c: Fix prototype of the fast random gatherer. Noted by Joe Vender. -----------+ ChangeLog | 5 +++++ random.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) Index: gnupg/cipher/ChangeLog diff -u gnupg/cipher/ChangeLog:1.148 gnupg/cipher/ChangeLog:1.149 --- gnupg/cipher/ChangeLog:1.148 Wed Mar 23 09:50:27 2005 +++ gnupg/cipher/ChangeLog Tue Jun 7 20:03:19 2005 @@ -1,3 +1,8 @@ +2005-06-07 David Shaw + + * random.c: Fix prototype of the fast random gatherer. Noted by + Joe Vender. + 2005-03-23 Werner Koch * rndw32.c (rndw32_gather_random_fast): While adding data use the Index: gnupg/cipher/random.c diff -u gnupg/cipher/random.c:1.57 gnupg/cipher/random.c:1.58 --- gnupg/cipher/random.c:1.57 Tue May 31 10:39:18 2005 +++ gnupg/cipher/random.c Tue Jun 7 20:03:19 2005 @@ -183,7 +183,7 @@ return NULL; } -static void (* +static int (* getfnc_fast_random_poll (void))( void (*)(const void*, size_t, int), int) { #ifdef USE_RNDW32 @@ -620,7 +620,7 @@ void fast_random_poll() { - static void (*fnc)( void (*)(const void*, size_t, int), int) = NULL; + static int (*fnc)( void (*)(const void*, size_t, int), int) = NULL; static int initialized = 0; rndstats.fastpolls++; From cvs at cvs.gnupg.org Wed Jun 8 05:10:05 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 8 05:10:10 2005 Subject: gnupg/g10 (ChangeLog export.c g10.c options.h) Message-ID: Date: Wednesday, June 8, 2005 @ 05:31:48 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog export.c g10.c options.h * options.h, g10.c (main), export.c (parse_export_options, do_export_stream): Add export-options export-clean-sigs, export-clean-uids, export-clean-subkeys, and export-clean which is all of the above. Export-minimal is the same except it also removes all non-selfsigs. export-unusable-sigs is now a noop. -----------+ ChangeLog | 8 ++++++++ export.c | 53 +++++++++++++++++++++++++++++++++-------------------- g10.c | 4 ++-- options.h | 4 +++- 4 files changed, 46 insertions(+), 23 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.749 gnupg/g10/ChangeLog:1.750 --- gnupg/g10/ChangeLog:1.749 Wed Jun 1 21:13:05 2005 +++ gnupg/g10/ChangeLog Wed Jun 8 05:31:47 2005 @@ -1,3 +1,11 @@ +2005-06-07 David Shaw + + * options.h, g10.c (main), export.c (parse_export_options, + do_export_stream): Add export-options export-clean-sigs, + export-clean-uids, export-clean-subkeys, and export-clean which is + all of the above. Export-minimal is the same except it also + removes all non-selfsigs. export-unusable-sigs is now a noop. + 2005-06-01 David Shaw * signal.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on Index: gnupg/g10/export.c diff -u gnupg/g10/export.c:1.47 gnupg/g10/export.c:1.48 --- gnupg/g10/export.c:1.47 Tue May 31 10:39:17 2005 +++ gnupg/g10/export.c Wed Jun 8 05:31:48 2005 @@ -1,6 +1,6 @@ /* export.c - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, - * 2004 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, + * 2005 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -35,6 +35,7 @@ #include "util.h" #include "main.h" #include "i18n.h" +#include "trustdb.h" static int do_export( STRLIST users, int secret, unsigned int options ); static int do_export_stream( IOBUF out, STRLIST users, int secret, @@ -49,12 +50,20 @@ {"export-local-sigs",EXPORT_LOCAL_SIGS,NULL}, {"export-attributes",EXPORT_ATTRIBUTES,NULL}, {"export-sensitive-revkeys",EXPORT_SENSITIVE_REVKEYS,NULL}, - {"export-minimal",EXPORT_MINIMAL,NULL}, - {"export-unusable-sigs",EXPORT_UNUSABLE_SIGS,NULL}, + {"export-minimal", + EXPORT_MINIMAL|EXPORT_CLEAN_SIGS|EXPORT_CLEAN_UIDS|EXPORT_CLEAN_SUBKEYS, + NULL}, + {"export-clean", + EXPORT_CLEAN_SIGS|EXPORT_CLEAN_UIDS|EXPORT_CLEAN_SUBKEYS,NULL}, + {"export-clean-sigs",EXPORT_CLEAN_SIGS,NULL}, + {"export-clean-uids",EXPORT_CLEAN_UIDS,NULL}, + {"export-clean-subkeys",EXPORT_CLEAN_SUBKEYS,NULL}, /* Aliases for backward compatibility */ {"include-local-sigs",EXPORT_LOCAL_SIGS,NULL}, {"include-attributes",EXPORT_ATTRIBUTES,NULL}, {"include-sensitive-revkeys",EXPORT_SENSITIVE_REVKEYS,NULL}, + /* dummy */ + {"export-unusable-sigs",0,NULL}, {NULL,0,NULL} /* add tags for include revoked and disabled? */ }; @@ -222,13 +231,20 @@ keystr(sk_keyid)); continue; } + } + else + { + /* It's a public key export */ + if((options&EXPORT_MINIMAL) + && (node=find_kbnode(keyblock,PKT_PUBLIC_KEY))) + keyid_from_pk(node->pkt->pkt.public_key,keyid); + + if(options&EXPORT_CLEAN_UIDS) + clean_uids_from_key(keyblock,opt.verbose); - if(options&EXPORT_MINIMAL) - keyid_from_sk(sk,keyid); + if(options&EXPORT_CLEAN_SUBKEYS) + clean_subkeys_from_key(keyblock,opt.verbose); } - else if((options&EXPORT_MINIMAL) - && (node=find_kbnode(keyblock,PKT_PUBLIC_KEY))) - keyid_from_pk(node->pkt->pkt.public_key,keyid); /* and write it */ for( kbctx=NULL; (node = walk_kbnode( keyblock, &kbctx, 0 )); ) { @@ -315,7 +331,14 @@ continue; } - if( node->pkt->pkttype == PKT_SIGNATURE ) + if(node->pkt->pkttype==PKT_USER_ID) + { + /* Run clean_sigs_from_uid against each uid if + export-clean-sigs is on. */ + if(options&EXPORT_CLEAN_SIGS) + clean_sigs_from_uid(keyblock,node,opt.verbose); + } + else if(node->pkt->pkttype==PKT_SIGNATURE) { /* If we have export-minimal turned on, do not include any signature that isn't a selfsig. Note that this @@ -327,16 +350,6 @@ || node->pkt->pkt.signature->keyid[1]!=keyid[1])) continue; - /* We do basically the same thing for - export-unusable-sigs. It only applies to expired - uid sigs that aren't selfsigs. */ - if(!(options&EXPORT_UNUSABLE_SIGS) - && IS_UID_SIG(node->pkt->pkt.signature) - && node->pkt->pkt.signature->flags.expired - && (node->pkt->pkt.signature->keyid[0]!=keyid[0] - || node->pkt->pkt.signature->keyid[1]!=keyid[1])) - continue; - /* do not export packets which are marked as not exportable */ if(!(options&EXPORT_LOCAL_SIGS) Index: gnupg/g10/g10.c diff -u gnupg/g10/g10.c:1.309 gnupg/g10/g10.c:1.310 --- gnupg/g10/g10.c:1.309 Tue May 31 10:39:16 2005 +++ gnupg/g10/g10.c Wed Jun 8 05:31:48 2005 @@ -1664,9 +1664,9 @@ opt.force_v3_sigs = 1; opt.escape_from = 1; opt.import_options=IMPORT_SK2PK; - opt.export_options=EXPORT_ATTRIBUTES|EXPORT_UNUSABLE_SIGS; + opt.export_options=EXPORT_ATTRIBUTES; opt.keyserver_options.import_options=IMPORT_REPAIR_PKS_SUBKEY_BUG; - opt.keyserver_options.export_options=EXPORT_ATTRIBUTES|EXPORT_UNUSABLE_SIGS; + opt.keyserver_options.export_options=EXPORT_ATTRIBUTES; opt.keyserver_options.options= KEYSERVER_INCLUDE_SUBKEYS|KEYSERVER_INCLUDE_REVOKED|KEYSERVER_TRY_DNS_SRV|KEYSERVER_HONOR_KEYSERVER_URL; opt.verify_options= Index: gnupg/g10/options.h diff -u gnupg/g10/options.h:1.139 gnupg/g10/options.h:1.140 --- gnupg/g10/options.h:1.139 Tue May 31 10:39:16 2005 +++ gnupg/g10/options.h Wed Jun 8 05:31:48 2005 @@ -257,7 +257,9 @@ #define EXPORT_ATTRIBUTES (1<<1) #define EXPORT_SENSITIVE_REVKEYS (1<<2) #define EXPORT_MINIMAL (1<<3) -#define EXPORT_UNUSABLE_SIGS (1<<4) +#define EXPORT_CLEAN_SIGS (1<<4) +#define EXPORT_CLEAN_UIDS (1<<5) +#define EXPORT_CLEAN_SUBKEYS (1<<6) #define LIST_SHOW_PHOTOS (1<<0) #define LIST_SHOW_POLICY_URLS (1<<1) From cvs at cvs.gnupg.org Wed Jun 8 14:51:11 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 8 14:51:29 2005 Subject: gnupg/g10 (ChangeLog getkey.c) Message-ID: Date: Wednesday, June 8, 2005 @ 15:12:57 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog getkey.c * getkey.c (fixup_uidnode, merge_selfsigs_main): Handle both expired and revoked uids in fixup_uidnode(). No need to special case in merge_selfsigs_main(). This also means that an expired uid will have its selfsig tagged with chosen_selfsig. -----------+ ChangeLog | 7 +++++++ getkey.c | 21 +++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.750 gnupg/g10/ChangeLog:1.751 --- gnupg/g10/ChangeLog:1.750 Wed Jun 8 05:31:47 2005 +++ gnupg/g10/ChangeLog Wed Jun 8 15:12:57 2005 @@ -1,3 +1,10 @@ +2005-06-08 David Shaw + + * getkey.c (fixup_uidnode, merge_selfsigs_main): Handle both + expired and revoked uids in fixup_uidnode(). No need to special + case in merge_selfsigs_main(). This also means that an expired + uid will have its selfsig tagged with chosen_selfsig. + 2005-06-07 David Shaw * options.h, g10.c (main), export.c (parse_export_options, Index: gnupg/g10/getkey.c diff -u gnupg/g10/getkey.c:1.127 gnupg/g10/getkey.c:1.128 --- gnupg/g10/getkey.c:1.127 Tue May 31 10:39:16 2005 +++ gnupg/g10/getkey.c Wed Jun 8 15:12:57 2005 @@ -1347,11 +1347,18 @@ return; /* has been revoked */ } + uid->expiredate = sig->expiredate; + + if(sig->flags.expired) + { + uid->is_expired = 1; + return; /* has expired */ + } + uid->created = sig->timestamp; /* this one is okay */ uid->selfsigversion = sig->version; /* If we got this far, it's not expired :) */ uid->is_expired = 0; - uid->expiredate = sig->expiredate; /* store the key flags in the helper variable for later processing */ uid->help_key_usage=parse_key_usage(sig); @@ -1652,19 +1659,9 @@ * the same email address may become valid again (hired, * fired, hired again). */ - if(sig->flags.expired) - { - uidnode->pkt->pkt.user_id->is_expired=1; - signode = NULL; - } - else - { - uidnode->pkt->pkt.user_id->is_expired=0; - signode = k; - } sigdate = sig->timestamp; - uidnode->pkt->pkt.user_id->expiredate=sig->expiredate; + signode = k; if( sig->version > sigversion ) sigversion = sig->version; } From cvs at cvs.gnupg.org Thu Jun 9 00:32:12 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Jun 9 00:32:19 2005 Subject: gnupg/util (ChangeLog dotlock.c) Message-ID: Date: Thursday, June 9, 2005 @ 00:54:02 Author: dshaw Path: /cvs/gnupg/gnupg/util Modified: ChangeLog dotlock.c * dotlock.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on mingw32. Noted by Joe Vender. -----------+ ChangeLog | 5 +++ dotlock.c | 92 ++++++++++++++++++++++++++++-------------------------------- 2 files changed, 48 insertions(+), 49 deletions(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.190 gnupg/util/ChangeLog:1.191 --- gnupg/util/ChangeLog:1.190 Tue May 31 12:11:00 2005 +++ gnupg/util/ChangeLog Thu Jun 9 00:54:02 2005 @@ -1,3 +1,8 @@ +2005-06-08 David Shaw + + * dotlock.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on + mingw32. Noted by Joe Vender. + 2005-05-31 Werner Koch * regcomp.c (MB_CUR_MAX) [_WIN32]: Define it only if not defined. Index: gnupg/util/dotlock.c diff -u gnupg/util/dotlock.c:1.20 gnupg/util/dotlock.c:1.21 --- gnupg/util/dotlock.c:1.20 Tue May 31 10:38:45 2005 +++ gnupg/util/dotlock.c Thu Jun 9 00:54:02 2005 @@ -1,5 +1,6 @@ /* dotlock.c - dotfile locking - * Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2004, + * 2005 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -52,8 +53,6 @@ static volatile DOTLOCK all_lockfiles; static int never_lock; -static int read_lockfile( const char *name ); - void disable_dotlock(void) { @@ -81,14 +80,14 @@ { static int initialized; DOTLOCK h; - int fd = -1; - char pidstr[16]; #if !defined (HAVE_DOSISH_SYSTEM) + int fd = -1; + char pidstr[16]; struct utsname utsbuf; -#endif const char *nodename; const char *dirpart; int dirpartlen; +#endif if( !initialized ) { atexit( remove_lockfiles ); @@ -235,7 +234,7 @@ #endif } - +#ifndef HAVE_DOSISH_SYSTEM static int maybe_deadlock( DOTLOCK h ) @@ -250,6 +249,43 @@ } /**************** + * Read the lock file and return the pid, returns -1 on error. + */ +static int +read_lockfile( const char *name ) +{ + int fd, pid; + char pidstr[16]; + + if( (fd = open(name, O_RDONLY)) == -1 ) { + int e = errno; + log_debug("error opening lockfile `%s': %s\n", name, strerror(errno) ); + errno = e; + return -1; + } + if( read(fd, pidstr, 10 ) != 10 ) { /* Read 10 digits w/o newline */ + log_debug("error reading lockfile `%s'", name ); + close(fd); + errno = 0; + return -1; + } + pidstr[10] = 0; /* terminate pid string */ + close(fd); + pid = atoi(pidstr); +#ifndef __riscos__ + if( !pid || pid == -1 ) { +#else /* __riscos__ */ + if( (!pid && riscos_getpid()) || pid == -1 ) { +#endif /* __riscos__ */ + log_error("invalid pid %d in lockfile `%s'", pid, name ); + errno = 0; + return -1; + } + return pid; +} +#endif /* !HAVE_DOSISH_SYSTEM */ + +/**************** * Do a lock on H. A TIMEOUT of 0 returns immediately, * -1 waits forever (hopefully not), other * values are timeouts in milliseconds. @@ -400,48 +436,6 @@ #endif } - -/**************** - * Read the lock file and return the pid, returns -1 on error. - */ -static int -read_lockfile( const char *name ) -{ -#if defined (HAVE_DOSISH_SYSTEM) - return 0; -#else - int fd, pid; - char pidstr[16]; - - if( (fd = open(name, O_RDONLY)) == -1 ) { - int e = errno; - log_debug("error opening lockfile `%s': %s\n", name, strerror(errno) ); - errno = e; - return -1; - } - if( read(fd, pidstr, 10 ) != 10 ) { /* Read 10 digits w/o newline */ - log_debug("error reading lockfile `%s'", name ); - close(fd); - errno = 0; - return -1; - } - pidstr[10] = 0; /* terminate pid string */ - close(fd); - pid = atoi(pidstr); -#ifndef __riscos__ - if( !pid || pid == -1 ) { -#else /* __riscos__ */ - if( (!pid && riscos_getpid()) || pid == -1 ) { -#endif /* __riscos__ */ - log_error("invalid pid %d in lockfile `%s'", pid, name ); - errno = 0; - return -1; - } - return pid; -#endif -} - - void remove_lockfiles() { From cvs at cvs.gnupg.org Thu Jun 9 04:31:29 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Jun 9 04:31:33 2005 Subject: gnupg/g10 (ChangeLog keyedit.c trustdb.c) Message-ID: Date: Thursday, June 9, 2005 @ 04:53:18 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keyedit.c trustdb.c * trustdb.c (clean_uids_from_key), keyedit.c (menu_clean_uids_from_key): Tweak algorithm to preserve the last selfsig which helps prevent uid resurrections. -----------+ ChangeLog | 4 ++++ keyedit.c | 40 ++++++++++++++++++++++------------------ trustdb.c | 24 +++++++++--------------- 3 files changed, 35 insertions(+), 33 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.751 gnupg/g10/ChangeLog:1.752 --- gnupg/g10/ChangeLog:1.751 Wed Jun 8 15:12:57 2005 +++ gnupg/g10/ChangeLog Thu Jun 9 04:53:18 2005 @@ -1,5 +1,9 @@ 2005-06-08 David Shaw + * trustdb.c (clean_uids_from_key), keyedit.c + (menu_clean_uids_from_key): Tweak algorithm to preserve the last + selfsig which helps prevent uid resurrections. + * getkey.c (fixup_uidnode, merge_selfsigs_main): Handle both expired and revoked uids in fixup_uidnode(). No need to special case in merge_selfsigs_main(). This also means that an expired Index: gnupg/g10/keyedit.c diff -u gnupg/g10/keyedit.c:1.184 gnupg/g10/keyedit.c:1.185 --- gnupg/g10/keyedit.c:1.184 Tue May 31 21:12:10 2005 +++ gnupg/g10/keyedit.c Thu Jun 9 04:53:18 2005 @@ -1435,7 +1435,8 @@ { "enable" , cmdENABLEKEY , KEYEDIT_NOT_SK, N_("enable key") }, { "disable" , cmdDISABLEKEY, KEYEDIT_NOT_SK, N_("disable key") }, { "showphoto",cmdSHOWPHOTO , 0, N_("show selected photo IDs") }, - { "clean", cmdCLEAN , KEYEDIT_NOT_SK, NULL }, + { "clean", cmdCLEAN , KEYEDIT_NOT_SK, + N_("clean unusable parts from key") }, { NULL, cmdNONE, 0, NULL } }; @@ -2150,19 +2151,16 @@ redisplay=modified=menu_clean_uids_from_key(keyblock); else if(ascii_strcasecmp(arg_string,"subkeys")==0) redisplay=modified=menu_clean_subkeys_from_key(keyblock); - else if(ascii_strcasecmp(arg_string,"all")==0) - { - modified=menu_clean_sigs_from_uids(keyblock); - modified+=menu_clean_uids_from_key(keyblock); - modified+=menu_clean_subkeys_from_key(keyblock); - redisplay=modified; - } else tty_printf("Unable to clean `%s'\n",arg_string); } else - tty_printf("Please specify item to clean: `sigs'," - " `uids', `subkeys', or `all'\n"); + { + modified=menu_clean_sigs_from_uids(keyblock); + modified+=menu_clean_uids_from_key(keyblock); + modified+=menu_clean_subkeys_from_key(keyblock); + redisplay=modified; + } } break; @@ -3187,34 +3185,40 @@ static int menu_clean_uids_from_key(KBNODE keyblock) { - KBNODE node; int modified=clean_uids_from_key(keyblock,0); if(modified) { + KBNODE node,uidnode=NULL; + for(node=keyblock->next;node;node=node->next) { - if(node->pkt->pkttype==PKT_USER_ID && is_deleted_kbnode(node)) + if(node->pkt->pkttype==PKT_USER_ID) + uidnode=node; + else if(uidnode && node->pkt->pkttype==PKT_SIGNATURE + && is_deleted_kbnode(node)) { const char *reason; - char *user=utf8_to_native(node->pkt->pkt.user_id->name, - node->pkt->pkt.user_id->len,0); + char *user=utf8_to_native(uidnode->pkt->pkt.user_id->name, + uidnode->pkt->pkt.user_id->len,0); - if(node->pkt->pkt.user_id->is_revoked) + if(uidnode->pkt->pkt.user_id->is_revoked) reason=_("revoked"); - else if(node->pkt->pkt.user_id->is_expired) + else if(uidnode->pkt->pkt.user_id->is_expired) reason=_("expired"); else reason=_("invalid"); - tty_printf("User ID \"%s\" removed: %s\n",user,reason); + tty_printf("User ID \"%s\" compacted: %s\n",user,reason); + + uidnode=NULL; m_free(user); } } } else - tty_printf("No user IDs are removable.\n"); + tty_printf("No user IDs are compactable.\n"); return modified; } Index: gnupg/g10/trustdb.c diff -u gnupg/g10/trustdb.c:1.142 gnupg/g10/trustdb.c:1.143 --- gnupg/g10/trustdb.c:1.142 Tue May 31 21:12:10 2005 +++ gnupg/g10/trustdb.c Thu Jun 9 04:53:18 2005 @@ -1641,30 +1641,23 @@ and is not expired. Note that this does not take into account whether the uid has a trust path to it - just whether the keyholder themselves has certified the uid. Returns how many user IDs were - removed. */ + removed. To "remove" a user ID, we simply remove ALL signatures + except the self-sig that caused the user ID to be remove-worthy. + We don't actually remove the user ID packet itself since it might + be ressurected in a later merge. */ int clean_uids_from_key(KBNODE keyblock,int noisy) { - int uidcount=0,delete_until_next=0,deleted=0; + int delete_until_next=0,deleted=0; KBNODE node; assert(keyblock->pkt->pkttype==PKT_PUBLIC_KEY); merge_keys_and_selfsig(keyblock); - /* First count how many user IDs we have. We need to be careful - that we don't delete them all as some keys could actually have NO - valid user IDs. 2440 requires at least 1 user ID packet, valid - or not. */ for(node=keyblock->next; node && node->pkt->pkttype!=PKT_PUBLIC_SUBKEY; node=node->next) - if(node->pkt->pkttype==PKT_USER_ID) - uidcount++; - - for(node=keyblock->next; - node && node->pkt->pkttype!=PKT_PUBLIC_SUBKEY && uidcount>deleted+1; - node=node->next) { if(node->pkt->pkttype==PKT_USER_ID) { @@ -1693,7 +1686,7 @@ else reason=_("invalid"); - log_info("removing user ID \"%s\" from key %s: %s\n", + log_info("compacting user ID \"%s\" on key %s: %s\n", user,keystr(keyblock->pkt->pkt.public_key->keyid), reason); @@ -1701,8 +1694,9 @@ } } } - - if(delete_until_next) + else if(node->pkt->pkttype==PKT_SIGNATURE + && delete_until_next + && !node->pkt->pkt.signature->flags.chosen_selfsig) delete_kbnode(node); } From cvs at cvs.gnupg.org Fri Jun 10 04:30:52 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Fri Jun 10 04:30:57 2005 Subject: gnupg/g10 (ChangeLog kbnode.c keydb.h trustdb.c) Message-ID: Date: Friday, June 10, 2005 @ 04:52:41 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog kbnode.c keydb.h trustdb.c * keydb.h, kbnode.c (undelete_kbnode): New function to undelete a kbnode. * trustdb.c (clean_uids_from_key): Further tweak the algorithm so that the last good selfsig is kept when the chosen selfsig is a revocation. -----------+ ChangeLog | 9 +++++++++ kbnode.c | 8 +++++++- keydb.h | 5 +++-- trustdb.c | 41 ++++++++++++++++++++++++++++++++++------- 4 files changed, 53 insertions(+), 10 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.752 gnupg/g10/ChangeLog:1.753 --- gnupg/g10/ChangeLog:1.752 Thu Jun 9 04:53:18 2005 +++ gnupg/g10/ChangeLog Fri Jun 10 04:52:41 2005 @@ -1,3 +1,12 @@ +2005-06-09 David Shaw + + * keydb.h, kbnode.c (undelete_kbnode): New function to undelete a + kbnode. + + * trustdb.c (clean_uids_from_key): Further tweak the algorithm so + that the last good selfsig is kept when the chosen selfsig is a + revocation. + 2005-06-08 David Shaw * trustdb.c (clean_uids_from_key), keyedit.c Index: gnupg/g10/kbnode.c diff -u gnupg/g10/kbnode.c:1.26 gnupg/g10/kbnode.c:1.27 --- gnupg/g10/kbnode.c:1.26 Tue May 31 10:39:16 2005 +++ gnupg/g10/kbnode.c Fri Jun 10 04:52:41 2005 @@ -1,5 +1,6 @@ /* kbnode.c - keyblock node utility functions - * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, + * 2005 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -113,6 +114,11 @@ node->private_flag |= 1; } +void +undelete_kbnode( KBNODE node ) +{ + node->private_flag &= ~1; +} /**************** Index: gnupg/g10/keydb.h diff -u gnupg/g10/keydb.h:1.92 gnupg/g10/keydb.h:1.93 --- gnupg/g10/keydb.h:1.92 Tue May 31 12:11:01 2005 +++ gnupg/g10/keydb.h Fri Jun 10 04:52:41 2005 @@ -1,6 +1,6 @@ /* keydb.h - Key database - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, - * 2004 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, + * 2005 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -293,6 +293,7 @@ KBNODE clone_kbnode( KBNODE node ); void release_kbnode( KBNODE n ); void delete_kbnode( KBNODE node ); +void undelete_kbnode( KBNODE node ); void add_kbnode( KBNODE root, KBNODE node ); void insert_kbnode( KBNODE root, KBNODE node, int pkttype ); void move_kbnode( KBNODE *root, KBNODE node, KBNODE where ); Index: gnupg/g10/trustdb.c diff -u gnupg/g10/trustdb.c:1.143 gnupg/g10/trustdb.c:1.144 --- gnupg/g10/trustdb.c:1.143 Thu Jun 9 04:53:18 2005 +++ gnupg/g10/trustdb.c Fri Jun 10 04:52:41 2005 @@ -1644,12 +1644,18 @@ removed. To "remove" a user ID, we simply remove ALL signatures except the self-sig that caused the user ID to be remove-worthy. We don't actually remove the user ID packet itself since it might - be ressurected in a later merge. */ + be ressurected in a later merge. + + If this self-sig is a revocation, we also include the most recent + valid regular sig since it is hard to import the user ID otherwise. + TODO: change the import code to allow importing a uid with only a + revocation if the uid already exists on the keyring. */ int clean_uids_from_key(KBNODE keyblock,int noisy) { int delete_until_next=0,deleted=0; - KBNODE node; + KBNODE node,signode=NULL; + u32 sigdate=0; assert(keyblock->pkt->pkttype==PKT_PUBLIC_KEY); @@ -1663,6 +1669,12 @@ { PKT_user_id *uid=node->pkt->pkt.user_id; + if(signode && !signode->pkt->pkt.signature->flags.chosen_selfsig) + undelete_kbnode(signode); + + sigdate=0; + signode=NULL; + /* Skip valid user IDs, and non-self-signed user IDs if --allow-non-selfsigned-uid is set. */ if(uid->created @@ -1694,12 +1706,27 @@ } } } - else if(node->pkt->pkttype==PKT_SIGNATURE - && delete_until_next - && !node->pkt->pkt.signature->flags.chosen_selfsig) - delete_kbnode(node); + else if(node->pkt->pkttype==PKT_SIGNATURE) + { + PKT_signature *sig=node->pkt->pkt.signature; + + /* This isn't actually slow - the key signature validation + is cached from merge_keys_and_selfsig() */ + if(IS_UID_SIG(sig) && sig->timestamp>sigdate + && check_key_signature(keyblock,node,NULL)==0) + { + sigdate=sig->timestamp; + signode=node; + } + + if(delete_until_next && !sig->flags.chosen_selfsig) + delete_kbnode(node); + } } - + + if(signode && !signode->pkt->pkt.signature->flags.chosen_selfsig) + undelete_kbnode(signode); + return deleted; } From cvs at cvs.gnupg.org Fri Jun 10 04:39:02 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Fri Jun 10 04:39:04 2005 Subject: gnupg/g10 (ChangeLog export.c keyedit.c options.h trustdb.c trustdb.h) Message-ID: Date: Friday, June 10, 2005 @ 05:00:57 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog export.c keyedit.c options.h trustdb.c trustdb.h * options.h, export.c (do_export_stream), keyedit.c (keyedit_menu, menu_clean_subkeys_from_key), trustdb.h, trustdb.c (clean_subkeys_from_key): Remove subkey cleaning function. It is of very limited usefulness since it cannot be used on any subkey that can sign, and can only affect multiple selfsigs on encryption-only subkeys. -----------+ ChangeLog | 7 +++++++ export.c | 11 ++--------- keyedit.c | 38 +------------------------------------- options.h | 1 - trustdb.c | 60 ------------------------------------------------------------ trustdb.h | 1 - 6 files changed, 10 insertions(+), 108 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.753 gnupg/g10/ChangeLog:1.754 --- gnupg/g10/ChangeLog:1.753 Fri Jun 10 04:52:41 2005 +++ gnupg/g10/ChangeLog Fri Jun 10 05:00:57 2005 @@ -1,5 +1,12 @@ 2005-06-09 David Shaw + * options.h, export.c (do_export_stream), keyedit.c (keyedit_menu, + menu_clean_subkeys_from_key), trustdb.h, trustdb.c + (clean_subkeys_from_key): Remove subkey cleaning function. It is + of very limited usefulness since it cannot be used on any subkey + that can sign, and can only affect multiple selfsigs on + encryption-only subkeys. + * keydb.h, kbnode.c (undelete_kbnode): New function to undelete a kbnode. Index: gnupg/g10/export.c diff -u gnupg/g10/export.c:1.48 gnupg/g10/export.c:1.49 --- gnupg/g10/export.c:1.48 Wed Jun 8 05:31:48 2005 +++ gnupg/g10/export.c Fri Jun 10 05:00:57 2005 @@ -50,14 +50,10 @@ {"export-local-sigs",EXPORT_LOCAL_SIGS,NULL}, {"export-attributes",EXPORT_ATTRIBUTES,NULL}, {"export-sensitive-revkeys",EXPORT_SENSITIVE_REVKEYS,NULL}, - {"export-minimal", - EXPORT_MINIMAL|EXPORT_CLEAN_SIGS|EXPORT_CLEAN_UIDS|EXPORT_CLEAN_SUBKEYS, - NULL}, - {"export-clean", - EXPORT_CLEAN_SIGS|EXPORT_CLEAN_UIDS|EXPORT_CLEAN_SUBKEYS,NULL}, + {"export-minimal",EXPORT_MINIMAL|EXPORT_CLEAN_SIGS|EXPORT_CLEAN_UIDS,NULL}, + {"export-clean",EXPORT_CLEAN_SIGS|EXPORT_CLEAN_UIDS,NULL}, {"export-clean-sigs",EXPORT_CLEAN_SIGS,NULL}, {"export-clean-uids",EXPORT_CLEAN_UIDS,NULL}, - {"export-clean-subkeys",EXPORT_CLEAN_SUBKEYS,NULL}, /* Aliases for backward compatibility */ {"include-local-sigs",EXPORT_LOCAL_SIGS,NULL}, {"include-attributes",EXPORT_ATTRIBUTES,NULL}, @@ -241,9 +237,6 @@ if(options&EXPORT_CLEAN_UIDS) clean_uids_from_key(keyblock,opt.verbose); - - if(options&EXPORT_CLEAN_SUBKEYS) - clean_subkeys_from_key(keyblock,opt.verbose); } /* and write it */ Index: gnupg/g10/keyedit.c diff -u gnupg/g10/keyedit.c:1.185 gnupg/g10/keyedit.c:1.186 --- gnupg/g10/keyedit.c:1.185 Thu Jun 9 04:53:18 2005 +++ gnupg/g10/keyedit.c Fri Jun 10 05:00:57 2005 @@ -53,10 +53,9 @@ static void show_key_and_fingerprint( KBNODE keyblock ); static int menu_adduid( KBNODE keyblock, KBNODE sec_keyblock, int photo ); static void menu_deluid( KBNODE pub_keyblock, KBNODE sec_keyblock ); -static int menu_delsig( KBNODE pub_keyblock ); +static int menu_delsig( KBNODE pub_keyblock ); static int menu_clean_sigs_from_uids(KBNODE keyblock); static int menu_clean_uids_from_key(KBNODE keyblock); -static int menu_clean_subkeys_from_key(KBNODE keyblock); static void menu_delkey( KBNODE pub_keyblock, KBNODE sec_keyblock ); static int menu_addrevoker( KBNODE pub_keyblock, KBNODE sec_keyblock, int sensitive ); @@ -2149,8 +2148,6 @@ modified=menu_clean_sigs_from_uids(keyblock); else if(ascii_strcasecmp(arg_string,"uids")==0) redisplay=modified=menu_clean_uids_from_key(keyblock); - else if(ascii_strcasecmp(arg_string,"subkeys")==0) - redisplay=modified=menu_clean_subkeys_from_key(keyblock); else tty_printf("Unable to clean `%s'\n",arg_string); } @@ -2158,7 +2155,6 @@ { modified=menu_clean_sigs_from_uids(keyblock); modified+=menu_clean_uids_from_key(keyblock); - modified+=menu_clean_subkeys_from_key(keyblock); redisplay=modified; } } @@ -3223,38 +3219,6 @@ return modified; } -static int -menu_clean_subkeys_from_key(KBNODE keyblock) -{ - KBNODE node; - int modified=clean_subkeys_from_key(keyblock,0); - - if(modified) - { - for(node=keyblock->next;node;node=node->next) - { - if(node->pkt->pkttype==PKT_PUBLIC_SUBKEY && is_deleted_kbnode(node)) - { - const char *reason; - - if(node->pkt->pkt.public_key->is_revoked) - reason=_("revoked"); - else if(node->pkt->pkt.public_key->has_expired) - reason=_("expired"); - else - reason=_("invalid"); - - tty_printf("Subkey %s removed: %s\n", - keystr(node->pkt->pkt.public_key->keyid),reason); - } - } - } - else - tty_printf("No subkeys are removable.\n"); - - return modified; -} - /**************** * Remove some of the secondary keys */ Index: gnupg/g10/options.h diff -u gnupg/g10/options.h:1.140 gnupg/g10/options.h:1.141 --- gnupg/g10/options.h:1.140 Wed Jun 8 05:31:48 2005 +++ gnupg/g10/options.h Fri Jun 10 05:00:57 2005 @@ -259,7 +259,6 @@ #define EXPORT_MINIMAL (1<<3) #define EXPORT_CLEAN_SIGS (1<<4) #define EXPORT_CLEAN_UIDS (1<<5) -#define EXPORT_CLEAN_SUBKEYS (1<<6) #define LIST_SHOW_PHOTOS (1<<0) #define LIST_SHOW_POLICY_URLS (1<<1) Index: gnupg/g10/trustdb.c diff -u gnupg/g10/trustdb.c:1.144 gnupg/g10/trustdb.c:1.145 --- gnupg/g10/trustdb.c:1.144 Fri Jun 10 04:52:41 2005 +++ gnupg/g10/trustdb.c Fri Jun 10 05:00:57 2005 @@ -1730,66 +1730,6 @@ return deleted; } -/* Another cleaning function. This only cleans encrypt-only subkeys - since an expired/revoked encryption key is basically useless, but - an expired/revoked key that can sign is still needed to verify old - signatures. */ -int -clean_subkeys_from_key(KBNODE keyblock,int noisy) -{ - int delete_until_next=0,deleted=0; - KBNODE node; - char *main_key=NULL; - - assert(keyblock->pkt->pkttype==PKT_PUBLIC_KEY); - - merge_keys_and_selfsig(keyblock); - - if(noisy) - main_key=m_strdup(keystr(keyblock->pkt->pkt.public_key->keyid)); - - for(node=keyblock->next;node;node=node->next) - { - if(node->pkt->pkttype==PKT_PUBLIC_SUBKEY) - { - PKT_public_key *pk=node->pkt->pkt.public_key; - - /* If it is valid, not expired, and not revoked, leave it - alone. If a key can make signatures, leave it alone. */ - if(pk->pubkey_usage!=PUBKEY_USAGE_ENC - || (pk->is_valid && !pk->has_expired && !pk->is_revoked)) - delete_until_next=0; - else - { - delete_until_next=1; - deleted++; - - if(noisy) - { - const char *reason; - - if(pk->is_revoked) - reason=_("revoked"); - else if(pk->has_expired) - reason=_("expired"); - else - reason=_("invalid"); - - log_info("removing subkey %s from key %s: %s\n", - keystr_from_pk(pk),main_key,reason); - } - } - } - - if(delete_until_next) - delete_kbnode(node); - } - - m_free(main_key); - - return deleted; -} - /* Used by validate_one_keyblock to confirm a regexp within a trust signature. Returns 1 for match, and 0 for no match or regex error. */ Index: gnupg/g10/trustdb.h diff -u gnupg/g10/trustdb.h:1.55 gnupg/g10/trustdb.h:1.56 --- gnupg/g10/trustdb.h:1.55 Tue May 31 10:39:15 2005 +++ gnupg/g10/trustdb.h Fri Jun 10 05:00:57 2005 @@ -84,7 +84,6 @@ int clean_sigs_from_uid(KBNODE keyblock,KBNODE uidnode,int noisy); int clean_uids_from_key(KBNODE keyblock,int noisy); -int clean_subkeys_from_key(KBNODE keyblock,int noisy); /*-- tdbdump.c --*/ void list_trustdb(const char *username); From cvs at cvs.gnupg.org Fri Jun 10 04:53:30 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Fri Jun 10 04:53:35 2005 Subject: gnupg/g10 (ChangeLog import.c options.h) Message-ID: Date: Friday, June 10, 2005 @ 05:15:25 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog import.c options.h * options.h, import.c (parse_import_options, delete_inv_parts): import-unusable-sigs is now a noop. -----------+ ChangeLog | 3 +++ import.c | 27 ++------------------------- options.h | 1 - 3 files changed, 5 insertions(+), 26 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.754 gnupg/g10/ChangeLog:1.755 --- gnupg/g10/ChangeLog:1.754 Fri Jun 10 05:00:57 2005 +++ gnupg/g10/ChangeLog Fri Jun 10 05:15:25 2005 @@ -1,5 +1,8 @@ 2005-06-09 David Shaw + * options.h, import.c (parse_import_options, delete_inv_parts): + import-unusable-sigs is now a noop. + * options.h, export.c (do_export_stream), keyedit.c (keyedit_menu, menu_clean_subkeys_from_key), trustdb.h, trustdb.c (clean_subkeys_from_key): Remove subkey cleaning function. It is Index: gnupg/g10/import.c diff -u gnupg/g10/import.c:1.122 gnupg/g10/import.c:1.123 --- gnupg/g10/import.c:1.122 Tue May 31 10:39:16 2005 +++ gnupg/g10/import.c Fri Jun 10 05:15:25 2005 @@ -94,10 +94,11 @@ {"fast-import",IMPORT_FAST,NULL}, {"convert-sk-to-pk",IMPORT_SK2PK,NULL}, {"merge-only",IMPORT_MERGE_ONLY,NULL}, - {"import-unusable-sigs",IMPORT_UNUSABLE_SIGS,NULL}, /* Aliases for backward compatibility */ {"allow-local-sigs",IMPORT_LOCAL_SIGS,NULL}, {"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL}, + /* dummy */ + {"import-unusable-sigs",0,NULL}, {NULL,0,NULL} }; @@ -1556,30 +1557,6 @@ node->pkt->pkt.signature->sig_class); delete_kbnode(node); } - else if(node->pkt->pkttype==PKT_SIGNATURE - && IS_UID_SIG(node->pkt->pkt.signature) - && node->pkt->pkt.signature->flags.expired - && (node->pkt->pkt.signature->keyid[0]!=keyid[0] - || node->pkt->pkt.signature->keyid[1]!=keyid[1]) - && !(options&IMPORT_UNUSABLE_SIGS)) - { - /* Note that we haven't necessarily checked this sig for - validity. We strip it anyway since if it was valid, it - would be expired. If it wasn't valid, it either would - be expired if it was valid, or was altered to the point - that it looked expired (and so doesn't matter terribly - much if it is expired or not). */ - if(opt.verbose) - { - char *kid=m_strdup(keystr(keyid)); - log_info(_("key %s: expired signature from key %s -" - " skipped\n"),kid, - keystr(node->pkt->pkt.signature->keyid)); - m_free(kid); - } - - delete_kbnode(node); - } else if( (node->flag & 4) ) /* marked for deletion */ delete_kbnode( node ); } Index: gnupg/g10/options.h diff -u gnupg/g10/options.h:1.141 gnupg/g10/options.h:1.142 --- gnupg/g10/options.h:1.141 Fri Jun 10 05:00:57 2005 +++ gnupg/g10/options.h Fri Jun 10 05:15:25 2005 @@ -251,7 +251,6 @@ #define IMPORT_FAST (1<<2) #define IMPORT_SK2PK (1<<3) #define IMPORT_MERGE_ONLY (1<<4) -#define IMPORT_UNUSABLE_SIGS (1<<5) #define EXPORT_LOCAL_SIGS (1<<0) #define EXPORT_ATTRIBUTES (1<<1) From cvs at cvs.gnupg.org Fri Jun 10 16:33:19 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Jun 10 16:33:26 2005 Subject: LIBGCRYPT-1-2-BRANCH libgcrypt (AUTHORS ChangeLog configure.ac) Message-ID: Date: Friday, June 10, 2005 @ 16:55:17 Author: wk Path: /cvs/libgcrypt/libgcrypt Tag: LIBGCRYPT-1-2-BRANCH Modified: AUTHORS ChangeLog configure.ac Moved basic tests to the top. --------------+ AUTHORS | 1 - ChangeLog | 4 ++++ configure.ac | 37 ++++++++++++++++++------------------- 3 files changed, 22 insertions(+), 20 deletions(-) Index: libgcrypt/AUTHORS diff -u libgcrypt/AUTHORS:1.44 libgcrypt/AUTHORS:1.44.2.1 --- libgcrypt/AUTHORS:1.44 Fri Feb 13 13:44:15 2004 +++ libgcrypt/AUTHORS Fri Jun 10 16:55:16 2005 @@ -63,7 +63,6 @@ Orginal code for cipher/rfc2268.c. - More credits ============ The ATH implementation (src/ath*) has been taken from GPGME and Index: libgcrypt/ChangeLog diff -u libgcrypt/ChangeLog:1.158.2.6 libgcrypt/ChangeLog:1.158.2.7 --- libgcrypt/ChangeLog:1.158.2.6 Sat Apr 16 19:33:47 2005 +++ libgcrypt/ChangeLog Fri Jun 10 16:55:16 2005 @@ -1,3 +1,7 @@ +2005-06-10 Werner Koch + + * configure.ac: Moved basic tests to the top. + 2005-02-03 Moritz Schulte * THANKS: Updated. Index: libgcrypt/configure.ac diff -u libgcrypt/configure.ac:1.70.2.5 libgcrypt/configure.ac:1.70.2.6 --- libgcrypt/configure.ac:1.70.2.5 Wed Jan 5 17:44:35 2005 +++ libgcrypt/configure.ac Fri Jun 10 16:55:16 2005 @@ -19,7 +19,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # (Process this file with autoconf to produce a configure script.) -AC_REVISION($Revision: 1.70.2.5 $) +AC_REVISION($Revision: 1.70.2.6 $) AC_PREREQ(2.59) min_automake_version="1.9.3" @@ -78,6 +78,23 @@ AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) + +AC_PROG_MAKE_SET +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +# AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_PROG_CC +AC_PROG_CPP +AM_PROG_AS +AC_ISC_POSIX +AC_PROG_INSTALL +AC_PROG_AWK + +AM_PROG_LIBTOOL + ########################## ## General definitions. ## ########################## @@ -366,25 +383,7 @@ [use_capabilities="$withval"],[use_capabilities=no]) AC_MSG_RESULT($use_capabilities) -############################## -#### Checks for programs. #### -############################## - -AC_PROG_MAKE_SET -missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -# AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -AC_PROG_CC -AC_PROG_CPP -AM_PROG_AS -AC_ISC_POSIX -AC_PROG_INSTALL -AC_PROG_AWK -AM_PROG_LIBTOOL AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME", [A human readable text with the name of the OS]) From cvs at cvs.gnupg.org Fri Jun 10 16:51:01 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Jun 10 16:51:04 2005 Subject: libgcrypt (ChangeLog README THANKS configure.ac) Message-ID: Date: Friday, June 10, 2005 @ 17:13:00 Author: wk Path: /cvs/libgcrypt/libgcrypt Modified: ChangeLog README THANKS configure.ac Move detection of basic stuff to the top. For example we need to know whether gcc is used before testing for it. Reported by Ralf Fassel. --------------+ ChangeLog | 14 ++++++++++---- README | 5 ++--- THANKS | 1 + configure.ac | 43 ++++++++++++++++++++++++------------------- 4 files changed, 37 insertions(+), 26 deletions(-) Index: libgcrypt/ChangeLog diff -u libgcrypt/ChangeLog:1.167 libgcrypt/ChangeLog:1.168 --- libgcrypt/ChangeLog:1.167 Sat Apr 23 00:39:42 2005 +++ libgcrypt/ChangeLog Fri Jun 10 17:13:00 2005 @@ -1,11 +1,17 @@ +2005-06-10 Werner Koch + + * configure.ac: Move detection of basic stuff to the top. For + example we need to know whether gcc is used before testing for it. + Reported by Ralf Fassel. + 2005-04-23 Moritz Schulte * acinclude.m4 (TYPE_SOCKLEN_T): New type definition test; provided by Albert Chin. - * configure.ac: Don't use $(CMD) as it's not portable; use `CMD` nstead. - Simpler -lnsl/-lsocket test. - Use TYPE_SOCKLEN_T test. - Don't forget to set `random_modules' correctly. + * configure.ac: Don't use $(CMD) as it's not portable; use CMD in + backticks instead. Simpler -lnsl/-lsocket test. Use + TYPE_SOCKLEN_T test. Don't forget to set `random_modules' + correctly. 2005-04-22 Moritz Schulte Index: libgcrypt/README diff -u libgcrypt/README:1.78 libgcrypt/README:1.79 --- libgcrypt/README:1.78 Thu Apr 15 11:46:37 2004 +++ libgcrypt/README Fri Jun 10 17:13:00 2005 @@ -55,8 +55,7 @@ rndunix - Entropy gatherer for Unices without a /dev/random rndw32 - Entropy gatherer for MS Windows - The documentation is available under the terms of the GNU Free - Documentation License; see the file COPYING.DOC for the terms. + The documentation is available under the terms of the GPL. This library used to be available under the GPL - this was changed with version 1.1.7 with the rationale that there are now many free @@ -64,7 +63,7 @@ similar to Libcrypt. We decided that to foster the use of cryptography in Free Software an LGPLed library would make more sense because it avoids problems due to license incompatibilities - between some Free Software licenses and the GPL. + between some Free Software licenses and the GPL. Please note that in many cases it is better for a library to be licensed under the GPL, so that it provides an advantage for free Index: libgcrypt/THANKS diff -u libgcrypt/THANKS:1.85 libgcrypt/THANKS:1.86 --- libgcrypt/THANKS:1.85 Tue Mar 22 22:30:17 2005 +++ libgcrypt/THANKS Fri Jun 10 17:13:00 2005 @@ -90,6 +90,7 @@ Peter Gutmann pgut001@cs.auckland.ac.nz QingLong qinglong@bolizm.ihep.su Rafael Ãvila de Espíndola rafael.espindola@gmail.com +Ralf Fassel ralf@akutech.de Ralf Hildebrandt Ralf.Hildebrandt@innominate.com Ralf Schneider ralf@tapfere-schneiderleins.de Ralph Gillen gillen@theochem.uni-duesseldorf.de Index: libgcrypt/configure.ac diff -u libgcrypt/configure.ac:1.75 libgcrypt/configure.ac:1.76 --- libgcrypt/configure.ac:1.75 Sat Apr 23 00:39:42 2005 +++ libgcrypt/configure.ac Fri Jun 10 17:13:00 2005 @@ -19,7 +19,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # (Process this file with autoconf to produce a configure script.) -AC_REVISION($Revision: 1.75 $) +AC_REVISION($Revision: 1.76 $) AC_PREREQ(2.59) min_automake_version="1.9.3" @@ -70,6 +70,7 @@ #endif ]) + AC_SUBST(LIBGCRYPT_LT_CURRENT) AC_SUBST(LIBGCRYPT_LT_AGE) AC_SUBST(LIBGCRYPT_LT_REVISION) @@ -78,6 +79,28 @@ AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) + +###################### +## Basic checks. ### (we need some results later on (e.g. $GCC) +###################### + +AC_PROG_MAKE_SET +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +# AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_PROG_CC +AC_PROG_CPP +AM_PROG_AS +AC_ISC_POSIX +AC_PROG_INSTALL +AC_PROG_AWK + +AM_PROG_LIBTOOL + + ########################## ## General definitions. ## ########################## @@ -366,25 +389,7 @@ [use_capabilities="$withval"],[use_capabilities=no]) AC_MSG_RESULT($use_capabilities) -############################## -#### Checks for programs. #### -############################## -AC_PROG_MAKE_SET -missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -# AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -AC_PROG_CC -AC_PROG_CPP -AM_PROG_AS -AC_ISC_POSIX -AC_PROG_INSTALL -AC_PROG_AWK - -AM_PROG_LIBTOOL AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME", [A human readable text with the name of the OS]) From cvs at cvs.gnupg.org Sun Jun 12 22:19:54 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Jun 12 22:20:01 2005 Subject: gnupg/g10 (ChangeLog getkey.c) Message-ID: Date: Sunday, June 12, 2005 @ 22:42:04 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog getkey.c * getkey.c (merge_selfsigs_main, merge_selfsigs_subkey): Make sure that even after keys may be merged together, we only have one chosen selfsig. -----------+ ChangeLog | 6 ++++++ getkey.c | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.755 gnupg/g10/ChangeLog:1.756 --- gnupg/g10/ChangeLog:1.755 Fri Jun 10 05:15:25 2005 +++ gnupg/g10/ChangeLog Sun Jun 12 22:42:04 2005 @@ -1,3 +1,9 @@ +2005-06-12 David Shaw + + * getkey.c (merge_selfsigs_main, merge_selfsigs_subkey): Make sure + that even after keys may be merged together, we only have one + chosen selfsig. + 2005-06-09 David Shaw * options.h, import.c (parse_import_options, delete_inv_parts): Index: gnupg/g10/getkey.c diff -u gnupg/g10/getkey.c:1.128 gnupg/g10/getkey.c:1.129 --- gnupg/g10/getkey.c:1.128 Wed Jun 8 15:12:57 2005 +++ gnupg/g10/getkey.c Sun Jun 12 22:42:04 2005 @@ -1650,7 +1650,8 @@ if ( check_key_signature( keyblock, k, NULL ) ) ; /* signature did not verify */ else if ( (IS_UID_SIG (sig) || IS_UID_REV (sig)) - && sig->timestamp >= sigdate ) { + && sig->timestamp >= sigdate ) + { /* Note: we allow to invalidate cert revocations * by a newer signature. An attacker can't use this * because a key should be revoced with a key revocation. @@ -1662,9 +1663,10 @@ sigdate = sig->timestamp; signode = k; + signode->pkt->pkt.signature->flags.chosen_selfsig=0; if( sig->version > sigversion ) sigversion = sig->version; - } + } } } } @@ -1941,14 +1943,17 @@ * figure out other information like the old expiration * time */ } - else if ( IS_SUBKEY_SIG (sig) && sig->timestamp >= sigdate ) { + else if ( IS_SUBKEY_SIG (sig) && sig->timestamp >= sigdate ) + { if(sig->flags.expired) - ; /* signature has expired - ignore it */ - else { + ; /* signature has expired - ignore it */ + else + { sigdate = sig->timestamp; signode = k; - } - } + signode->pkt->pkt.signature->flags.chosen_selfsig=0; + } + } } } } From cvs at cvs.gnupg.org Sun Jun 12 22:55:33 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Jun 12 22:55:39 2005 Subject: gnupg/g10 (ChangeLog import.c options.h) Message-ID: Date: Sunday, June 12, 2005 @ 23:17:46 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog import.c options.h * options.h, import.c (parse_import_options, clean_sigs_from_all_uids, import_one): Add import-clean-sigs option to automatically clean a key when importing. Note that when importing a key that is already on the local keyring, the clean applies to the merged key - i.e. existing superceded or invalid signatures are removed. -----------+ ChangeLog | 7 +++++++ import.c | 47 +++++++++++++++++++++++++++++++++++++++++------ options.h | 1 + 3 files changed, 49 insertions(+), 6 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.756 gnupg/g10/ChangeLog:1.757 --- gnupg/g10/ChangeLog:1.756 Sun Jun 12 22:42:04 2005 +++ gnupg/g10/ChangeLog Sun Jun 12 23:17:46 2005 @@ -1,5 +1,12 @@ 2005-06-12 David Shaw + * options.h, import.c (parse_import_options, + clean_sigs_from_all_uids, import_one): Add import-clean-sigs + option to automatically clean a key when importing. Note that + when importing a key that is already on the local keyring, the + clean applies to the merged key - i.e. existing superceded or + invalid signatures are removed. + * getkey.c (merge_selfsigs_main, merge_selfsigs_subkey): Make sure that even after keys may be merged together, we only have one chosen selfsig. Index: gnupg/g10/import.c diff -u gnupg/g10/import.c:1.123 gnupg/g10/import.c:1.124 --- gnupg/g10/import.c:1.123 Fri Jun 10 05:15:25 2005 +++ gnupg/g10/import.c Sun Jun 12 23:17:46 2005 @@ -55,6 +55,7 @@ ulong secret_dups; ulong skipped_new_keys; ulong not_imported; + ulong n_sigs_cleaned; }; @@ -94,6 +95,8 @@ {"fast-import",IMPORT_FAST,NULL}, {"convert-sk-to-pk",IMPORT_SK2PK,NULL}, {"merge-only",IMPORT_MERGE_ONLY,NULL}, + {"import-clean",IMPORT_CLEAN_SIGS,NULL}, + {"import-clean-sigs",IMPORT_CLEAN_SIGS,NULL}, /* Aliases for backward compatibility */ {"allow-local-sigs",IMPORT_LOCAL_SIGS,NULL}, {"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL}, @@ -302,6 +305,8 @@ log_info(_(" secret keys unchanged: %lu\n"), stats->secret_dups ); if( stats->not_imported ) log_info(_(" not imported: %lu\n"), stats->not_imported ); + if( stats->n_sigs_cleaned) + log_info(_(" signatures cleaned: %lu\n"),stats->n_sigs_cleaned); } if( is_status_enabled() ) { @@ -649,6 +654,20 @@ } } +static int +clean_sigs_from_all_uids(KBNODE keyblock) +{ + KBNODE uidnode; + int deleted=0; + + for(uidnode=keyblock->next;uidnode;uidnode=uidnode->next) + if(uidnode->pkt->pkttype==PKT_USER_ID) + deleted+=clean_sigs_from_uid(keyblock,uidnode,opt.verbose); + + return deleted; +} + + /**************** * Try to import one keyblock. Return an error only in serious cases, but * never for an invalid keyblock. It uses log_error to increase the @@ -708,6 +727,13 @@ return 0; } + /* Clean the key that we're about to import, to cut down on things + that we have to clean later. This has no practical impact on + the end result, but does result in less logging which might + confuse the user. */ + if(options&IMPORT_CLEAN_SIGS) + clean_sigs_from_all_uids(keyblock); + clear_kbnode_flags( keyblock ); if((options&IMPORT_REPAIR_PKS_SUBKEY_BUG) && fix_pks_corruption(keyblock) @@ -808,7 +834,7 @@ } else { /* merge */ KEYDB_HANDLE hd; - int n_uids, n_sigs, n_subk; + int n_uids, n_sigs, n_subk, n_sigs_cleaned; /* Compare the original against the new key; just to be sure nothing * weird is going on */ @@ -849,14 +875,19 @@ /* and try to merge the block */ clear_kbnode_flags( keyblock_orig ); clear_kbnode_flags( keyblock ); - n_uids = n_sigs = n_subk = 0; + n_uids = n_sigs = n_subk = n_sigs_cleaned = 0; rc = merge_blocks( fname, keyblock_orig, keyblock, - keyid, &n_uids, &n_sigs, &n_subk ); - if( rc ) { + keyid, &n_uids, &n_sigs, &n_subk ); + if( rc ) + { keydb_release (hd); goto leave; - } - if( n_uids || n_sigs || n_subk ) { + } + + if(options&IMPORT_CLEAN_SIGS) + n_sigs_cleaned=clean_sigs_from_all_uids(keyblock_orig); + + if( n_uids || n_sigs || n_subk || n_sigs_cleaned) { mod_key = 1; /* keyblock_orig has been updated; write */ rc = keydb_update_keyblock (hd, keyblock_orig); @@ -888,12 +919,16 @@ else if( n_subk ) log_info( _("key %s: \"%s\" %d new subkeys\n"), keystr(keyid), p, n_subk ); + if(n_sigs_cleaned) + log_info(_("key %s: \"%s\" %d signatures cleaned\n"), + keystr(keyid),p,n_sigs_cleaned); m_free(p); } stats->n_uids +=n_uids; stats->n_sigs +=n_sigs; stats->n_subk +=n_subk; + stats->n_sigs_cleaned +=n_sigs_cleaned; if (is_status_enabled ()) print_import_ok (pk, NULL, Index: gnupg/g10/options.h diff -u gnupg/g10/options.h:1.142 gnupg/g10/options.h:1.143 --- gnupg/g10/options.h:1.142 Fri Jun 10 05:15:25 2005 +++ gnupg/g10/options.h Sun Jun 12 23:17:46 2005 @@ -251,6 +251,7 @@ #define IMPORT_FAST (1<<2) #define IMPORT_SK2PK (1<<3) #define IMPORT_MERGE_ONLY (1<<4) +#define IMPORT_CLEAN_SIGS (1<<5) #define EXPORT_LOCAL_SIGS (1<<0) #define EXPORT_ATTRIBUTES (1<<1) From cvs at cvs.gnupg.org Mon Jun 13 22:22:49 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Mon Jun 13 22:22:53 2005 Subject: gnupg (ChangeLog configure.ac) Message-ID: Date: Monday, June 13, 2005 @ 22:45:06 Author: dshaw Path: /cvs/gnupg/gnupg Modified: ChangeLog configure.ac * configure.ac: Add check for no-pointer-sign warning keyword, and disable. This is gcc4 specific. --------------+ ChangeLog | 5 +++++ configure.ac | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) Index: gnupg/ChangeLog diff -u gnupg/ChangeLog:1.251 gnupg/ChangeLog:1.252 --- gnupg/ChangeLog:1.251 Tue May 31 10:39:18 2005 +++ gnupg/ChangeLog Mon Jun 13 22:45:05 2005 @@ -1,3 +1,8 @@ +2005-06-13 David Shaw + + * configure.ac: Add check for no-pointer-sign warning keyword, and + disable. This is gcc4 specific. + 2005-05-31 Werner Koch Released 1.4.2rc1. Index: gnupg/configure.ac diff -u gnupg/configure.ac:1.143 gnupg/configure.ac:1.144 --- gnupg/configure.ac:1.143 Tue May 31 14:26:02 2005 +++ gnupg/configure.ac Mon Jun 13 22:45:05 2005 @@ -1214,7 +1214,7 @@ AC_SUBST(NETLIBS) AC_SUBST(W32LIBS) -# Special options used fith gcc. +# Special options used with gcc. if test "$GCC" = yes; then # Note that it is okay to use CFLAGS here because this are just # warning options and the user should have a chance of overriding @@ -1226,6 +1226,20 @@ CFLAGS="$CFLAGS -Wall" fi + AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign]) + + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wno-pointer-sign" + + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no) + AC_MSG_RESULT($_gcc_psign) + + CFLAGS=$_gcc_cflags_save; + + if test x"$_gcc_psign" = xyes ; then + CFLAGS="$CFLAGS -Wno-pointer-sign" + fi + # Non exec stack hack. Fixme: Write a test to check whether as # can cope with it and use the enable-noexecstack option only to # disable it in case it is required on sime platforms. From cvs at cvs.gnupg.org Tue Jun 14 05:32:59 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Tue Jun 14 05:33:06 2005 Subject: gnupg/g10 (ChangeLog import.c keygen.c options.h trustdb.c) Message-ID: Date: Tuesday, June 14, 2005 @ 05:55:19 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog import.c keygen.c options.h trustdb.c * keygen.c (save_unprotected_key_to_card): Fix gcc4 warning. * options.h, import.c (parse_import_options, import_one): Add import-clean-uids option to automatically compact unusable uids when importing. Like import-clean-sigs, this may nodify the local keyring. * trustdb.c (clean_uids_from_key): Only allow selfsigs to be a candidate for re-inclusion. -----------+ ChangeLog | 12 ++++++++++++ import.c | 30 +++++++++++++++++++++++++----- keygen.c | 2 +- options.h | 1 + trustdb.c | 8 ++++++-- 5 files changed, 45 insertions(+), 8 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.757 gnupg/g10/ChangeLog:1.758 --- gnupg/g10/ChangeLog:1.757 Sun Jun 12 23:17:46 2005 +++ gnupg/g10/ChangeLog Tue Jun 14 05:55:19 2005 @@ -1,3 +1,15 @@ +2005-06-13 David Shaw + + * keygen.c (save_unprotected_key_to_card): Fix gcc4 warning. + + * options.h, import.c (parse_import_options, import_one): Add + import-clean-uids option to automatically compact unusable uids + when importing. Like import-clean-sigs, this may nodify the local + keyring. + + * trustdb.c (clean_uids_from_key): Only allow selfsigs to be a + candidate for re-inclusion. + 2005-06-12 David Shaw * options.h, import.c (parse_import_options, Index: gnupg/g10/import.c diff -u gnupg/g10/import.c:1.124 gnupg/g10/import.c:1.125 --- gnupg/g10/import.c:1.124 Sun Jun 12 23:17:46 2005 +++ gnupg/g10/import.c Tue Jun 14 05:55:19 2005 @@ -56,6 +56,7 @@ ulong skipped_new_keys; ulong not_imported; ulong n_sigs_cleaned; + ulong n_uids_cleaned; }; @@ -95,8 +96,9 @@ {"fast-import",IMPORT_FAST,NULL}, {"convert-sk-to-pk",IMPORT_SK2PK,NULL}, {"merge-only",IMPORT_MERGE_ONLY,NULL}, - {"import-clean",IMPORT_CLEAN_SIGS,NULL}, + {"import-clean",IMPORT_CLEAN_SIGS|IMPORT_CLEAN_UIDS,NULL}, {"import-clean-sigs",IMPORT_CLEAN_SIGS,NULL}, + {"import-clean-uids",IMPORT_CLEAN_UIDS,NULL}, /* Aliases for backward compatibility */ {"allow-local-sigs",IMPORT_LOCAL_SIGS,NULL}, {"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL}, @@ -307,6 +309,8 @@ log_info(_(" not imported: %lu\n"), stats->not_imported ); if( stats->n_sigs_cleaned) log_info(_(" signatures cleaned: %lu\n"),stats->n_sigs_cleaned); + if( stats->n_uids_cleaned) + log_info(_(" user IDs cleaned: %lu\n"),stats->n_uids_cleaned); } if( is_status_enabled() ) { @@ -734,6 +738,9 @@ if(options&IMPORT_CLEAN_SIGS) clean_sigs_from_all_uids(keyblock); + if(options&IMPORT_CLEAN_UIDS) + clean_uids_from_key(keyblock,opt.verbose); + clear_kbnode_flags( keyblock ); if((options&IMPORT_REPAIR_PKS_SUBKEY_BUG) && fix_pks_corruption(keyblock) @@ -834,7 +841,7 @@ } else { /* merge */ KEYDB_HANDLE hd; - int n_uids, n_sigs, n_subk, n_sigs_cleaned; + int n_uids, n_sigs, n_subk, n_sigs_cleaned, n_uids_cleaned; /* Compare the original against the new key; just to be sure nothing * weird is going on */ @@ -875,7 +882,7 @@ /* and try to merge the block */ clear_kbnode_flags( keyblock_orig ); clear_kbnode_flags( keyblock ); - n_uids = n_sigs = n_subk = n_sigs_cleaned = 0; + n_uids = n_sigs = n_subk = n_sigs_cleaned = n_uids_cleaned = 0; rc = merge_blocks( fname, keyblock_orig, keyblock, keyid, &n_uids, &n_sigs, &n_subk ); if( rc ) @@ -887,7 +894,10 @@ if(options&IMPORT_CLEAN_SIGS) n_sigs_cleaned=clean_sigs_from_all_uids(keyblock_orig); - if( n_uids || n_sigs || n_subk || n_sigs_cleaned) { + if(options&IMPORT_CLEAN_UIDS) + n_uids_cleaned=clean_uids_from_key(keyblock_orig,opt.verbose); + + if( n_uids || n_sigs || n_subk || n_sigs_cleaned || n_uids_cleaned) { mod_key = 1; /* keyblock_orig has been updated; write */ rc = keydb_update_keyblock (hd, keyblock_orig); @@ -919,9 +929,18 @@ else if( n_subk ) log_info( _("key %s: \"%s\" %d new subkeys\n"), keystr(keyid), p, n_subk ); - if(n_sigs_cleaned) + if(n_sigs_cleaned==1) + log_info(_("key %s: \"%s\" %d signature cleaned\n"), + keystr(keyid),p,n_sigs_cleaned); + else if(n_sigs_cleaned) log_info(_("key %s: \"%s\" %d signatures cleaned\n"), keystr(keyid),p,n_sigs_cleaned); + if(n_uids_cleaned==1) + log_info(_("key %s: \"%s\" %d user ID cleaned\n"), + keystr(keyid),p,n_uids_cleaned); + else if(n_uids_cleaned) + log_info(_("key %s: \"%s\" %d user IDs cleaned\n"), + keystr(keyid),p,n_uids_cleaned); m_free(p); } @@ -929,6 +948,7 @@ stats->n_sigs +=n_sigs; stats->n_subk +=n_subk; stats->n_sigs_cleaned +=n_sigs_cleaned; + stats->n_uids_cleaned +=n_uids_cleaned; if (is_status_enabled ()) print_import_ok (pk, NULL, Index: gnupg/g10/keygen.c diff -u gnupg/g10/keygen.c:1.155 gnupg/g10/keygen.c:1.156 --- gnupg/g10/keygen.c:1.155 Tue May 31 10:39:16 2005 +++ gnupg/g10/keygen.c Tue Jun 14 05:55:19 2005 @@ -3543,7 +3543,7 @@ p = stpcpy (p,"))(10:created-at"); sprintf (numbuf2, "%lu", (unsigned long)sk->timestamp); - sprintf (numbuf, "%d:", strlen (numbuf2)); + sprintf (numbuf, "%u:", (unsigned int)strlen (numbuf2)); p = stpcpy (stpcpy (stpcpy (p, numbuf), numbuf2), "))"); rc = agent_scd_writekey (keyno, sexp, p - sexp); Index: gnupg/g10/options.h diff -u gnupg/g10/options.h:1.143 gnupg/g10/options.h:1.144 --- gnupg/g10/options.h:1.143 Sun Jun 12 23:17:46 2005 +++ gnupg/g10/options.h Tue Jun 14 05:55:19 2005 @@ -252,6 +252,7 @@ #define IMPORT_SK2PK (1<<3) #define IMPORT_MERGE_ONLY (1<<4) #define IMPORT_CLEAN_SIGS (1<<5) +#define IMPORT_CLEAN_UIDS (1<<6) #define EXPORT_LOCAL_SIGS (1<<0) #define EXPORT_ATTRIBUTES (1<<1) Index: gnupg/g10/trustdb.c diff -u gnupg/g10/trustdb.c:1.145 gnupg/g10/trustdb.c:1.146 --- gnupg/g10/trustdb.c:1.145 Fri Jun 10 05:00:57 2005 +++ gnupg/g10/trustdb.c Tue Jun 14 05:55:19 2005 @@ -1625,8 +1625,9 @@ otherwise, it's invalid */ if(noisy) - log_info("removing signature issued by key %s: %s\n", + log_info("removing signature from %s on uid \"%s\": %s\n", keystr(node->pkt->pkt.signature->keyid), + uidnode->pkt->pkt.user_id->name, node->flag&(1<<9)?"superceded":"invalid"); delete_kbnode(node); @@ -1655,10 +1656,12 @@ { int delete_until_next=0,deleted=0; KBNODE node,signode=NULL; - u32 sigdate=0; + u32 keyid[2],sigdate=0; assert(keyblock->pkt->pkttype==PKT_PUBLIC_KEY); + keyid_from_pk(keyblock->pkt->pkt.public_key,keyid); + merge_keys_and_selfsig(keyblock); for(node=keyblock->next; @@ -1713,6 +1716,7 @@ /* This isn't actually slow - the key signature validation is cached from merge_keys_and_selfsig() */ if(IS_UID_SIG(sig) && sig->timestamp>sigdate + && keyid[0]==sig->keyid[0] && keyid[1]==sig->keyid[1] && check_key_signature(keyblock,node,NULL)==0) { sigdate=sig->timestamp; From cvs at cvs.gnupg.org Wed Jun 15 10:31:09 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Wed Jun 15 10:31:14 2005 Subject: dirmngr/src (ChangeLog ldap.c server.c) Message-ID: Date: Wednesday, June 15, 2005 @ 10:53:36 Author: wk Path: /cvs/dirmngr/dirmngr/src Modified: ChangeLog ldap.c server.c (cmd_lookup): Take care of NO_DATA which might get returned also by start_cert_fetch(). -----------+ ChangeLog | 5 +++++ ldap.c | 2 +- server.c | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) Index: dirmngr/src/ChangeLog diff -u dirmngr/src/ChangeLog:1.48 dirmngr/src/ChangeLog:1.49 --- dirmngr/src/ChangeLog:1.48 Wed Apr 20 19:03:56 2005 +++ dirmngr/src/ChangeLog Wed Jun 15 10:53:35 2005 @@ -1,3 +1,8 @@ +2005-06-15 Werner Koch + + * server.c (cmd_lookup): Take care of NO_DATA which might get + returned also by start_cert_fetch(). + 2005-04-20 Werner Koch * ldap.c (ldap_wrapper_wait_connections): Set a shutdown flag. Index: dirmngr/src/ldap.c diff -u dirmngr/src/ldap.c:1.49 dirmngr/src/ldap.c:1.50 --- dirmngr/src/ldap.c:1.49 Wed Apr 20 19:03:56 2005 +++ dirmngr/src/ldap.c Wed Jun 15 10:53:35 2005 @@ -712,7 +712,7 @@ log_info (_("ldap wrapper %d started\n"), (int)ctx->pid); /* Need to wait for the first byte so we are able to detect an empty - output and not let the consumer se an EOF without further error + output and not let the consumer see an EOF without further error indications. The CRL loading logic assumes that after return from this function, a failed search (e.g. host not found ) is indicated right away. */ Index: dirmngr/src/server.c diff -u dirmngr/src/server.c:1.50 dirmngr/src/server.c:1.51 --- dirmngr/src/server.c:1.50 Wed Apr 20 19:03:56 2005 +++ dirmngr/src/server.c Wed Jun 15 10:53:35 2005 @@ -649,6 +649,7 @@ size_t valuelen; ldap_server_t ldapserver; cert_fetch_context_t fetch_context; + int any_no_data = 0; /* Break the line down into an STRLIST */ for (p=line; *p; line = p) @@ -686,6 +687,14 @@ /* Fetch certificates matching pattern */ err = start_cert_fetch (ctrl, &fetch_context, list, ldapserver); + if ( gpg_err_code (err) == GPG_ERR_NO_DATA ) + { + if (DBG_LOOKUP) + log_debug ("cmd_lookup: no data\n"); + err = 0; + any_no_data = 1; + continue; + } if (err) { log_error (_("start_cert_fetch failed: %s\n"), gpg_strerror (err)); @@ -697,6 +706,12 @@ { xfree (value); value = NULL; err = fetch_next_cert (fetch_context, &value, &valuelen); + if (gpg_err_code (err) == GPG_ERR_NO_DATA ) + { + err = 0; + any_no_data = 1; + break; /* Ready. */ + } if (gpg_err_code (err) == GPG_ERR_TRUNCATED) { truncated = 1; @@ -758,6 +773,9 @@ assuan_write_status (ctx, "TRUNCATED", str); } + if (!err && !count && any_no_data) + err = gpg_error (GPG_ERR_NO_DATA); + leave: if (err) log_error (_("command %s failed: %s\n"), "LOOKUP", gpg_strerror (err)); From cvs at cvs.gnupg.org Thu Jun 16 02:55:11 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Thu Jun 16 03:22:16 2005 Subject: libgpg-error/src (mkerrcodes.awk) Message-ID: Date: Thursday, June 16, 2005 @ 02:55:11 Author: marcus Path: /cvs/gnupg/libgpg-error/src Modified: mkerrcodes.awk 2005-06-16 Marcus Brinkmann * src/mkerrcodes.awk: Fix comment. Allow any non-empty line to start the processing, not only lines starting with numbers. Guillaume Libersat ----------------+ mkerrcodes.awk | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) From cvs at cvs.gnupg.org Thu Jun 16 02:55:11 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Thu Jun 16 03:27:15 2005 Subject: libgpg-error (ChangeLog) Message-ID: Date: Thursday, June 16, 2005 @ 02:55:11 Author: marcus Path: /cvs/gnupg/libgpg-error Modified: ChangeLog 2005-06-16 Marcus Brinkmann * src/mkerrcodes.awk: Fix comment. Allow any non-empty line to start the processing, not only lines starting with numbers. Guillaume Libersat -----------+ ChangeLog | 6 ++++++ 1 files changed, 6 insertions(+) From cvs at cvs.gnupg.org Thu Jun 16 02:28:27 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Thu Jun 16 03:27:28 2005 Subject: libgpg-error/po (ChangeLog de.po) Message-ID: Date: Thursday, June 16, 2005 @ 02:28:27 Author: marcus Path: /cvs/gnupg/libgpg-error/po Modified: ChangeLog de.po 2005-06-16 Marcus Brinkmann * de.po: Apply typo fixes from Debian #313977. -----------+ ChangeLog | 4 ++++ de.po | 58 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 33 insertions(+), 29 deletions(-) From cvs at cvs.gnupg.org Thu Jun 16 02:55:42 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Thu Jun 16 03:27:46 2005 Subject: libgpg-error (ChangeLog) Message-ID: Date: Thursday, June 16, 2005 @ 02:55:42 Author: marcus Path: /cvs/gnupg/libgpg-error Modified: ChangeLog Fix changelog. -----------+ ChangeLog | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) From cvs at cvs.gnupg.org Thu Jun 16 09:50:41 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Thu Jun 16 09:50:44 2005 Subject: LIBGCRYPT-1-2-BRANCH libgcrypt (12 files) Message-ID: Date: Thursday, June 16, 2005 @ 10:13:14 Author: wk Path: /cvs/libgcrypt/libgcrypt Tag: LIBGCRYPT-1-2-BRANCH Modified: NEWS cipher/ChangeLog cipher/cipher.c cipher/md.c cipher/random.c doc/ChangeLog doc/gcrypt.texi mpi/ChangeLog mpi/mpicoder.c src/ChangeLog src/gcrypt.h src/sexp.c * gcrypt.texi: Adjusted function prototypes. * mpicoder.c (gcry_mpi_scan): Changed arg BUFFER to void*. * gcrypt.h (gcry_mpi_scan): Changed arg BUFFER from unsigned char* to void*. ------------------+ NEWS | 14 ++++++++++++++ cipher/ChangeLog | 9 +++++++++ cipher/cipher.c | 8 ++++---- cipher/md.c | 7 ++++--- cipher/random.c | 4 ++-- doc/ChangeLog | 4 ++++ doc/gcrypt.texi | 12 ++++++------ mpi/ChangeLog | 4 ++++ mpi/mpicoder.c | 3 ++- src/ChangeLog | 16 ++++++++++++++++ src/gcrypt.h | 20 ++++++++++---------- src/sexp.c | 8 ++++---- 12 files changed, 79 insertions(+), 30 deletions(-) Index: libgcrypt/NEWS diff -u libgcrypt/NEWS:1.69.2.3 libgcrypt/NEWS:1.69.2.4 --- libgcrypt/NEWS:1.69.2.3 Wed Jan 5 17:44:35 2005 +++ libgcrypt/NEWS Thu Jun 16 10:13:13 2005 @@ -1,6 +1,20 @@ Noteworthy changes in version 1.2.2 ------------------------------------------------ + * Minor changes to some function declarations. Buffer arguments are + now typed as void pointer. This should not affect any compilation. + + * Interface changes relative to the 1.2.1 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + gcry_cipher_encrypt CHANGED: Arguments IN and OUT are now void*. + gcry_cipher_decrypt CHANGED: Arguments IN and OUT are now void*. + gcry_create_nonce CHANGED: Argument BUFFER is now void*. + gcry_md_ctl CHANGED: Argument BUFFER is now void*. + gcry_sexp_sprint CHANGED: Argument BUFFER is now void*. + gcry_mpi_scan CHANGED: Argument BUFFER is now void*. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Noteworthy changes in version 1.2.1 (2005-01-05) ------------------------------------------------ Index: libgcrypt/cipher/ChangeLog diff -u libgcrypt/cipher/ChangeLog:1.211.2.12 libgcrypt/cipher/ChangeLog:1.211.2.13 --- libgcrypt/cipher/ChangeLog:1.211.2.12 Sat Apr 16 19:32:43 2005 +++ libgcrypt/cipher/ChangeLog Thu Jun 16 10:13:13 2005 @@ -1,3 +1,12 @@ +2005-06-15 Werner Koch + + * cipher.c (gcry_cipher_encrypt, gcry_cipher_decrypt): Changed OUT + and IN to void*. + + * md.c (gcry_md_ctl): Changed arg BUFFER to void*. + * random.c (gcry_randomize): Ditto. + (gcry_create_nonce): Ditto. + 2005-04-16 Moritz Schulte * ac.c (_gcry_ac_init): New function. Index: libgcrypt/cipher/cipher.c diff -u libgcrypt/cipher/cipher.c:1.69.2.1 libgcrypt/cipher/cipher.c:1.69.2.2 --- libgcrypt/cipher/cipher.c:1.69.2.1 Sat Mar 19 18:58:13 2005 +++ libgcrypt/cipher/cipher.c Thu Jun 16 10:13:13 2005 @@ -1069,8 +1069,8 @@ * been requested. */ gcry_error_t -gcry_cipher_encrypt (gcry_cipher_hd_t h, byte *out, size_t outsize, - const byte *in, size_t inlen) +gcry_cipher_encrypt (gcry_cipher_hd_t h, void *out, size_t outsize, + const void *in, size_t inlen) { gcry_err_code_t err; @@ -1151,8 +1151,8 @@ gcry_error_t -gcry_cipher_decrypt (gcry_cipher_hd_t h, byte *out, size_t outsize, - const byte *in, size_t inlen) +gcry_cipher_decrypt (gcry_cipher_hd_t h, void *out, size_t outsize, + const void *in, size_t inlen) { gcry_err_code_t err = GPG_ERR_NO_ERROR; Index: libgcrypt/cipher/md.c diff -u libgcrypt/cipher/md.c:1.82 libgcrypt/cipher/md.c:1.82.2.1 --- libgcrypt/cipher/md.c:1.82 Fri Dec 19 20:49:35 2003 +++ libgcrypt/cipher/md.c Thu Jun 16 10:13:13 2005 @@ -798,8 +798,9 @@ } gcry_error_t -gcry_md_ctl (gcry_md_hd_t hd, int cmd, byte *buffer, size_t buflen) +gcry_md_ctl (gcry_md_hd_t hd, int cmd, void *buffer, size_t buflen) { + unsigned char *buf = (unsigned char *)buffer; gcry_err_code_t rc = 0; switch (cmd) @@ -808,10 +809,10 @@ md_final (hd); break; case GCRYCTL_SET_KEY: - rc = gcry_err_code (gcry_md_setkey (hd, buffer, buflen)); + rc = gcry_err_code (gcry_md_setkey (hd, buf, buflen)); break; case GCRYCTL_START_DUMP: - md_start_debug (hd, buffer); + md_start_debug (hd, buf); break; case GCRYCTL_STOP_DUMP: md_stop_debug( hd ); Index: libgcrypt/cipher/random.c diff -u libgcrypt/cipher/random.c:1.69.2.3 libgcrypt/cipher/random.c:1.69.2.4 --- libgcrypt/cipher/random.c:1.69.2.3 Wed Sep 15 12:23:04 2004 +++ libgcrypt/cipher/random.c Thu Jun 16 10:13:13 2005 @@ -358,7 +358,7 @@ 1 is strong enough for most usage, 2 is good for key generation stuff but may be very slow. */ void -gcry_randomize (byte *buffer, size_t length, enum gcry_random_level level) +gcry_randomize (void *buffer, size_t length, enum gcry_random_level level) { byte *p; int err; @@ -1098,7 +1098,7 @@ /* Create an unpredicable nonce of LENGTH bytes in BUFFER. */ void -gcry_create_nonce (unsigned char *buffer, size_t length) +gcry_create_nonce (void *buffer, size_t length) { static unsigned char nonce_buffer[20+8]; static int nonce_buffer_initialized = 0; Index: libgcrypt/doc/ChangeLog diff -u libgcrypt/doc/ChangeLog:1.38.2.5 libgcrypt/doc/ChangeLog:1.38.2.6 --- libgcrypt/doc/ChangeLog:1.38.2.5 Tue Feb 22 18:59:21 2005 +++ libgcrypt/doc/ChangeLog Thu Jun 16 10:13:13 2005 @@ -1,3 +1,7 @@ +2005-06-16 Werner Koch + + * gcrypt.texi: Adjusted function prototypes. + 2005-02-08 Werner Koch * gcrypt.texi: Fixed direntry. Index: libgcrypt/doc/gcrypt.texi diff -u libgcrypt/doc/gcrypt.texi:1.38.2.5 libgcrypt/doc/gcrypt.texi:1.38.2.6 --- libgcrypt/doc/gcrypt.texi:1.38.2.5 Tue Feb 22 18:59:21 2005 +++ libgcrypt/doc/gcrypt.texi Thu Jun 16 10:13:13 2005 @@ -1352,7 +1352,7 @@ following functions. They may be used as often as required to process all the data. -@deftypefun gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t @var{h}, unsigned char *{out}, size_t @var{outsize}, const unsigned char *@var{in}, size_t @var{inlen}) +@deftypefun gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t @var{h}, void *{out}, size_t @var{outsize}, const void *@var{in}, size_t @var{inlen}) @code{gcry_cipher_encrypt} is used to encrypt the data. This function can either work in place or with two buffers. It uses the cipher @@ -1372,7 +1372,7 @@ @end deftypefun -@deftypefun gcry_error_t gcry_cipher_decrypt (gcry_cipher_hd_t @var{h}, unsigned char *{out}, size_t @var{outsize}, const unsigned char *@var{in}, size_t @var{inlen}) +@deftypefun gcry_error_t gcry_cipher_decrypt (gcry_cipher_hd_t @var{h}, void *{out}, size_t @var{outsize}, const void *@var{in}, size_t @var{inlen}) @code{gcry_cipher_decrypt} is used to decrypt the data. This function can either work in place or with two buffers. It uses the cipher @@ -3003,7 +3003,7 @@ allocated in a ``secure'' area of the memory. @end deftypefun -@deftypefun void gcry_create_nonce (unsigned char *@var{buffer}, size_t @var{length}) +@deftypefun void gcry_create_nonce (void *@var{buffer}, size_t @var{length}) Fill @var{buffer} with @var{length} unpredictable bytes. This is commonly called a nonce and may also be used for initialization @@ -3129,7 +3129,7 @@ back into a regular external S-expression format and to show the structure for debugging. -@deftypefun size_t gcry_sexp_sprint (@w{gcry_sexp_t @var{sexp}}, @w{int @var{mode}}, @w{char *@var{buffer}}, @w{size_t @var{maxlength}}) +@deftypefun size_t gcry_sexp_sprint (@w{gcry_sexp_t @var{sexp}}, @w{int @var{mode}}, @w{void *@var{buffer}}, @w{size_t @var{maxlength}}) Copies the S-expression object @var{sexp} into @var{buffer} using the format specified in @var{mode}. @var{maxlength} must be set to the @@ -3231,7 +3231,7 @@ actual data with index @var{number} is returned and the length of this data will be stored to @var{datalen}. If there is no data at the given index or the index represents another list, @code{NULL} is returned. -@strong{Note:} The returned pointer is valid as long as @var{list} is +@strong{Take care:} The returned pointer is valid as long as @var{list} is not modified or released. @noindent @@ -3362,7 +3362,7 @@ The following functions are used to convert between an external representation of an MPI and the internal one of @acronym{Libgcrypt}. -@deftypefun int gcry_mpi_scan (@w{gcry_mpi_t *@var{r_mpi}}, @w{enum gcry_mpi_format @var{format}}, @w{const unsigned char *@var{buffer}}, @w{size_t @var{buflen}}, @w{size_t *@var{nscanned}}) +@deftypefun int gcry_mpi_scan (@w{gcry_mpi_t *@var{r_mpi}}, @w{enum gcry_mpi_format @var{format}}, @w{const void *@var{buffer}}, @w{size_t @var{buflen}}, @w{size_t *@var{nscanned}}) Convert the external representation of an integer stored in @var{buffer} with a length of @var{buflen} into a newly created MPI returned which Index: libgcrypt/mpi/ChangeLog diff -u libgcrypt/mpi/ChangeLog:1.89.2.4 libgcrypt/mpi/ChangeLog:1.89.2.5 --- libgcrypt/mpi/ChangeLog:1.89.2.4 Sun May 29 11:32:24 2005 +++ libgcrypt/mpi/ChangeLog Thu Jun 16 10:13:13 2005 @@ -1,3 +1,7 @@ +2005-06-16 Werner Koch + + * mpicoder.c (gcry_mpi_scan): Changed arg BUFFER to void*. + 2005-05-29 Moritz Schulte * mpiutil.c (gcry_mpi_randomize): Store random data in secure Index: libgcrypt/mpi/mpicoder.c diff -u libgcrypt/mpi/mpicoder.c:1.38 libgcrypt/mpi/mpicoder.c:1.38.4.1 --- libgcrypt/mpi/mpicoder.c:1.38 Mon Jul 28 14:06:40 2003 +++ libgcrypt/mpi/mpicoder.c Thu Jun 16 10:13:13 2005 @@ -333,8 +333,9 @@ bytes actually scanned after a successful operation. */ gcry_error_t gcry_mpi_scan( struct gcry_mpi **ret_mpi, enum gcry_mpi_format format, - const unsigned char *buffer, size_t buflen, size_t *nscanned ) + const void *buffer_arg, size_t buflen, size_t *nscanned ) { + const unsigned char *buffer = (const unsigned char*)buffer_arg; struct gcry_mpi *a = NULL; unsigned int len; int secure = (buffer && gcry_is_secure (buffer)); Index: libgcrypt/src/ChangeLog diff -u libgcrypt/src/ChangeLog:1.151.2.14 libgcrypt/src/ChangeLog:1.151.2.15 --- libgcrypt/src/ChangeLog:1.151.2.14 Sat Apr 16 19:33:40 2005 +++ libgcrypt/src/ChangeLog Thu Jun 16 10:13:13 2005 @@ -1,3 +1,19 @@ +2005-06-16 Werner Koch + + * gcrypt.h (gcry_mpi_scan): Changed arg BUFFER from unsigned char* + to void*. + +2005-06-15 Werner Koch + + * gcrypt.h, sexp.c (gcry_sexp_sprint): Changed arg BUFFER from + char* to void*. + * gcrypt.h (gcry_md_ctl): Changed arg BUFFER from unsigned char* + to void*. + (gcry_randomize): Ditto. + (gcry_create_nonce): Ditto. + (gcry_cipher_encrypt, gcry_cipher_decrypt): Changed args IN and + OUT from unsigned char* to void*. + 2005-04-16 Moritz Schulte * g10lib.h (_gcry_ac_init): Declare. Index: libgcrypt/src/gcrypt.h diff -u libgcrypt/src/gcrypt.h:1.125.2.7 libgcrypt/src/gcrypt.h:1.125.2.8 --- libgcrypt/src/gcrypt.h:1.125.2.7 Thu Apr 14 19:42:07 2005 +++ libgcrypt/src/gcrypt.h Thu Jun 16 10:13:13 2005 @@ -411,7 +411,7 @@ /* Copies the S-expression object SEXP into BUFFER using the format specified in MODE. */ -size_t gcry_sexp_sprint (gcry_sexp_t sexp, int mode, char *buffer, +size_t gcry_sexp_sprint (gcry_sexp_t sexp, int mode, void *buffer, size_t maxlength); /* Dumps the S-expression object A in a aformat suitable for debugging @@ -537,7 +537,7 @@ RET_MPI. If NSCANNED is not NULL, it will receive the number of bytes actually scanned after a successful operation. */ gcry_error_t gcry_mpi_scan (gcry_mpi_t *ret_mpi, enum gcry_mpi_format format, - const unsigned char *buffer, size_t buflen, + const void *buffer, size_t buflen, size_t *nscanned); /* Convert the big integer A into the external representation @@ -819,13 +819,13 @@ most algorithms it is possible to pass NULL for in and 0 for INLEN and do a in-place decryption of the data provided in OUT. */ gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t h, - unsigned char *out, size_t outsize, - const unsigned char *in, size_t inlen); + void *out, size_t outsize, + const void *in, size_t inlen); /* The counterpart to gcry_cipher_encrypt. */ gcry_error_t gcry_cipher_decrypt (gcry_cipher_hd_t h, - unsigned char *out, size_t outsize, - const unsigned char *in, size_t inlen); + void *out, size_t outsize, + const void *in, size_t inlen); /* Set key K of length L for the cipher handle H. (We have to cast away a const char* here - this catch-all ctl function was probably @@ -1210,8 +1210,8 @@ void gcry_md_reset (gcry_md_hd_t hd); /* Perform various operations on the digets object HD. */ -gcry_error_t gcry_md_ctl (gcry_md_hd_t hd, int cmd, unsigned char *buffer, - size_t buflen); +gcry_error_t gcry_md_ctl (gcry_md_hd_t hd, int cmd, + void *buffer, size_t buflen); /* Pass LENGTH bytes of data in BUFFER to the digest object HD so that it can update the digest values. This is the actual hash @@ -1332,7 +1332,7 @@ /* Fill BUFFER with LENGTH bytes of random, using random numbers of quality LEVEL. */ -void gcry_randomize (unsigned char *buffer, size_t length, +void gcry_randomize (void *buffer, size_t length, enum gcry_random_level level); /* Add the external random from BUFFER with LENGTH bytes into the @@ -1366,7 +1366,7 @@ /* Create an unpredicable nonce of LENGTH bytes in BUFFER. */ -void gcry_create_nonce (unsigned char *buffer, size_t length); +void gcry_create_nonce (void *buffer, size_t length); Index: libgcrypt/src/sexp.c diff -u libgcrypt/src/sexp.c:1.40.2.3 libgcrypt/src/sexp.c:1.40.2.4 --- libgcrypt/src/sexp.c:1.40.2.3 Thu Apr 14 19:51:42 2005 +++ libgcrypt/src/sexp.c Thu Jun 16 10:13:13 2005 @@ -1537,11 +1537,11 @@ * the required length is returned. */ size_t -gcry_sexp_sprint( const gcry_sexp_t list, int mode, - char *buffer, size_t maxlength ) +gcry_sexp_sprint (const gcry_sexp_t list, int mode, + void *buffer, size_t maxlength) { - static byte empty[3] = { ST_OPEN, ST_CLOSE, ST_STOP }; - const byte *s; + static unsigned char empty[3] = { ST_OPEN, ST_CLOSE, ST_STOP }; + const unsigned char *s; char *d; DATALEN n; char numbuf[20]; From cvs at cvs.gnupg.org Thu Jun 16 11:43:21 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Thu Jun 16 11:43:29 2005 Subject: LIBGCRYPT-1-2-BRANCH libgcrypt (21 files) Message-ID: Date: Thursday, June 16, 2005 @ 12:05:54 Author: wk Path: /cvs/libgcrypt/libgcrypt Tag: LIBGCRYPT-1-2-BRANCH Modified: NEWS cipher/ChangeLog cipher/blowfish.c cipher/cipher.c cipher/crc.c cipher/dsa.c cipher/elgamal.c cipher/md.c cipher/primegen.c cipher/random.c cipher/rmd160.c cipher/tiger.c mpi/ChangeLog mpi/mpicoder.c mpi/mpiutil.c src/ChangeLog src/gcrypt-module.h src/sexp.c tests/ChangeLog tests/basic.c tests/tsexp.c * cipher.c (gcry_cipher_register): Changed arg ALGORITHM_ID from unsigned int * to int*. * rmd160.c (_gcry_rmd160_mixblock): Applied cast. * tiger.c (round): Renamed to R to avoid conflict with builtin. * crc.c (crc32_write): Applied cast. * dsa.c (gen_k): Made RNDBUF unsigned. * elgamal.c (gen_k): Ditto. * blowfish.c (selftest): Added cast to constants. * random.c (rndpool, keypool): Made unsigned. (mix_pool): Changed char* to unsigned char*. * md.c (gcry_md_ctl): Use cast to fix signed/unsigned mismatch. * primegen.c (prime_generate_internal): Ditto. (is_prime): Made COUNT unsigned. * mpiutil.c (gcry_mpi_randomize): Made P unsigned. * mpicoder.c (gcry_mpi_scan): Changed arg BUFFER to void*. (mpi_read_from_buffer): Made BUFFER arg const. (gcry_mpi_scan): Removed now needless cast. Add cast for arg to mpi_fromstr. (gcry_mpi_print): Made TMP unsigned. * sexp.c (normalize): Made P unsigned. (gcry_sexp_nth_data): Cast return value to char*. (sexp_sscan): Fixed sign/usnigned conflicts. (whitespacep): Changed arg to char*. (unquote_string): Changed arg STRING to char*. * gcrypt-module.h (gcry_cipher_register): Changed arg ALGORITHM_ID from unsigned int * to int*. * basic.c (check_one_md): Made P unsigned. ---------------------+ NEWS | 2 cipher/ChangeLog | 16 +++++++ cipher/blowfish.c | 3 - cipher/cipher.c | 2 cipher/crc.c | 2 cipher/dsa.c | 2 cipher/elgamal.c | 2 cipher/md.c | 2 cipher/primegen.c | 12 ++--- cipher/random.c | 29 +++++++------ cipher/rmd160.c | 2 cipher/tiger.c | 18 ++++---- mpi/ChangeLog | 5 ++ mpi/mpicoder.c | 104 ++++++++++++++++++++++++++------------------------ mpi/mpiutil.c | 2 src/ChangeLog | 9 ++++ src/gcrypt-module.h | 2 src/sexp.c | 67 ++++++++++++++++---------------- tests/ChangeLog | 4 + tests/basic.c | 10 ++-- tests/tsexp.c | 5 +- 21 files changed, 174 insertions(+), 126 deletions(-) Index: libgcrypt/NEWS diff -u libgcrypt/NEWS:1.69.2.4 libgcrypt/NEWS:1.69.2.5 --- libgcrypt/NEWS:1.69.2.4 Thu Jun 16 10:13:13 2005 +++ libgcrypt/NEWS Thu Jun 16 12:05:54 2005 @@ -3,6 +3,7 @@ * Minor changes to some function declarations. Buffer arguments are now typed as void pointer. This should not affect any compilation. + A bug in the definition of gcry_cipher_register has been fixed. * Interface changes relative to the 1.2.1 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -12,6 +13,7 @@ gcry_md_ctl CHANGED: Argument BUFFER is now void*. gcry_sexp_sprint CHANGED: Argument BUFFER is now void*. gcry_mpi_scan CHANGED: Argument BUFFER is now void*. + gcry_cipher_register CHANGED: Argument ALGORITHM_ID is now int*. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Index: libgcrypt/cipher/ChangeLog diff -u libgcrypt/cipher/ChangeLog:1.211.2.13 libgcrypt/cipher/ChangeLog:1.211.2.14 --- libgcrypt/cipher/ChangeLog:1.211.2.13 Thu Jun 16 10:13:13 2005 +++ libgcrypt/cipher/ChangeLog Thu Jun 16 12:05:54 2005 @@ -1,3 +1,19 @@ +2005-06-16 Werner Koch + + * cipher.c (gcry_cipher_register): Changed arg ALGORITHM_ID + from unsigned int * to int*. + * rmd160.c (_gcry_rmd160_mixblock): Applied cast. + * tiger.c (round): Renamed to R to avoid conflict with builtin. + * crc.c (crc32_write): Applied cast. + * dsa.c (gen_k): Made RNDBUF unsigned. + * elgamal.c (gen_k): Ditto. + * blowfish.c (selftest): Added cast to constants. + * random.c (rndpool, keypool): Made unsigned. + (mix_pool): Changed char* to unsigned char*. + * md.c (gcry_md_ctl): Use cast to fix signed/unsigned mismatch. + * primegen.c (prime_generate_internal): Ditto. + (is_prime): Made COUNT unsigned. + 2005-06-15 Werner Koch * cipher.c (gcry_cipher_encrypt, gcry_cipher_decrypt): Changed OUT Index: libgcrypt/cipher/blowfish.c diff -u libgcrypt/cipher/blowfish.c:1.38 libgcrypt/cipher/blowfish.c:1.38.2.1 --- libgcrypt/cipher/blowfish.c:1.38 Tue Dec 9 15:10:32 2003 +++ libgcrypt/cipher/blowfish.c Thu Jun 16 12:05:54 2005 @@ -473,7 +473,8 @@ byte key3[] = { 0x41, 0x79, 0x6E, 0xA0, 0x52, 0x61, 0x6E, 0xE4 }; byte cipher3[] = { 0xE1, 0x13, 0xF4, 0x10, 0x2C, 0xFC, 0xCE, 0x43 }; - bf_setkey( (void *) &c, "abcdefghijklmnopqrstuvwxyz", 26 ); + bf_setkey( (void *) &c, + (const unsigned char*)"abcdefghijklmnopqrstuvwxyz", 26 ); encrypt_block( (void *) &c, buffer, plain ); if( memcmp( buffer, "\x32\x4E\xD0\xFE\xF4\x13\xA2\x03", 8 ) ) return "Blowfish selftest failed (1)."; Index: libgcrypt/cipher/cipher.c diff -u libgcrypt/cipher/cipher.c:1.69.2.2 libgcrypt/cipher/cipher.c:1.69.2.3 --- libgcrypt/cipher/cipher.c:1.69.2.2 Thu Jun 16 10:13:13 2005 +++ libgcrypt/cipher/cipher.c Thu Jun 16 12:05:54 2005 @@ -250,7 +250,7 @@ and a pointer representhing this module is stored in MODULE. */ gcry_error_t gcry_cipher_register (gcry_cipher_spec_t *cipher, - unsigned int *algorithm_id, + int *algorithm_id, gcry_module_t *module) { gcry_err_code_t err = 0; Index: libgcrypt/cipher/crc.c diff -u libgcrypt/cipher/crc.c:1.6 libgcrypt/cipher/crc.c:1.6.2.1 --- libgcrypt/cipher/crc.c:1.6 Mon Oct 27 14:08:04 2003 +++ libgcrypt/cipher/crc.c Thu Jun 16 12:05:54 2005 @@ -161,7 +161,7 @@ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context; if (!inbuf) return; - ctx->CRC = update_crc32 (ctx->CRC, inbuf, inlen); + ctx->CRC = update_crc32 (ctx->CRC, (char*)inbuf, inlen); } static byte * Index: libgcrypt/cipher/dsa.c diff -u libgcrypt/cipher/dsa.c:1.41 libgcrypt/cipher/dsa.c:1.41.2.1 --- libgcrypt/cipher/dsa.c:1.41 Tue Dec 9 15:10:32 2003 +++ libgcrypt/cipher/dsa.c Thu Jun 16 12:05:53 2005 @@ -88,7 +88,7 @@ gcry_mpi_t k = mpi_alloc_secure( mpi_get_nlimbs(q) ); unsigned int nbits = mpi_get_nbits(q); unsigned int nbytes = (nbits+7)/8; - char *rndbuf = NULL; + unsigned char *rndbuf = NULL; if ( DBG_CIPHER ) log_debug("choosing a random k "); Index: libgcrypt/cipher/elgamal.c diff -u libgcrypt/cipher/elgamal.c:1.52 libgcrypt/cipher/elgamal.c:1.52.2.1 --- libgcrypt/cipher/elgamal.c:1.52 Tue Dec 9 15:10:32 2003 +++ libgcrypt/cipher/elgamal.c Thu Jun 16 12:05:53 2005 @@ -167,7 +167,7 @@ gcry_mpi_t p_1 = mpi_copy(p); unsigned int orig_nbits = mpi_get_nbits(p); unsigned int nbits, nbytes; - char *rndbuf = NULL; + unsigned char *rndbuf = NULL; if (small_k) { Index: libgcrypt/cipher/md.c diff -u libgcrypt/cipher/md.c:1.82.2.1 libgcrypt/cipher/md.c:1.82.2.2 --- libgcrypt/cipher/md.c:1.82.2.1 Thu Jun 16 10:13:13 2005 +++ libgcrypt/cipher/md.c Thu Jun 16 12:05:53 2005 @@ -812,7 +812,7 @@ rc = gcry_err_code (gcry_md_setkey (hd, buf, buflen)); break; case GCRYCTL_START_DUMP: - md_start_debug (hd, buf); + md_start_debug (hd, (char*)buf); break; case GCRYCTL_STOP_DUMP: md_stop_debug( hd ); Index: libgcrypt/cipher/primegen.c diff -u libgcrypt/cipher/primegen.c:1.55 libgcrypt/cipher/primegen.c:1.55.2.1 --- libgcrypt/cipher/primegen.c:1.55 Fri Feb 20 19:32:40 2004 +++ libgcrypt/cipher/primegen.c Thu Jun 16 12:05:53 2005 @@ -41,7 +41,7 @@ void *extra_check_arg); static int check_prime( gcry_mpi_t prime, gcry_mpi_t val_2, gcry_prime_check_func_t cb_func, void *cb_arg ); -static int is_prime( gcry_mpi_t n, int steps, int *count ); +static int is_prime( gcry_mpi_t n, int steps, unsigned int *count ); static void m_out_of_n( char *array, int m, int n ); static void (*progress_cb) (void *,const char*,int,int, int ); @@ -313,7 +313,7 @@ } else { - m_out_of_n (perms, n, m); + m_out_of_n ((char*)perms, n, m); for (i = j = 0; (i < m) && (j < n); i++) if (perms[i]) { @@ -534,8 +534,8 @@ { gcry_mpi_t prime, ptest, pminus1, val_2, val_3, result; int i; - unsigned x, step; - unsigned count1, count2; + unsigned int x, step; + unsigned int count1, count2; int *mods; /* if ( DBG_CIPHER ) */ @@ -644,7 +644,7 @@ { int i; unsigned int x; - int count=0; + unsigned int count=0; /* Check against small primes. */ for (i=0; (x = small_prime_numbers[i]); i++ ) @@ -689,7 +689,7 @@ * Return true if n is probably a prime */ static int -is_prime (gcry_mpi_t n, int steps, int *count) +is_prime (gcry_mpi_t n, int steps, unsigned int *count) { gcry_mpi_t x = mpi_alloc( mpi_get_nlimbs( n ) ); gcry_mpi_t y = mpi_alloc( mpi_get_nlimbs( n ) ); Index: libgcrypt/cipher/random.c diff -u libgcrypt/cipher/random.c:1.69.2.4 libgcrypt/cipher/random.c:1.69.2.5 --- libgcrypt/cipher/random.c:1.69.2.4 Thu Jun 16 10:13:13 2005 +++ libgcrypt/cipher/random.c Thu Jun 16 12:05:53 2005 @@ -88,8 +88,8 @@ static int is_initialized; #define MASK_LEVEL(a) do { (a) &= 3; } while(0) -static char *rndpool; /* allocated size is POOLSIZE+BLOCKLEN */ -static char *keypool; /* allocated size is POOLSIZE+BLOCKLEN */ +static unsigned char *rndpool; /* allocated size is POOLSIZE+BLOCKLEN */ +static unsigned char *keypool; /* allocated size is POOLSIZE+BLOCKLEN */ static size_t pool_readpos; static size_t pool_writepos; static int pool_filled; @@ -452,13 +452,13 @@ Note, that this function muts only be called with a locked pool. */ static void -mix_pool(byte *pool) +mix_pool (unsigned char *pool) { static unsigned char failsafe_digest[DIGESTLEN]; static int failsafe_digest_valid; - char *hashbuf = pool + POOLSIZE; - char *p, *pend; + unsigned char *hashbuf = pool + POOLSIZE; + unsigned char *p, *pend; int i, n; RMD160_CONTEXT md; @@ -473,10 +473,10 @@ pend = pool + POOLSIZE; memcpy(hashbuf, pend - DIGESTLEN, DIGESTLEN ); memcpy(hashbuf+DIGESTLEN, pool, BLOCKLEN-DIGESTLEN); - _gcry_rmd160_mixblock( &md, hashbuf); + _gcry_rmd160_mixblock( &md, (char*)hashbuf); memcpy(pool, hashbuf, 20 ); - if (failsafe_digest_valid && (char *)pool == rndpool) + if (failsafe_digest_valid && pool == rndpool) { for (i=0; i < 20; i++) pool[i] ^= failsafe_digest[i]; @@ -492,7 +492,7 @@ memcpy (hashbuf+DIGESTLEN, p+DIGESTLEN, BLOCKLEN-DIGESTLEN); else { - char *pp = p + DIGESTLEN; + unsigned char *pp = p + DIGESTLEN; for (i=DIGESTLEN; i < BLOCKLEN; i++ ) { @@ -502,7 +502,7 @@ } } - _gcry_rmd160_mixblock( &md, hashbuf); + _gcry_rmd160_mixblock( &md, (char*)hashbuf); memcpy(p, hashbuf, 20 ); } @@ -510,9 +510,10 @@ of the pool on the stack, so it is okay not to require secure memory here. Before we use this pool, it will be copied to the help buffer anyway. */ - if ( (char*)pool == rndpool) + if ( pool == rndpool) { - _gcry_rmd160_hash_buffer (failsafe_digest, pool, POOLSIZE); + _gcry_rmd160_hash_buffer ((char*)failsafe_digest, + (char*)pool, POOLSIZE); failsafe_digest_valid = 1; } @@ -633,7 +634,7 @@ void _gcry_update_random_seed_file() { - ulong *sp, *dp; + unsigned long *sp, *dp; int fd, i; int err; @@ -1143,8 +1144,8 @@ and updating the first 20 bytes of the buffer with this hash. */ for (p = buffer; length > 0; length -= n, p += n) { - _gcry_sha1_hash_buffer (nonce_buffer, - nonce_buffer, sizeof nonce_buffer); + _gcry_sha1_hash_buffer ((char*)nonce_buffer, + (char*)nonce_buffer, sizeof nonce_buffer); n = length > 20? 20 : length; memcpy (p, nonce_buffer, n); } Index: libgcrypt/cipher/rmd160.c diff -u libgcrypt/cipher/rmd160.c:1.34 libgcrypt/cipher/rmd160.c:1.34.2.1 --- libgcrypt/cipher/rmd160.c:1.34 Thu Dec 11 16:46:12 2003 +++ libgcrypt/cipher/rmd160.c Thu Jun 16 12:05:53 2005 @@ -447,7 +447,7 @@ { char *p = buffer; - transform( hd, buffer ); + transform( hd, (unsigned char *)buffer ); #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0) X(0); X(1); Index: libgcrypt/cipher/tiger.c diff -u libgcrypt/cipher/tiger.c:1.28 libgcrypt/cipher/tiger.c:1.28.2.1 --- libgcrypt/cipher/tiger.c:1.28 Thu Dec 11 16:46:12 2003 +++ libgcrypt/cipher/tiger.c Thu Jun 16 12:05:53 2005 @@ -600,7 +600,7 @@ } static void -round( u64 *ra, u64 *rb, u64 *rc, u64 x, int mul ) +R( u64 *ra, u64 *rb, u64 *rc, u64 x, int mul ) { u64 a = *ra; u64 b = *rb; @@ -626,14 +626,14 @@ u64 b = *rb; u64 c = *rc; - round( &a, &b, &c, x[0], mul ); - round( &b, &c, &a, x[1], mul ); - round( &c, &a, &b, x[2], mul ); - round( &a, &b, &c, x[3], mul ); - round( &b, &c, &a, x[4], mul ); - round( &c, &a, &b, x[5], mul ); - round( &a, &b, &c, x[6], mul ); - round( &b, &c, &a, x[7], mul ); + R( &a, &b, &c, x[0], mul ); + R( &b, &c, &a, x[1], mul ); + R( &c, &a, &b, x[2], mul ); + R( &a, &b, &c, x[3], mul ); + R( &b, &c, &a, x[4], mul ); + R( &c, &a, &b, x[5], mul ); + R( &a, &b, &c, x[6], mul ); + R( &b, &c, &a, x[7], mul ); *ra = a; *rb = b; Index: libgcrypt/mpi/ChangeLog diff -u libgcrypt/mpi/ChangeLog:1.89.2.5 libgcrypt/mpi/ChangeLog:1.89.2.6 --- libgcrypt/mpi/ChangeLog:1.89.2.5 Thu Jun 16 10:13:13 2005 +++ libgcrypt/mpi/ChangeLog Thu Jun 16 12:05:53 2005 @@ -1,6 +1,11 @@ 2005-06-16 Werner Koch + * mpiutil.c (gcry_mpi_randomize): Made P unsigned. * mpicoder.c (gcry_mpi_scan): Changed arg BUFFER to void*. + (mpi_read_from_buffer): Made BUFFER arg const. + (gcry_mpi_scan): Removed now needless cast. Add cast for arg to + mpi_fromstr. + (gcry_mpi_print): Made TMP unsigned. 2005-05-29 Moritz Schulte Index: libgcrypt/mpi/mpicoder.c diff -u libgcrypt/mpi/mpicoder.c:1.38.4.1 libgcrypt/mpi/mpicoder.c:1.38.4.2 --- libgcrypt/mpi/mpicoder.c:1.38.4.1 Thu Jun 16 10:13:13 2005 +++ libgcrypt/mpi/mpicoder.c Thu Jun 16 12:05:53 2005 @@ -32,50 +32,55 @@ static gcry_mpi_t -mpi_read_from_buffer(byte *buffer, unsigned *ret_nread, int secure) +mpi_read_from_buffer (const unsigned char *buffer, unsigned int *ret_nread, + int secure) { - int i, j; - unsigned int nbits, nbytes, nlimbs, nread=0; - mpi_limb_t a; - gcry_mpi_t val = MPI_NULL; - - if( *ret_nread < 2 ) - goto leave; - nbits = buffer[0] << 8 | buffer[1]; - if( nbits > MAX_EXTERN_MPI_BITS ) { - log_error("mpi too large (%u bits)\n", nbits); - goto leave; - } - else if( !nbits ) { - log_error("an mpi of size 0 is not allowed\n"); - goto leave; + int i, j; + unsigned int nbits, nbytes, nlimbs, nread=0; + mpi_limb_t a; + gcry_mpi_t val = MPI_NULL; + + if (*ret_nread < 2) + goto leave; + nbits = buffer[0] << 8 | buffer[1]; + if (nbits > MAX_EXTERN_MPI_BITS) + { + log_error ("mpi too large (%u bits)\n", nbits); + goto leave; } - buffer += 2; - nread = 2; - - nbytes = (nbits+7) / 8; - nlimbs = (nbytes+BYTES_PER_MPI_LIMB-1) / BYTES_PER_MPI_LIMB; - val = secure? mpi_alloc_secure( nlimbs ) - : mpi_alloc( nlimbs ); - i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; - i %= BYTES_PER_MPI_LIMB; - j= val->nlimbs = nlimbs; - val->sign = 0; - for( ; j > 0; j-- ) { - a = 0; - for(; i < BYTES_PER_MPI_LIMB; i++ ) { - if( ++nread > *ret_nread ) - log_bug("mpi larger than buffer"); - a <<= 8; - a |= *buffer++; - } - i = 0; - val->d[j-1] = a; + else if (!nbits) + { + log_error ("an mpi of size 0 is not allowed\n"); + goto leave; + } + buffer += 2; + nread = 2; + + nbytes = (nbits+7) / 8; + nlimbs = (nbytes+BYTES_PER_MPI_LIMB-1) / BYTES_PER_MPI_LIMB; + val = secure? mpi_alloc_secure( nlimbs ) + : mpi_alloc( nlimbs ); + i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; + i %= BYTES_PER_MPI_LIMB; + j= val->nlimbs = nlimbs; + val->sign = 0; + for( ; j > 0; j-- ) + { + a = 0; + for (; i < BYTES_PER_MPI_LIMB; i++ ) + { + if ( ++nread > *ret_nread ) + log_bug ("mpi larger than buffer"); + a <<= 8; + a |= *buffer++; + } + i = 0; + val->d[j-1] = a; } - leave: - *ret_nread = nread; - return val; + leave: + *ret_nread = nread; + return val; } @@ -385,7 +390,7 @@ return gcry_error (GPG_ERR_NO_ERROR); } else if( format == GCRYMPI_FMT_PGP ) { - a = mpi_read_from_buffer( (char*)buffer, &len, secure); + a = mpi_read_from_buffer (buffer, &len, secure); if( nscanned ) *nscanned = len; if( ret_mpi && a ) { @@ -397,7 +402,7 @@ return gcry_error (a ? GPG_ERR_NO_ERROR : GPG_ERR_INV_OBJ); } else if( format == GCRYMPI_FMT_SSH ) { - const byte *s = buffer; + const unsigned char *s = buffer; size_t n; if( len && len < 4 ) @@ -438,7 +443,7 @@ return gcry_error (GPG_ERR_INV_ARG); /* can only handle C strings for now */ a = secure? mpi_alloc_secure (0) : mpi_alloc(0); - if( mpi_fromstr( a, buffer ) ) + if( mpi_fromstr ( a, (const char *)buffer ) ) return gcry_error (GPG_ERR_INV_OBJ); if( ret_mpi ) { mpi_normalize ( a ); @@ -473,7 +478,7 @@ len = buflen; *nwritten = 0; if( format == GCRYMPI_FMT_STD ) { - char *tmp; + unsigned char *tmp; int extra = 0; unsigned int n; @@ -487,8 +492,9 @@ } if (buffer && n > len) { + /* The provided buffer is too short. */ gcry_free(tmp); - return gcry_error (GPG_ERR_TOO_SHORT); /* the provided buffer is too short */ + return gcry_error (GPG_ERR_TOO_SHORT); } if( buffer ) { byte *s = buffer; @@ -510,7 +516,7 @@ if (buffer && n > len) return gcry_error (GPG_ERR_TOO_SHORT); /* the provided buffer is too short */ if( buffer ) { - char *tmp; + unsigned char *tmp; tmp = _gcry_mpi_get_buffer( a, &n, NULL ); memcpy( buffer, tmp, n ); gcry_free(tmp); @@ -527,8 +533,8 @@ if (buffer && n+2 > len) return gcry_error (GPG_ERR_TOO_SHORT); /* the provided buffer is too short */ if( buffer ) { - char *tmp; - byte *s = buffer; + unsigned char *tmp; + unsigned char *s = buffer; s[0] = nbits >> 8; s[1] = nbits; @@ -540,7 +546,7 @@ return gcry_error (GPG_ERR_NO_ERROR); } else if( format == GCRYMPI_FMT_SSH ) { - char *tmp; + unsigned char *tmp; int extra = 0; unsigned int n; Index: libgcrypt/mpi/mpiutil.c diff -u libgcrypt/mpi/mpiutil.c:1.38.2.2 libgcrypt/mpi/mpiutil.c:1.38.2.3 --- libgcrypt/mpi/mpiutil.c:1.38.2.2 Sun May 29 11:32:24 2005 +++ libgcrypt/mpi/mpiutil.c Thu Jun 16 12:05:53 2005 @@ -377,7 +377,7 @@ gcry_mpi_randomize( gcry_mpi_t w, unsigned int nbits, enum gcry_random_level level ) { - char *p; + unsigned char *p; size_t nbytes = (nbits+7)/8; if (level == GCRY_WEAK_RANDOM) Index: libgcrypt/src/ChangeLog diff -u libgcrypt/src/ChangeLog:1.151.2.15 libgcrypt/src/ChangeLog:1.151.2.16 --- libgcrypt/src/ChangeLog:1.151.2.15 Thu Jun 16 10:13:13 2005 +++ libgcrypt/src/ChangeLog Thu Jun 16 12:05:53 2005 @@ -1,5 +1,14 @@ 2005-06-16 Werner Koch + * sexp.c (normalize): Made P unsigned. + (gcry_sexp_nth_data): Cast return value to char*. + (sexp_sscan): Fixed sign/usnigned conflicts. + (whitespacep): Changed arg to char*. + (unquote_string): Changed arg STRING to char*. + + * gcrypt-module.h (gcry_cipher_register): Changed arg ALGORITHM_ID + from unsigned int * to int*. + * gcrypt.h (gcry_mpi_scan): Changed arg BUFFER from unsigned char* to void*. Index: libgcrypt/src/gcrypt-module.h diff -u libgcrypt/src/gcrypt-module.h:1.1 libgcrypt/src/gcrypt-module.h:1.1.4.1 --- libgcrypt/src/gcrypt-module.h:1.1 Mon Jul 28 12:17:44 2003 +++ libgcrypt/src/gcrypt-module.h Thu Jun 16 12:05:53 2005 @@ -89,7 +89,7 @@ CIPHER. On success, a new algorithm ID is stored in ALGORITHM_ID and a pointer representhing this module is stored in MODULE. */ gcry_error_t gcry_cipher_register (gcry_cipher_spec_t *cipher, - unsigned int *algorithm_id, + int *algorithm_id, gcry_module_t *module); /* Unregister the cipher identified by MODULE, which must have been Index: libgcrypt/src/sexp.c diff -u libgcrypt/src/sexp.c:1.40.2.4 libgcrypt/src/sexp.c:1.40.2.5 --- libgcrypt/src/sexp.c:1.40.2.4 Thu Jun 16 10:13:13 2005 +++ libgcrypt/src/sexp.c Thu Jun 16 12:05:53 2005 @@ -66,7 +66,7 @@ to the S-expressions definition. */ #undef whitespacep static GPG_ERR_INLINE int -whitespacep (const unsigned char *p) +whitespacep (const char *p) { switch (*p) { @@ -172,22 +172,23 @@ static gcry_sexp_t normalize ( gcry_sexp_t list ) { - char *p; - if ( !list ) - return NULL; - p = list->d; - if ( *p == ST_STOP ) { - /* this is "" */ - gcry_sexp_release ( list ); - return NULL; - } - if( *p == ST_OPEN && p[1] == ST_CLOSE ) { - /* this is "()" */ - gcry_sexp_release ( list ); - return NULL; - } + unsigned char *p; - return list; + if ( !list ) + return NULL; + p = list->d; + if ( *p == ST_STOP ) { + /* this is "" */ + gcry_sexp_release ( list ); + return NULL; + } + if( *p == ST_OPEN && p[1] == ST_CLOSE ) { + /* this is "()" */ + gcry_sexp_release ( list ); + return NULL; + } + + return list; } /* Create a new S-expression object by reading LENGTH bytes from @@ -559,7 +560,7 @@ const char * gcry_sexp_nth_data( const gcry_sexp_t list, int number, size_t *datalen ) { - const byte *p; + const unsigned char *p; DATALEN n; int level = 0; @@ -600,7 +601,7 @@ if ( *p == ST_DATA ) { memcpy ( &n, ++p, sizeof n ); *datalen = n; - return p + sizeof n; + return (const char*)p + sizeof n; } return NULL; @@ -751,7 +752,7 @@ static int -hextobyte( const byte *s ) +hextobyte( const unsigned char *s ) { int c=0; @@ -773,10 +774,11 @@ return c; } -struct make_space_ctx { - gcry_sexp_t sexp; - size_t allocated; - byte *pos; +struct make_space_ctx +{ + gcry_sexp_t sexp; + size_t allocated; + unsigned char *pos; }; static void @@ -801,8 +803,9 @@ quotes are must already be removed from STRING. We assume that the quoted string is syntacillay correct. */ static size_t -unquote_string (const unsigned char *string, size_t length, unsigned char *buf) +unquote_string (const char *string_arg, size_t length, unsigned char *buf) { + const unsigned char *string = (const unsigned char*)string_arg; int esc = 0; const unsigned char *s = string; unsigned char *d = buf; @@ -1040,7 +1043,7 @@ { /* Keep it easy - we know that the unquoted string will never be larger. */ - char *save; + unsigned char *save; size_t len; quoted++; /* Skip leading quote. */ @@ -1074,7 +1077,7 @@ { if (whitespacep (hexfmt)) continue; - *c.pos++ = hextobyte (hexfmt); + *c.pos++ = hextobyte ((const unsigned char*)hexfmt); hexfmt++; } hexfmt = NULL; @@ -1453,7 +1456,7 @@ { *dest++ = '#'; for (i=0; i < len; i++, dest += 2 ) - sprintf (dest, "%02X", src[i]); + sprintf ((char*)dest, "%02X", src[i]); *dest++ = '#'; } return len*2+2; @@ -1482,7 +1485,7 @@ default: if ( (*s < 0x20 || (*s >= 0x7f && *s <= 0xa0))) { - sprintf (p, "\\x%02x", *s); + sprintf ((char*)p, "\\x%02x", *s); p += 4; } else @@ -1623,9 +1626,9 @@ return 0; switch (type) { - case 1: convert_to_string (s, n, d); break; - case 2: convert_to_token (s, n, d); break; - default: convert_to_hex (s, n, d); break; + case 1: convert_to_string (s, n, (unsigned char*)d); break; + case 2: convert_to_token (s, n, (unsigned char*)d); break; + default: convert_to_hex (s, n, (unsigned char*)d); break; } d += nn; } @@ -1781,7 +1784,7 @@ *errcode = gcry_error (GPG_ERR_SEXP_NESTED_DH); return 0; } - disphint = p; + disphint = (const char*)p; } else if (*p == ']') { Index: libgcrypt/tests/ChangeLog diff -u libgcrypt/tests/ChangeLog:1.50 libgcrypt/tests/ChangeLog:1.50.2.1 --- libgcrypt/tests/ChangeLog:1.50 Wed Mar 3 09:08:05 2004 +++ libgcrypt/tests/ChangeLog Thu Jun 16 12:05:53 2005 @@ -1,3 +1,7 @@ +2005-06-16 Werner Koch + + * basic.c (check_one_md): Made P unsigned. + 2004-02-25 Werner Koch * Makefile.am (TEST): Add benchmark. Index: libgcrypt/tests/basic.c diff -u libgcrypt/tests/basic.c:1.27 libgcrypt/tests/basic.c:1.27.2.1 --- libgcrypt/tests/basic.c:1.27 Fri Oct 31 06:06:05 2003 +++ libgcrypt/tests/basic.c Thu Jun 16 12:05:53 2005 @@ -29,7 +29,7 @@ { const char *secret; const char *public; - const char *grip; + const unsigned char *grip; } test_spec_pubkey_key_t; @@ -583,7 +583,7 @@ check_one_md (int algo, char *data, int len, char *expect) { gcry_md_hd_t hd, hd2; - char *p; + unsigned char *p; int mdlen; int i; gcry_error_t err = 0; @@ -979,7 +979,7 @@ " 891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)\n" " (e #010001#)))\n", - "\x32\x10\x0c\x27\x17\x3e\xf6\xe9\xc4\xe9" + (const unsigned char*)"\x32\x10\x0c\x27\x17\x3e\xf6\xe9\xc4\xe9" "\xa2\x5d\x3d\x69\xf8\x6d\x37\xa4\xf9\x39"} }, { @@ -1018,7 +1018,7 @@ " 6E45831AB811EEE848EBB24D9F5F2883B6E5DDC4C659DEF944DCFD80BF4D0A20" " 42CAA7DC289F0C5A9D155F02D3D551DB741A81695B74D4C8F477F9C7838EB0FB#)))\n", - "\xc6\x39\x83\x1a\x43\xe5\x05\x5d\xc6\xd8" + (const unsigned char*)"\xc6\x39\x83\x1a\x43\xe5\x05\x5d\xc6\xd8" "\x4a\xa6\xf9\xeb\x23\xbf\xa9\x12\x2d\x5b" } }, { @@ -1049,7 +1049,7 @@ " D20DB4BEE9BDF916648DE6D6E419FA446C513AAB81C30CB7B34D6007637BE675" " 56CE6473E9F9EE9B9FADD275D001563336F2186F424DEC6199A0F758F6A00FF4#)))\n", - "\xa7\x99\x61\xeb\x88\x83\xd2\xf4\x05\xc8" + (const unsigned char*)"\xa7\x99\x61\xeb\x88\x83\xd2\xf4\x05\xc8" "\x4f\xba\x06\xf8\x78\x09\xbc\x1e\x20\xe5" } }, }; Index: libgcrypt/tests/tsexp.c diff -u libgcrypt/tests/tsexp.c:1.10 libgcrypt/tests/tsexp.c:1.10.2.1 --- libgcrypt/tests/tsexp.c:1.10 Tue Feb 3 13:13:15 2004 +++ libgcrypt/tests/tsexp.c Thu Jun 16 12:05:53 2005 @@ -219,7 +219,7 @@ size_t expected;/* expected length or 0 on error and then ... */ size_t erroff; /* ... and at this offset */ gcry_error_t errcode; /* ... with this error code */ - unsigned char *text; + char *text; } values[] = { { 14, 13, 0, GPG_ERR_NO_ERROR, "(9:abcdefghi) " }, { 16, 15, 0, GPG_ERR_NO_ERROR, "(10:abcdefghix)" }, @@ -245,7 +245,8 @@ info ("checking canoncial length test function\n"); for (idx=0; values[idx].text; idx++) { - n = gcry_sexp_canon_len (values[idx].text, values[idx].textlen, + n = gcry_sexp_canon_len ((const unsigned char*)values[idx].text, + values[idx].textlen, &erroff, &errcode); if (n && n == values[idx].expected) From cvs at cvs.gnupg.org Fri Jun 17 14:32:44 2005 From: cvs at cvs.gnupg.org (cvs user mo) Date: Fri Jun 17 14:32:51 2005 Subject: LIBGCRYPT-1-2-BRANCH libgcrypt/src (ChangeLog global.c) Message-ID: Date: Friday, June 17, 2005 @ 14:55:24 Author: mo Path: /cvs/libgcrypt/libgcrypt/src Tag: LIBGCRYPT-1-2-BRANCH Modified: ChangeLog global.c 2005-06-17 Moritz Schulte * global.c (gcry_xstrdup): Removed superfluous strcpy call. -----------+ ChangeLog | 4 ++++ global.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) Index: libgcrypt/src/ChangeLog diff -u libgcrypt/src/ChangeLog:1.151.2.16 libgcrypt/src/ChangeLog:1.151.2.17 --- libgcrypt/src/ChangeLog:1.151.2.16 Thu Jun 16 12:05:53 2005 +++ libgcrypt/src/ChangeLog Fri Jun 17 14:55:23 2005 @@ -1,3 +1,7 @@ +2005-06-17 Moritz Schulte + + * global.c (gcry_xstrdup): Removed superfluous strcpy call. + 2005-06-16 Werner Koch * sexp.c (normalize): Made P unsigned. Index: libgcrypt/src/global.c diff -u libgcrypt/src/global.c:1.45.2.4 libgcrypt/src/global.c:1.45.2.5 --- libgcrypt/src/global.c:1.45.2.4 Sat Apr 16 19:33:40 2005 +++ libgcrypt/src/global.c Fri Jun 17 14:55:23 2005 @@ -72,8 +72,10 @@ err = _gcry_md_init (); if (! err) err = _gcry_pk_init (); +#if 0 if (! err) err = _gcry_ac_init (); +#endif if (err) /* FIXME? */ @@ -629,7 +631,6 @@ } } - strcpy( p, string ); return p; } From cvs at cvs.gnupg.org Fri Jun 17 14:36:21 2005 From: cvs at cvs.gnupg.org (cvs user mo) Date: Fri Jun 17 14:36:25 2005 Subject: libgcrypt/src (ChangeLog global.c) Message-ID: Date: Friday, June 17, 2005 @ 14:59:03 Author: mo Path: /cvs/libgcrypt/libgcrypt/src Modified: ChangeLog global.c 2005-06-17 Moritz Schulte * global.c (gcry_xstrdup): Removed superfluous strcpy call. -----------+ ChangeLog | 4 ++++ global.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) Index: libgcrypt/src/ChangeLog diff -u libgcrypt/src/ChangeLog:1.165 libgcrypt/src/ChangeLog:1.166 --- libgcrypt/src/ChangeLog:1.165 Sat Apr 23 00:39:43 2005 +++ libgcrypt/src/ChangeLog Fri Jun 17 14:59:03 2005 @@ -1,3 +1,7 @@ +2005-06-17 Moritz Schulte + + * global.c (gcry_xstrdup): Removed superfluous strcpy call. + 2005-04-22 Moritz Schulte * Makefile.am (pkgconfigdir, pkgconfig_DATA): New; support for Index: libgcrypt/src/global.c diff -u libgcrypt/src/global.c:1.49 libgcrypt/src/global.c:1.50 --- libgcrypt/src/global.c:1.49 Sat Apr 23 00:39:44 2005 +++ libgcrypt/src/global.c Fri Jun 17 14:59:03 2005 @@ -632,7 +632,6 @@ } } - strcpy( p, string ); return p; } From cvs at cvs.gnupg.org Sat Jun 18 13:27:10 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Sat Jun 18 13:27:16 2005 Subject: gnupg/g10 (6 files) Message-ID: Date: Saturday, June 18, 2005 @ 13:49:50 Author: wk Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog app-openpgp.c cardglue.c parse-packet.c status.c status.h (parse_signature): Use log_info for messages about missing timestamp or keyid. In case we don't use that key there won't be no further error and thus gpg does not need to return with an error. ----------------+ ChangeLog | 18 ++++++++++++++++++ app-openpgp.c | 4 ++-- cardglue.c | 1 + parse-packet.c | 4 ++-- status.c | 1 - status.h | 1 - 6 files changed, 23 insertions(+), 6 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.758 gnupg/g10/ChangeLog:1.759 --- gnupg/g10/ChangeLog:1.758 Tue Jun 14 05:55:19 2005 +++ gnupg/g10/ChangeLog Sat Jun 18 13:49:50 2005 @@ -1,3 +1,10 @@ +2005-06-18 Werner Koch + + * parse-packet.c (parse_signature): Use log_info for messages + about missing timestamp or keyid. In case we don't use that key + there won't be no further error and thus gpg does not need to + return with an error. + 2005-06-13 David Shaw * keygen.c (save_unprotected_key_to_card): Fix gcc4 warning. @@ -61,6 +68,17 @@ all of the above. Export-minimal is the same except it also removes all non-selfsigs. export-unusable-sigs is now a noop. +2005-06-06 Werner Koch + + * cardglue.c (open_card): Emit new CARDCTRL status 5 for no reader + available. + +2005-06-02 Werner Koch + + * app-openpgp.c (do_writekey): Typo fix. + + * status.c, status.h: Removed STATUS_BAD_PASSPHRASE_PIN. + 2005-06-01 David Shaw * signal.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on Index: gnupg/g10/app-openpgp.c diff -u gnupg/g10/app-openpgp.c:1.30 gnupg/g10/app-openpgp.c:1.31 --- gnupg/g10/app-openpgp.c:1.30 Tue May 31 10:39:17 2005 +++ gnupg/g10/app-openpgp.c Sat Jun 18 13:49:50 2005 @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * - * $Id: app-openpgp.c,v 1.30 2005/05/31 08:39:17 wk Exp $ + * $Id: app-openpgp.c,v 1.31 2005/06/18 11:49:50 wk Exp $ */ #include @@ -1746,7 +1746,7 @@ nbits = rsa_e? count_bits (rsa_e, rsa_e_len) : 0; if (nbits < 2 || nbits > 32) { - log_error (_("RSA public exponent missing or largerr than %d bits\n"), + log_error (_("RSA public exponent missing or larger than %d bits\n"), 32); err = gpg_error (GPG_ERR_BAD_SECKEY); goto leave; Index: gnupg/g10/cardglue.c diff -u gnupg/g10/cardglue.c:1.33 gnupg/g10/cardglue.c:1.34 --- gnupg/g10/cardglue.c:1.33 Tue May 31 12:11:01 2005 +++ gnupg/g10/cardglue.c Sat Jun 18 13:49:50 2005 @@ -412,6 +412,7 @@ slot = apdu_open_reader (default_reader_port); if (slot == -1) { + write_status_text (STATUS_CARDCTRL, "5"); log_error ("card reader not available\n"); return NULL; } Index: gnupg/g10/parse-packet.c diff -u gnupg/g10/parse-packet.c:1.117 gnupg/g10/parse-packet.c:1.118 --- gnupg/g10/parse-packet.c:1.117 Tue May 31 10:39:16 2005 +++ gnupg/g10/parse-packet.c Sat Jun 18 13:49:50 2005 @@ -1337,7 +1337,7 @@ if(p) sig->timestamp = buffer_to_u32(p); else if(!(sig->pubkey_algo>=100 && sig->pubkey_algo<=110)) - log_error("signature packet without timestamp\n"); + log_info ("signature packet without timestamp\n"); p = parse_sig_subpkt2( sig, SIGSUBPKT_ISSUER, NULL ); if(p) @@ -1346,7 +1346,7 @@ sig->keyid[1] = buffer_to_u32(p+4); } else if(!(sig->pubkey_algo>=100 && sig->pubkey_algo<=110)) - log_error("signature packet without keyid\n"); + log_info ("signature packet without keyid\n"); p=parse_sig_subpkt(sig->hashed,SIGSUBPKT_SIG_EXPIRE,NULL); if(p) Index: gnupg/g10/status.c diff -u gnupg/g10/status.c:1.51 gnupg/g10/status.c:1.52 --- gnupg/g10/status.c:1.51 Tue May 31 10:39:15 2005 +++ gnupg/g10/status.c Sat Jun 18 13:49:50 2005 @@ -113,7 +113,6 @@ case STATUS_ENC_TO : s = "ENC_TO"; break; case STATUS_NODATA : s = "NODATA"; break; case STATUS_BAD_PASSPHRASE : s = "BAD_PASSPHRASE"; break; - case STATUS_BAD_PASSPHRASE_PIN: s = "BAD_PASSPHRASE_PIN"; break; case STATUS_NO_PUBKEY : s = "NO_PUBKEY"; break; case STATUS_NO_SECKEY : s = "NO_SECKEY"; break; case STATUS_NEED_PASSPHRASE_SYM: s = "NEED_PASSPHRASE_SYM"; break; Index: gnupg/g10/status.h diff -u gnupg/g10/status.h:1.34 gnupg/g10/status.h:1.35 --- gnupg/g10/status.h:1.34 Tue May 31 10:39:15 2005 +++ gnupg/g10/status.h Sat Jun 18 13:49:50 2005 @@ -110,7 +110,6 @@ /* Extra status codes for certain smartcard operations. Primary useful to double check that change PIN worked as expected. */ -#define STATUS_BAD_PASSPHRASE_PIN 78 #define STATUS_SC_OP_FAILURE 79 #define STATUS_SC_OP_SUCCESS 80 From cvs at cvs.gnupg.org Mon Jun 20 18:40:30 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Mon Jun 20 18:40:37 2005 Subject: gnupg (13 files) Message-ID: Date: Monday, June 20, 2005 @ 19:03:27 Author: wk Path: /cvs/gnupg/gnupg Modified: THANKS checks/ChangeLog checks/conventional.test doc/ChangeLog doc/DETAILS doc/gpg.sgml g10/ChangeLog g10/g10.c g10/keyedit.c g10/options.h po/ChangeLog po/de.po tools/signmany * gpg.sgml: Document smartcard related options. * g10.c, options.h: New option --no-interactive-selection. * keyedit.c (keyedit_menu): Use it. --------------------------+ THANKS | 1 checks/ChangeLog | 5 +++ checks/conventional.test | 12 ++----- doc/ChangeLog | 8 ++++ doc/DETAILS | 4 -- doc/gpg.sgml | 74 ++++++++++++++++++++++++++++++++++++++++++++- g10/ChangeLog | 5 +++ g10/g10.c | 9 ++++- g10/keyedit.c | 10 ++++-- g10/options.h | 1 po/ChangeLog | 4 ++ po/de.po | 59 +++++++++++++++-------------------- tools/signmany | 2 - 13 files changed, 143 insertions(+), 51 deletions(-) Index: gnupg/THANKS diff -u gnupg/THANKS:1.83 gnupg/THANKS:1.84 --- gnupg/THANKS:1.83 Tue May 31 10:39:18 2005 +++ gnupg/THANKS Mon Jun 20 19:03:27 2005 @@ -103,6 +103,7 @@ Joe Rhett jrhett@isite.net John A. Martin jam@jamux.com John Clizbe JPClizbe@comcast.net +John R. Shannon john@johnrshannon.com Johnny Teveßen j.tevessen@gmx.de Jörg Schilling schilling@fokus.gmd.de Jos Backus Jos.Backus@nl.origin-it.com Index: gnupg/checks/ChangeLog diff -u gnupg/checks/ChangeLog:1.27 gnupg/checks/ChangeLog:1.28 --- gnupg/checks/ChangeLog:1.27 Mon Feb 9 20:44:36 2004 +++ gnupg/checks/ChangeLog Mon Jun 20 19:03:27 2005 @@ -1,3 +1,8 @@ +2005-06-02 Werner Koch + + * conventional.test: have_cipher_algo now requires uppercase + algorithm names. Changed. Noted by John R. Shannon. + 2004-02-09 David Shaw * clearsig.test, sigs.test: Properly detect RSA being missing, and Index: gnupg/checks/conventional.test diff -u gnupg/checks/conventional.test:1.9 gnupg/checks/conventional.test:1.10 --- gnupg/checks/conventional.test:1.9 Wed Dec 31 20:00:35 2003 +++ gnupg/checks/conventional.test Mon Jun 20 19:03:27 2005 @@ -11,23 +11,19 @@ algos="3des" -if have_cipher_algo "idea"; then +if have_cipher_algo "CAST5"; then algos="$algos idea" fi -if have_cipher_algo "cast5"; then +if have_cipher_algo "BLOWFISH"; then algos="$algos idea" fi -if have_cipher_algo "blowfish"; then - algos="$algos idea" -fi - -if have_cipher_algo "aes"; then +if have_cipher_algo "AES"; then algos="$algos aes aes192 aes256" fi -if have_cipher_algo "twofish"; then +if have_cipher_algo "TWOFISH"; then algos="$algos twofish" fi Index: gnupg/doc/ChangeLog diff -u gnupg/doc/ChangeLog:1.101 gnupg/doc/ChangeLog:1.102 --- gnupg/doc/ChangeLog:1.101 Sat May 14 04:55:10 2005 +++ gnupg/doc/ChangeLog Mon Jun 20 19:03:27 2005 @@ -1,3 +1,11 @@ +2005-06-20 Werner Koch + + * gpg.sgml: Document smartcard related options. + +2005-06-06 Werner Koch + + * DETAILS: New subcode 5 for CARDCTRL. + 2005-05-13 David Shaw * gpg.sgml: Document --default-sig-expire and Index: gnupg/doc/DETAILS diff -u gnupg/doc/DETAILS:1.90 gnupg/doc/DETAILS:1.91 --- gnupg/doc/DETAILS:1.90 Mon Mar 14 20:19:21 2005 +++ gnupg/doc/DETAILS Mon Jun 20 19:03:27 2005 @@ -349,9 +349,6 @@ The supplied passphrase was good and the secret key material is therefore usable. - BAD_PASSPHRASE_PIN - Reserved for future use. - DECRYPTION_FAILED The symmetric decryption failed - one reason could be a wrong passphrase for a symmetrical encrypted message. @@ -553,6 +550,7 @@ 2 = Request removal of a card. 3 = Card with serialnumber detected 4 = No card available. + 5 = No card reader available PLAINTEXT Index: gnupg/doc/gpg.sgml diff -u gnupg/doc/gpg.sgml:1.84 gnupg/doc/gpg.sgml:1.85 --- gnupg/doc/gpg.sgml:1.84 Tue May 31 10:39:17 2005 +++ gnupg/doc/gpg.sgml Mon Jun 20 19:03:27 2005 @@ -572,11 +572,38 @@ + + +--card-edit + +Present a menu to work with a smartcard. The subcommand "help" provides +an overview on available commands. For a detailed description, please +see the Card HOWTO at +http://www.gnupg.org/documentation/howtos.html#GnuPG-cardHOWTO . + + + +--card-status + +Show the content of the smart card. + + + +--change-pin + +Present a menu to allow changing the PIN of a smartcard. This +functionality is also available as the subcommand "passwd" with the +--card-edit command. + + + --sign-key &ParmName; Signs a public key with your secret key. This is a shortcut version of -the subcommand "sign" from --edit. +the subcommand "sign" from --edit. You may also want to consider the +option --no-interactive-selection which will drop you into the regular +menu when not all keys shall be signed. @@ -1032,6 +1059,14 @@ Prompt before overwriting any files. + +--no-interactive-selection + +Do not use interactive selection mode in certain menues but require +a selection in advance. This is currently only used with the "sign" +subcommand of --edit-key. + + --batch @@ -1621,6 +1656,43 @@ $GNUPGHOME. + +--pcsc-driver &ParmFile; + +Use &ParmFile; to access the smartcard reader. The current default +is `libpcsclite.so'. Instead of using this option you might also +want to install a symbolic link to the default file name +(e.g. from `libpcsclite.so.1'). + + + +--ctapi-driver &ParmFile; + +Use &ParmFile; to access the smartcard reader. The current default +is `libtowitoko.so'. Note that the use of this interface is +deprecated; it may be removed in future releases. + + + +--disable-ccid + +Disable the integrated support for CCID compliant readers. This +allows to fall back to one of the other drivers even if the internal +CCID driver can handle the reader. Note, that CCID support is only +available if libusb was available at build time. + + + +--reader-port number_or_string + +This option may be used to specify the port of the card terminal. A +value of 0 refers to the first serial device; add 32768 to access USB +devices. The default is 32768 (first USB device). PC/SC or CCID +readers might need a string here; run the program in verbose mode to get +a list of available readers. The default is then the first reader +found. + + --display-charset &ParmName; Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.759 gnupg/g10/ChangeLog:1.760 --- gnupg/g10/ChangeLog:1.759 Sat Jun 18 13:49:50 2005 +++ gnupg/g10/ChangeLog Mon Jun 20 19:03:27 2005 @@ -1,3 +1,8 @@ +2005-06-20 Werner Koch + + * g10.c, options.h: New option --no-interactive-selection. + * keyedit.c (keyedit_menu): Use it. + 2005-06-18 Werner Koch * parse-packet.c (parse_signature): Use log_info for messages Index: gnupg/g10/g10.c diff -u gnupg/g10/g10.c:1.310 gnupg/g10/g10.c:1.311 --- gnupg/g10/g10.c:1.310 Wed Jun 8 05:31:48 2005 +++ gnupg/g10/g10.c Mon Jun 20 19:03:27 2005 @@ -346,14 +346,14 @@ oEnableProgressFilter, oMultifile, oKeyidFormat, - oNoop, + oNoInteractiveSelection, oReaderPort, octapiDriver, opcscDriver, oDisableCCID, - aTest + oNoop }; @@ -676,6 +676,7 @@ { oEnableProgressFilter, "enable-progress-filter", 0, "@" }, { oMultifile, "multifile", 0, "@" }, { oKeyidFormat, "keyid-format", 2, "@" }, + { oNoInteractiveSelection, "no-interactive-selection", 0, "@" }, { oReaderPort, "reader-port", 2, "@"}, { octapiDriver, "ctapi-driver", 2, "@"}, @@ -2542,6 +2543,10 @@ else log_error("unknown keyid-format `%s'\n",pargs.r.ret_str); break; + case oNoInteractiveSelection: + opt.no_interactive_selection = 1; + break; + case oNoop: break; default : pargs.err = configfp? 1:2; break; Index: gnupg/g10/keyedit.c diff -u gnupg/g10/keyedit.c:1.186 gnupg/g10/keyedit.c:1.187 --- gnupg/g10/keyedit.c:1.186 Fri Jun 10 05:00:57 2005 +++ gnupg/g10/keyedit.c Mon Jun 20 19:03:27 2005 @@ -1741,8 +1741,14 @@ && !cpr_get_answer_is_yes("keyedit.sign_all.okay", _("Really sign all user IDs?" " (y/N) "))) - interactive=1; - + { + if (opt.no_interactive_selection) + { + have_commands = 0; + break; + } + interactive=1; + } /* What sort of signing are we doing? */ if(!parse_sign_type(answer,&localsig,&nonrevokesig,&trustsig)) { Index: gnupg/g10/options.h diff -u gnupg/g10/options.h:1.144 gnupg/g10/options.h:1.145 --- gnupg/g10/options.h:1.144 Tue Jun 14 05:55:19 2005 +++ gnupg/g10/options.h Mon Jun 20 19:03:27 2005 @@ -157,6 +157,7 @@ char *temp_dir; int no_encrypt_to; int interactive; + int no_interactive_selection; STRLIST sig_notation_data; STRLIST cert_notation_data; STRLIST sig_policy_url; Index: gnupg/po/ChangeLog diff -u gnupg/po/ChangeLog:1.65 gnupg/po/ChangeLog:1.66 --- gnupg/po/ChangeLog:1.65 Tue May 31 12:12:01 2005 +++ gnupg/po/ChangeLog Mon Jun 20 19:03:27 2005 @@ -1,3 +1,7 @@ +2005-06-15 Werner Koch + + * de.po: Some Typo fixes. + 2005-05-31 Werner Koch * zh_TW.po, zh_CN.po, es.po, ro.po: Updated. Index: gnupg/po/de.po diff -u gnupg/po/de.po:1.108 gnupg/po/de.po:1.109 --- gnupg/po/de.po:1.108 Tue May 31 12:11:00 2005 +++ gnupg/po/de.po Mon Jun 20 19:03:27 2005 @@ -8,7 +8,7 @@ "Project-Id-Version: gnupg-1.4.1\n" "Report-Msgid-Bugs-To: gnupg-i18n@gnupg.org\n" "POT-Creation-Date: 2005-05-31 11:45+0200\n" -"PO-Revision-Date: 2005-03-30 10:45+0200\n" +"PO-Revision-Date: 2005-06-15 10:51+0200\n" "Last-Translator: Walter Koch \n" "Language-Team: German \n" "MIME-Version: 1.0\n" @@ -55,9 +55,9 @@ msgstr "Hinweis: 'random_seed'-Datei ist leer\n" #: cipher/random.c:408 +#, fuzzy msgid "WARNING: invalid size of random_seed file - not used\n" -msgstr "" -"WARNUNG: Falsche GröÂße der 'random_seed'-Datei - sie wird nicht verwendet\n" +msgstr "WARNUNG: Falsche Größe der 'random_seed'-Datei - sie wird nicht verwendet\n" #: cipher/random.c:416 #, c-format @@ -110,7 +110,7 @@ "keep you from getting bored, because it will improve the quality\n" "of the entropy.\n" msgstr "" -"Zufalls wird gesammelt. Bitte arebiten Sie an etwas anderem, da\n" +"Zufalls wird gesammelt. Bitte arbeiten Sie an etwas anderem, da\n" "so die Qualität der Zufallszahlen erhöht werden kann.\n" #: cipher/rndlinux.c:135 @@ -218,7 +218,7 @@ #: g10/app-openpgp.c:1562 msgid "key already exists\n" -msgstr "Shlüssel existiert bereits\n" +msgstr "Schlüssel existiert bereits\n" #: g10/app-openpgp.c:1566 msgid "existing key will be replaced\n" @@ -569,7 +569,7 @@ #: g10/card-util.c:1245 msgid "secret key already stored on a card\n" -msgstr "geheimer Schlüssel ist bereits auf einer Karte gepeichert\n" +msgstr "geheimer Schlüssel ist bereits auf einer Karte gespeichert\n" #: g10/card-util.c:1316 g10/keyedit.c:1350 msgid "quit this menu" @@ -851,7 +851,7 @@ #: g10/encr-data.c:104 msgid "problem handling encrypted packet\n" -msgstr "Problem beim Bearbeiten des verschlüsselten Pakets\n" +msgstr "Problem beim Bearbeiten des verschlüsselten Packets\n" #: g10/exec.c:49 msgid "no remote program execution supported\n" @@ -1451,11 +1451,11 @@ #: g10/g10.c:2779 msgid "completes-needed must be greater than 0\n" -msgstr "completes-needed müssen gröÂßer als 0 sein\n" +msgstr "completes-needed müssen größer als 0 sein\n" #: g10/g10.c:2781 msgid "marginals-needed must be greater than 1\n" -msgstr "marginals-needed müssen gröÂßer als 1 sein\n" +msgstr "marginals-needed müssen größer als 1 sein\n" #: g10/g10.c:2783 #, fuzzy @@ -1904,12 +1904,9 @@ "\n" "If you don't know what the right answer is, answer \"0\"." msgstr "" -"Wenn Sie die User-ID eines Schlüssels beglaubigen wollen, sollten Sie " -"zunächst\n" -"sicherstellen, daß der Schlüssel demjenigen gehört, der in der User-ID " -"genannt\n" -"ist. Für Dritte ist es hilfreich zu wissen, wie gut diese Zuordnung " -"überprüft\n" +"Wenn Sie die User-ID eines Schlüssels beglaubigen wollen, sollten Sie zunächst\n" +"sicherstellen, daß der Schlüssel demjenigen gehört, der in der User-ID genannt\n" +"ist. Für Dritte ist es hilfreich zu wissen, wie gut diese Zuordnung überprüft\n" "wurde.\n" "\n" "\"0\" zeigt, daß Sie keine bestimmte Aussage über die Sorgfalt der \n" @@ -1920,7 +1917,7 @@ " Dies ist hilfreich für eine \"persona\"-Überprüfung, wobei man den\n" " Schlüssel eines Pseudonym-Trägers beglaubigt\n" "\n" -"\"2\" Sie nahmen eine flüchtige Überprüfung vor. Das heisst Sie haben z.B.\n" +"\"2\" Sie nahmen eine flüchtige Überprüfung vor. Das heißt Sie haben z.B.\n" " den Schlüsselfingerabdruck kontrolliert und die User-ID des Schlüssels\n" " anhand des Fotos geprüft.\n" "\n" @@ -1928,14 +1925,12 @@ " Das kann z.B. die Kontrolle des Schlüsselfingerabdrucks mit dem\n" " Schlüsselinhaber persönlich vorgenommen haben; daß Sie die User-ID des\n" " Schlüssel anhand einer schwer zu fälschenden Urkunde mit Foto (wie z.B.\n" -" einem Paß) abgeglichen haben und schliesslich per E-Mail-Verkehr die\n" +" einem Paß) abgeglichen haben und schließlich per E-Mail-Verkehr die\n" " E-Mail-Adresse als zum Schlüsselbesitzer gehörig erkannt haben.\n" "\n" -"Beachten Sie, daß diese Beispiele für die Antworten 2 und 3 *nur* Beispiele " -"sind.\n" -"Schlußendlich ist es Ihre Sache, was Sie unter \"flüchtig\" oder " -"\"ausführlich\"\n" -"verstehen, wenn Sie Schlüssel Dritter beglaubigen.\n" +"Beachten Sie, daß diese Beispiele für die Antworten 2 und 3 *nur* Beispiele\n" +"sind. Schlußendlich ist es Ihre Sache, was Sie unter \"flüchtig\" oder\n" +" \"ausführlich\" verstehen, wenn Sie Schlüssel Dritter beglaubigen.\n" "\n" "Wenn Sie nicht wissen, wie Sie antworten sollen, wählen Sie \"0\"." @@ -1975,11 +1970,10 @@ "know which key was used because this signing key might establish\n" "a trust connection through another already certified key." msgstr "" -"Diese Beglaubigung kann nicht geprüft werden, da Sie den passenden " -"Schlüssel\n" +"Diese Beglaubigung kann nicht geprüft werden, da Sie den passenden Schlüssel\n" "nicht besitzen. Sie sollten die Löschung der Beglaubigung verschieben, bis\n" "sie wissen, welcher Schlüssel verwendet wurde. Denn vielleicht würde genau\n" -"diese Beglaubigung den \"Trust\"-Weg kompletieren." +"diese Beglaubigung den \"Trust\"-Weg komplettieren." #: g10/helptext.c:211 msgid "" @@ -2600,7 +2594,7 @@ "trust signatures on your behalf.\n" msgstr "" "Geben Sie bitte die Tiefe dieser \"Trust\"-Unterschrift ein.\n" -"Eine Tiefe gröÂßer 1 erlaubt dem zu unterschreibenden Schlüssel\n" +"Eine Tiefe größer 1 erlaubt dem zu unterschreibenden Schlüssel\n" "Trust-Signatures für Sie zu machen.\n" #: g10/keyedit.c:451 @@ -2617,7 +2611,7 @@ #: g10/keyedit.c:604 g10/keyedit.c:632 g10/keyedit.c:659 g10/keyedit.c:827 #: g10/keyedit.c:890 g10/keyedit.c:1729 msgid "Are you sure you still want to sign it? (y/N) " -msgstr "Wollen Sie ihn immmer noch beglaubigen? (j/N) " +msgstr "Wollen Sie ihn immer noch beglaubigen? (j/N) " #: g10/keyedit.c:618 g10/keyedit.c:646 g10/keyedit.c:673 g10/keyedit.c:833 #: g10/keyedit.c:1735 @@ -2698,7 +2692,7 @@ #: g10/keyedit.c:784 msgid "Do you want to sign it again anyway? (y/N) " -msgstr "Wollen Sie ihn immmer noch wieder beglaubigen? (j/N) " +msgstr "Wollen Sie ihn immer noch wieder beglaubigen? (j/N) " #: g10/keyedit.c:806 #, fuzzy, c-format @@ -3180,9 +3174,8 @@ msgstr "Möchten Sie die ausgewählten Schlüssel wirklich widerrufen? " #: g10/keyedit.c:2015 -#, fuzzy msgid "Do you really want to revoke this subkey? (y/N) " -msgstr "Möchten Sie diesen Schlüssel wirklich wiederrufen? " +msgstr "Möchten Sie diesen Schlüssel wirklich widerrufen? " #: g10/keyedit.c:2056 msgid "" @@ -3206,12 +3199,10 @@ msgstr "Die Voreinstellungen wirklich ändern? " #: g10/keyedit.c:2175 -#, fuzzy msgid "Save changes? (y/N) " msgstr "Änderungen speichern? " #: g10/keyedit.c:2178 -#, fuzzy msgid "Quit without saving? (y/N) " msgstr "Beenden ohne zu speichern? " @@ -3353,7 +3344,7 @@ #: g10/keyedit.c:2963 g10/keyedit.c:3342 msgid "Are you sure you still want to add it? (y/N) " -msgstr "Wollen Sie ihn immmer noch hinzufügen? (j/N) " +msgstr "Wollen Sie ihn immer noch hinzufügen? (j/N) " #: g10/keyedit.c:2969 msgid "You may not add a photo ID to a PGP2-style key.\n" @@ -3531,7 +3522,7 @@ #: g10/keyedit.c:4237 msgid "Are you sure you still want to revoke it? (y/N) " -msgstr "Wollen Sie ihn immmer noch widerrufen? (j/N) " +msgstr "Wollen Sie ihn immer noch widerrufen? (j/N) " #: g10/keyedit.c:4241 msgid "Create a revocation certificate for this signature? (y/N) " Index: gnupg/tools/signmany diff -u gnupg/tools/signmany:1.1 gnupg/tools/signmany:1.2 --- gnupg/tools/signmany:1.1 Mon Oct 14 16:14:31 2002 +++ gnupg/tools/signmany Mon Jun 20 19:03:26 2005 @@ -15,7 +15,7 @@ echo "Keyid: $k" answer=A while [ "$answer" = "A" ]; do - gpg $ro --lock-never --sign-key $k + gpg $ro --lock-never --no-interactive-selection --sign-key $k answer="" while [ "$answer" = "" ]; do read -p 'Okay, Again or Quit? (O/A/Q) ' From cvs at cvs.gnupg.org Mon Jun 20 19:09:08 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Mon Jun 20 19:09:11 2005 Subject: gnupg/g10 (ChangeLog keygen.c) Message-ID: Date: Monday, June 20, 2005 @ 19:32:09 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keygen.c * keygen.c (save_unprotected_key_to_card): Better fix for gcc4 warning. -----------+ ChangeLog | 5 +++++ keygen.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.760 gnupg/g10/ChangeLog:1.761 --- gnupg/g10/ChangeLog:1.760 Mon Jun 20 19:03:27 2005 +++ gnupg/g10/ChangeLog Mon Jun 20 19:32:09 2005 @@ -1,3 +1,8 @@ +2005-06-20 David Shaw + + * keygen.c (save_unprotected_key_to_card): Better fix for gcc4 + warning. + 2005-06-20 Werner Koch * g10.c, options.h: New option --no-interactive-selection. Index: gnupg/g10/keygen.c diff -u gnupg/g10/keygen.c:1.156 gnupg/g10/keygen.c:1.157 --- gnupg/g10/keygen.c:1.156 Tue Jun 14 05:55:19 2005 +++ gnupg/g10/keygen.c Mon Jun 20 19:32:09 2005 @@ -3543,7 +3543,7 @@ p = stpcpy (p,"))(10:created-at"); sprintf (numbuf2, "%lu", (unsigned long)sk->timestamp); - sprintf (numbuf, "%u:", (unsigned int)strlen (numbuf2)); + sprintf (numbuf, "%lu:", (unsigned long)strlen (numbuf2)); p = stpcpy (stpcpy (stpcpy (p, numbuf), numbuf2), "))"); rc = agent_scd_writekey (keyno, sexp, p - sexp); From cvs at cvs.gnupg.org Mon Jun 20 19:09:44 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Mon Jun 20 19:09:47 2005 Subject: GNUPG-1-9-BRANCH gnupg (ChangeLog NEWS README configure.ac doc/scdaemon.texi po/de.po) Message-ID: Date: Monday, June 20, 2005 @ 19:32:44 Author: wk Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: ChangeLog NEWS README configure.ac doc/scdaemon.texi po/de.po Preparing 1.9.17 -------------------+ ChangeLog | 4 NEWS | 2 README | 41 +---- configure.ac | 6 doc/scdaemon.texi | 30 +++- po/de.po | 375 +++++++++++++++++++++++++++++----------------------- 6 files changed, 257 insertions(+), 201 deletions(-) Index: gnupg/ChangeLog diff -u gnupg/ChangeLog:1.131.2.77 gnupg/ChangeLog:1.131.2.78 --- gnupg/ChangeLog:1.131.2.77 Fri Jun 3 15:57:24 2005 +++ gnupg/ChangeLog Mon Jun 20 19:32:44 2005 @@ -1,3 +1,7 @@ +2005-06-20 Werner Koch + + Released 1.9.17. + 2005-06-02 Werner Koch * configure.ac (HAVE_PTH): Define as alias for USE_GNU_PTH. It is Index: gnupg/NEWS diff -u gnupg/NEWS:1.165.2.73 gnupg/NEWS:1.165.2.74 --- gnupg/NEWS:1.165.2.73 Tue Jun 7 21:09:18 2005 +++ gnupg/NEWS Mon Jun 20 19:32:44 2005 @@ -1,4 +1,4 @@ -Noteworthy changes in version 1.9.17 +Noteworthy changes in version 1.9.17 (2005-06-20) ------------------------------------------------- * gpg-connect-agent has now features to handle Assuan INQUIRE Index: gnupg/README diff -u gnupg/README:1.72.2.17 gnupg/README:1.72.2.18 --- gnupg/README:1.72.2.17 Thu Apr 21 11:33:07 2005 +++ gnupg/README Mon Jun 20 19:32:44 2005 @@ -3,16 +3,17 @@ Version 1.9.x -GnuPG 1.9 is the future version of GnuPG; it is based on the gnupg-1.3 +GnuPG 1.9 is the future version of GnuPG; it is based on some gnupg-1.3 code and the previous newpg package. It will eventually lead to a -GnuPG 2.0 release. Note that GnuPG 1.3 and 1.9 are not always in sync -and thus features and bug fixes done in 1.3 are not necessary +GnuPG 2.0 release. Note that GnuPG 1.4 and 1.9 are not always in sync +and thus features and bug fixes done in 1.4 are not necessary available in 1.9. You should use this GnuPG version if you want to use the gpg-agent or gpgsm (the S/MIME variant of gpg). Note that the gpg-agent is also -helpful when using the standard gpg versions (1.3.x as well as some of -the old 1.2.x). +helpful when using the standard gpg versions (1.4.x as well as some of +the old 1.2.x). There are no problems installing 1.4 and 1.9 +alongside; in act we suggest to do this. BUILD INSTRUCTIONS @@ -64,6 +65,9 @@ COMMANDS ======== +See the info documentation ("info gnupg") for a full list of commands +and options. + gpgsm: ------ @@ -79,25 +83,6 @@ prepended before each block. -gpg2: (Note that these card commands are also available with gpg 1.3.x) ------ - ---card-status - - Show information pertaining smartcards implementing the OpenPGP - application. - ---change-pin - - Offers a menu to change the PIN of OpenPGP smartcards and to reset - the retry counters. - ---card-edit - - Offers a menu to change any data object on the card and to generate - the keys. - - OPTIONS ======= @@ -480,10 +465,8 @@ =============== GPG, the OpenPGP part of GnuPG, supports the OpenPGP smartcard -(surprise!); see http://g10code.com/p-card.html. - -[Fixme: We need to explain this further] - +(surprise!); see http://g10code.com/p-card.html and +http://www.gnupg.org/documentation/howtos.html#GnuPG-cardHOWTO . GPGSM, the CMS (S/MIME) part of GnuPG, supports two kinds of smartcards. The most flexible way is to use PKCS#15 compliant cards, @@ -512,8 +495,6 @@ debugging flag is "--debug 2048" showing the communication between scdaemon and the reader. -[fixme: write more stuff] - Index: gnupg/configure.ac diff -u gnupg/configure.ac:1.36.2.90 gnupg/configure.ac:1.36.2.91 --- gnupg/configure.ac:1.36.2.90 Fri Jun 3 15:57:24 2005 +++ gnupg/configure.ac Mon Jun 20 19:32:44 2005 @@ -1,6 +1,6 @@ # configure.ac - for GnuPG 1.9 # Copyright (C) 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is part of GnuPG. # @@ -24,7 +24,7 @@ # Version number: Remember to change it immediately *after* a release. # Add a "-cvs" prefix for non-released code. -AC_INIT(gnupg, 1.9.17-cvs, gnupg-devel@gnupg.org) +AC_INIT(gnupg, 1.9.17, gnupg-devel@gnupg.org) # Set development_version to yes if the minor number is odd or you # feel that the default check for a development version is not # sufficient. @@ -34,7 +34,7 @@ NEED_LIBGCRYPT_API=1 NEED_LIBGCRYPT_VERSION=1.1.94 -NEED_LIBASSUAN_VERSION=0.6.9 +NEED_LIBASSUAN_VERSION=0.6.10 NEED_KSBA_VERSION=0.9.11 Index: gnupg/doc/scdaemon.texi diff -u gnupg/doc/scdaemon.texi:1.1.2.16 gnupg/doc/scdaemon.texi:1.1.2.17 --- gnupg/doc/scdaemon.texi:1.1.2.16 Tue Jun 7 21:09:18 2005 +++ gnupg/doc/scdaemon.texi Mon Jun 20 19:32:44 2005 @@ -199,16 +199,36 @@ Append all logging output to @var{file}. This is very helpful in seeing what the agent actually does. -@item --reader-port @var{number} -This option may be used to specify the port of the card terminal. A -value of 0 refers to the first serial device; add 32768 to access USB -devices. The default is 32768 (first USB device). + +@item --pcsc-driver @var{library} +@opindex pcsc-driver +Use @var{library} to access the smartcard reader. The current default +is @file{libpcsclite.so}. Instead of using this option you might also +want to install a symbolic link to the default file name +(e.g. from @file{libpcsclite.so.1}). @item --ctapi-driver @var{library} +@opindex ctapi-driver Use @var{library} to access the smartcard reader. The current default -is @code{libtowitoko.so}. Note that the use of this interface is +is @file{libtowitoko.so}. Note that the use of this interface is deprecated; it may be removed in future releases. +@item --disable-ccid +@opindex disable-ccid +Disable the integrated support for CCID compliant readers. This +allows to fall back to one of the other drivers even if the internal +CCID driver can handle the reader. Note, that CCID support is only +available if libusb was available at build time. + +@item --reader-port @var{number_or_string} +@opindex reader-port +This option may be used to specify the port of the card terminal. A +value of 0 refers to the first serial device; add 32768 to access USB +devices. The default is 32768 (first USB device). PC/SC or CCID +readers might need a string here; run the program in verbose mode to get +a list of available readers. The default is then the first reader +found. + @item --allow-admin @itemx --deny-admin Index: gnupg/po/de.po diff -u gnupg/po/de.po:1.84.2.19 gnupg/po/de.po:1.84.2.20 --- gnupg/po/de.po:1.84.2.19 Thu Apr 21 16:39:00 2005 +++ gnupg/po/de.po Mon Jun 20 19:32:43 2005 @@ -10,15 +10,15 @@ msgstr "" "Project-Id-Version: gnupg2 1.9.16\n" "Report-Msgid-Bugs-To: translations@gnupg.org\n" -"POT-Creation-Date: 2005-04-21 15:21+0200\n" -"PO-Revision-Date: 2005-04-21 16:23+0200\n" +"POT-Creation-Date: 2005-06-16 09:12+0200\n" +"PO-Revision-Date: 2005-06-20 19:12+0200\n" "Last-Translator: Werner Koch \n" "Language-Team: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: agent/gpg-agent.c:107 agent/protect-tool.c:106 scd/scdaemon.c:98 +#: agent/gpg-agent.c:108 agent/protect-tool.c:108 scd/scdaemon.c:99 msgid "" "@Options:\n" " " @@ -26,51 +26,47 @@ "@Optionen:\n" " " -#: agent/gpg-agent.c:109 scd/scdaemon.c:100 +#: agent/gpg-agent.c:110 scd/scdaemon.c:101 msgid "run in server mode (foreground)" msgstr "Im Server Modus ausführen" -#: agent/gpg-agent.c:110 scd/scdaemon.c:101 +#: agent/gpg-agent.c:111 scd/scdaemon.c:104 msgid "run in daemon mode (background)" msgstr "Im Daemon Modus ausführen" -#: agent/gpg-agent.c:111 kbx/kbxutil.c:81 scd/scdaemon.c:102 sm/gpgsm.c:329 +#: agent/gpg-agent.c:112 kbx/kbxutil.c:81 scd/scdaemon.c:105 sm/gpgsm.c:329 #: tools/gpgconf.c:62 msgid "verbose" msgstr "ausführlich" -#: agent/gpg-agent.c:112 kbx/kbxutil.c:82 scd/scdaemon.c:103 sm/gpgsm.c:330 +#: agent/gpg-agent.c:113 kbx/kbxutil.c:82 scd/scdaemon.c:106 sm/gpgsm.c:330 msgid "be somewhat more quiet" msgstr "Etwas weniger Ausgaben erzeugen" -#: agent/gpg-agent.c:113 scd/scdaemon.c:104 +#: agent/gpg-agent.c:114 scd/scdaemon.c:107 msgid "sh-style command output" msgstr "Ausgabe für /bin/sh" -#: agent/gpg-agent.c:114 scd/scdaemon.c:105 +#: agent/gpg-agent.c:115 scd/scdaemon.c:108 msgid "csh-style command output" msgstr "Ausgabe für /bin/csh" -#: agent/gpg-agent.c:115 +#: agent/gpg-agent.c:116 msgid "|FILE|read options from FILE" msgstr "|DATEI|Konfigurationsoptionen aus DATEI lesen" -#: agent/gpg-agent.c:120 scd/scdaemon.c:112 +#: agent/gpg-agent.c:121 scd/scdaemon.c:117 msgid "do not detach from the console" msgstr "Im Vordergrund laufen lassen" -#: agent/gpg-agent.c:121 +#: agent/gpg-agent.c:122 msgid "do not grab keyboard and mouse" msgstr "Tastatur und Maus nicht \"grabben\"" -#: agent/gpg-agent.c:122 scd/scdaemon.c:113 sm/gpgsm.c:332 +#: agent/gpg-agent.c:123 scd/scdaemon.c:118 sm/gpgsm.c:332 msgid "use a log file for the server" msgstr "Logausgaben in eine Datei umlenken" -#: agent/gpg-agent.c:123 -msgid "do not allow multiple connections" -msgstr "Nicht mehr als eine Verbindung erlauben" - #: agent/gpg-agent.c:125 msgid "use a standard location for the socket" msgstr "Benutze einen Standardnamen für den Socket" @@ -99,37 +95,41 @@ msgid "|N|expire cached PINs after N seconds" msgstr "|N|lasse PINs im Cache nach N Sekunden verfallen" -#: agent/gpg-agent.c:147 +#: agent/gpg-agent.c:149 msgid "do not use the PIN cache when signing" msgstr "benutze PINs im Cache nicht bem Signieren" -#: agent/gpg-agent.c:149 +#: agent/gpg-agent.c:151 msgid "allow clients to mark keys as \"trusted\"" msgstr "erlaube Aufrufern Schlüssel als \"vertrauenswürdig\" zu markieren" -#: agent/gpg-agent.c:151 +#: agent/gpg-agent.c:153 msgid "allow presetting passphrase" msgstr "erlaube ein \"preset\" von Passphrases" -#: agent/gpg-agent.c:152 +#: agent/gpg-agent.c:154 msgid "enable ssh-agent emulation" msgstr "Die ssh-agent Emulation anschalten" -#: agent/gpg-agent.c:232 agent/protect-tool.c:139 scd/scdaemon.c:178 +#: agent/gpg-agent.c:156 +msgid "|FILE|write environment settings also to FILE" +msgstr "|DATEI|Schreibe die Umgebungsvariabeln auf DATEI" + +#: agent/gpg-agent.c:235 agent/protect-tool.c:142 scd/scdaemon.c:183 #: sm/gpgsm.c:503 tools/gpgconf.c:85 msgid "Please report bugs to <" msgstr "Fehlerberichte bitte an <" -#: agent/gpg-agent.c:232 agent/protect-tool.c:139 scd/scdaemon.c:178 +#: agent/gpg-agent.c:235 agent/protect-tool.c:142 scd/scdaemon.c:183 #: sm/gpgsm.c:503 tools/gpgconf.c:85 msgid ">.\n" msgstr ">.\n" -#: agent/gpg-agent.c:235 +#: agent/gpg-agent.c:238 msgid "Usage: gpg-agent [options] (-h for help)" msgstr "Gebrauch: gpg-agent [Optionen] (-h für Hilfe)" -#: agent/gpg-agent.c:237 +#: agent/gpg-agent.c:240 msgid "" "Syntax: gpg-agent [options] [command [args]]\n" "Secret key management for GnuPG\n" @@ -137,127 +137,132 @@ "Syntax: gpg-agent [Optionen] [Kommando [Argumente]]\n" "Verwaltung von geheimen Schlüssel für GnuPG\n" -#: agent/gpg-agent.c:308 scd/scdaemon.c:252 sm/gpgsm.c:632 +#: agent/gpg-agent.c:311 scd/scdaemon.c:257 sm/gpgsm.c:632 #, c-format msgid "invalid debug-level `%s' given\n" msgstr "ungültige Debugebene `%s' angegeben\n" -#: agent/gpg-agent.c:498 agent/protect-tool.c:1061 kbx/kbxutil.c:431 -#: scd/scdaemon.c:367 sm/gpgsm.c:753 +#: agent/gpg-agent.c:482 agent/protect-tool.c:1072 kbx/kbxutil.c:431 +#: scd/scdaemon.c:349 sm/gpgsm.c:753 #, c-format msgid "libgcrypt is too old (need %s, have %s)\n" msgstr "" "Die Bibliothek \"libgcrypt\" is zu alt (benötigt wird %s, vorhanden ist %s)\n" -#: agent/gpg-agent.c:590 scd/scdaemon.c:442 sm/gpgsm.c:854 +#: agent/gpg-agent.c:574 scd/scdaemon.c:424 sm/gpgsm.c:854 #, c-format msgid "NOTE: no default option file `%s'\n" msgstr "Notiz: Voreingestellte Konfigurationsdatei `%s' fehlt\n" -#: agent/gpg-agent.c:595 agent/gpg-agent.c:1104 scd/scdaemon.c:447 +#: agent/gpg-agent.c:579 agent/gpg-agent.c:1085 scd/scdaemon.c:429 #: sm/gpgsm.c:858 #, c-format msgid "option file `%s': %s\n" msgstr "Konfigurationsdatei `%s': %s\n" -#: agent/gpg-agent.c:603 scd/scdaemon.c:455 sm/gpgsm.c:865 +#: agent/gpg-agent.c:587 scd/scdaemon.c:437 sm/gpgsm.c:865 #, c-format msgid "reading options from `%s'\n" msgstr "Optionen werden aus `%s' gelesen\n" -#: agent/gpg-agent.c:1154 agent/gpg-agent.c:1257 agent/gpg-agent.c:1261 -#: agent/gpg-agent.c:1297 agent/gpg-agent.c:1301 +#: agent/gpg-agent.c:879 +#, c-format +msgid "error creating `%s': %s\n" +msgstr "Fehler beim Erstellen von `%s': %s\n" + +#: agent/gpg-agent.c:1135 agent/gpg-agent.c:1238 agent/gpg-agent.c:1242 +#: agent/gpg-agent.c:1278 agent/gpg-agent.c:1282 scd/scdaemon.c:900 #, c-format msgid "can't create directory `%s': %s\n" msgstr "Das Verzeichniss `%s' kann nicht erstellt werden: %s\n" -#: agent/gpg-agent.c:1168 +#: agent/gpg-agent.c:1149 scd/scdaemon.c:914 msgid "name of socket too long\n" msgstr "Der Name des Sockets ist zu lang\n" -#: agent/gpg-agent.c:1194 +#: agent/gpg-agent.c:1175 scd/scdaemon.c:940 #, c-format msgid "can't create socket: %s\n" msgstr "Socket kann nicht erzeugt werden: %s\n" -#: agent/gpg-agent.c:1223 +#: agent/gpg-agent.c:1204 scd/scdaemon.c:969 #, c-format msgid "error binding socket to `%s': %s\n" msgstr "Der Socket kann nicht an `%s' gebunden werden: %s\n" -#: agent/gpg-agent.c:1231 +#: agent/gpg-agent.c:1212 scd/scdaemon.c:977 #, c-format msgid "listen() failed: %s\n" msgstr "Der listen() Aufruf ist fehlgeschlagen: %s\n" -#: agent/gpg-agent.c:1237 +#: agent/gpg-agent.c:1218 scd/scdaemon.c:983 #, c-format msgid "listening on socket `%s'\n" msgstr "Es wird auf Socket `%s' gehört\n" -#: agent/gpg-agent.c:1265 agent/gpg-agent.c:1307 +#: agent/gpg-agent.c:1246 agent/gpg-agent.c:1288 #, c-format msgid "directory `%s' created\n" msgstr "Verzeichniss `%s' wurde erstellt\n" -#: agent/gpg-agent.c:1313 +#: agent/gpg-agent.c:1294 #, c-format msgid "stat() failed for `%s': %s\n" msgstr "stat() Aufruf für `%s' fehlgeschlagen: %s\n" -#: agent/gpg-agent.c:1317 +#: agent/gpg-agent.c:1298 #, c-format msgid "can't use `%s' as home directory\n" msgstr "Die Datei `%s' kann nicht als Home-Verzeichniss benutzt werden\n" -#: agent/gpg-agent.c:1408 +#: agent/gpg-agent.c:1396 #, c-format -msgid "handler for fd %d started\n" -msgstr "Handhabungsroutine für fd %d gestartet\n" +msgid "handler 0x%lx for fd %d started\n" +msgstr "Handhabungsroutine 0x%lx für fd %d gestartet\n" -#: agent/gpg-agent.c:1417 +#: agent/gpg-agent.c:1406 #, c-format -msgid "handler for fd %d terminated\n" -msgstr "Handhabungsroutine für den fd %d beendet\n" +msgid "handler 0x%lx for fd %d terminated\n" +msgstr "Handhabungsroutine 0x%lx für den fd %d beendet\n" -#: agent/gpg-agent.c:1430 +#: agent/gpg-agent.c:1420 #, c-format -msgid "ssh handler for fd %d started\n" -msgstr "SSH Handhabungsroutine für fd %d gestartet\n" +msgid "ssh handler 0x%lx for fd %d started\n" +msgstr "SSH Handhabungsroutine 0x%lx für fd %d gestartet\n" -#: agent/gpg-agent.c:1436 +#: agent/gpg-agent.c:1427 #, c-format -msgid "ssh handler for fd %d terminated\n" -msgstr "SSH Handhabungsroutine für fd %d beendet\n" +msgid "ssh handler 0x%lx for fd %d terminated\n" +msgstr "SSH Handhabungsroutine 0x%lx für fd %d beendet\n" -#: agent/gpg-agent.c:1525 +#: agent/gpg-agent.c:1521 scd/scdaemon.c:1099 #, c-format msgid "pth_select failed: %s - waiting 1s\n" msgstr "pth_select() Aufruf fehlgeschlagen: %s - warte 1s\n" -#: agent/gpg-agent.c:1582 +#: agent/gpg-agent.c:1605 scd/scdaemon.c:1156 #, c-format msgid "%s %s stopped\n" msgstr "%s %s angehalten\n" -#: agent/gpg-agent.c:1604 +#: agent/gpg-agent.c:1626 msgid "no gpg-agent running in this session\n" msgstr "Der gpg-agent läuft nicht für diese Session\n" -#: agent/gpg-agent.c:1614 common/simple-pwquery.c:323 sm/call-agent.c:140 +#: agent/gpg-agent.c:1636 common/simple-pwquery.c:323 sm/call-agent.c:143 msgid "malformed GPG_AGENT_INFO environment variable\n" msgstr "Die Variable GPG_AGENT_INFO ist fehlerhaft\n" -#: agent/gpg-agent.c:1626 common/simple-pwquery.c:335 sm/call-agent.c:152 +#: agent/gpg-agent.c:1648 common/simple-pwquery.c:335 sm/call-agent.c:155 #, c-format msgid "gpg-agent protocol version %d is not supported\n" msgstr "Das gpg-agent Protocol %d wird nicht unterstützt\n" -#: agent/protect-tool.c:142 +#: agent/protect-tool.c:145 msgid "Usage: gpg-protect-tool [options] (-h for help)\n" msgstr "Gebrauch: gpg-protect-tool [Optionen] (-h für Hilfe)\n" -#: agent/protect-tool.c:144 +#: agent/protect-tool.c:147 msgid "" "Syntax: gpg-protect-tool [options] [args]]\n" "Secret key maintenance tool\n" @@ -265,16 +270,16 @@ "Syntax: gpg-protect-tool [Optionen] [Argumente]\n" "Werkzeug zum Bearbeiten von geheimen Schlüsseln\n" -#: agent/protect-tool.c:1193 +#: agent/protect-tool.c:1205 msgid "Please enter the passphrase to unprotect the PKCS#12 object." msgstr "Bitte geben Sie die Passphrase zum Entsperren des PKCS#12 Objekts ein" -#: agent/protect-tool.c:1196 +#: agent/protect-tool.c:1208 msgid "Please enter the passphrase to protect the new PKCS#12 object." msgstr "" "Bitte geben Sie die Passphrase zum Schützen des neuen PKCS#12 Objekts ein" -#: agent/protect-tool.c:1199 +#: agent/protect-tool.c:1211 msgid "" "Please enter the passphrase to protect the imported object within the GnuPG " "system." @@ -282,11 +287,11 @@ "Bitte geben Sie die Passphrase ein, um das importierte Objket im GnuPG " "System zu schützen." -#: agent/protect-tool.c:1202 agent/genkey.c:110 agent/genkey.c:218 +#: agent/protect-tool.c:1214 agent/genkey.c:110 agent/genkey.c:218 msgid "Please re-enter this passphrase" msgstr "Bitte geben Sie das Mantra (Passphrase) noch einmal ein:" -#: agent/protect-tool.c:1204 +#: agent/protect-tool.c:1216 msgid "" "Please enter the passphrase or the PIN\n" "needed to complete this operation." @@ -294,24 +299,36 @@ "Die Eingabe des Mantras (Passphrase) bzw. der PIN\n" "wird benötigt um diese Aktion auszuführen." -#: agent/protect-tool.c:1208 agent/genkey.c:131 agent/genkey.c:238 +#: agent/protect-tool.c:1220 agent/genkey.c:131 agent/genkey.c:238 msgid "does not match - try again" msgstr "Keine Übereinstimmung - bitte nochmal versuchen" -#: agent/protect-tool.c:1209 +#: agent/protect-tool.c:1221 msgid "Passphrase:" msgstr "Passphrase:" -#: agent/protect-tool.c:1222 +#: agent/protect-tool.c:1234 #, c-format msgid "error while asking for the passphrase: %s\n" msgstr "Fehler bei der Abfrage der Passphrase: %s\n" -#: agent/protect-tool.c:1225 +#: agent/protect-tool.c:1237 msgid "cancelled\n" msgstr "Vom Benutzer abgebrochen\n" -#: agent/divert-scd.c:200 +#: agent/divert-scd.c:216 +msgid "Admin PIN" +msgstr "Admin PIN" + +#: agent/divert-scd.c:257 +msgid "Repeat this PIN" +msgstr "PIN bitte wiederholen" + +#: agent/divert-scd.c:260 +msgid "PIN not correctly repeated; try again" +msgstr "PIN wurde nicht korrekt eingegeben; nochmal versuchen" + +#: agent/divert-scd.c:272 #, c-format msgid "Please enter the PIN%s%s%s to unlock the card" msgstr "Bitte geben Sie die PIN%s%s%s ein um die Karte zu entsperren" @@ -326,12 +343,12 @@ msgid "Please enter the new passphrase" msgstr "Bitte geben Sie das Mantra (Passphrase) ein:" -#: agent/query.c:145 +#: agent/query.c:169 #, c-format msgid "failed to acquire the pinentry lock: %s\n" msgstr "Die Sperre für das Pinentry kann nicht gesetzt werden: %s\n" -#: agent/query.c:307 +#: agent/query.c:332 msgid "" "Please enter your PIN, so that the secret key can be unlocked for this " "session" @@ -339,7 +356,7 @@ "Bitte geben Sie Ihre PIN ein, so daß der geheime Schlüssel benutzt werden " "kann" -#: agent/query.c:310 +#: agent/query.c:335 msgid "" "Please enter your passphrase, so that the secret key can be unlocked for " "this session" @@ -347,31 +364,31 @@ "Bitte geben Sie Ihr Mantra (Passphrase) ein, so daß der geheime Schlüssel " "benutzt werden kann" -#: agent/query.c:365 agent/query.c:377 +#: agent/query.c:393 agent/query.c:405 msgid "PIN too long" msgstr "Die PIN ist zu lang" -#: agent/query.c:366 +#: agent/query.c:394 msgid "Passphrase too long" msgstr "Das Matra (Passphrase) ist zu lang" -#: agent/query.c:374 +#: agent/query.c:402 msgid "Invalid characters in PIN" msgstr "Ungültige Zeichen in der PIN" -#: agent/query.c:379 +#: agent/query.c:407 msgid "PIN too short" msgstr "Die PIN ist zu kurz" -#: agent/query.c:391 +#: agent/query.c:419 msgid "Bad PIN" msgstr "Falsche PIN" -#: agent/query.c:392 +#: agent/query.c:420 msgid "Bad Passphrase" msgstr "Falsches Mantra (Passphrase)" -#: agent/query.c:431 +#: agent/query.c:460 msgid "Passphrase" msgstr "Mantra" @@ -467,7 +484,7 @@ msgid "problem with the agent\n" msgstr "Problem mit dem Agenten\n" -#: jnlib/logging.c:609 +#: jnlib/logging.c:610 #, c-format msgid "you found a bug ... (%s:%d)\n" msgstr "Sie haben einen Bug (Softwarefehler) gefunden ... (%s:%d)\n" @@ -522,43 +539,39 @@ "Syntax: kbxutil [Optionen] [Dateien]\n" "Anlistem exportieren und Importieren von KeyBox Dateien\n" -#: scd/scdaemon.c:106 sm/gpgsm.c:349 +#: scd/scdaemon.c:103 +msgid "run in multi server mode (foreground)" +msgstr "Im Multiserver Modus ausführen" + +#: scd/scdaemon.c:109 sm/gpgsm.c:349 msgid "read options from file" msgstr "Konfigurationsoptionen aus Datei lesen" -#: scd/scdaemon.c:111 -msgid "|N|set OpenSC debug level to N" -msgstr "|N|Den OpenSC Debugstufe auf N setzen" - -#: scd/scdaemon.c:114 +#: scd/scdaemon.c:119 msgid "|N|connect to reader at port N" msgstr "|N|Verbinde mit dem Leser auf Port N" -#: scd/scdaemon.c:115 +#: scd/scdaemon.c:120 msgid "|NAME|use NAME as ct-API driver" msgstr "|NAME|Benutze NAME als CT-API Treiber" -#: scd/scdaemon.c:116 +#: scd/scdaemon.c:121 msgid "|NAME|use NAME as PC/SC driver" msgstr "|NAME|Benutze NAME als PC/SC Treiber" -#: scd/scdaemon.c:119 +#: scd/scdaemon.c:124 msgid "do not use the internal CCID driver" msgstr "Den internen CCID Treiber nicht benutzen" -#: scd/scdaemon.c:126 -msgid "do not use the OpenSC layer" -msgstr "Den OpenSC basierten Kartenzugriff nicht nutzen" - -#: scd/scdaemon.c:131 +#: scd/scdaemon.c:129 msgid "allow the use of admin card commands" msgstr "Erlaube die Benutzung von \"Admin\" Kommandos" -#: scd/scdaemon.c:181 +#: scd/scdaemon.c:186 msgid "Usage: scdaemon [options] (-h for help)" msgstr "Gebrauch: scdaemon [Optionen] (-h für Hilfe)" -#: scd/scdaemon.c:183 +#: scd/scdaemon.c:188 msgid "" "Syntax: scdaemon [options] [command [args]]\n" "Smartcard daemon for GnuPG\n" @@ -566,12 +579,22 @@ "Synatx: scdaemon [Optionen] [Kommando [Argumente]]\n" "Smartcard Daemon für GnuPG\n" -#: scd/scdaemon.c:635 +#: scd/scdaemon.c:656 msgid "please use the option `--daemon' to run the program in the background\n" msgstr "" "Bitte die Option `--daemon' nutzen um das Programm im Hintergund " "auszuführen\n" +#: scd/scdaemon.c:997 +#, c-format +msgid "handler for fd %d started\n" +msgstr "Handhabungsroutine für fd %d gestartet\n" + +#: scd/scdaemon.c:1002 +#, c-format +msgid "handler for fd %d terminated\n" +msgstr "Handhabungsroutine für den fd %d beendet\n" + #: scd/app-openpgp.c:595 #, c-format msgid "failed to store the fingerprint: %s\n" @@ -582,52 +605,52 @@ msgid "failed to store the creation date: %s\n" msgstr "Das Erzeugungsdatum kann nicht gespeichert werden: %s\n" -#: scd/app-openpgp.c:976 +#: scd/app-openpgp.c:978 #, c-format msgid "reading public key failed: %s\n" msgstr "Fehler beim Lesen des öffentlichen Schlüssels: %s\n" -#: scd/app-openpgp.c:984 scd/app-openpgp.c:1621 scd/app-openpgp.c:2411 +#: scd/app-openpgp.c:986 scd/app-openpgp.c:1910 msgid "response does not contain the public key data\n" msgstr "Die Antwort enthält keine Public Key Daten\n" -#: scd/app-openpgp.c:992 scd/app-openpgp.c:1629 scd/app-openpgp.c:2419 +#: scd/app-openpgp.c:994 scd/app-openpgp.c:1918 msgid "response does not contain the RSA modulus\n" msgstr "Die Antwort enthält keinen RSA Modulus\n" -#: scd/app-openpgp.c:1001 scd/app-openpgp.c:1639 scd/app-openpgp.c:2430 +#: scd/app-openpgp.c:1003 scd/app-openpgp.c:1928 msgid "response does not contain the RSA public exponent\n" msgstr "Die Antwort enthält keinen öffenlichen RSA Exponent\n" -#: scd/app-openpgp.c:1253 scd/app-openpgp.c:1341 scd/app-openpgp.c:1861 +#: scd/app-openpgp.c:1259 scd/app-openpgp.c:1347 scd/app-openpgp.c:2150 #, c-format msgid "PIN callback returned error: %s\n" msgstr "Fehler vom PIN \"callback\": %s\n" -#: scd/app-openpgp.c:1259 scd/app-openpgp.c:1347 scd/app-openpgp.c:1867 +#: scd/app-openpgp.c:1265 scd/app-openpgp.c:1353 scd/app-openpgp.c:2156 #, c-format msgid "PIN for CHV%d is too short; minimum length is %d\n" msgstr "Die PIN für den CHV%d ist zu kurz; Mindestlänge ist %d\n" -#: scd/app-openpgp.c:1268 scd/app-openpgp.c:1282 scd/app-openpgp.c:1357 -#: scd/app-openpgp.c:1876 scd/app-openpgp.c:1890 +#: scd/app-openpgp.c:1274 scd/app-openpgp.c:1288 scd/app-openpgp.c:1363 +#: scd/app-openpgp.c:2165 scd/app-openpgp.c:2179 #, c-format msgid "verify CHV%d failed: %s\n" msgstr "Prüfen von CHV%d fehlgeschlagen: %s\n" -#: scd/app-openpgp.c:1305 +#: scd/app-openpgp.c:1311 msgid "access to admin commands is not configured\n" msgstr "Zugriff auf Admin Kommandos ist nicht konfiguriert\n" -#: scd/app-openpgp.c:1320 scd/app-openpgp.c:2096 +#: scd/app-openpgp.c:1326 scd/app-openpgp.c:2385 msgid "error retrieving CHV status from card\n" msgstr "Fehler beim Holen des CHV Status von der Karte\n" -#: scd/app-openpgp.c:1326 scd/app-openpgp.c:2105 +#: scd/app-openpgp.c:1332 scd/app-openpgp.c:2394 msgid "card is permanently locked!\n" msgstr "Die Karte ist dauerhaft gesperrt!\n" -#: scd/app-openpgp.c:1331 +#: scd/app-openpgp.c:1337 #, c-format msgid "%d Admin PIN attempts remaining before card is permanently locked\n" msgstr "" @@ -636,109 +659,119 @@ #. TRANSLATORS: Do not translate the "|A|" prefix but #. keep it at the start of the string. We need this elsewhere #. to get some infos on the string. -#: scd/app-openpgp.c:1338 +#: scd/app-openpgp.c:1344 msgid "|A|Admin PIN" msgstr "|A|Admin PIN" #. TRANSLATORS: Do not translate the "|*|" prefixes but #. keep it at the start of the string. We need this elsewhere #. to get some infos on the string. -#: scd/app-openpgp.c:1487 +#: scd/app-openpgp.c:1493 msgid "|AN|New Admin PIN" msgstr "|AN|Neue Admin PIN" -#: scd/app-openpgp.c:1487 +#: scd/app-openpgp.c:1493 msgid "|N|New PIN" msgstr "|N|Neue PIN" -#: scd/app-openpgp.c:1491 +#: scd/app-openpgp.c:1497 #, c-format msgid "error getting new PIN: %s\n" msgstr "Fehler beim Holen der neuen PIN: %s\n" -#: scd/app-openpgp.c:1564 scd/app-openpgp.c:1707 +#: scd/app-openpgp.c:1547 scd/app-openpgp.c:1996 msgid "error reading application data\n" msgstr "Fehler beim Lesen der Anwendungsdaten\n" -#: scd/app-openpgp.c:1571 scd/app-openpgp.c:1714 +#: scd/app-openpgp.c:1553 scd/app-openpgp.c:2003 msgid "error reading fingerprint DO\n" msgstr "Fehler beim Lesen des Fingerabdruck Datenobjekts\n" -#: scd/app-openpgp.c:1580 +#: scd/app-openpgp.c:1563 msgid "key already exists\n" msgstr "Schlüssel existiert bereits\n" -#: scd/app-openpgp.c:1584 +#: scd/app-openpgp.c:1567 msgid "existing key will be replaced\n" msgstr "Existierender Schlüssel wird ersetzt\n" -#: scd/app-openpgp.c:1586 +#: scd/app-openpgp.c:1569 msgid "generating new key\n" msgstr "Neuer Schlüssel wird erzeugt\n" -#: scd/app-openpgp.c:1597 +#: scd/app-openpgp.c:1736 +msgid "creation timestamp missing\n" +msgstr "Erzeugungsdatum fehlt\n" + +#: scd/app-openpgp.c:1743 +#, c-format +msgid "RSA modulus missing or not of size %d bits\n" +msgstr "Der RSA Modulus fehlt oder ist nicht %d Bits lang\n" + +#: scd/app-openpgp.c:1750 +#, c-format +msgid "RSA public exponent missing or larger than %d bits\n" +msgstr "Der öffentliche RSA Exponent fehlt oder ist länger als %d Bits\n" + +#: scd/app-openpgp.c:1758 scd/app-openpgp.c:1765 +#, c-format +msgid "RSA prime %s missing or not of size %d bits\n" +msgstr "Die RSA Primzahl %s fehlt oder ist nicht %d Bits lang\n" + +#: scd/app-openpgp.c:1828 +#, c-format +msgid "failed to store the key: %s\n" +msgstr "Fehler beim Speichern des Schlüssels: %s\n" + +#: scd/app-openpgp.c:1887 msgid "please wait while key is being generated ...\n" msgstr "Bitte warten bis der Schlüssel erzeugt wurde ...\n" -#: scd/app-openpgp.c:1612 +#: scd/app-openpgp.c:1901 msgid "generating key failed\n" msgstr "Fehler beim Erzeugen des Schlüssels\n" -#: scd/app-openpgp.c:1615 +#: scd/app-openpgp.c:1904 #, c-format msgid "key generation completed (%d seconds)\n" msgstr "Schlüsselerzeugung vollendet (%d Sekunden)\n" -#: scd/app-openpgp.c:1672 +#: scd/app-openpgp.c:1961 msgid "invalid structure of OpenPGP card (DO 0x93)\n" msgstr "Ungültige Struktur der OpenPGP Karte (DO 0x93)\n" -#: scd/app-openpgp.c:1841 +#: scd/app-openpgp.c:2130 #, c-format msgid "signatures created so far: %lu\n" msgstr "Anzahl bereits erzeugter Signaturen: %lu\n" -#: scd/app-openpgp.c:1849 +#: scd/app-openpgp.c:2138 #, c-format -msgid "PIN [sigs done: %lu]" -msgstr "PIN [erzeugte signaturen: %lu]" +msgid "||Please enter the PIN%%0A[sigs done: %lu]" +msgstr "||Bitte geben Sie die PIN ein%%0A[Sigs bisher: %lu]" -#: scd/app-openpgp.c:2110 +#: scd/app-openpgp.c:2399 msgid "" "verification of Admin PIN is currently prohibited through this command\n" msgstr "" "Die Überprüfung der Admin PIN is momentan durch ein Kommando verboten " "worden\n" -#: scd/app-openpgp.c:2181 scd/app-openpgp.c:2191 +#: scd/app-openpgp.c:2470 scd/app-openpgp.c:2480 #, c-format msgid "can't access %s - invalid OpenPGP card?\n" msgstr "Zugriff auf %s nicht möglich - ungültige OpenPGP Karte?\n" -#: scd/app-openpgp.c:2262 -#, c-format -msgid "error getting serial number: %s\n" -msgstr "Fehler beim Holen der Seriennummer: %s\n" - -#: scd/app-openpgp.c:2362 -#, c-format -msgid "failed to store the key: %s\n" -msgstr "Fehler beim Speichern des Schlüssels: %s\n" - -#: scd/app-openpgp.c:2404 -msgid "reading the key failed\n" -msgstr "Fehler beim Lesen des Schlüssels: %s\n" - -#: sm/base64.c:315 +#: sm/base64.c:317 #, c-format msgid "invalid radix64 character %02x skipped\n" msgstr "Ungültiges Basis-64 Zeichen %02X wurde übergangen\n" -#: sm/call-agent.c:98 +#: sm/call-agent.c:101 msgid "no running gpg-agent - starting one\n" msgstr "Kein aktiver gpg-agent - es wird einer gestarted\n" -#: sm/call-agent.c:163 +#: sm/call-agent.c:166 msgid "can't connect to the agent - trying fall back\n" msgstr "Verbindung zum gpg-agent nicht möglich - Ersatzmethode wird versucht\n" @@ -761,31 +794,31 @@ "Verbindung zum Dirmngr kann nicht aufgebaut werden - Ersatzmethode wird " "versucht\n" -#: sm/certdump.c:59 sm/certdump.c:143 +#: sm/certdump.c:60 sm/certdump.c:146 msgid "none" msgstr "keine" -#: sm/certdump.c:152 +#: sm/certdump.c:155 msgid "[none]" msgstr "[keine]" -#: sm/certdump.c:494 +#: sm/certdump.c:496 msgid "[Error - No name]" msgstr "[Fehler - Kein Name]" -#: sm/certdump.c:508 +#: sm/certdump.c:510 msgid "[Error - unknown encoding]" msgstr "[Fehler - Unbekannte Kodierung]" -#: sm/certdump.c:512 +#: sm/certdump.c:514 msgid "[Error - invalid encoding]" msgstr "[Fehler - Ungültige Kodierung]" -#: sm/certdump.c:517 +#: sm/certdump.c:519 msgid "[Error - invalid DN]" msgstr "[Fehler - Ungültiger DN]" -#: sm/certdump.c:678 +#: sm/certdump.c:680 #, c-format msgid "" "Please enter the passphrase to unlock the secret key for:\n" @@ -978,7 +1011,7 @@ msgid "certificate `%s' not found: %s\n" msgstr "Zertifikat `%s' nicht gefunden: %s\n" -#: sm/delete.c:112 sm/keydb.c:1401 sm/keydb.c:1494 +#: sm/delete.c:112 sm/keydb.c:1402 sm/keydb.c:1495 #, c-format msgid "error locking keybox: %s\n" msgstr "Fehler beim Sperren der Keybox: %s\n" @@ -1421,40 +1454,40 @@ msgid "can't create lock for `%s'\n" msgstr "Datei `%s' konnte nicht gesperrt werden\n" -#: sm/keydb.c:1325 sm/keydb.c:1387 +#: sm/keydb.c:1326 sm/keydb.c:1388 msgid "failed to get the fingerprint\n" msgstr "Kann den Fingerprint nicht ermitteln\n" -#: sm/keydb.c:1332 sm/keydb.c:1394 +#: sm/keydb.c:1333 sm/keydb.c:1395 msgid "failed to allocate keyDB handle\n" msgstr "Kann keinen KeyDB Handler bereitstellen\n" -#: sm/keydb.c:1349 +#: sm/keydb.c:1350 #, c-format msgid "problem looking for existing certificate: %s\n" msgstr "Problem bei der Suche nach vorhandenem Zertifikat: %s\n" -#: sm/keydb.c:1357 +#: sm/keydb.c:1358 #, c-format msgid "error finding writable keyDB: %s\n" msgstr "Fehler bei der Suche nach einer schreibbaren KeyDB: %s\n" -#: sm/keydb.c:1365 +#: sm/keydb.c:1366 #, c-format msgid "error storing certificate: %s\n" msgstr "Fehler beim Speichern des Zertifikats: %s\n" -#: sm/keydb.c:1409 +#: sm/keydb.c:1410 #, c-format msgid "problem re-searching certificate: %s\n" msgstr "Problem bei Wiederfinden des Zertifikats: %s\n" -#: sm/keydb.c:1418 sm/keydb.c:1506 +#: sm/keydb.c:1419 sm/keydb.c:1507 #, c-format msgid "error getting stored flags: %s\n" msgstr "Fehler beim Holen der gespeicherten Flags: %s\n" -#: sm/keydb.c:1427 sm/keydb.c:1517 +#: sm/keydb.c:1428 sm/keydb.c:1518 #, c-format msgid "error storing flags: %s\n" msgstr "Fehler beim Speichern der Flags: %s\n" @@ -1580,6 +1613,24 @@ msgid "Configuration for OCSP" msgstr "Konfiguration zu OCSP" +#~ msgid "do not allow multiple connections" +#~ msgstr "Nicht mehr als eine Verbindung erlauben" + +#~ msgid "|N|set OpenSC debug level to N" +#~ msgstr "|N|Den OpenSC Debugstufe auf N setzen" + +#~ msgid "do not use the OpenSC layer" +#~ msgstr "Den OpenSC basierten Kartenzugriff nicht nutzen" + +#~ msgid "PIN [sigs done: %lu]" +#~ msgstr "PIN [erzeugte signaturen: %lu]" + +#~ msgid "error getting serial number: %s\n" +#~ msgstr "Fehler beim Holen der Seriennummer: %s\n" + +#~ msgid "reading the key failed\n" +#~ msgstr "Fehler beim Lesen des Schlüssels: %s\n" + #~ msgid "error creating a pipe: %s\n" #~ msgstr "Fehler beim Erzeugen einer \"Pipe\": %s\n" From cvs at cvs.gnupg.org Mon Jun 20 19:29:13 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Mon Jun 20 19:29:18 2005 Subject: GNUPG-1-9-BRANCH gnupg (NEWS configure.ac) Message-ID: Date: Monday, June 20, 2005 @ 19:52:14 Author: wk Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: NEWS configure.ac post release version number update --------------+ NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) Index: gnupg/NEWS diff -u gnupg/NEWS:1.165.2.74 gnupg/NEWS:1.165.2.75 --- gnupg/NEWS:1.165.2.74 Mon Jun 20 19:32:44 2005 +++ gnupg/NEWS Mon Jun 20 19:52:13 2005 @@ -1,3 +1,7 @@ +Noteworthy changes in version 1.9.18 +------------------------------------------------- + + Noteworthy changes in version 1.9.17 (2005-06-20) ------------------------------------------------- Index: gnupg/configure.ac diff -u gnupg/configure.ac:1.36.2.91 gnupg/configure.ac:1.36.2.92 --- gnupg/configure.ac:1.36.2.91 Mon Jun 20 19:32:44 2005 +++ gnupg/configure.ac Mon Jun 20 19:52:13 2005 @@ -24,7 +24,7 @@ # Version number: Remember to change it immediately *after* a release. # Add a "-cvs" prefix for non-released code. -AC_INIT(gnupg, 1.9.17, gnupg-devel@gnupg.org) +AC_INIT(gnupg, 1.9.18-cvs, gnupg-devel@gnupg.org) # Set development_version to yes if the minor number is odd or you # feel that the default check for a development version is not # sufficient. From cvs at cvs.gnupg.org Mon Jun 20 19:32:52 2005 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Jun 20 19:32:58 2005 Subject: libassuan (ChangeLog NEWS configure.ac) Message-ID: Date: Monday, June 20, 2005 @ 19:32:51 Author: werner Path: /cvs/gnupg/libassuan Modified: ChangeLog NEWS configure.ac Preparing for 0.6.10 --------------+ ChangeLog | 4 ++++ NEWS | 4 ++-- configure.ac | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Mon Jun 20 19:32:52 2005 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Jun 20 19:33:06 2005 Subject: libassuan/src (assuan-inquire.c assuan.h) Message-ID: Date: Monday, June 20, 2005 @ 19:32:52 Author: werner Path: /cvs/gnupg/libassuan/src Modified: assuan-inquire.c assuan.h Preparing for 0.6.10 ------------------+ assuan-inquire.c | 2 +- assuan.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Mon Jun 20 19:39:08 2005 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Jun 20 19:39:14 2005 Subject: libassuan (NEWS configure.ac) Message-ID: Date: Monday, June 20, 2005 @ 19:39:08 Author: werner Path: /cvs/gnupg/libassuan Modified: NEWS configure.ac post release version number update --------------+ NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Mon Jun 20 19:41:38 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Mon Jun 20 19:41:41 2005 Subject: gnupg/doc (ChangeLog gpg.sgml) Message-ID: Date: Monday, June 20, 2005 @ 20:04:39 Author: dshaw Path: /cvs/gnupg/gnupg/doc Modified: ChangeLog gpg.sgml * gpg.sgml: Document --edit-key/clean, import-clean, and export-clean. -----------+ ChangeLog | 5 ++++ gpg.sgml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) Index: gnupg/doc/ChangeLog diff -u gnupg/doc/ChangeLog:1.102 gnupg/doc/ChangeLog:1.103 --- gnupg/doc/ChangeLog:1.102 Mon Jun 20 19:03:27 2005 +++ gnupg/doc/ChangeLog Mon Jun 20 20:04:39 2005 @@ -1,3 +1,8 @@ +2005-06-20 David Shaw + + * gpg.sgml: Document --edit-key/clean, import-clean, and + export-clean. + 2005-06-20 Werner Koch * gpg.sgml: Document smartcard related options. Index: gnupg/doc/gpg.sgml diff -u gnupg/doc/gpg.sgml:1.85 gnupg/doc/gpg.sgml:1.86 --- gnupg/doc/gpg.sgml:1.85 Mon Jun 20 19:03:27 2005 +++ gnupg/doc/gpg.sgml Mon Jun 20 20:04:39 2005 @@ -543,6 +543,36 @@ toggle Toggle between public and secret key listing. + + +clean + +Cleans keys by removing unusable pieces. This command can be used to +keep keys neat and clean, and it has no effect aside from that. + + + + +sigs + +Remove any signatures that are not usable by the trust calculations. +For example, this removes any signature that does not validate. It +also removes any signature that is superceded by a later signature, or +signatures that were revoked. + + + +uids + +Compact (by removing all signatures except the selfsig) any user ID +that is no longer usable (e.g. revoked, or expired). + + + + +If invoked with no arguments, both `sigs' and `uids' are cleaned. + + save @@ -1377,6 +1407,22 @@ any new keys to be imported. Defaults to no. + +import-clean-sigs + +After import, remove any signatures from the new key that are not +usable. This is the same as running the --edit-key command "clean +sigs" after import. Defaults to no. + + + +import-clean-uids + +After import, compact (remove all signatures from) any user IDs from +the new key that are not usable. This is the same as running the +--edit-key command "clean uids" after import. Defaults to no. + + @@ -1418,6 +1464,22 @@ out any signatures that are not self-signatures. Defaults to no. + +export-clean-sigs + +Do not export any signatures that are not usable. This is the same as +running the --edit-key command "clean sigs" before export. Defaults +to no. + + + +export-clean-uids + +Compact (remove all signatures from) user IDs on the key being +exported if the user IDs are not usable. This is the same as running +the --edit-key command "clean uids" before export. Defaults to no. + + From cvs at cvs.gnupg.org Mon Jun 20 19:42:36 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Mon Jun 20 19:42:39 2005 Subject: gnupg (ChangeLog NEWS) Message-ID: Date: Monday, June 20, 2005 @ 20:05:37 Author: dshaw Path: /cvs/gnupg/gnupg Modified: ChangeLog NEWS * NEWS: Note key cleaning commands. -----------+ ChangeLog | 4 ++++ NEWS | 9 +++++++++ 2 files changed, 13 insertions(+) Index: gnupg/ChangeLog diff -u gnupg/ChangeLog:1.252 gnupg/ChangeLog:1.253 --- gnupg/ChangeLog:1.252 Mon Jun 13 22:45:05 2005 +++ gnupg/ChangeLog Mon Jun 20 20:05:37 2005 @@ -1,3 +1,7 @@ +2005-06-20 David Shaw + + * NEWS: Note key cleaning commands. + 2005-06-13 David Shaw * configure.ac: Add check for no-pointer-sign warning keyword, and Index: gnupg/NEWS diff -u gnupg/NEWS:1.243 gnupg/NEWS:1.244 --- gnupg/NEWS:1.243 Tue May 31 10:39:18 2005 +++ gnupg/NEWS Mon Jun 20 20:05:37 2005 @@ -27,6 +27,15 @@ library. It is enabled via the configure option --with-libcurl like the other (also experimental) cURL helpers. + * New key cleaning options that can be used to remove unusable + (expired, revoked) signatures from a key. This is available via + the new "clean" command in --edit-key on a key by key basis, as + well as via the import-clean-sigs/import-clean-uids and + export-clean-sigs/export-clean-uids options for --import-options + and --export-options. These are currently off by default, and + replace the import-unusable-sigs/export-unusable-sigs options + from version 1.4.1. + Noteworthy changes in version 1.4.1 (2005-03-15) ------------------------------------------------ From cvs at cvs.gnupg.org Mon Jun 20 19:47:32 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 19:47:36 2005 Subject: gpgme/gpgme (ChangeLog gpgme.m4) Message-ID: Date: Monday, June 20, 2005 @ 20:10:33 Author: marcus Path: /cvs/gpgme/gpgme/gpgme Modified: ChangeLog gpgme.m4 2005-06-20 Marcus Brinkmann * gpgme.m4: Only call GPGME_CONFIG if found. -----------+ ChangeLog | 4 ++++ gpgme.m4 | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.408 gpgme/gpgme/ChangeLog:1.409 --- gpgme/gpgme/ChangeLog:1.408 Fri Jun 3 21:41:55 2005 +++ gpgme/gpgme/ChangeLog Mon Jun 20 20:10:33 2005 @@ -1,3 +1,7 @@ +2005-06-20 Marcus Brinkmann + + * gpgme.m4: Only call GPGME_CONFIG if found. + 2005-06-03 Marcus Brinkmann * gpgme.h (struct _gpgme_signature): New members pubkey_algo and Index: gpgme/gpgme/gpgme.m4 diff -u gpgme/gpgme/gpgme.m4:1.9 gpgme/gpgme/gpgme.m4:1.10 --- gpgme/gpgme/gpgme.m4:1.9 Thu Sep 30 03:06:18 2004 +++ gpgme/gpgme/gpgme.m4 Mon Jun 20 20:10:33 2005 @@ -20,7 +20,9 @@ fi AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no) - gpgme_version=`$GPGME_CONFIG --version` + if test "$GPGME_CONFIG" != "no" ; then + gpgme_version=`$GPGME_CONFIG --version` + fi gpgme_version_major=`echo $gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` gpgme_version_minor=`echo $gpgme_version | \ From cvs at cvs.gnupg.org Mon Jun 20 19:48:41 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 19:48:44 2005 Subject: gpgme-1-0-branch gpgme/gpgme (ChangeLog gpgme.m4) Message-ID: Date: Monday, June 20, 2005 @ 20:11:42 Author: marcus Path: /cvs/gpgme/gpgme/gpgme Tag: gpgme-1-0-branch Modified: ChangeLog gpgme.m4 2005-06-20 Marcus Brinkmann * gpgme.m4: Only call GPGME_CONFIG if found. -----------+ ChangeLog | 4 ++++ gpgme.m4 | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) Index: gpgme/gpgme/ChangeLog diff -u gpgme/gpgme/ChangeLog:1.386.2.7 gpgme/gpgme/ChangeLog:1.386.2.8 --- gpgme/gpgme/ChangeLog:1.386.2.7 Fri Jun 3 01:09:54 2005 +++ gpgme/gpgme/ChangeLog Mon Jun 20 20:11:42 2005 @@ -1,3 +1,7 @@ +2005-06-20 Marcus Brinkmann + + * gpgme.m4: Only call GPGME_CONFIG if found. + 2005-06-03 Marcus Brinkmann * wait-global.c (gpgme_wait): Break out of the fd processing loop Index: gpgme/gpgme/gpgme.m4 diff -u gpgme/gpgme/gpgme.m4:1.9 gpgme/gpgme/gpgme.m4:1.9.2.1 --- gpgme/gpgme/gpgme.m4:1.9 Thu Sep 30 03:06:18 2004 +++ gpgme/gpgme/gpgme.m4 Mon Jun 20 20:11:42 2005 @@ -20,7 +20,9 @@ fi AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no) - gpgme_version=`$GPGME_CONFIG --version` + if test "$GPGME_CONFIG" != "no" ; then + gpgme_version=`$GPGME_CONFIG --version` + fi gpgme_version_major=`echo $gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` gpgme_version_minor=`echo $gpgme_version | \ From cvs at cvs.gnupg.org Mon Jun 20 20:19:39 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 20:19:52 2005 Subject: libgpg-error (compile) Message-ID: Date: Monday, June 20, 2005 @ 20:19:39 Author: marcus Path: /cvs/gnupg/libgpg-error Added: compile This required file was missing. ---------+ compile | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 142 insertions(+) From cvs at cvs.gnupg.org Mon Jun 20 20:24:48 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 20:24:56 2005 Subject: libgpg-error/src (mkerrcodes.awk) Message-ID: Date: Monday, June 20, 2005 @ 20:24:48 Author: marcus Path: /cvs/gnupg/libgpg-error/src Modified: mkerrcodes.awk Update copyright year. ----------------+ mkerrcodes.awk | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) From cvs at cvs.gnupg.org Mon Jun 20 20:28:15 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 20:28:21 2005 Subject: libgpg-error (NEWS THANKS) Message-ID: Date: Monday, June 20, 2005 @ 20:28:15 Author: marcus Path: /cvs/gnupg/libgpg-error Modified: NEWS THANKS Prepare for release. --------+ NEWS | 6 ++++-- THANKS | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Mon Jun 20 20:28:33 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 20:28:39 2005 Subject: libgpg-error (ChangeLog configure.ac) Message-ID: Date: Monday, June 20, 2005 @ 20:28:33 Author: marcus Path: /cvs/gnupg/libgpg-error Modified: ChangeLog configure.ac 2005-06-20 Marcus Brinkmann * configure.ac: Bump up LIBGPG_ERROR_LT_REVISION, update version field. --------------+ ChangeLog | 5 +++++ configure.ac | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) From cvs at cvs.gnupg.org Mon Jun 20 20:29:10 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 20:29:15 2005 Subject: libgpg-error (ChangeLog) Message-ID: Date: Monday, June 20, 2005 @ 20:29:10 Author: marcus Path: /cvs/gnupg/libgpg-error Modified: ChangeLog Prepare for release. -----------+ ChangeLog | 2 ++ 1 files changed, 2 insertions(+) From cvs at cvs.gnupg.org Mon Jun 20 20:55:21 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 20:55:31 2005 Subject: libgpg-error (NEWS configure.ac) Message-ID: Date: Monday, June 20, 2005 @ 20:55:21 Author: marcus Path: /cvs/gnupg/libgpg-error Modified: NEWS configure.ac Post-release fixup. --------------+ NEWS | 10 ++++++++++ configure.ac | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Mon Jun 20 21:10:45 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 21:10:50 2005 Subject: gpgme-1-0-branch gpgme/gpgme (11 files) Message-ID: Date: Monday, June 20, 2005 @ 21:33:47 Author: marcus Path: /cvs/gpgme/gpgme/gpgme Tag: gpgme-1-0-branch Modified: data-user.c gpgme.c gpgme.h gpgme.m4 passphrase.c verify.c w32-io.c wait-private.c wait-user.c wait.c wait.h Update copyright year. ----------------+ data-user.c | 2 +- gpgme.c | 2 +- gpgme.h | 2 +- gpgme.m4 | 2 +- passphrase.c | 2 +- verify.c | 2 +- w32-io.c | 2 +- wait-private.c | 2 +- wait-user.c | 2 +- wait.c | 2 +- wait.h | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) Index: gpgme/gpgme/data-user.c diff -u gpgme/gpgme/data-user.c:1.4.2.2 gpgme/gpgme/data-user.c:1.4.2.3 --- gpgme/gpgme/data-user.c:1.4.2.2 Sat May 28 22:10:37 2005 +++ gpgme/gpgme/data-user.c Mon Jun 20 21:33:46 2005 @@ -1,5 +1,5 @@ /* data-user.c - A user callback based data object. - Copyright (C) 2002, 2004 g10 Code GmbH + Copyright (C) 2002, 2004, 2005 g10 Code GmbH This file is part of GPGME. Index: gpgme/gpgme/gpgme.c diff -u gpgme/gpgme/gpgme.c:1.76.2.2 gpgme/gpgme/gpgme.c:1.76.2.3 --- gpgme/gpgme/gpgme.c:1.76.2.2 Sat May 28 22:10:37 2005 +++ gpgme/gpgme/gpgme.c Mon Jun 20 21:33:46 2005 @@ -1,6 +1,6 @@ /* gpgme.c - GnuPG Made Easy. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. Index: gpgme/gpgme/gpgme.h diff -u gpgme/gpgme/gpgme.h:1.149.2.5 gpgme/gpgme/gpgme.h:1.149.2.6 --- gpgme/gpgme/gpgme.h:1.149.2.5 Thu Jun 2 13:28:11 2005 +++ gpgme/gpgme/gpgme.h Mon Jun 20 21:33:46 2005 @@ -1,6 +1,6 @@ /* gpgme.h - Public interface to GnuPG Made Easy. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. Index: gpgme/gpgme/gpgme.m4 diff -u gpgme/gpgme/gpgme.m4:1.9.2.1 gpgme/gpgme/gpgme.m4:1.9.2.2 --- gpgme/gpgme/gpgme.m4:1.9.2.1 Mon Jun 20 20:11:42 2005 +++ gpgme/gpgme/gpgme.m4 Mon Jun 20 21:33:46 2005 @@ -1,5 +1,5 @@ # gpgme.m4 - autoconf macro to detect GPGME. -# Copyright (C) 2002, 2003, 2004 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2005 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without Index: gpgme/gpgme/passphrase.c diff -u gpgme/gpgme/passphrase.c:1.23.2.2 gpgme/gpgme/passphrase.c:1.23.2.3 --- gpgme/gpgme/passphrase.c:1.23.2.2 Thu Jun 2 13:28:11 2005 +++ gpgme/gpgme/passphrase.c Mon Jun 20 21:33:46 2005 @@ -1,6 +1,6 @@ /* passphrase.c - Passphrase callback. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. Index: gpgme/gpgme/verify.c diff -u gpgme/gpgme/verify.c:1.69.2.2 gpgme/gpgme/verify.c:1.69.2.3 --- gpgme/gpgme/verify.c:1.69.2.2 Thu Apr 21 09:12:18 2005 +++ gpgme/gpgme/verify.c Mon Jun 20 21:33:46 2005 @@ -1,6 +1,6 @@ /* verify.c - Signature verification. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. Index: gpgme/gpgme/w32-io.c diff -u gpgme/gpgme/w32-io.c:1.29.2.2 gpgme/gpgme/w32-io.c:1.29.2.3 --- gpgme/gpgme/w32-io.c:1.29.2.2 Sat May 28 22:10:37 2005 +++ gpgme/gpgme/w32-io.c Mon Jun 20 21:33:46 2005 @@ -1,6 +1,6 @@ /* w32-io.c - W32 API I/O functions. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. Index: gpgme/gpgme/wait-private.c diff -u gpgme/gpgme/wait-private.c:1.9.2.2 gpgme/gpgme/wait-private.c:1.9.2.3 --- gpgme/gpgme/wait-private.c:1.9.2.2 Fri Jun 3 00:05:32 2005 +++ gpgme/gpgme/wait-private.c Mon Jun 20 21:33:46 2005 @@ -1,6 +1,6 @@ /* wait-private.c Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. Index: gpgme/gpgme/wait-user.c diff -u gpgme/gpgme/wait-user.c:1.5.2.2 gpgme/gpgme/wait-user.c:1.5.2.3 --- gpgme/gpgme/wait-user.c:1.5.2.2 Fri Jun 3 00:05:32 2005 +++ gpgme/gpgme/wait-user.c Mon Jun 20 21:33:46 2005 @@ -1,6 +1,6 @@ /* wait-user.c Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. Index: gpgme/gpgme/wait.c diff -u gpgme/gpgme/wait.c:1.42.2.2 gpgme/gpgme/wait.c:1.42.2.3 --- gpgme/gpgme/wait.c:1.42.2.2 Fri Jun 3 00:05:32 2005 +++ gpgme/gpgme/wait.c Mon Jun 20 21:33:46 2005 @@ -1,6 +1,6 @@ /* wait.c Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. Index: gpgme/gpgme/wait.h diff -u gpgme/gpgme/wait.h:1.10.2.2 gpgme/gpgme/wait.h:1.10.2.3 --- gpgme/gpgme/wait.h:1.10.2.2 Fri Jun 3 00:05:32 2005 +++ gpgme/gpgme/wait.h Mon Jun 20 21:33:46 2005 @@ -1,6 +1,6 @@ /* wait.h - Definitions for the wait queue interface. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. From cvs at cvs.gnupg.org Mon Jun 20 21:12:05 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 21:12:07 2005 Subject: gpgme-1-0-branch gpgme (NEWS) Message-ID: Date: Monday, June 20, 2005 @ 21:35:07 Author: marcus Path: /cvs/gpgme/gpgme Tag: gpgme-1-0-branch Modified: NEWS Update for release. ------+ NEWS | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) Index: gpgme/NEWS diff -u gpgme/NEWS:1.136.2.5 gpgme/NEWS:1.136.2.6 --- gpgme/NEWS:1.136.2.5 Fri Jun 3 00:03:40 2005 +++ gpgme/NEWS Mon Jun 20 21:35:06 2005 @@ -1,4 +1,4 @@ -Noteworthy changes in version 1.0.3 (unreleased) +Noteworthy changes in version 1.0.3 (2005-06-20) ------------------------------------------------ * Previousy, GPGME would use a default "include certs" of 1. This @@ -10,6 +10,11 @@ Because the default changes, this is a slight change of the API semantics. We consider it to be a bug fix. + * A bug which made GPGME hang has been fixed. If you have + experienced hanging before, please try out this version and let me + know if you still experience hanging problems. + + * Interface changes relative to the 0.9.0 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gpgme_set_include_certs CHANGED DEFAULT GPGME_INCLUDE_CERTS_DEFAULT NEW @@ -1045,7 +1050,7 @@ * Made the W32 support more robust. - Copyright 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without From cvs at cvs.gnupg.org Mon Jun 20 21:12:18 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 21:12:20 2005 Subject: gpgme-1-0-branch gpgme (ChangeLog configure.ac) Message-ID: Date: Monday, June 20, 2005 @ 21:35:19 Author: marcus Path: /cvs/gpgme/gpgme Tag: gpgme-1-0-branch Modified: ChangeLog configure.ac 2005-06-20 Marcus Brinkmann * configure.ac: Update the version information for the release. --------------+ ChangeLog | 4 ++++ configure.ac | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) Index: gpgme/ChangeLog diff -u gpgme/ChangeLog:1.108.2.4 gpgme/ChangeLog:1.108.2.5 --- gpgme/ChangeLog:1.108.2.4 Tue Dec 28 12:36:59 2004 +++ gpgme/ChangeLog Mon Jun 20 21:35:19 2005 @@ -1,3 +1,7 @@ +2005-06-20 Marcus Brinkmann + + * configure.ac: Update the version information for the release. + 2004-12-28 Werner Koch Released 1.0.2. Index: gpgme/configure.ac diff -u gpgme/configure.ac:1.93.2.4 gpgme/configure.ac:1.93.2.5 --- gpgme/configure.ac:1.93.2.4 Tue Dec 28 12:42:19 2004 +++ gpgme/configure.ac Mon Jun 20 21:35:19 2005 @@ -1,6 +1,6 @@ # configure.ac for GPGME # Copyright (C) 2000 Werner Koch (dd9jn) -# Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH +# Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH # # This file is part of GPGME. # @@ -24,18 +24,18 @@ min_automake_version="1.9.3" # Version number: Remember to change it immediately *after* a release. -AC_INIT(gpgme, 1.0.3-cvs, [bug-gpgme@gnupg.org]) +AC_INIT(gpgme, 1.0.3, [bug-gpgme@gnupg.org]) # LT Version numbers, remember to change them just *before* a release. # (Code changed: REVISION++) # (Interfaces added/removed/changed: CURRENT++, REVISION=0) # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBGPGME_LT_CURRENT=14 -# Subtract 2 from this value if you want to make the LFS transition an +LIBGPGME_LT_CURRENT=15 +# Subtract 2 from the AGE value if you want to make the LFS transition an # ABI break. [Note to self: Remove this comment with the next regular break.] -LIBGPGME_LT_AGE=3 -LIBGPGME_LT_REVISION=3 +LIBGPGME_LT_AGE=4 +LIBGPGME_LT_REVISION=0 # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 @@ -44,7 +44,7 @@ NEED_GPGSM_VERSION=1.9.6 ############################################## AC_PREREQ(2.52) -AC_REVISION($Revision: 1.93.2.4 $) +AC_REVISION($Revision: 1.93.2.5 $) PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION From cvs at cvs.gnupg.org Mon Jun 20 22:10:05 2005 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Mon Jun 20 22:10:08 2005 Subject: gpgme-1-0-branch gpgme (NEWS configure.ac) Message-ID: Date: Monday, June 20, 2005 @ 22:33:07 Author: marcus Path: /cvs/gpgme/gpgme Tag: gpgme-1-0-branch Modified: NEWS configure.ac Post-release fixup. --------------+ NEWS | 10 ++++++++++ configure.ac | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) Index: gpgme/NEWS diff -u gpgme/NEWS:1.136.2.6 gpgme/NEWS:1.136.2.7 --- gpgme/NEWS:1.136.2.6 Mon Jun 20 21:35:06 2005 +++ gpgme/NEWS Mon Jun 20 22:33:07 2005 @@ -1,3 +1,13 @@ +Noteworthy changes in version 1.0.4 (unreleased) +------------------------------------------------ + + * ... + + * Interface changes relative to the 1.0.3 release: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +SOMETHING NEW +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Noteworthy changes in version 1.0.3 (2005-06-20) ------------------------------------------------ Index: gpgme/configure.ac diff -u gpgme/configure.ac:1.93.2.5 gpgme/configure.ac:1.93.2.6 --- gpgme/configure.ac:1.93.2.5 Mon Jun 20 21:35:19 2005 +++ gpgme/configure.ac Mon Jun 20 22:33:07 2005 @@ -24,7 +24,7 @@ min_automake_version="1.9.3" # Version number: Remember to change it immediately *after* a release. -AC_INIT(gpgme, 1.0.3, [bug-gpgme@gnupg.org]) +AC_INIT(gpgme, 1.0.4-cvs, [bug-gpgme@gnupg.org]) # LT Version numbers, remember to change them just *before* a release. # (Code changed: REVISION++) # (Interfaces added/removed/changed: CURRENT++, REVISION=0) @@ -44,7 +44,7 @@ NEED_GPGSM_VERSION=1.9.6 ############################################## AC_PREREQ(2.52) -AC_REVISION($Revision: 1.93.2.5 $) +AC_REVISION($Revision: 1.93.2.6 $) PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION From cvs at cvs.gnupg.org Tue Jun 21 06:01:06 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Tue Jun 21 06:01:13 2005 Subject: gnupg/keyserver (ChangeLog gpgkeys_hkp.c gpgkeys_oldhkp.c) Message-ID: Date: Tuesday, June 21, 2005 @ 06:24:10 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_hkp.c gpgkeys_oldhkp.c * gpgkeys_hkp.c (append_path, send_key, get_key, search_key, main), gpgkeys_oldhkp.c (main): Properly handle double slashes in paths. ------------------+ ChangeLog | 6 ++++++ gpgkeys_hkp.c | 29 +++++++++++++++++++---------- gpgkeys_oldhkp.c | 8 +++++++- 3 files changed, 32 insertions(+), 11 deletions(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.131 gnupg/keyserver/ChangeLog:1.132 --- gnupg/keyserver/ChangeLog:1.131 Sun Jun 5 16:34:47 2005 +++ gnupg/keyserver/ChangeLog Tue Jun 21 06:24:10 2005 @@ -1,3 +1,9 @@ +2005-06-20 David Shaw + + * gpgkeys_hkp.c (append_path, send_key, get_key, search_key, + main), gpgkeys_oldhkp.c (main): Properly handle double slashes in + paths. + 2005-06-05 David Shaw * ksutil.c (init_ks_options, parse_ks_options): Provide a default Index: gnupg/keyserver/gpgkeys_hkp.c diff -u gnupg/keyserver/gpgkeys_hkp.c:1.54 gnupg/keyserver/gpgkeys_hkp.c:1.55 --- gnupg/keyserver/gpgkeys_hkp.c:1.54 Sun Jun 5 01:09:27 2005 +++ gnupg/keyserver/gpgkeys_hkp.c Tue Jun 21 06:24:10 2005 @@ -69,6 +69,18 @@ return 0; } +/* Append but avoid creating a double slash // in the path. */ +static char * +append_path(char *dest,const char *src) +{ + size_t n=strlen(dest); + + if(src[0]=='/' && n>0 && dest[n-1]=='/') + dest[n-1]='\0'; + + return strcat(dest,src); +} + int send_key(int *eof) { @@ -162,11 +174,10 @@ strcat(request,opt->port); else strcat(request,"11371"); - if(opt->path) - strcat(request,opt->path); + strcat(request,opt->path); /* request is MAX_URL+15 bytes long - MAX_URL covers the whole URL, including any supplied path. The 15 covers /pks/add. */ - strcat(request,"/pks/add"); + append_path(request,"/pks/add"); if(opt->verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); @@ -229,12 +240,11 @@ strcat(request,opt->port); else strcat(request,"11371"); - if(opt->path) - strcat(request,opt->path); + strcat(request,opt->path); /* request is MAX_URL+55 bytes long - MAX_URL covers the whole URL, including any supplied path. The 60 overcovers this /pks/... etc string plus the 8 bytes of key id */ - strcat(request,"/pks/lookup?op=get&options=mr&search=0x"); + append_path(request,"/pks/lookup?op=get&options=mr&search=0x"); /* fingerprint or long key id. Take the last 8 characters and treat it like a short key id */ @@ -301,9 +311,8 @@ strcat(request,opt->port); else strcat(request,"11371"); - if(opt->path) - strcat(request,opt->path); - strcat(request,"/pks/lookup?op=index&options=mr&search="); + strcat(request,opt->path); + append_path(request,"/pks/lookup?op=index&options=mr&search="); strcat(request,searchkey_encoded); if(opt->verbose>2) @@ -599,7 +608,7 @@ fprintf(console,"Host:\t\t%s\n",opt->host); if(opt->port) fprintf(console,"Port:\t\t%s\n",opt->port); - if(opt->path) + if(strcmp(opt->path,"/")!=0) fprintf(console,"Path:\t\t%s\n",opt->path); fprintf(console,"Command:\t%s\n",ks_action_to_string(opt->action)); } Index: gnupg/keyserver/gpgkeys_oldhkp.c diff -u gnupg/keyserver/gpgkeys_oldhkp.c:1.4 gnupg/keyserver/gpgkeys_oldhkp.c:1.5 --- gnupg/keyserver/gpgkeys_oldhkp.c:1.4 Sun Jun 5 01:09:27 2005 +++ gnupg/keyserver/gpgkeys_oldhkp.c Tue Jun 21 06:24:10 2005 @@ -761,6 +761,7 @@ int failed=0; struct keylist *keylist=NULL,*keyptr=NULL; unsigned int timeout=DEFAULT_KEYSERVER_TIMEOUT; + size_t n; console=stderr; @@ -956,6 +957,11 @@ } } + /* Avoid the double slash // in a path */ + n=strlen(path); + if(n>0 && path[n-1]=='/') + path[n-1]='\0'; + if(timeout && register_timeout()==-1) { fprintf(console,"gpgkeys: unable to register timeout handler\n"); @@ -1028,7 +1034,7 @@ fprintf(console,"Host:\t\t%s\n",host); if(port[0]) fprintf(console,"Port:\t\t%s\n",port); - if(path[0]) + if(strcmp(path,"/")!=0) fprintf(console,"Path:\t\t%s\n",path); fprintf(console,"Command:\t%s\n",action==GET?"GET": action==SEND?"SEND":"SEARCH"); From cvs at cvs.gnupg.org Tue Jun 21 15:37:20 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Jun 21 15:37:28 2005 Subject: gnupg/doc (gpg.texi) Message-ID: Date: Tuesday, June 21, 2005 @ 16:00:26 Author: wk Path: /cvs/gnupg/gnupg/doc Modified: gpg.texi . ----------+ gpg.texi | 149 +++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 122 insertions(+), 27 deletions(-) Index: gnupg/doc/gpg.texi diff -u gnupg/doc/gpg.texi:1.11 gnupg/doc/gpg.texi:1.12 --- gnupg/doc/gpg.texi:1.11 Tue Mar 15 16:51:52 2005 +++ gnupg/doc/gpg.texi Tue Jun 21 16:00:26 2005 @@ -349,6 +349,26 @@ @item toggle Toggle between public and secret key listing. +@item clean +Cleans keys by removing unusable pieces. This command can be used to +keep keys neat and clean, and it has no effect aside from that. + +@table @asis + +@item sigs +Remove any signatures that are not usable by the trust calculations. +For example, this removes any signature that does not validate. It +also removes any signature that is superceded by a later signature, or +signatures that were revoked. + +@item uids +Compact (by removing all signatures except the selfsig) any user ID +that is no longer usable (e.g. revoked, or expired). +@end table + +@noindent +If invoked with no arguments, both `sigs' and `uids' are cleaned. + @item save Save all changes to the key rings and quit. @@ -389,9 +409,25 @@ Ultimately trusted. @end table +@item --card-edit +Present a menu to work with a smartcard. The subcommand "help" provides +an overview on available commands. For a detailed description, please +see the Card HOWTO at +http://www.gnupg.org/documentation/howtos.html#GnuPG-cardHOWTO . + +@item --card-status +Show the content of the smart card. + +@item --change-pin +Present a menu to allow changing the PIN of a smartcard. This +functionality is also available as the subcommand "passwd" with the +--card-edit command. + @item --sign-key @code{name} Signs a public key with your secret key. This is a shortcut version of -the subcommand "sign" from --edit. +the subcommand "sign" from --edit. You may also want to consider the +option --no-interactive-selection which will drop you into the regular +menu when not all keys shall be signed. @item --lsign-key @code{name} Signs a public key with your secret key but marks it as @@ -678,6 +714,11 @@ @item -i, --interactive Prompt before overwriting any files. +@item --no-interactive-selection +Do not use interactive selection mode in certain menues but require +a selection in advance. This is currently only used with the "sign" +subcommand of --edit-key. + @item --batch @itemx --no-batch Use batch mode. Never ask, do not allow interactive commands. @@ -732,10 +773,10 @@ This option defaults to 0 (no particular claim). @item --min-cert-level -When building the trust database, disregard any signatures with a -certification level below this. Defaults to 2, which disregards level -1 signatures. Note that level 0 "no particular claim" signatures are -always accepted. +When building the trust database, treat any signatures with a +certification level below this as invalid. Defaults to 2, which +disregards level 1 signatures. Note that level 0 "no particular +claim" signatures are always accepted. @item --trusted-key @code{long key ID} Assume that the specified key (which must be given @@ -893,6 +934,16 @@ @item merge-only During import, allow key updates to existing keys, but do not allow any new keys to be imported. Defaults to no. + +@item import-clean-sigs +After import, remove any signatures from the new key that are not +usable. This is the same as running the --edit-key command "clean +sigs" after import. Defaults to no. + +@item import-clean-uids +After import, compact (remove all signatures from) any user IDs from +the new key that are not usable. This is the same as running the +--edit-key command "clean uids" after import. Defaults to no. @end table @item --export-options @code{parameters} @@ -919,6 +970,16 @@ @item export-minimal Export the smallest key possible. Currently this is done by leaving out any signatures that are not self-signatures. Defaults to no. + +@item export-clean-sigs +Do not export any signatures that are not usable. This is the same as +running the --edit-key command "clean sigs" before export. Defaults +to no. + +@item export-clean-uids +Compact (remove all signatures from) user IDs on the key being +exported if the user IDs are not usable. This is the same as running +the --edit-key command "clean uids" before export. Defaults to no. @end table @item --list-options @code{parameters} @@ -1073,6 +1134,31 @@ a options file. This also overrides the environment variable $GNUPGHOME. +@item --pcsc-driver @code{file} +Use @code{file} to access the smartcard reader. The current default +is `libpcsclite.so'. Instead of using this option you might also +want to install a symbolic link to the default file name +(e.g. from `libpcsclite.so.1'). + +@item --ctapi-driver @code{file} +Use @code{file} to access the smartcard reader. The current default +is `libtowitoko.so'. Note that the use of this interface is +deprecated; it may be removed in future releases. + +@item --disable-ccid +Disable the integrated support for CCID compliant readers. This +allows to fall back to one of the other drivers even if the internal +CCID driver can handle the reader. Note, that CCID support is only +available if libusb was available at build time. + +@item --reader-port @code{number_or_string} +This option may be used to specify the port of the card terminal. A +value of 0 refers to the first serial device; add 32768 to access USB +devices. The default is 32768 (first USB device). PC/SC or CCID +readers might need a string here; run the program in verbose mode to get +a list of available readers. The default is then the first reader +found. + @item --display-charset @code{name} Set the name of the native character set. This is used to convert some informational strings like user IDs to the proper UTF-8 @@ -1155,14 +1241,6 @@ needed to separate out the various subpackets from the stream delivered to the file descriptor. -@item --sk-comments -@itemx --no-sk-comments -Include secret key comment packets when exporting secret keys. This -is a GnuPG extension to the OpenPGP standard, and is off by default. -Please note that this has nothing to do with the comments in clear -text signatures or armor headers. --no-sk-comments disables this -option. - @item --comment @code{string} @itemx --no-comments Use @code{string} as a comment string in clear text signatures and @@ -1171,7 +1249,7 @@ to get multiple comment strings. --no-comments removes all comments. It is a good idea to keep the length of a single comment below 60 characters to avoid problems with mail programs wrapping such lines. -Note, that those comment lines, like all other header lines, are not +Note that comment lines, like all other header lines, are not protected by the signature. @item --emit-version @@ -1184,15 +1262,16 @@ @itemx -N, --set-notation @code{name=value} Put the name value pair into the signature as notation data. @code{name} must consist only of printable characters or spaces, and -must contain a '@@' character. This is to help prevent pollution of -the IETF reserved notation namespace. The --expert flag overrides the -'@@' check. @code{value} may be any printable string; it will be -encoded in UTF8, so you should check that your --display-charset is -set correctly. If you prefix @code{name} with an exclamation mark (!), -the notation data will be flagged as critical (rfc2440:5.2.3.15). ---sig-notation sets a notation for data signatures. --cert-notation -sets a notation for key signatures (certifications). --set-notation -sets both. +must contain a '@@' character in the form keyname@@domain.example.com +(substituting the appropriate keyname and domain name, of course). +This is to help prevent pollution of the IETF reserved notation +namespace. The --expert flag overrides the '@@' check. @code{value} +may be any printable string; it will be encoded in UTF8, so you should +check that your --display-charset is set correctly. If you prefix +@code{name} with an exclamation mark (!), the notation data will be +flagged as critical (rfc2440:5.2.3.15). --sig-notation sets a +notation for data signatures. --cert-notation sets a notation for key +signatures (certifications). --set-notation sets both. There are special codes that may be used in notation names. "%k" will be expanded into the key ID of the key being signed, "%K" into the @@ -1672,14 +1751,30 @@ @item --ask-sig-expire @itemx --no-ask-sig-expire When making a data signature, prompt for an expiration time. If this -option is not specified, the expiration time is "never". ---no-ask-sig-expire disables this option. +option is not specified, the expiration time set via +--default-sig-expire is used. --no-ask-sig-expire disables this +option. + +@item --default-sig-expire +The default expiration time to use for signature expiration. Valid +values are "0" for no expiration, a number followed by the letter d +(for days), w (for weeks), m (for months), or y (for years) (for +example "2m" for two months, or "5y" for five years), or an absolute +date in the form YYYY-MM-DD. Defaults to "0". @item --ask-cert-expire @itemx --no-ask-cert-expire When making a key signature, prompt for an expiration time. If this -option is not specified, the expiration time is "never". ---no-ask-cert-expire disables this option. +option is not specified, the expiration time set via +--default-cert-expire is used. --no-ask-cert-expire disables this +option. + +@item --default-cert-expire +The default expiration time to use for key signature expiration. +Valid values are "0" for no expiration, a number followed by the +letter d (for days), w (for weeks), m (for months), or y (for years) +(for example "2m" for two months, or "5y" for five years), or an +absolute date in the form YYYY-MM-DD. Defaults to "0". @item --expert @itemx --no-expert From cvs at cvs.gnupg.org Tue Jun 21 16:05:26 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Jun 21 16:05:28 2005 Subject: gnupg/checks (ChangeLog conventional.test) Message-ID: Date: Tuesday, June 21, 2005 @ 16:28:13 Author: wk Path: /cvs/gnupg/gnupg/checks Modified: ChangeLog conventional.test * conventional.test (algos): Uhh ohh, cut+paste error and not tested. -------------------+ ChangeLog | 5 +++++ conventional.test | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) Index: gnupg/checks/ChangeLog diff -u gnupg/checks/ChangeLog:1.28 gnupg/checks/ChangeLog:1.29 --- gnupg/checks/ChangeLog:1.28 Mon Jun 20 19:03:27 2005 +++ gnupg/checks/ChangeLog Tue Jun 21 16:28:12 2005 @@ -1,3 +1,8 @@ +2005-06-21 Werner Koch + + * conventional.test (algos): Uhh ohh, cut+paste error and not + tested. + 2005-06-02 Werner Koch * conventional.test: have_cipher_algo now requires uppercase Index: gnupg/checks/conventional.test diff -u gnupg/checks/conventional.test:1.10 gnupg/checks/conventional.test:1.11 --- gnupg/checks/conventional.test:1.10 Mon Jun 20 19:03:27 2005 +++ gnupg/checks/conventional.test Tue Jun 21 16:28:12 2005 @@ -12,11 +12,11 @@ algos="3des" if have_cipher_algo "CAST5"; then - algos="$algos idea" + algos="$algos cast5" fi if have_cipher_algo "BLOWFISH"; then - algos="$algos idea" + algos="$algos blowfish" fi if have_cipher_algo "AES"; then From cvs at cvs.gnupg.org Tue Jun 21 16:27:03 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Jun 21 16:27:07 2005 Subject: gnupg (configure.ac) Message-ID: Date: Tuesday, June 21, 2005 @ 16:50:10 Author: wk Path: /cvs/gnupg/gnupg Modified: configure.ac Post release version number update --------------+ configure.ac | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: gnupg/configure.ac diff -u gnupg/configure.ac:1.145 gnupg/configure.ac:1.146 --- gnupg/configure.ac:1.145 Tue Jun 21 14:54:54 2005 +++ gnupg/configure.ac Tue Jun 21 16:50:10 2005 @@ -26,7 +26,7 @@ # Remember to change the version number immediately *after* a release # and remove the "-cvs" or "rc" suffix immediately *before* a release. -AC_INIT(gnupg, 1.4.2rc2, bug-gnupg@gnu.org) +AC_INIT(gnupg, 1.4.2-cvs, bug-gnupg@gnu.org) # Set development_version to yes if the minor number is odd or you # feel that the default check for a development version is not # sufficient. From cvs at cvs.gnupg.org Wed Jun 22 04:57:36 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 22 04:57:40 2005 Subject: gnupg/util (ChangeLog http.c) Message-ID: Date: Wednesday, June 22, 2005 @ 05:20:43 Author: dshaw Path: /cvs/gnupg/gnupg/util Modified: ChangeLog http.c * http.c (send_request): Need == after the radix64-encoded basic auth string. -----------+ ChangeLog | 5 +++++ http.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.191 gnupg/util/ChangeLog:1.192 --- gnupg/util/ChangeLog:1.191 Thu Jun 9 00:54:02 2005 +++ gnupg/util/ChangeLog Wed Jun 22 05:20:43 2005 @@ -1,3 +1,8 @@ +2005-06-21 David Shaw + + * http.c (send_request): Need == after the radix64-encoded basic + auth string. + 2005-06-08 David Shaw * dotlock.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on Index: gnupg/util/http.c diff -u gnupg/util/http.c:1.34 gnupg/util/http.c:1.35 --- gnupg/util/http.c:1.34 Tue May 31 10:38:45 2005 +++ gnupg/util/http.c Wed Jun 22 05:20:43 2005 @@ -530,8 +530,8 @@ if(uri->auth) { char *x=make_radix64_string(uri->auth,strlen(uri->auth)); - auth=m_alloc(50+strlen(x)); - sprintf(auth,"Proxy-Authorization: Basic %s\r\n",x); + auth=m_alloc(52+strlen(x)); + sprintf(auth,"Proxy-Authorization: Basic %s==\r\n",x); m_free(x); } @@ -543,8 +543,8 @@ if(hd->uri->auth) { char *x=make_radix64_string(hd->uri->auth,strlen(hd->uri->auth)); - auth=m_alloc(50+strlen(x)); - sprintf(auth,"Authorization: Basic %s\r\n",x); + auth=m_alloc(52+strlen(x)); + sprintf(auth,"Authorization: Basic %s==\r\n",x); m_free(x); } } From cvs at cvs.gnupg.org Wed Jun 22 05:49:30 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 22 05:49:34 2005 Subject: gnupg/util (ChangeLog http.c) Message-ID: Date: Wednesday, June 22, 2005 @ 06:12:40 Author: dshaw Path: /cvs/gnupg/gnupg/util Modified: ChangeLog http.c * http.c (send_request, http_open, http_open_document): Pass in auth and proxyauth that can override the in-url auth. -----------+ ChangeLog | 3 +++ http.c | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.192 gnupg/util/ChangeLog:1.193 --- gnupg/util/ChangeLog:1.192 Wed Jun 22 05:20:43 2005 +++ gnupg/util/ChangeLog Wed Jun 22 06:12:40 2005 @@ -1,5 +1,8 @@ 2005-06-21 David Shaw + * http.c (send_request, http_open, http_open_document): Pass in + auth and proxyauth that can override the in-url auth. + * http.c (send_request): Need == after the radix64-encoded basic auth string. Index: gnupg/util/http.c diff -u gnupg/util/http.c:1.35 gnupg/util/http.c:1.36 --- gnupg/util/http.c:1.35 Wed Jun 22 05:20:43 2005 +++ gnupg/util/http.c Wed Jun 22 06:12:40 2005 @@ -69,7 +69,7 @@ static int insert_escapes( byte *buffer, const byte *string, const byte *special ); static URI_TUPLE parse_tuple( byte *string ); -static int send_request( HTTP_HD hd, const char *proxy ); +static int send_request( HTTP_HD hd, const char *proxy, const char *proxyauth); static byte *build_rel_path( PARSED_URI uri ); static int parse_response( HTTP_HD hd ); @@ -146,7 +146,8 @@ int http_open( HTTP_HD hd, HTTP_REQ_TYPE reqtype, const char *url, - unsigned int flags, const char *proxy ) + const char *auth, unsigned int flags, const char *proxy, + const char *proxyauth ) { int rc; @@ -162,7 +163,9 @@ rc = parse_uri( &hd->uri, url ); if( !rc ) { - rc = send_request( hd, proxy ); + if(auth) + hd->uri->auth=auth; + rc = send_request( hd, proxy, proxyauth ); if( !rc ) { hd->fp_write = iobuf_sockopen( hd->sock , "w" ); if( hd->fp_write ) @@ -225,12 +228,13 @@ int -http_open_document( HTTP_HD hd, const char *document, - unsigned int flags, const char *proxy ) +http_open_document( HTTP_HD hd, const char *document, const char *auth, + unsigned int flags, const char *proxy, + const char *proxyauth ) { int rc; - rc = http_open( hd, HTTP_REQ_GET, document, flags, proxy ); + rc = http_open(hd, HTTP_REQ_GET, document, auth, flags, proxy, proxyauth ); if( rc ) return rc; @@ -503,7 +507,7 @@ * Returns 0 if the request was successful */ static int -send_request( HTTP_HD hd, const char *proxy ) +send_request( HTTP_HD hd, const char *proxy, const char *proxyauth ) { const byte *server; byte *request, *p; @@ -527,6 +531,9 @@ } hd->sock = connect_server( *uri->host? uri->host : "localhost", uri->port? uri->port : 80, 0, NULL ); + if(proxyauth) + uri->auth=proxyauth; + if(uri->auth) { char *x=make_radix64_string(uri->auth,strlen(uri->auth)); From cvs at cvs.gnupg.org Wed Jun 22 05:50:34 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 22 05:50:49 2005 Subject: gnupg/include (ChangeLog http.h) Message-ID: Date: Wednesday, June 22, 2005 @ 06:13:41 Author: dshaw Path: /cvs/gnupg/gnupg/include Modified: ChangeLog http.h * http.h: Fix prototypes for http_open_document and http_open to pass in auth and proxyauth. -----------+ ChangeLog | 5 +++++ http.h | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) Index: gnupg/include/ChangeLog diff -u gnupg/include/ChangeLog:1.87 gnupg/include/ChangeLog:1.88 --- gnupg/include/ChangeLog:1.87 Sat May 21 16:04:31 2005 +++ gnupg/include/ChangeLog Wed Jun 22 06:13:41 2005 @@ -1,3 +1,8 @@ +2005-06-21 David Shaw + + * http.h: Fix prototypes for http_open_document and http_open to + pass in auth and proxyauth. + 2005-05-19 Werner Koch * util.h: Add definitions for membuf functions. Index: gnupg/include/http.h diff -u gnupg/include/http.h:1.10 gnupg/include/http.h:1.11 --- gnupg/include/http.h:1.10 Tue May 31 10:39:15 2005 +++ gnupg/include/http.h Wed Jun 22 06:13:41 2005 @@ -36,7 +36,7 @@ struct parsed_uri { /* all these pointers point into buffer; most stuff is not escaped */ char *scheme; /* pointer to the scheme string (lowercase) */ - char *auth; /* username/password for basic auth */ + const char *auth; /* username/password for basic auth */ char *host; /* host (converted to lowercase) */ ushort port; /* port (always set if the host is set) */ char *path; /* the path */ @@ -76,11 +76,13 @@ typedef struct http_context *HTTP_HD; int http_open( HTTP_HD hd, HTTP_REQ_TYPE reqtype, const char *url, - unsigned int flags, const char *proxy ); + const char *auth, unsigned int flags, const char *proxy, + const char *proxyauth ); void http_start_data( HTTP_HD hd ); int http_wait_response( HTTP_HD hd, unsigned int *ret_status ); void http_close( HTTP_HD hd ); -int http_open_document( HTTP_HD hd, const char *document, - unsigned int flags, const char *proxy ); +int http_open_document( HTTP_HD hd, const char *document, const char *auth, + unsigned int flags, const char *proxy, + const char *proxyauth ); #endif /*G10_HTTP_H*/ From cvs at cvs.gnupg.org Wed Jun 22 05:53:20 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 22 05:53:26 2005 Subject: gnupg/keyserver (ChangeLog gpgkeys_http.c gpgkeys_oldhkp.c) Message-ID: Date: Wednesday, June 22, 2005 @ 06:16:29 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_http.c gpgkeys_oldhkp.c * gpgkeys_http.c (get_key), gpgkeys_oldhkp.c (send_key, get_key, search_key): Fix http_open/http_open_document calls to pass NULL for auth and proxyauth since these programs pass them in the URL. ------------------+ ChangeLog | 6 ++++++ gpgkeys_http.c | 2 +- gpgkeys_oldhkp.c | 7 ++++--- 3 files changed, 11 insertions(+), 4 deletions(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.132 gnupg/keyserver/ChangeLog:1.133 --- gnupg/keyserver/ChangeLog:1.132 Tue Jun 21 06:24:10 2005 +++ gnupg/keyserver/ChangeLog Wed Jun 22 06:16:29 2005 @@ -1,3 +1,9 @@ +2005-06-21 David Shaw + + * gpgkeys_http.c (get_key), gpgkeys_oldhkp.c (send_key, get_key, + search_key): Fix http_open/http_open_document calls to pass NULL + for auth and proxyauth since these programs pass them in the URL. + 2005-06-20 David Shaw * gpgkeys_hkp.c (append_path, send_key, get_key, search_key, Index: gnupg/keyserver/gpgkeys_http.c diff -u gnupg/keyserver/gpgkeys_http.c:1.16 gnupg/keyserver/gpgkeys_http.c:1.17 --- gnupg/keyserver/gpgkeys_http.c:1.16 Tue May 31 10:39:15 2005 +++ gnupg/keyserver/gpgkeys_http.c Wed Jun 22 06:16:29 2005 @@ -76,7 +76,7 @@ sprintf(request,"http://%s%s%s%s%s%s%s",auth[0]?auth:"",auth[0]?"@":"", host,port[0]?":":"",port[0]?port:"",path[0]?"":"/",path); - rc=http_open_document(&hd,request,http_flags,proxy[0]?proxy:NULL); + rc=http_open_document(&hd,request,NULL,http_flags,proxy[0]?proxy:NULL,NULL); if(rc!=0) { fprintf(console,"gpgkeys: HTTP fetch error: %s\n", Index: gnupg/keyserver/gpgkeys_oldhkp.c diff -u gnupg/keyserver/gpgkeys_oldhkp.c:1.5 gnupg/keyserver/gpgkeys_oldhkp.c:1.6 --- gnupg/keyserver/gpgkeys_oldhkp.c:1.5 Tue Jun 21 06:24:10 2005 +++ gnupg/keyserver/gpgkeys_oldhkp.c Wed Jun 22 06:16:29 2005 @@ -148,7 +148,8 @@ if(verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); - rc=http_open(&hd,HTTP_REQ_POST,request,http_flags,proxy[0]?proxy:NULL); + rc=http_open(&hd,HTTP_REQ_POST,request,NULL,http_flags, + proxy[0]?proxy:NULL,NULL); if(rc) { fprintf(console,"gpgkeys: unable to connect to `%s'\n",host); @@ -252,7 +253,7 @@ if(verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); - rc=http_open_document(&hd,request,http_flags,proxy[0]?proxy:NULL); + rc=http_open_document(&hd,request,NULL,http_flags,proxy[0]?proxy:NULL,NULL); if(rc!=0) { fprintf(console,"gpgkeys: HKP fetch error: %s\n", @@ -675,7 +676,7 @@ if(verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); - rc=http_open_document(&hd,request,http_flags,proxy[0]?proxy:NULL); + rc=http_open_document(&hd,request,NULL,http_flags,proxy[0]?proxy:NULL,NULL); if(rc) { fprintf(console,"gpgkeys: can't search keyserver `%s': %s\n", From cvs at cvs.gnupg.org Wed Jun 22 07:08:42 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 22 07:08:46 2005 Subject: gnupg/m4 (ChangeLog libcurl.m4) Message-ID: Date: Wednesday, June 22, 2005 @ 07:31:52 Author: dshaw Path: /cvs/gnupg/gnupg/m4 Modified: ChangeLog libcurl.m4 * libcurl.m4: Only do the OS X linker fix on Panther. Tiger has a clean curl-config. ------------+ ChangeLog | 5 +++++ libcurl.m4 | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) Index: gnupg/m4/ChangeLog diff -u gnupg/m4/ChangeLog:1.18 gnupg/m4/ChangeLog:1.19 --- gnupg/m4/ChangeLog:1.18 Sun Apr 24 18:52:14 2005 +++ gnupg/m4/ChangeLog Wed Jun 22 07:31:52 2005 @@ -1,3 +1,8 @@ +2005-06-22 David Shaw + + * libcurl.m4: Only do the OS X linker fix on Panther. Tiger has a + clean curl-config. + 2005-04-24 David Shaw * libcurl.m4: Add a check for curl_free() since older versions of Index: gnupg/m4/libcurl.m4 diff -u gnupg/m4/libcurl.m4:1.11 gnupg/m4/libcurl.m4:1.12 --- gnupg/m4/libcurl.m4:1.11 Sun Apr 24 18:52:15 2005 +++ gnupg/m4/libcurl.m4 Wed Jun 22 07:31:52 2005 @@ -1,7 +1,7 @@ # LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION], # [ACTION-IF-YES], [ACTION-IF-NO]) # ---------------------------------------------------------- -# David Shaw Apr-21-2005 +# David Shaw Jun-21-2005 # # Checks for libcurl. DEFAULT-ACTION is the string yes or no to # specify whether to default to --with-libcurl or --without-libcurl. @@ -99,9 +99,10 @@ LIBCURL=`$_libcurl_config --libs` # This is so silly, but Apple actually has a bug in their - # curl-config script! + # curl-config script. Fixed in Tiger, but there are still + # lots of Panther installs around. case "${host}" in - powerpc-apple-darwin*) + powerpc-apple-darwin7*) LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'` ;; esac From cvs at cvs.gnupg.org Wed Jun 22 21:42:09 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Jun 22 21:42:13 2005 Subject: gnupg/util (ChangeLog memrchr.c) Message-ID: Date: Wednesday, June 22, 2005 @ 22:05:21 Author: dshaw Path: /cvs/gnupg/gnupg/util Modified: ChangeLog memrchr.c * memrchr.c (memrchr): Not all compilers allow initializing based on a variable that is also being initialized. Noted by Nelson H. F. Beebe. -----------+ ChangeLog | 6 ++++++ memrchr.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.193 gnupg/util/ChangeLog:1.194 --- gnupg/util/ChangeLog:1.193 Wed Jun 22 06:12:40 2005 +++ gnupg/util/ChangeLog Wed Jun 22 22:05:21 2005 @@ -1,3 +1,9 @@ +2005-06-22 David Shaw + + * memrchr.c (memrchr): Not all compilers allow initializing based + on a variable that is also being initialized. Noted by Nelson + H. F. Beebe. + 2005-06-21 David Shaw * http.c (send_request, http_open, http_open_document): Pass in Index: gnupg/util/memrchr.c diff -u gnupg/util/memrchr.c:1.2 gnupg/util/memrchr.c:1.3 --- gnupg/util/memrchr.c:1.2 Tue May 31 10:38:45 2005 +++ gnupg/util/memrchr.c Wed Jun 22 22:05:21 2005 @@ -33,7 +33,9 @@ void * memrchr(const void *s, int c, size_t n) { - const unsigned char *start=s,*end=s+n-1; + const unsigned char *start=s,*end=s; + + end+=n-1; while(end>=start) { From cvs at cvs.gnupg.org Thu Jun 23 06:00:22 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Jun 23 06:00:28 2005 Subject: gnupg/util (ChangeLog http.c) Message-ID: Date: Thursday, June 23, 2005 @ 06:23:37 Author: dshaw Path: /cvs/gnupg/gnupg/util Modified: ChangeLog http.c * http.c (make_radix64_string): Add '=' padding as per standard. (send_request, http_open, http_open_document): Clean up auth code. Can now support different auth for a proxy and the file being requested via that proxy. Unescape auth strings. -----------+ ChangeLog | 7 +++++ http.c | 78 +++++++++++++++++++++++++++++++++++------------------------- 2 files changed, 53 insertions(+), 32 deletions(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.194 gnupg/util/ChangeLog:1.195 --- gnupg/util/ChangeLog:1.194 Wed Jun 22 22:05:21 2005 +++ gnupg/util/ChangeLog Thu Jun 23 06:23:37 2005 @@ -1,3 +1,10 @@ +2005-06-23 David Shaw + + * http.c (make_radix64_string): Add '=' padding as per standard. + (send_request, http_open, http_open_document): Clean up auth code. + Can now support different auth for a proxy and the file being + requested via that proxy. Unescape auth strings. + 2005-06-22 David Shaw * memrchr.c (memrchr): Not all compilers allow initializing based Index: gnupg/util/http.c diff -u gnupg/util/http.c:1.36 gnupg/util/http.c:1.37 --- gnupg/util/http.c:1.36 Wed Jun 22 06:12:40 2005 +++ gnupg/util/http.c Thu Jun 23 06:23:37 2005 @@ -1,5 +1,6 @@ /* http.c - HTTP protocol handler - * Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + * Copyright (C) 1999, 2001, 2002, 2003, 2004, + * 2005 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -69,7 +70,7 @@ static int insert_escapes( byte *buffer, const byte *string, const byte *special ); static URI_TUPLE parse_tuple( byte *string ); -static int send_request( HTTP_HD hd, const char *proxy, const char *proxyauth); +static int send_request( HTTP_HD hd, const char *auth, const char *proxy ); static byte *build_rel_path( PARSED_URI uri ); static int parse_response( HTTP_HD hd ); @@ -117,8 +118,8 @@ * create a radix64 encoded string. */ -/* TODO: This is a duplicate of code in g10/armor.c. Better to use a - single copy in strgutil.c */ +/* TODO: This is a duplicate of code in g10/armor.c modified to do the + "=" padding. Better to use a single copy in strgutil.c ? */ static char * make_radix64_string( const byte *data, size_t len ) { @@ -135,10 +136,13 @@ *p++ = bintoasc[(data[0] >> 2) & 077]; *p++ = bintoasc[(((data[0] <<4)&060)|((data[1] >> 4)&017))&077]; *p++ = bintoasc[((data[1]<<2)&074)]; + *p++ = '='; } else if( len == 1 ) { *p++ = bintoasc[(data[0] >> 2) & 077]; *p++ = bintoasc[(data[0] <<4)&060]; + *p++ = '='; + *p++ = '='; } *p = 0; return buffer; @@ -146,8 +150,7 @@ int http_open( HTTP_HD hd, HTTP_REQ_TYPE reqtype, const char *url, - const char *auth, unsigned int flags, const char *proxy, - const char *proxyauth ) + char *auth, unsigned int flags, const char *proxy ) { int rc; @@ -163,9 +166,7 @@ rc = parse_uri( &hd->uri, url ); if( !rc ) { - if(auth) - hd->uri->auth=auth; - rc = send_request( hd, proxy, proxyauth ); + rc = send_request( hd, auth, proxy ); if( !rc ) { hd->fp_write = iobuf_sockopen( hd->sock , "w" ); if( hd->fp_write ) @@ -228,13 +229,12 @@ int -http_open_document( HTTP_HD hd, const char *document, const char *auth, - unsigned int flags, const char *proxy, - const char *proxyauth ) +http_open_document( HTTP_HD hd, const char *document, char *auth, + unsigned int flags, const char *proxy ) { int rc; - rc = http_open(hd, HTTP_REQ_GET, document, auth, flags, proxy, proxyauth ); + rc = http_open(hd, HTTP_REQ_GET, document, auth, flags, proxy ); if( rc ) return rc; @@ -507,13 +507,13 @@ * Returns 0 if the request was successful */ static int -send_request( HTTP_HD hd, const char *proxy, const char *proxyauth ) +send_request( HTTP_HD hd, const char *auth, const char *proxy ) { const byte *server; byte *request, *p; ushort port; int rc; - char *auth=NULL; + char *proxy_authstr=NULL,*authstr=NULL; server = *hd->uri->host? hd->uri->host : "localhost"; port = hd->uri->port? hd->uri->port : 80; @@ -531,29 +531,39 @@ } hd->sock = connect_server( *uri->host? uri->host : "localhost", uri->port? uri->port : 80, 0, NULL ); - if(proxyauth) - uri->auth=proxyauth; - if(uri->auth) { - char *x=make_radix64_string(uri->auth,strlen(uri->auth)); - auth=m_alloc(52+strlen(x)); - sprintf(auth,"Proxy-Authorization: Basic %s==\r\n",x); + char *x; + remove_escapes(uri->auth); + x=make_radix64_string(uri->auth,strlen(uri->auth)); + proxy_authstr=m_alloc(52+strlen(x)); + sprintf(proxy_authstr,"Proxy-Authorization: Basic %s\r\n",x); m_free(x); } release_parsed_uri( uri ); } else + hd->sock = connect_server( server, port, hd->flags, hd->uri->scheme ); + + if(auth || hd->uri->auth) { - hd->sock = connect_server( server, port, hd->flags, hd->uri->scheme ); - if(hd->uri->auth) + char *x,*tempauth=NULL; + + if(auth) { - char *x=make_radix64_string(hd->uri->auth,strlen(hd->uri->auth)); - auth=m_alloc(52+strlen(x)); - sprintf(auth,"Authorization: Basic %s==\r\n",x); - m_free(x); + tempauth=m_strdup(auth); + remove_escapes(tempauth); } + else if(hd->uri->auth) + remove_escapes(hd->uri->auth); + + x=make_radix64_string(tempauth?tempauth:hd->uri->auth, + strlen(tempauth?tempauth:hd->uri->auth)); + authstr=m_alloc(52+strlen(x)); + sprintf(authstr,"Authorization: Basic %s\r\n",x); + m_free(x); + m_free(tempauth); } if( hd->sock == -1 ) @@ -561,13 +571,16 @@ p = build_rel_path( hd->uri ); - request=m_alloc(strlen(server)*2 + strlen(p) + (auth?strlen(auth):0) + 65); + request=m_alloc(strlen(server)*2 + strlen(p) + + (authstr?strlen(authstr):0) + + (proxy_authstr?strlen(proxy_authstr):0) + 65); if( proxy ) - sprintf( request, "%s http://%s:%hu%s%s HTTP/1.0\r\n%s", + sprintf( request, "%s http://%s:%hu%s%s HTTP/1.0\r\n%s%s", hd->req_type == HTTP_REQ_GET ? "GET" : hd->req_type == HTTP_REQ_HEAD? "HEAD": hd->req_type == HTTP_REQ_POST? "POST": "OOPS", - server, port, *p == '/'? "":"/", p, auth?auth:"" ); + server, port, *p == '/'? "":"/", p, + authstr?authstr:"",proxy_authstr?proxy_authstr:"" ); else { char portstr[15]; @@ -580,14 +593,15 @@ hd->req_type == HTTP_REQ_HEAD? "HEAD": hd->req_type == HTTP_REQ_POST? "POST": "OOPS", *p == '/'? "":"/", p, server, (port!=80)?portstr:"", - auth?auth:""); + authstr?authstr:""); } m_free(p); rc = write_server( hd->sock, request, strlen(request) ); m_free( request ); - m_free(auth); + m_free(proxy_authstr); + m_free(authstr); return rc; } From cvs at cvs.gnupg.org Thu Jun 23 06:01:12 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Jun 23 06:01:15 2005 Subject: gnupg/include (ChangeLog http.h) Message-ID: Date: Thursday, June 23, 2005 @ 06:24:28 Author: dshaw Path: /cvs/gnupg/gnupg/include Modified: ChangeLog http.h * http.h: Fix prototypes for http_open_document and http_open again, to handle the new different auth for regular files and proxies. -----------+ ChangeLog | 6 ++++++ http.h | 13 ++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) Index: gnupg/include/ChangeLog diff -u gnupg/include/ChangeLog:1.88 gnupg/include/ChangeLog:1.89 --- gnupg/include/ChangeLog:1.88 Wed Jun 22 06:13:41 2005 +++ gnupg/include/ChangeLog Thu Jun 23 06:24:28 2005 @@ -1,3 +1,9 @@ +2005-06-23 David Shaw + + * http.h: Fix prototypes for http_open_document and http_open + again, to handle the new different auth for regular files and + proxies. + 2005-06-21 David Shaw * http.h: Fix prototypes for http_open_document and http_open to Index: gnupg/include/http.h diff -u gnupg/include/http.h:1.11 gnupg/include/http.h:1.12 --- gnupg/include/http.h:1.11 Wed Jun 22 06:13:41 2005 +++ gnupg/include/http.h Thu Jun 23 06:24:28 2005 @@ -1,5 +1,6 @@ /* http.h - HTTP protocol handler - * Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000, 2001, 2003, 2004, + * 2005 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -36,7 +37,7 @@ struct parsed_uri { /* all these pointers point into buffer; most stuff is not escaped */ char *scheme; /* pointer to the scheme string (lowercase) */ - const char *auth; /* username/password for basic auth */ + char *auth; /* username/password for basic auth */ char *host; /* host (converted to lowercase) */ ushort port; /* port (always set if the host is set) */ char *path; /* the path */ @@ -76,13 +77,11 @@ typedef struct http_context *HTTP_HD; int http_open( HTTP_HD hd, HTTP_REQ_TYPE reqtype, const char *url, - const char *auth, unsigned int flags, const char *proxy, - const char *proxyauth ); + char *auth, unsigned int flags, const char *proxy ); void http_start_data( HTTP_HD hd ); int http_wait_response( HTTP_HD hd, unsigned int *ret_status ); void http_close( HTTP_HD hd ); -int http_open_document( HTTP_HD hd, const char *document, const char *auth, - unsigned int flags, const char *proxy, - const char *proxyauth ); +int http_open_document( HTTP_HD hd, const char *document, char *auth, + unsigned int flags, const char *proxy ); #endif /*G10_HTTP_H*/ From cvs at cvs.gnupg.org Thu Jun 23 06:02:46 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Jun 23 06:02:49 2005 Subject: gnupg/keyserver (ChangeLog gpgkeys_http.c gpgkeys_oldhkp.c) Message-ID: Date: Thursday, June 23, 2005 @ 06:26:01 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_http.c gpgkeys_oldhkp.c * gpgkeys_http.c (get_key), gpgkeys_oldhkp (send_key, get_key, search_key): No longer need to pass a proxyauth. * gpgkeys_http.c (get_key): Pass auth outside of the URL. ------------------+ ChangeLog | 7 +++++++ gpgkeys_http.c | 7 ++++--- gpgkeys_oldhkp.c | 6 +++--- 3 files changed, 14 insertions(+), 6 deletions(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.133 gnupg/keyserver/ChangeLog:1.134 --- gnupg/keyserver/ChangeLog:1.133 Wed Jun 22 06:16:29 2005 +++ gnupg/keyserver/ChangeLog Thu Jun 23 06:26:01 2005 @@ -1,3 +1,10 @@ +2005-06-23 David Shaw + + * gpgkeys_http.c (get_key), gpgkeys_oldhkp (send_key, get_key, + search_key): No longer need to pass a proxyauth. + + * gpgkeys_http.c (get_key): Pass auth outside of the URL. + 2005-06-21 David Shaw * gpgkeys_http.c (get_key), gpgkeys_oldhkp.c (send_key, get_key, Index: gnupg/keyserver/gpgkeys_http.c diff -u gnupg/keyserver/gpgkeys_http.c:1.17 gnupg/keyserver/gpgkeys_http.c:1.18 --- gnupg/keyserver/gpgkeys_http.c:1.17 Wed Jun 22 06:16:29 2005 +++ gnupg/keyserver/gpgkeys_http.c Thu Jun 23 06:26:01 2005 @@ -73,10 +73,11 @@ return KEYSERVER_NO_MEMORY; } - sprintf(request,"http://%s%s%s%s%s%s%s",auth[0]?auth:"",auth[0]?"@":"", - host,port[0]?":":"",port[0]?port:"",path[0]?"":"/",path); + sprintf(request,"http://%s%s%s%s%s",host, + port[0]?":":"",port[0]?port:"",path[0]?"":"/",path); - rc=http_open_document(&hd,request,NULL,http_flags,proxy[0]?proxy:NULL,NULL); + rc=http_open_document(&hd,request,auth[0]?auth:NULL, + http_flags,proxy[0]?proxy:NULL); if(rc!=0) { fprintf(console,"gpgkeys: HTTP fetch error: %s\n", Index: gnupg/keyserver/gpgkeys_oldhkp.c diff -u gnupg/keyserver/gpgkeys_oldhkp.c:1.6 gnupg/keyserver/gpgkeys_oldhkp.c:1.7 --- gnupg/keyserver/gpgkeys_oldhkp.c:1.6 Wed Jun 22 06:16:29 2005 +++ gnupg/keyserver/gpgkeys_oldhkp.c Thu Jun 23 06:26:01 2005 @@ -149,7 +149,7 @@ fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); rc=http_open(&hd,HTTP_REQ_POST,request,NULL,http_flags, - proxy[0]?proxy:NULL,NULL); + proxy[0]?proxy:NULL); if(rc) { fprintf(console,"gpgkeys: unable to connect to `%s'\n",host); @@ -253,7 +253,7 @@ if(verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); - rc=http_open_document(&hd,request,NULL,http_flags,proxy[0]?proxy:NULL,NULL); + rc=http_open_document(&hd,request,NULL,http_flags,proxy[0]?proxy:NULL); if(rc!=0) { fprintf(console,"gpgkeys: HKP fetch error: %s\n", @@ -676,7 +676,7 @@ if(verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); - rc=http_open_document(&hd,request,NULL,http_flags,proxy[0]?proxy:NULL,NULL); + rc=http_open_document(&hd,request,NULL,http_flags,proxy[0]?proxy:NULL); if(rc) { fprintf(console,"gpgkeys: can't search keyserver `%s': %s\n", From cvs at cvs.gnupg.org Thu Jun 23 06:21:35 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Jun 23 06:21:38 2005 Subject: gnupg/keyserver (ChangeLog curl-shim.c curl-shim.h) Message-ID: Date: Thursday, June 23, 2005 @ 06:44:21 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog curl-shim.c curl-shim.h * curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): Add CURLOPT_USERPWD option for HTTP auth. -------------+ ChangeLog | 3 +++ curl-shim.c | 7 +++++-- curl-shim.h | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.134 gnupg/keyserver/ChangeLog:1.135 --- gnupg/keyserver/ChangeLog:1.134 Thu Jun 23 06:26:01 2005 +++ gnupg/keyserver/ChangeLog Thu Jun 23 06:44:20 2005 @@ -1,5 +1,8 @@ 2005-06-23 David Shaw + * curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): + Add CURLOPT_USERPWD option for HTTP auth. + * gpgkeys_http.c (get_key), gpgkeys_oldhkp (send_key, get_key, search_key): No longer need to pass a proxyauth. Index: gnupg/keyserver/curl-shim.c diff -u gnupg/keyserver/curl-shim.c:1.6 gnupg/keyserver/curl-shim.c:1.7 --- gnupg/keyserver/curl-shim.c:1.6 Tue May 31 10:39:15 2005 +++ gnupg/keyserver/curl-shim.c Thu Jun 23 06:44:20 2005 @@ -104,6 +104,9 @@ case CURLOPT_URL: curl->url=va_arg(ap,char *); break; + case CURLOPT_USERPWD: + curl->auth=va_arg(ap,char *); + break; case CURLOPT_WRITEFUNCTION: curl->writer=va_arg(ap,write_func); break; @@ -142,7 +145,7 @@ if(curl->flags.post) { - rc=http_open(&curl->hd,HTTP_REQ_POST,curl->url,0,curl->proxy); + rc=http_open(&curl->hd,HTTP_REQ_POST,curl->url,curl->auth,0,curl->proxy); if(rc==0) { char content_len[50]; @@ -163,7 +166,7 @@ } else { - rc=http_open(&curl->hd,HTTP_REQ_GET,curl->url,0,curl->proxy); + rc=http_open(&curl->hd,HTTP_REQ_GET,curl->url,curl->auth,0,curl->proxy); if(rc==0) { rc=http_wait_response(&curl->hd,&curl->status); Index: gnupg/keyserver/curl-shim.h diff -u gnupg/keyserver/curl-shim.h:1.5 gnupg/keyserver/curl-shim.h:1.6 --- gnupg/keyserver/curl-shim.h:1.5 Tue May 31 10:39:15 2005 +++ gnupg/keyserver/curl-shim.h Thu Jun 23 06:44:20 2005 @@ -36,6 +36,7 @@ typedef enum { CURLOPT_URL, + CURLOPT_USERPWD, CURLOPT_WRITEFUNCTION, CURLOPT_FILE, CURLOPT_ERRORBUFFER, @@ -57,6 +58,7 @@ typedef struct { char *url; + char *auth; char *errorbuffer; char *proxy; write_func writer; From cvs at cvs.gnupg.org Fri Jun 24 01:19:17 2005 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Fri Jun 24 01:19:22 2005 Subject: gnupg/keyserver (7 files) Message-ID: Date: Friday, June 24, 2005 @ 01:42:35 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog curl-shim.c gpgkeys_curl.c gpgkeys_hkp.c gpgkeys_http.c gpgkeys_mailto.in gpgkeys_test.in * gpgkeys_mailto.in, gpgkeys_test.in: Use @VERSION@ so version string stays up to date. * gpgkeys_http.c: Don't need to define HTTP_PROXY_ENV here since it's in ksutil.h. * gpgkeys_curl.c (get_key, main), gpgkeys_hkp.c (main): Pass AUTH values to curl or curl-shim. * curl-shim.c (curl_easy_perform), gpgkeys_curl.c (main), gpgkeys_hkp.c (main): Use curl-style proxy semantics. -------------------+ ChangeLog | 12 ++++++++++++ curl-shim.c | 19 +++++++++++++++++-- gpgkeys_curl.c | 33 +++++++++++++++++---------------- gpgkeys_hkp.c | 29 ++++++++++++++++++----------- gpgkeys_http.c | 6 ------ gpgkeys_mailto.in | 2 +- gpgkeys_test.in | 2 +- 7 files changed, 66 insertions(+), 37 deletions(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.135 gnupg/keyserver/ChangeLog:1.136 --- gnupg/keyserver/ChangeLog:1.135 Thu Jun 23 06:44:20 2005 +++ gnupg/keyserver/ChangeLog Fri Jun 24 01:42:35 2005 @@ -1,5 +1,17 @@ 2005-06-23 David Shaw + * gpgkeys_mailto.in, gpgkeys_test.in: Use @VERSION@ so version + string stays up to date. + + * gpgkeys_http.c: Don't need to define HTTP_PROXY_ENV here since + it's in ksutil.h. + + * gpgkeys_curl.c (get_key, main), gpgkeys_hkp.c (main): Pass AUTH + values to curl or curl-shim. + + * curl-shim.c (curl_easy_perform), gpgkeys_curl.c (main), + gpgkeys_hkp.c (main): Use curl-style proxy semantics. + * curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): Add CURLOPT_USERPWD option for HTTP auth. Index: gnupg/keyserver/curl-shim.c diff -u gnupg/keyserver/curl-shim.c:1.7 gnupg/keyserver/curl-shim.c:1.8 --- gnupg/keyserver/curl-shim.c:1.7 Thu Jun 23 06:44:20 2005 +++ gnupg/keyserver/curl-shim.c Fri Jun 24 01:42:35 2005 @@ -29,6 +29,7 @@ #include #include "http.h" #include "util.h" +#include "ksutil.h" #include "curl-shim.h" static CURLcode @@ -142,10 +143,24 @@ int rc; CURLcode err=CURLE_OK; const char *errstr=NULL; + char *proxy=NULL; + + /* Emulate the libcurl proxy behavior. If the calling program set a + proxy, use it. If it didn't set a proxy or set it to NULL, check + for one in the environment. If the calling program explicitly + set a null-string proxy, don't set a proxy at all. */ + + if(curl->proxy) + { + if(*curl->proxy) + proxy=curl->proxy; + } + else + proxy=getenv(HTTP_PROXY_ENV); if(curl->flags.post) { - rc=http_open(&curl->hd,HTTP_REQ_POST,curl->url,curl->auth,0,curl->proxy); + rc=http_open(&curl->hd,HTTP_REQ_POST,curl->url,curl->auth,0,proxy); if(rc==0) { char content_len[50]; @@ -166,7 +181,7 @@ } else { - rc=http_open(&curl->hd,HTTP_REQ_GET,curl->url,curl->auth,0,curl->proxy); + rc=http_open(&curl->hd,HTTP_REQ_GET,curl->url,curl->auth,0,proxy); if(rc==0) { rc=http_wait_response(&curl->hd,&curl->status); Index: gnupg/keyserver/gpgkeys_curl.c diff -u gnupg/keyserver/gpgkeys_curl.c:1.18 gnupg/keyserver/gpgkeys_curl.c:1.19 --- gnupg/keyserver/gpgkeys_curl.c:1.18 Tue May 31 10:39:15 2005 +++ gnupg/keyserver/gpgkeys_curl.c Fri Jun 24 01:42:35 2005 @@ -58,11 +58,8 @@ fprintf(output,"KEY 0x%s BEGIN\n",getkey); - sprintf(request,"%s://%s%s%s%s%s%s",opt->scheme, - opt->auth?opt->auth:"", - opt->auth?"@":"",opt->host, - opt->port?":":"",opt->port?opt->port:"", - opt->path?opt->path:"/"); + sprintf(request,"%s://%s%s%s%s",opt->scheme,opt->host, + opt->port?":":"",opt->port?opt->port:"",opt->path?opt->path:"/"); curl_easy_setopt(curl,CURLOPT_URL,request); curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,curl_writer); @@ -98,7 +95,7 @@ char line[MAX_LINE]; char *thekey=NULL; long follow_redirects=5; - char proxy[MAX_PROXY+1]; + char *proxy=NULL; console=stderr; @@ -193,20 +190,19 @@ if(strncasecmp(start,"http-proxy",10)==0) { + /* Safe to not check the return code of strdup() here. + If it fails, we simply won't use a proxy. */ if(no) - proxy[0]='\0'; - else if(start[10]=='=') { - strncpy(proxy,&start[11],MAX_PROXY); - proxy[MAX_PROXY]='\0'; + free(proxy); + proxy=strdup(""); } - else if(start[10]=='\0') + else if(start[10]=='=') { - char *http_proxy=getenv(HTTP_PROXY_ENV); - if(http_proxy) + if(strlen(&start[11])auth) + curl_easy_setopt(curl,CURLOPT_USERPWD,opt->auth); + if(opt->debug) { curl_easy_setopt(curl,CURLOPT_STDERR,console); @@ -289,7 +288,7 @@ curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,opt->flags.check_cert); curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file); - if(proxy[0]) + if(proxy) curl_easy_setopt(curl,CURLOPT_PROXY,proxy); /* If it's a GET or a SEARCH, the next thing to come in is the @@ -372,6 +371,8 @@ if(curl) curl_easy_cleanup(curl); + free(proxy); + curl_global_cleanup(); return ret; Index: gnupg/keyserver/gpgkeys_hkp.c diff -u gnupg/keyserver/gpgkeys_hkp.c:1.55 gnupg/keyserver/gpgkeys_hkp.c:1.56 --- gnupg/keyserver/gpgkeys_hkp.c:1.55 Tue Jun 21 06:24:10 2005 +++ gnupg/keyserver/gpgkeys_hkp.c Fri Jun 24 01:42:35 2005 @@ -39,7 +39,6 @@ extern char *optarg; extern int optind; -static char proxy[MAX_PROXY+1]; static FILE *input,*output,*console; static CURL *curl; static struct ks_options *opt; @@ -384,6 +383,7 @@ char line[MAX_LINE]; int failed=0; struct keylist *keylist=NULL,*keyptr=NULL; + char *proxy=NULL; console=stderr; @@ -479,19 +479,16 @@ if(strncasecmp(start,"http-proxy",10)==0) { if(no) - proxy[0]='\0'; - else if(start[10]=='=') { - strncpy(proxy,&start[11],MAX_PROXY); - proxy[MAX_PROXY]='\0'; + free(proxy); + proxy=strdup(""); } - else if(start[10]=='\0') + else if(start[10]=='=') { - char *http_proxy=getenv(HTTP_PROXY_ENV); - if(http_proxy) + if(strlen(&start[11])auth) + curl_easy_setopt(curl,CURLOPT_USERPWD,opt->auth); + if(opt->debug) { curl_easy_setopt(curl,CURLOPT_STDERR,console); curl_easy_setopt(curl,CURLOPT_VERBOSE,1); } - if(proxy[0]) + if(proxy) curl_easy_setopt(curl,CURLOPT_PROXY,proxy); #if 0 @@ -704,5 +704,12 @@ if(output!=stdout) fclose(output); + free_ks_options(opt); + + if(curl) + curl_easy_cleanup(curl); + + free(proxy); + return ret; } Index: gnupg/keyserver/gpgkeys_http.c diff -u gnupg/keyserver/gpgkeys_http.c:1.18 gnupg/keyserver/gpgkeys_http.c:1.19 --- gnupg/keyserver/gpgkeys_http.c:1.18 Thu Jun 23 06:26:01 2005 +++ gnupg/keyserver/gpgkeys_http.c Fri Jun 24 01:42:35 2005 @@ -48,12 +48,6 @@ static char path[URLMAX_PATH+1]; static FILE *input,*output,*console; -#ifdef __riscos__ -#define HTTP_PROXY_ENV "GnuPG$HttpProxy" -#else -#define HTTP_PROXY_ENV "http_proxy" -#endif - static int get_key(char *getkey) { Index: gnupg/keyserver/gpgkeys_mailto.in diff -u gnupg/keyserver/gpgkeys_mailto.in:1.8 gnupg/keyserver/gpgkeys_mailto.in:1.9 --- gnupg/keyserver/gpgkeys_mailto.in:1.8 Tue May 31 10:39:15 2005 +++ gnupg/keyserver/gpgkeys_mailto.in Fri Jun 24 01:42:35 2005 @@ -27,7 +27,7 @@ sub VERSION_MESSAGE () { - print STDOUT "gpgkeys_mailto (GnuPG) 1.3.91-cvs\n"; + print STDOUT "gpgkeys_mailto (GnuPG) @VERSION@\n"; } sub HELP_MESSAGE () Index: gnupg/keyserver/gpgkeys_test.in diff -u gnupg/keyserver/gpgkeys_test.in:1.4 gnupg/keyserver/gpgkeys_test.in:1.5 --- gnupg/keyserver/gpgkeys_test.in:1.4 Tue May 31 10:39:14 2005 +++ gnupg/keyserver/gpgkeys_test.in Fri Jun 24 01:42:35 2005 @@ -26,7 +26,7 @@ sub VERSION_MESSAGE () { - print STDOUT "gpgkeys_test (GnuPG) 1.3.91-cvs\n"; + print STDOUT "gpgkeys_test (GnuPG) @VERSION@\n"; } sub HELP_MESSAGE () From cvs at cvs.gnupg.org Sat Jun 25 21:40:48 2005 From: cvs at cvs.gnupg.org (cvs user mo) Date: Sat Jun 25 21:40:54 2005 Subject: libgcrypt/src (ChangeLog Makefile.am) Message-ID: Date: Saturday, June 25, 2005 @ 22:04:17 Author: mo Path: /cvs/libgcrypt/libgcrypt/src Modified: ChangeLog Makefile.am 2005-06-25 Moritz Schulte * Makefile.am (pkgconfigdir, pkgconfig_DATA): Removed variables. * libgcrypt.pc.in: Removed file - we do not want to support a second, foreign configuration system. -------------+ ChangeLog | 6 ++++++ Makefile.am | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) Index: libgcrypt/src/ChangeLog diff -u libgcrypt/src/ChangeLog:1.166 libgcrypt/src/ChangeLog:1.167 --- libgcrypt/src/ChangeLog:1.166 Fri Jun 17 14:59:03 2005 +++ libgcrypt/src/ChangeLog Sat Jun 25 22:04:17 2005 @@ -1,3 +1,9 @@ +2005-06-25 Moritz Schulte + + * Makefile.am (pkgconfigdir, pkgconfig_DATA): Removed variables. + * libgcrypt.pc.in: Removed file - we do not want to support a + second, foreign configuration system. + 2005-06-17 Moritz Schulte * global.c (gcry_xstrdup): Removed superfluous strcpy call. Index: libgcrypt/src/Makefile.am diff -u libgcrypt/src/Makefile.am:1.45 libgcrypt/src/Makefile.am:1.46 --- libgcrypt/src/Makefile.am:1.45 Sat Apr 23 00:39:44 2005 +++ libgcrypt/src/Makefile.am Sat Jun 25 22:04:17 2005 @@ -1,4 +1,4 @@ -# Copyright (C) 1998,1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. +# Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc. # # This file is part of Libgcrypt. # @@ -22,8 +22,6 @@ bin_SCRIPTS = libgcrypt-config m4datadir = $(datadir)/aclocal m4data_DATA = libgcrypt.m4 -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libgcrypt.pc include_HEADERS = gcrypt.h gcrypt-module.h lib_LTLIBRARIES = libgcrypt.la From cvs at cvs.gnupg.org Sat Jun 25 21:42:03 2005 From: cvs at cvs.gnupg.org (cvs user mo) Date: Sat Jun 25 21:42:07 2005 Subject: libgcrypt (ChangeLog configure.ac) Message-ID: Date: Saturday, June 25, 2005 @ 22:05:35 Author: mo Path: /cvs/libgcrypt/libgcrypt Modified: ChangeLog configure.ac 2005-06-25 Moritz Schulte * configure.ac: Removed src/libgcrypt.pc from AC_CONFIG_FILES. --------------+ ChangeLog | 4 ++++ configure.ac | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) Index: libgcrypt/ChangeLog diff -u libgcrypt/ChangeLog:1.168 libgcrypt/ChangeLog:1.169 --- libgcrypt/ChangeLog:1.168 Fri Jun 10 17:13:00 2005 +++ libgcrypt/ChangeLog Sat Jun 25 22:05:35 2005 @@ -1,3 +1,7 @@ +2005-06-25 Moritz Schulte + + * configure.ac: Removed src/libgcrypt.pc from AC_CONFIG_FILES. + 2005-06-10 Werner Koch * configure.ac: Move detection of basic stuff to the top. For Index: libgcrypt/configure.ac diff -u libgcrypt/configure.ac:1.76 libgcrypt/configure.ac:1.77 --- libgcrypt/configure.ac:1.76 Fri Jun 10 17:13:00 2005 +++ libgcrypt/configure.ac Sat Jun 25 22:05:35 2005 @@ -19,7 +19,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # (Process this file with autoconf to produce a configure script.) -AC_REVISION($Revision: 1.76 $) +AC_REVISION($Revision: 1.77 $) AC_PREREQ(2.59) min_automake_version="1.9.3" @@ -788,7 +788,6 @@ doc/Makefile src/Makefile src/libgcrypt-config -src/libgcrypt.pc tests/Makefile w32-dll/Makefile ]) From cvs at cvs.gnupg.org Mon Jun 27 16:46:13 2005 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Jun 27 16:46:27 2005 Subject: geam/src (Makefile.am) Message-ID: Date: Monday, June 27, 2005 @ 16:46:13 Author: werner Path: /cvs/wk/geam/src Modified: Makefile.am (simple_mta_LDADD): Add LIBPTH. -------------+ Makefile.am | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) From cvs at cvs.gnupg.org Mon Jun 27 16:46:14 2005 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Jun 27 16:46:37 2005 Subject: geam (ChangeLog) Message-ID: Date: Monday, June 27, 2005 @ 16:46:14 Author: werner Path: /cvs/wk/geam Modified: ChangeLog (simple_mta_LDADD): Add LIBPTH. -----------+ ChangeLog | 4 ++++ 1 files changed, 4 insertions(+) From cvs at cvs.gnupg.org Wed Jun 29 15:48:30 2005 From: cvs at cvs.gnupg.org (cvs user wk) Date: Wed Jun 29 15:48:35 2005 Subject: GNUPG-1-9-BRANCH gnupg/agent (ChangeLog Makefile.am command-ssh.c minip12.c t-protect.c) Message-ID: Date: Wednesday, June 29, 2005 @ 16:12:18 Author: wk Path: /cvs/gnupg/gnupg/agent Tag: GNUPG-1-9-BRANCH Added: t-protect.c Modified: ChangeLog Makefile.am command-ssh.c minip12.c (data_sign): Removed empty statement. ---------------+ ChangeLog | 9 +++ Makefile.am | 15 +++++ command-ssh.c | 2 minip12.c | 12 +++- t-protect.c | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 175 insertions(+), 5 deletions(-) Index: gnupg/agent/ChangeLog diff -u gnupg/agent/ChangeLog:1.59.2.86 gnupg/agent/ChangeLog:1.59.2.87 --- gnupg/agent/ChangeLog:1.59.2.86 Thu Jun 16 10:12:03 2005 +++ gnupg/agent/ChangeLog Wed Jun 29 16:12:18 2005 @@ -1,3 +1,12 @@ +2005-06-29 Werner Koch + + * command-ssh.c (data_sign): Removed empty statement. + +2005-06-21 Werner Koch + + * minip12.c (create_final): Cast size_t to ulong for printf. + (build_key_bag, build_cert_bag, build_cert_sequence): Ditto. + 2005-06-16 Werner Koch * protect-tool.c (make_advanced): Makde RESULT a plain char. Index: gnupg/agent/Makefile.am diff -u gnupg/agent/Makefile.am:1.22.2.7 gnupg/agent/Makefile.am:1.22.2.8 --- gnupg/agent/Makefile.am:1.22.2.7 Wed Jun 1 17:46:01 2005 +++ gnupg/agent/Makefile.am Wed Jun 29 16:12:18 2005 @@ -20,6 +20,7 @@ bin_PROGRAMS = gpg-agent libexec_PROGRAMS = gpg-protect-tool gpg-preset-passphrase +noinst_PROGRAMS = $(TESTS) AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl @@ -70,3 +71,17 @@ gpg_preset_passphrase_LDADD += -lwsock32 endif +# +# Module tests +# +TESTS = t-protect + +t_common_ldadd = ../jnlib/libjnlib.a ../common/libcommon.a \ + $(LIBGCRYPT_LIBS) -lgpg-error @LIBINTL@ + +t_protect_SOURCES = t-protect.c protect.c +t_protect_LDADD = $(t_common_ldadd) + + + + Index: gnupg/agent/command-ssh.c diff -u gnupg/agent/command-ssh.c:1.1.4.23 gnupg/agent/command-ssh.c:1.1.4.24 --- gnupg/agent/command-ssh.c:1.1.4.23 Thu Jun 16 10:12:03 2005 +++ gnupg/agent/command-ssh.c Wed Jun 29 16:12:18 2005 @@ -1988,7 +1988,7 @@ gcry_sexp_t valuelist = NULL; gcry_sexp_t sublist = NULL; gcry_mpi_t sig_value = NULL; - unsigned char *sig_blob = NULL;; + unsigned char *sig_blob = NULL; size_t sig_blob_n = 0; char *identifier = NULL; const char *identifier_raw; Index: gnupg/agent/minip12.c diff -u gnupg/agent/minip12.c:1.5.2.9 gnupg/agent/minip12.c:1.5.2.10 --- gnupg/agent/minip12.c:1.5.2.9 Thu Jun 16 10:12:03 2005 +++ gnupg/agent/minip12.c Wed Jun 29 16:12:18 2005 @@ -1085,7 +1085,8 @@ /* Ready. */ resultlen = p - result; if (needed != resultlen) - log_debug ("length mismatch: %u, %u\n", needed, resultlen); + log_debug ("length mismatch: %lu, %lu\n", + (unsigned long)needed, (unsigned long)resultlen); *r_length = resultlen; return result; @@ -1339,7 +1340,8 @@ keybaglen = p - keybag; if (needed != keybaglen) - log_debug ("length mismatch: %u, %u\n", needed, keybaglen); + log_debug ("length mismatch: %lu, %lu\n", + (unsigned long)needed, (unsigned long)keybaglen); *r_length = keybaglen; return keybag; @@ -1437,7 +1439,8 @@ certbaglen = p - certbag; if (needed != certbaglen) - log_debug ("length mismatch: %u, %u\n", needed, certbaglen); + log_debug ("length mismatch: %lu, %lu\n", + (unsigned long)needed, (unsigned long)certbaglen); *r_length = certbaglen; return certbag; @@ -1527,7 +1530,8 @@ certseqlen = p - certseq; if (needed != certseqlen) - log_debug ("length mismatch: %u, %u\n", needed, certseqlen); + log_debug ("length mismatch: %lu, %lu\n", + (unsigned long)needed, (unsigned long)certseqlen); /* Append some pad characters; we already allocated extra space. */ n = 8 - certseqlen % 8; Index: gnupg/agent/t-protect.c diff -u /dev/null gnupg/agent/t-protect.c:1.1.2.1 --- /dev/null Wed Jun 29 16:12:18 2005 +++ gnupg/agent/t-protect.c Wed Jun 29 16:12:18 2005 @@ -0,0 +1,142 @@ +/* t-protect.c - Module tests for protect.c + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * This file is part of GnuPG. + * + * GnuPG is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GnuPG is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + +#include +#include +#include +#include +#include + +#include "agent.h" + + +#define pass() do { ; } while(0) +#define fail() do { fprintf (stderr, "%s:%d: test failed\n",\ + __FILE__,__LINE__); \ + exit (1); \ + } while(0) + + +static void +test_agent_protect (void) +{ + /* Protect the key encoded in canonical format in PLAINKEY. We assume + a valid S-Exp here. */ +/* int agent_protect (const unsigned char *plainkey, const char *passphrase, */ +/* unsigned char **result, size_t *resultlen); */ +} + + +static void +test_agent_unprotect (void) +{ + /* Unprotect the key encoded in canonical format. We assume a valid + S-Exp here. */ +/* int */ +/* agent_unprotect (const unsigned char *protectedkey, const char *passphrase, */ +/* unsigned char **result, size_t *resultlen) */ +} + + +static void +test_agent_private_key_type (void) +{ +/* Check the type of the private key, this is one of the constants: + PRIVATE_KEY_UNKNOWN if we can't figure out the type (this is the + value 0), PRIVATE_KEY_CLEAR for an unprotected private key. + PRIVATE_KEY_PROTECTED for an protected private key or + PRIVATE_KEY_SHADOWED for a sub key where the secret parts are stored + elsewhere. */ +/* int */ +/* agent_private_key_type (const unsigned char *privatekey) */ +} + + +static void +test_make_shadow_info (void) +{ + static struct + { + const char *snstr; + const char *idstr; + const char *expected; + } data[] = { + { "", "", NULL }, + + }; + int i; + unsigned char *result; + + for (i=0; i < DIM(data); i++) + { + result = make_shadow_info (data[i].snstr, data[i].idstr); + if (!result && !data[i].expected) + pass (); + else if (!result && data[i].expected) + fail (); + else if (!data[i].expected) + fail (); + /* fixme: Need to compare the result but also need to check + proper S-expression syntax. */ + } +} + + + +static void +test_agent_shadow_key (void) +{ +/* Create a shadow key from a public key. We use the shadow protocol + "ti-v1" and insert the S-expressionn SHADOW_INFO. The resulting + S-expression is returned in an allocated buffer RESULT will point + to. The input parameters are expected to be valid canonicalized + S-expressions */ +/* int */ +/* agent_shadow_key (const unsigned char *pubkey, */ +/* const unsigned char *shadow_info, */ +/* unsigned char **result) */ +} + + +static void +test_agent_get_shadow_info (void) +{ +/* Parse a canonical encoded shadowed key and return a pointer to the + inner list with the shadow_info */ +/* int */ +/* agent_get_shadow_info (const unsigned char *shadowkey, */ +/* unsigned char const **shadow_info) */ +} + + + + +int +main (int argc, char **argv) +{ + test_agent_protect (); + test_agent_unprotect (); + test_agent_private_key_type (); + test_make_shadow_info (); + test_agent_shadow_key (); + test_agent_get_shadow_info (); + + return 0; +}