From cvs at cvs.gnupg.org Fri Jul 4 17:46:06 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Fri, 04 Jul 2008 17:46:06 +0200 Subject: [svn] gpgme - r1327 - in trunk: . doc gpgme Message-ID: Author: wk Date: 2008-07-04 17:46:01 +0200 (Fri, 04 Jul 2008) New Revision: 1327 Modified: trunk/ChangeLog trunk/INSTALL trunk/config.guess trunk/config.sub trunk/depcomp trunk/doc/ChangeLog trunk/doc/gpgme.texi trunk/doc/mdate-sh trunk/doc/texinfo.tex trunk/gpgme/gpgme.h trunk/install-sh trunk/missing trunk/mkinstalldirs Log: Update automake scripts. Minor doc changes. [The diff below has been truncated] Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-29 18:41:19 UTC (rev 1326) +++ trunk/ChangeLog 2008-07-04 15:46:01 UTC (rev 1327) @@ -1,3 +1,8 @@ +2008-07-04 Werner Koch + + * config.guess, config.sub: Update to 2007-11-19. Also update + missing et al scripts. + 2008-04-01 Werner Koch * configure.ac (AC_INIT): Fix quoting. Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2008-06-29 18:41:19 UTC (rev 1326) +++ trunk/doc/ChangeLog 2008-07-04 15:46:01 UTC (rev 1327) @@ -1,3 +1,7 @@ +2008-07-04 Werner Koch + + * gpgme.texi (Algorithms): Add a hint on symmetric only encryption. + 2008-06-27 Marcus Brinkmann * gpgme.texi (Cancellation): Document gpgme_cancel_async. Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2008-06-29 18:41:19 UTC (rev 1326) +++ trunk/INSTALL 2008-07-04 15:46:01 UTC (rev 1327) @@ -1,13 +1,19 @@ -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. +Installation Instructions +************************* - This file is free documentation; the Free Software Foundation gives +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== - These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -20,9 +26,9 @@ It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -32,20 +38,17 @@ may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -64,54 +67,55 @@ all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== - You can compile the package for more than one kind of computer at the +You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular +options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. @@ -122,7 +126,7 @@ Optional Features ================= - Some packages pay attention to `--enable-FEATURE' options to +Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -137,11 +141,11 @@ Specifying the System Type ========================== - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -156,7 +160,7 @@ need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -167,9 +171,9 @@ Sharing Defaults ================ - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -178,7 +182,7 @@ Defining Variables ================== - Variables not defined in a site shell script can be set in the +Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -186,14 +190,18 @@ ./configure CC=/usr/local2/bin/gcc -will cause the specified gcc to be used as the C compiler (unless it is +causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + `configure' Invocation ====================== - `configure' recognizes the following options to control how it -operates. +`configure' recognizes the following options to control how it operates. `--help' `-h' Modified: trunk/config.guess =================================================================== --- trunk/config.guess 2008-06-29 18:41:19 UTC (rev 1326) +++ trunk/config.guess 2008-07-04 15:46:01 UTC (rev 1327) @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2004-01-05' +timestamp='2007-11-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,13 +18,15 @@ # # 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. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. @@ -53,7 +56,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -66,11 +69,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,7 +107,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -123,7 +126,7 @@ ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi at noc.rutgers.edu 1994-08-24) @@ -158,6 +161,7 @@ arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -196,53 +200,32 @@ # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pegasos:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU @@ -280,45 +263,49 @@ "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha*:OpenVMS:*:*) - echo alpha-hp-vms - exit 0 ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit 0 ;; + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -326,32 +313,32 @@ else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -360,10 +347,10 @@ esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; From cvs at cvs.gnupg.org Sat Jul 5 18:44:08 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Sat, 05 Jul 2008 18:44:08 +0200 Subject: [svn] gcry - r1293 - in trunk: . cipher random src Message-ID: Author: wk Date: 2008-07-05 18:44:03 +0200 (Sat, 05 Jul 2008) New Revision: 1293 Added: trunk/random/ trunk/random/ChangeLog trunk/random/Makefile.am trunk/random/rand-internal.h trunk/random/random-daemon.c trunk/random/random.c trunk/random/random.h trunk/random/rndegd.c trunk/random/rndhw.c trunk/random/rndlinux.c trunk/random/rndunix.c trunk/random/rndw32.c Removed: trunk/cipher/rand-internal.h trunk/cipher/random-daemon.c trunk/cipher/random.c trunk/cipher/random.h trunk/cipher/rndegd.c trunk/cipher/rndhw.c trunk/cipher/rndlinux.c trunk/cipher/rndunix.c trunk/cipher/rndw32.c Modified: trunk/ChangeLog trunk/Makefile.am trunk/cipher/ChangeLog trunk/cipher/Makefile.am trunk/configure.ac trunk/src/ChangeLog trunk/src/Makefile.am trunk/src/cipher.h Log: Moved random stuff into its own directory. [The diff below has been truncated] Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-24 08:11:04 UTC (rev 1292) +++ trunk/ChangeLog 2008-07-05 16:44:03 UTC (rev 1293) @@ -1,3 +1,9 @@ +2008-07-05 Werner Koch + + * random/: New. + * Makefile.am (DIST_SUBDIRS): Add random. + * configure.ac (AC_CONFIG_FILES): Add random/Makefile. + 2008-04-25 Werner Koch Release 1.4.1. Modified: trunk/cipher/ChangeLog =================================================================== --- trunk/cipher/ChangeLog 2008-06-24 08:11:04 UTC (rev 1292) +++ trunk/cipher/ChangeLog 2008-07-05 16:44:03 UTC (rev 1293) @@ -1,3 +1,9 @@ +2008-07-05 Werner Koch + + * random-daemon.c, random.h, rndhw.c, rndunix.c, rand-internal.h + * random.c, rndegd.c, rndlinux.c, rndw32.c: Move to ../cipher. + * Makefile.am: Remove random stuff. + 2008-06-24 Szakats Istvan (wk) * ac.c (_gcry_ac_key_destroy, _gcry_ac_key_pair_generate): Relase Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2008-06-24 08:11:04 UTC (rev 1292) +++ trunk/src/ChangeLog 2008-07-05 16:44:03 UTC (rev 1293) @@ -1,3 +1,7 @@ +2008-07-05 Werner Koch + + * Makefile.am: Include librandom.la. + 2008-04-18 Werner Koch * missing-string.c (vasprintf): Remove. It is not used. Reported Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2008-06-24 08:11:04 UTC (rev 1292) +++ trunk/Makefile.am 2008-07-05 16:44:03 UTC (rev 1293) @@ -22,8 +22,8 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-random-daemon \ --enable-ciphers=arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia -DIST_SUBDIRS = m4 mpi cipher src doc tests -SUBDIRS = mpi cipher src doc tests +DIST_SUBDIRS = m4 mpi cipher random src doc tests +SUBDIRS = mpi cipher random src doc tests EXTRA_DIST = BUGS autogen.sh README.SVN DISTCLEANFILES = Modified: trunk/cipher/Makefile.am =================================================================== --- trunk/cipher/Makefile.am 2008-06-24 08:11:04 UTC (rev 1292) +++ trunk/cipher/Makefile.am 2008-07-05 16:44:03 UTC (rev 1293) @@ -15,8 +15,7 @@ # 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 +# License along with this program; if not, see . # Process this file with automake to produce Makefile.in @@ -30,8 +29,7 @@ noinst_LTLIBRARIES = libcipher.la -GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ @GCRYPT_DIGESTS@ \ - @GCRYPT_RANDOM@ +GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ @GCRYPT_DIGESTS@ libcipher_la_DEPENDENCIES = $(GCRYPT_MODULES) libcipher_la_LIBADD = $(GCRYPT_MODULES) @@ -40,16 +38,8 @@ cipher.c pubkey.c ac.c md.c \ bithelp.h \ primegen.c \ -random.c random.h \ -rndhw.c \ -rand-internal.h \ rmd.h -if USE_RANDOM_DAEMON -libcipher_la_SOURCES += random-daemon.c -endif USE_RANDOM_DAEMON - - EXTRA_libcipher_la_SOURCES = \ arcfour.c \ blowfish.c \ @@ -63,10 +53,6 @@ md5.c \ rijndael.c rijndael-tables.h \ rmd160.c \ -rndlinux.c \ -rndegd.c \ -rndunix.c \ -rndw32.c \ rsa.c \ seed.c \ serpent.c \ Deleted: trunk/cipher/rand-internal.h Deleted: trunk/cipher/random-daemon.c Deleted: trunk/cipher/random.c Deleted: trunk/cipher/random.h Deleted: trunk/cipher/rndegd.c Deleted: trunk/cipher/rndhw.c Deleted: trunk/cipher/rndlinux.c Deleted: trunk/cipher/rndunix.c Deleted: trunk/cipher/rndw32.c Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-06-24 08:11:04 UTC (rev 1292) +++ trunk/configure.ac 2008-07-05 16:44:03 UTC (rev 1293) @@ -1081,6 +1081,7 @@ m4/Makefile mpi/Makefile cipher/Makefile +random/Makefile doc/Makefile src/Makefile src/gcrypt.h Added: trunk/random/ChangeLog =================================================================== --- trunk/random/ChangeLog 2008-06-24 08:11:04 UTC (rev 1292) +++ trunk/random/ChangeLog 2008-07-05 16:44:03 UTC (rev 1293) @@ -0,0 +1,17 @@ +2008-07-05 Werner Koch + + * random-daemon.c, random.h, rndhw.c, rndunix.c, rand-internal.h * + random.c, rndegd.c, rndlinux.c, rndw32.c: Move from ../cipher/ to + here. + * Makefile.am: New. + + Copyright 2008 Free Software Foundation, Inc. + + This file is free software; as a special exception the author gives + unlimited permission to copy and/or distribute it, with or without + modifications, as long as this notice is preserved. + + This file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY, to the extent permitted by law; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + \ No newline at end of file Added: trunk/random/Makefile.am =================================================================== --- trunk/random/Makefile.am 2008-06-24 08:11:04 UTC (rev 1292) +++ trunk/random/Makefile.am 2008-07-05 16:44:03 UTC (rev 1293) @@ -0,0 +1,47 @@ +# Makefile for cipher modules +# Copyright (C) 2008 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt 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. +# +# Libgcrypt 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, see . + +# Process this file with automake to produce Makefile.in + +# Need to include ../src in addition to top_srcdir because gcrypt.h is +# a built header. +AM_CPPFLAGS = -I../src -I$(top_srcdir)/src +AM_CFLAGS = $(GPG_ERROR_CFLAGS) + +noinst_LTLIBRARIES = librandom.la + +GCRYPT_MODULES = @GCRYPT_RANDOM@ + +librandom_la_DEPENDENCIES = $(GCRYPT_MODULES) +librandom_la_LIBADD = $(GCRYPT_MODULES) + +librandom_la_SOURCES = \ +random.c random.h \ +rndhw.c \ +rand-internal.h + +if USE_RANDOM_DAEMON +librandom_la_SOURCES += random-daemon.c +endif USE_RANDOM_DAEMON + + +EXTRA_librandom_la_SOURCES = \ +rndlinux.c \ +rndegd.c \ +rndunix.c \ +rndw32.c Copied: trunk/random/rand-internal.h (from rev 1290, trunk/cipher/rand-internal.h) Copied: trunk/random/random-daemon.c (from rev 1290, trunk/cipher/random-daemon.c) Copied: trunk/random/random.c (from rev 1290, trunk/cipher/random.c) =================================================================== --- trunk/cipher/random.c 2008-04-25 16:53:39 UTC (rev 1290) +++ trunk/random/random.c 2008-07-05 16:44:03 UTC (rev 1293) @@ -0,0 +1,1446 @@ +/* random.c - random number generator + * Copyright (C) 1998, 2000, 2001, 2002, 2003, + * 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + * + * This file is part of Libgcrypt. + * + * Libgcrypt 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. + * + * Libgcrypt 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, see . + */ + +/* + This random number generator is modelled after the one described in + Peter Gutmann's paper: "Software Generation of Practically Strong + Random Numbers". See also chapter 6 in his book "Cryptographic + Security Architecture", New York, 2004, ISBN 0-387-95387-6. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_GETHRTIME +#include +#endif +#ifdef HAVE_GETTIMEOFDAY +#include +#endif +#ifdef HAVE_GETRUSAGE +#include +#endif +#ifdef __MINGW32__ +#include +#endif +#include "g10lib.h" +#include "../cipher/rmd.h" +#include "random.h" +#include "rand-internal.h" +#include "cipher.h" /* Required for the rmd160_hash_buffer() prototype. */ +#include "ath.h" + +#ifndef RAND_MAX /* For SunOS. */ +#define RAND_MAX 32767 +#endif + +/* Check whether we can lock the seed file read write. */ +#if defined(HAVE_FCNTL) && defined(HAVE_FTRUNCATE) && !defined(HAVE_W32_SYSTEM) +#define LOCK_SEED_FILE 1 +#else +#define LOCK_SEED_FILE 0 +#endif + +/* Define the constant we use for transforming the pool at read-out. */ +#if SIZEOF_UNSIGNED_LONG == 8 +#define ADD_VALUE 0xa5a5a5a5a5a5a5a5 +#elif SIZEOF_UNSIGNED_LONG == 4 +#define ADD_VALUE 0xa5a5a5a5 +#else +#error weird size for an unsigned long +#endif + +/* Contstants pertaining to the hash pool. */ +#define BLOCKLEN 64 /* Hash this amount of bytes... */ +#define DIGESTLEN 20 /* ... into a digest of this length (rmd160). */ +/* POOLBLOCKS is the number of digests which make up the pool. */ +#define POOLBLOCKS 30 +/* POOLSIZE must be a multiple of the digest length to make the AND + operations faster, the size should also be a multiple of unsigned + long. */ +#define POOLSIZE (POOLBLOCKS*DIGESTLEN) +#if (POOLSIZE % SIZEOF_UNSIGNED_LONG) +#error Please make sure that poolsize is a multiple of unsigned long +#endif +#define POOLWORDS (POOLSIZE / SIZEOF_UNSIGNED_LONG) + + +/* RNDPOOL is the pool we use to collect the entropy and to stir it + up. Its allocated size is POOLSIZE+BLOCKLEN. Note that this is + also an indication on whether the module has been fully + initialized. */ +static unsigned char *rndpool; + +/* KEYPOOL is used as a scratch copy to read out random from RNDPOOL. + Its allocated size is also POOLSIZE+BLOCKLEN. */ +static unsigned char *keypool; + +/* This is the offset into RNDPOOL where the next random bytes are to + be mixed in. */ +static size_t pool_writepos; + +/* When reading data out of KEYPOOL, we start the read at different + positions. This variable keeps track on where to read next. */ +static size_t pool_readpos; + +/* This flag is set to true as soon as the pool has been completely + filled the first time. This may happen either by rereading a seed + file or by adding enough entropy. */ +static int pool_filled; + +/* This counter is used to track whether the initial seeding has been + done with enough bytes from a reliable entropy source. */ +static size_t pool_filled_counter; + +/* If random of level GCRY_VERY_STRONG_RANDOM has been requested we + have stricter requirements on what kind of entropy is in the pool. + In particular POOL_FILLED is not sufficient. Thus we add some + extra seeding and set this flag to true if the extra seeding has + been done. */ +static int did_initial_extra_seeding; + +/* This variable is used to estimated the amount of fresh entropy + available in RNDPOOL. */ +static int pool_balance; + +/* After a mixing operation this variable will be set to true and + cleared if new entropy has been added or a remix is required for + otehr reasons. */ +static int just_mixed; + +/* The name of the seed file or NULL if no seed file has been defined. + The seed file needs to be regsitered at initialiation time. We + keep a malloced copy here. */ +static char *seed_file_name; + +/* If a seed file has been registered and maybe updated on exit this + flag set. */ +static int allow_seed_file_update; + +/* Option flag set at initialiation time to force allocation of the + pool in secure memory. */ +static int secure_alloc; + +/* This function pointer is set to the actual entropy gathering + function during initailization. After initialization it is + guaranteed to point to function. (On systems without a random + gatherer module a dummy function is used).*/ +static int (*slow_gather_fnc)(void (*)(const void*, size_t, + enum random_origins), + enum random_origins, size_t, int); + +/* This function is set to the actual fast entropy gathering fucntion + during initialization. If it is NULL, no such function is + available. */ +static void (*fast_gather_fnc)(void (*)(const void*, size_t, + enum random_origins), + enum random_origins); + + +/* Option flag useful for debugging and the test suite. If set + requests for very strong random are degraded to strong random. Not + used by regular applications. */ +static int quick_test; + +/* On systems without entropy gathering modules, this flag is set to + indicate that the random generator is not working properly. A + warning message is issued as well. This is useful only for + debugging and during development. */ +static int faked_rng; + +/* This is the lock we use to protect all pool operations. */ +static ath_mutex_t pool_lock = ATH_MUTEX_INITIALIZER; + +/* This is a helper for assert calls. These calls are used to assert + that functions are called in a locked state. It is not meant to be + thread-safe but as a method to get aware of missing locks in the + test suite. */ +static int pool_is_locked; + +/* This is the lock we use to protect the buffer used by the nonce + generation. */ +static ath_mutex_t nonce_buffer_lock = ATH_MUTEX_INITIALIZER; + + +/* We keep some counters in this structure for the sake of the + _gcry_random_dump_stats () function. */ +static struct +{ + unsigned long mixrnd; + unsigned long mixkey; + unsigned long slowpolls; + unsigned long fastpolls; + unsigned long getbytes1; + unsigned long ngetbytes1; + unsigned long getbytes2; + unsigned long ngetbytes2; + unsigned long addbytes; + unsigned long naddbytes; +} rndstats; + + +/* If not NULL a progress function called from certain places and the + opaque value passed along. Registred by + _gcry_register_random_progress (). */ +static void (*progress_cb) (void *,const char*,int,int, int ); +static void *progress_cb_data; + + +/* --- Stuff pertaining to the random daemon support. --- */ +#ifdef USE_RANDOM_DAEMON + +/* If ALLOW_DAEMON is true, the module will try to use the random + daemon first. If the daemon has failed, this variable is set to + back to false and the code continues as normal. Note, we don't + test this flag in a locked state because a wrong value does not + harm and the trhead will find out itself that the daemon does not + work and set it (again) to false. */ +static int allow_daemon; + +/* During initialization, the user may set a non-default socket name + for accessing the random daemon. If this value is NULL, the + default name will be used. */ +static char *daemon_socket_name; + +#endif /*USE_RANDOM_DAEMON*/ + + + +/* --- Prototypes --- */ +static void read_pool (byte *buffer, size_t length, int level ); +static void add_randomness (const void *buffer, size_t length, + enum random_origins origin); +static void random_poll (void); +static void do_fast_random_poll (void); +static int (*getfnc_gather_random (void))(void (*)(const void*, size_t, + enum random_origins), + enum random_origins, size_t, int); +static void (*getfnc_fast_random_poll (void))(void (*)(const void*, size_t, + enum random_origins), + enum random_origins); +static void read_random_source (enum random_origins origin, + size_t length, int level); +static int gather_faked (void (*add)(const void*, size_t, enum random_origins), + enum random_origins, size_t length, int level ); + + + +/* --- Functions --- */ + + +/* Basic initialization which is required to initialize mutexes and + such. It does not run a full initialization so that the filling of + the random pool can be delayed until it is actually needed. We + assume that this function is used before any concurrent access + happens. */ +static void +initialize_basics(void) +{ + static int initialized; + int err; + + if (!initialized) + { + initialized = 1; + err = ath_mutex_init (&pool_lock); + if (err) + log_fatal ("failed to create the pool lock: %s\n", strerror (err) ); + + err = ath_mutex_init (&nonce_buffer_lock); + if (err) + log_fatal ("failed to create the nonce buffer lock: %s\n", + strerror (err) ); + +#ifdef USE_RANDOM_DAEMON + _gcry_daemon_initialize_basics (); +#endif /*USE_RANDOM_DAEMON*/ + + /* Make sure that we are still using the values we have + traditionally used for the random levels. */ + assert ( GCRY_WEAK_RANDOM == 0 + && GCRY_STRONG_RANDOM == 1 + && GCRY_VERY_STRONG_RANDOM == 2); + } +} + +/* Take the pool lock. */ +static void +lock_pool (void) +{ + int err; + + err = ath_mutex_lock (&pool_lock); + if (err) + log_fatal ("failed to acquire the pool lock: %s\n", strerror (err)); + pool_is_locked = 1; +} + +/* Release the pool lock. */ +static void +unlock_pool (void) +{ + int err; + + pool_is_locked = 0; + err = ath_mutex_unlock (&pool_lock); + if (err) + log_fatal ("failed to release the pool lock: %s\n", strerror (err)); From cvs at cvs.gnupg.org Thu Jul 17 19:09:40 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 17 Jul 2008 19:09:40 +0200 Subject: [svn] gpgme - r1328 - trunk/doc Message-ID: Author: wk Date: 2008-07-17 19:09:39 +0200 (Thu, 17 Jul 2008) New Revision: 1328 Added: trunk/doc/module-overview.sk Modified: trunk/doc/ChangeLog trunk/doc/Makefile.am Log: Add a module overview diagram. [The diff below has been truncated] Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2008-07-04 15:46:01 UTC (rev 1327) +++ trunk/doc/ChangeLog 2008-07-17 17:09:39 UTC (rev 1328) @@ -1,3 +1,7 @@ +2008-07-17 Werner Koch + + * module-overview.sk: New. + 2008-07-04 Werner Koch * gpgme.texi (Algorithms): Add a hint on symmetric only encryption. Modified: trunk/doc/Makefile.am =================================================================== --- trunk/doc/Makefile.am 2008-07-04 15:46:01 UTC (rev 1327) +++ trunk/doc/Makefile.am 2008-07-17 17:09:39 UTC (rev 1328) @@ -21,6 +21,8 @@ DISTCLEANFILES = gpgme.tmp +EXTRA_DIST = module-overview.sk + info_TEXINFOS = gpgme.texi gpgme_TEXINFOS = uiserver.texi lesser.texi gpl.texi Added: trunk/doc/module-overview.sk =================================================================== --- trunk/doc/module-overview.sk 2008-07-04 15:46:01 UTC (rev 1327) +++ trunk/doc/module-overview.sk 2008-07-17 17:09:39 UTC (rev 1328) @@ -0,0 +1,640 @@ +##Sketch 1 2 +document() +layout('A4',1) +fp((0,0,0)) +ft(1) +Fn('Helvetica-Bold') +Fs(18) +dstyle('Text') +fp((0,1,0.498)) +ft(1) +lp((0,0,0)) +lw(0.283465) +lc(1) +lj(0) +ld(()) +la1() +la2() +dstyle('Application Box') +layer('Layer 1',1,1,0,0,(0,0,0)) +lw(1) +r(0,0,0,0,688.145,44.1554) +lw(1) +r(0,0,0,0,682.363,85.0359) +lp((0.392,0.584,0.929)) +lw(4.25197) +b() +bs(605.383,329.758,0) +bs(605.383,230.546,0) +lw(1) +r(0,0,0,0,807.414,53.6148) +lp((0.392,0.584,0.929)) +lw(4.25) +b() +bs(480.134,240.945,0) +bs(480.358,325.277,0) +lp((0.392,0.584,0.929)) +lw(3.25) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(474.803,432.284,0) +bs(475.334,360.243,0) +lw(3.25) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(354.331,432.284,0) +bs(352.806,361.417,0) +lp((0.392,0.584,0.929)) +lw(3.25) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(212.598,432.284,0) +bs(212.598,361.417,0) +fp((0.999,1,0.4)) +lw(0.283465) +r(70.5968,0,0,-56.6929,191.608,488.976,0.0603744,0.151107) +lw(1) +r(0,0,0,0,88.5492,390.805) +lp((0.392,0.584,0.929)) +lw(4.25197) +b() +bs(226.772,524.409,0) +bs(226.772,488.976,0) +lp((0.392,0.584,0.929)) +lw(4.25) +b() +bs(403.937,528.718,0) +bs(403.937,488.976,0) +lp((0.392,0.584,0.929)) +lw(3.25) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(240.945,432.284,0) +bs(240.574,394.994,0) +bs(595.276,396.85,0) +bs(595.276,361.417,0) +lp((0.392,0.584,0.929)) +lw(3.25) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(333.071,432.284,0) +bs(333.07,425.196,0) +bs(333.07,382.677,0) +bs(240.945,382.677,0) +bs(240.945,361.417,0) +G() +fp((0.999,1,0.4)) +lw(0.283465) +r(70.5589,0,0,-28.347,318.897,354.331,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica-Bold') +Fs(10) +txt('GPG',(1,0,0,0.905764,344.004,335.686)) +G_() +G() +fp((0.999,1,0.4)) +lw(0.283465) +r(70.5589,0,0,-28.3464,446.763,354.33,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('GpgConf',(0.552654,0,0,0.500564,481.802,340.184),1,1) +G_() +G() +fp((0.999,1,0.4)) +lw(0.283465) +r(70.5589,0,0,-28.347,191.338,354.331,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('GpgSM',(0.552654,0,0,0.500574,226.376,340.185),1,1) +G_() +lp((0.392,0.584,0.929)) +lw(4.25) +b() +bs(347.244,325.984,0) +bs(347.244,325.984,0) +bs(347.244,255.118,0) +bs(304.724,255.118,0) +bs(304.724,226.771,0) +lp((0.392,0.584,0.929)) +lw(4.25) +b() +bs(233.858,325.984,0) +bs(233.858,255.118,0) +bs(276.378,255.118,0) +bs(276.378,226.771,0) +fp((0,0,0)) +le() +lw(1) +Fn('Palatino-Roman') +txt('2008-07-17',(0.608301,0,0,0.608301,708.661,65.8308)) +lw(1) +r(0,0,0,0,750.427,153.265) +lp((0.392,0.584,0.929)) +lw(3.25) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(219.685,325.984,0) +bs(219.685,198.425,0) +bs(219.685,162.992,0) +G() +fp((1,1,1)) +lw(0.283465) +r(113.386,0,0,-42.5196,35.4333,162.992,0.0670228,0.151107) +fp((0,0,0)) +lw(0.283465) +Fn('Helvetica') +Fs(14) +style('Text') +Fn('Helvetica-Bold') +Fs(18) +txt('LDAP Server',(0.552654,0,0,0.552654,92.1261,148.819),1,1) +fp((0,0,0)) +lw(0.283465) +Fn('Helvetica') +Fs(14) +style('Text') +Fn('Helvetica-Bold') +Fs(18) +txt('(CRLs, Certificates)',(0.552654,0,0,0.552654,92.1261,134.646),1,1) +G_() +G() +fp((1,1,1)) +lw(0.283465) +r(113.386,0,0,-42.5196,35.4331,99.2125,0.0670228,0.151107) +fp((0,0,0)) +lw(0.283465) +Fn('Helvetica') +Fs(14) +style('Text') +Fn('Helvetica-Bold') +Fs(18) +txt('HTTP Server',(0.552654,0,0,0.552654,92.1259,85.0394),1,1) +fp((0,0,0)) +lw(0.283465) +Fn('Helvetica') +Fs(14) +style('Text') +Fn('Helvetica-Bold') +Fs(18) +txt('(CRLs)',(0.552654,0,0,0.552654,92.1259,70.8662),1,1) +G_() +G() +fp((0.999,1,0.4)) +lw(0.283465) +r(70.866,0,0,-31.2962,191.338,158.855,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('DirMngr',(0.552654,0,0,0.552654,224.02,142.978),1,1) +G_() +lw(2) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(219.15,126.18,0) +bs(219.685,77.9528,0) +bs(155.906,77.9528,0) +lp((0.392,0.584,0.929)) +lw(3) +b() +bs(233.858,127.559,0) +bs(233.858,99.2125,0) +bs(276.378,99.2125,0) +bs(276.378,85.0393,0) +lp((0.392,0.584,0.929)) +lw(3) +b() +bs(248.031,127.559,0) +bs(248.031,113.386,0) +bs(375.59,113.386,0) +bs(375.59,85.0393,0) +G() +fp((1,0.647,0.31)) +lw(0.283465) +r(99.2124,0,0,-28.3464,333.07,85.0393,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +Fn('Helvetica-Bold') +Fs(18) +txt('Certificate Cache',(0.552654,0,0,0.552654,382.606,69.8548),1,1) +fp((1,0.647,0.31)) +lw(0.283465) +r(70.5589,0,0,-28.3464,248.031,85.0393,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('CRL Cache',(0.552654,0,0,0.552654,284.147,70.6936),1,1) +G_() +lw(1) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(503.149,240.945,0) +bs(503.149,283.464,0) +bs(588.189,283.465,0) +bs(588.189,325.984,0) +lw(1) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(503.149,283.464,0) +bs(503.149,283.464,0) +bs(361.417,283.464,0) +bs(361.417,325.984,0) +lw(1) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(361.417,283.464,0) +bs(205.512,283.465,0) +bs(205.512,325.984,0) +lw(1) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(574.015,85.0393,0) +bs(574.015,141.732,0) +bs(262.204,141.732,0) +lw(1) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(602.361,85.0393,0) +bs(602.361,170.079,0) +bs(439.37,170.079,0) +bs(439.37,311.811,0) +bs(460.629,311.811,0) +bs(460.629,325.984,0) +lw(1) +ld((5, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(389.763,240.945,0) +bs(389.763,269.291,0) +bs(290.551,269.291,0) +bs(290.551,340.157,0) +bs(262.204,340.157,0) +lw(1) +ld((5, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(389.763,269.291,0) +bs(559.843,269.291,0) +bs(559.843,333.071,0) +bs(574.016,333.071,0) +lw(1) +ld((5, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(488.976,85.0393,0) +bs(488.976,127.559,0) +bs(389.763,127.559,0) +bs(389.763,212.598,0) +lw(2) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(205.512,127.559,0) +bs(205.512,113.386,0) +bs(170.079,113.386,0) +bs(170.079,141.732,0) +bs(155.906,141.732,0) +lp((0.392,0.584,0.929)) +lw(3.25) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(622.961,356.76,0) +bs(622.961,518.503,0) +G() +fp((0.999,1,0.4)) +lw(0.283465) +r(70.5589,0,0,-28.3459,573.199,354.33,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('GpgAgent',(0.552654,0,0,0.500554,608.238,340.185),1,1) +G_() +lp((0.392,0.584,0.929)) +lw(4.25) +b() +bs(721.712,467.717,0) +bs(721.712,297.838,0) +G() +fp((0.999,1,0.4)) +lw(0.283465) +r(70.5589,0,0,-28.3464,686.278,297.637,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('SCdaemon',(0.552654,0,0,0.500564,721.316,283.492),1,1) +G_() +fp((1,0.647,0.31)) +lw(0.283465) +lj(1) +r(86.162,0,0,-117.493,679.192,566.929,0.181818,0.333333) +G() +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica-Bold') +Fs(18) +txt('Smartcard',(0.552654,0,0,0.552654,698.127,491.036)) +fp((0.999,1,0.4)) +lw(0.283465) +r(70.5589,0,0,-31.2962,686.279,557.593,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('Card Reader',(0.552654,0,0,0.552654,721.318,541.975),1,1) +G_() +G() +fp((0.999,1,0.4)) +lw(0.283465) +r(73.6353,0,0,-41.2944,587.066,565.703,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('PIN Entry',(0.57675,0,0,0.729211,623.632,545.097),1,1) +G_() +lp((0.392,0.584,0.929)) +lw(3.25) +ld((1, 1)) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(643.758,340.157,0) +bs(643.758,340.157,0) +bs(707.539,340.158,0) +bs(707.539,304.724,0) +lw(1) +la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) +b() +bs(574.016,283.465,0) +bs(587.066,283.464,0) +bs(686.278,283.464,0) +G() +lp((0.392,0.584,0.929)) +lw(4.25197) +b() +bs(98.9053,325.985,0) +bs(98.9053,240.945,0) +G() +fp((0.999,1,0.4)) +lw(0.283465) +r(70.5589,0,0,-28.3464,63.7795,354.331,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('WatchGnuPG',(0.552654,0,0,0.552654,98.8185,338.713),1,1) +G_() +G() +fp((1,0.647,0.31)) +lw(0.283465) +r(70.5589,0,0,-28.1194,63.7795,240.718,0.0670228,0.168178) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +txt('Log Socket',(0.552654,0,0,0.552654,98.8175,225.1),1,1) +G_() +G_() +G() +fp((1,0.647,0.31)) +lw(0.283465) +r(85.0392,0,0,-28.3464,446.457,240.945,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +Fn('Helvetica-Bold') +Fs(18) +txt('Config Files',(0.552654,0,0,0.552654,485.621,226.772),1,1) +G_() +G() +fp((1,0.647,0.31)) +lw(0.283465) +r(85.0392,0,0,-28.3464,545.669,85.0394,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +Fn('Helvetica-Bold') +Fs(18) +txt('Config Files',(0.552654,0,0,0.552654,584.834,70.8662),1,1) +G_() +G() +fp((1,0.647,0.31)) +lw(0.283465) +r(84.6546,0,0,-27.3609,347.245,239.959,0.0670228,0.151107) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(14) +style('Text') +Fn('Helvetica-Bold') +Fs(18) +txt('Help Files',(0.552654,0,0,0.552654,388.252,224.705),1,1) +G_() +G() From cvs at cvs.gnupg.org Thu Jul 17 21:41:15 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 17 Jul 2008 21:41:15 +0200 Subject: [svn] GnuPG - r4798 - in trunk: common doc g10 po scd Message-ID: Author: wk Date: 2008-07-17 21:40:53 +0200 (Thu, 17 Jul 2008) New Revision: 4798 Modified: trunk/common/ChangeLog trunk/common/exechelp.c trunk/doc/DETAILS trunk/doc/scdaemon.texi trunk/g10/ChangeLog trunk/g10/exec.c trunk/g10/gpg.c trunk/po/be.po trunk/po/ca.po trunk/po/cs.po trunk/po/da.po trunk/po/de.po trunk/po/el.po trunk/po/eo.po trunk/po/es.po trunk/po/et.po trunk/po/fi.po trunk/po/fr.po trunk/po/gl.po trunk/po/hu.po trunk/po/id.po trunk/po/it.po trunk/po/ja.po trunk/po/nb.po trunk/po/pl.po trunk/po/pt.po trunk/po/pt_BR.po trunk/po/ro.po trunk/po/ru.po trunk/po/sk.po trunk/po/sv.po trunk/po/tr.po trunk/po/zh_CN.po trunk/po/zh_TW.po trunk/scd/ChangeLog trunk/scd/app-openpgp.c trunk/scd/command.c Log: Do not run the setuid test if running under as root proper. Documentation fixes. Some enhancements for the new OpenPGP Card. Modified: trunk/common/ChangeLog =================================================================== --- trunk/common/ChangeLog 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/common/ChangeLog 2008-07-17 19:40:53 UTC (rev 4798) @@ -1,3 +1,8 @@ +2008-07-17 Werner Koch + + * exechelp.c (gnupg_spawn_process_detached): Do not run the setuid + test for root. + 2008-06-26 Werner Koch * estream.c (es_write_sanitized): Loose check for control Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/g10/ChangeLog 2008-07-17 19:40:53 UTC (rev 4798) @@ -1,3 +1,8 @@ +2008-07-17 Werner Koch + + * gpg.c (main): Do not run the setuid test for root. + * exec.c (exec_write): Ditto. + 2008-06-25 Marcus Brinkmann * gpg.c (enum cmd_and_opt_values): Remove option Modified: trunk/scd/ChangeLog =================================================================== --- trunk/scd/ChangeLog 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/scd/ChangeLog 2008-07-17 19:40:53 UTC (rev 4798) @@ -1,3 +1,10 @@ +2008-07-03 Werner Koch + + * app-openpgp.c (do_readcert): New. + (app_local_s): Add fields IS_V2 and MAX_CERTLEN_3. + (app_select_openpgp): Set them and register do_readcert. + (do_setattr): Allow storing of the certificate. + 2008-06-25 Werner Koch * app-dinsig.c (do_sign): Allow for SHA256. Modified: trunk/common/exechelp.c =================================================================== --- trunk/common/exechelp.c 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/common/exechelp.c 2008-07-17 19:40:53 UTC (rev 4798) @@ -826,7 +826,7 @@ pid_t pid; int i; - if (getuid() != geteuid()) + if (getuid() && getuid() != geteuid()) return gpg_error (GPG_ERR_BUG); if (access (pgmname, X_OK)) Modified: trunk/doc/DETAILS =================================================================== --- trunk/doc/DETAILS 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/doc/DETAILS 2008-07-17 19:40:53 UTC (rev 4798) @@ -338,7 +338,11 @@ KEYEXPIRED The key has expired. expire-timestamp is the expiration time - in seconds after the epoch. + in seconds sice Epoch. This status line is not very useful + because it will also be emitted for expired subkeys even if + this subkey is not used. To check whether a key used to sign + a message has expired, the EXPKEYSIG status line is to be + used. Note, that TIMESTAMP may either be a number with seconds since epoch or an ISO 8601 string which can be detected by the Modified: trunk/doc/scdaemon.texi =================================================================== --- trunk/doc/scdaemon.texi 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/doc/scdaemon.texi 2008-07-17 19:40:53 UTC (rev 4798) @@ -470,11 +470,12 @@ @subsection Return a certificate @example - READCERT @var{hexified_certid} + READCERT @var{hexified_certid}|@var{keyid} @end example This function is used to read a certificate identified by - at var{hexified_certid} from the card. + at var{hexified_certid} from the card. With OpenPGP cards the keyid + at code{OpenPGP.3} may be used to rad the certticate of version 2 cards. @node Scdaemon READKEY Modified: trunk/g10/exec.c =================================================================== --- trunk/g10/exec.c 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/g10/exec.c 2008-07-17 19:40:53 UTC (rev 4798) @@ -318,9 +318,9 @@ #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) /* There should be no way to get to this spot while still carrying - setuid privs. Just in case, bomb out if we are. */ - if(getuid()!=geteuid()) - BUG(); + setuid privs. Just in case, bomb out if we are (and are not root). */ + if (getuid () && getuid () != geteuid ()) + BUG (); #endif if(program==NULL && args_in==NULL) Modified: trunk/g10/gpg.c =================================================================== --- trunk/g10/gpg.c 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/g10/gpg.c 2008-07-17 19:40:53 UTC (rev 4798) @@ -2015,9 +2015,9 @@ got_secmem = 1; #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) /* There should be no way to get to this spot while still carrying - setuid privs. Just in case, bomb out if we are. */ - if(getuid()!=geteuid()) - BUG(); + setuid privs. Just in case, bomb out if we are (and are not root). */ + if (getuid () && getuid () != geteuid ()) + BUG (); #endif maybe_setuid = 0; Modified: trunk/po/be.po [not shown] Modified: trunk/po/ca.po [not shown] Modified: trunk/po/cs.po [not shown] Modified: trunk/po/da.po [not shown] Modified: trunk/po/de.po [not shown] Modified: trunk/po/el.po [not shown] Modified: trunk/po/eo.po [not shown] Modified: trunk/po/es.po [not shown] Modified: trunk/po/et.po [not shown] Modified: trunk/po/fi.po [not shown] Modified: trunk/po/fr.po [not shown] Modified: trunk/po/gl.po [not shown] Modified: trunk/po/hu.po [not shown] Modified: trunk/po/id.po [not shown] Modified: trunk/po/it.po [not shown] Modified: trunk/po/ja.po [not shown] Modified: trunk/po/nb.po [not shown] Modified: trunk/po/pl.po [not shown] Modified: trunk/po/pt.po [not shown] Modified: trunk/po/pt_BR.po [not shown] Modified: trunk/po/ro.po [not shown] Modified: trunk/po/ru.po [not shown] Modified: trunk/po/sk.po [not shown] Modified: trunk/po/sv.po [not shown] Modified: trunk/po/tr.po [not shown] Modified: trunk/po/zh_CN.po [not shown] Modified: trunk/po/zh_TW.po [not shown] Modified: trunk/scd/app-openpgp.c =================================================================== --- trunk/scd/app-openpgp.c 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/scd/app-openpgp.c 2008-07-17 19:40:53 UTC (rev 4798) @@ -85,6 +85,7 @@ { 0x0102, 0, 0, 0, 0, 0, 0, "Private DO 2"}, { 0x0103, 0, 0, 0, 0, 0, 0, "Private DO 3"}, { 0x0104, 0, 0, 0, 0, 0, 0, "Private DO 4"}, + { 0x7F21, 1, 0, 1, 0, 0, 0, "Cardholder certificate"}, { 0 } }; @@ -120,10 +121,12 @@ /* Keep track of card capabilities. */ struct { + unsigned int is_v2:1; /* This is a v2.0 compatible card. */ unsigned int get_challenge:1; unsigned int key_import:1; unsigned int change_force_chv:1; unsigned int private_dos:1; + unsigned int max_certlen_3:16; } extcap; /* Flags used to control the application. */ @@ -740,11 +743,12 @@ { char tmp[50]; - sprintf (tmp, "gc=%d ki=%d fc=%d pd=%d", + sprintf (tmp, "gc=%d ki=%d fc=%d pd=%d mcl3=%u", app->app_local->extcap.get_challenge, app->app_local->extcap.key_import, app->app_local->extcap.change_force_chv, - app->app_local->extcap.private_dos); + app->app_local->extcap.private_dos, + app->app_local->extcap.max_certlen_3); send_status_info (ctrl, table[idx].name, tmp, strlen (tmp), NULL, 0); return 0; } @@ -1274,7 +1278,48 @@ #endif } +/* Read the statdard certificate of an OpenPGP v2 card. It is + returned in a freshly allocated buffer with that address stored at + CERT and the length of the certificate stored at CERTLEN. CERTID + needs to be set to "OpenPGP.3". */ +static gpg_error_t +do_readcert (app_t app, const char *certid, + unsigned char **cert, size_t *certlen) +{ +#if GNUPG_MAJOR_VERSION > 1 + gpg_error_t err; + unsigned char *buffer; + size_t buflen; + void *relptr; + *cert = NULL; + *certlen = 0; + if (strcmp (certid, "OPENPGP.3")) + return gpg_error (GPG_ERR_INV_ID); + if (app->app_local->extcap.is_v2) + return gpg_error (GPG_ERR_NOT_FOUND); + + relptr = get_one_do (app, 0x00C4, &buffer, &buflen, NULL); + if (!relptr) + return gpg_error (GPG_ERR_NOT_FOUND); + + *cert = xtrymalloc (buflen); + if (!*cert) + err = gpg_error_from_syserror (); + else + { + memcpy (*cert, buffer, buflen); + *certlen = buflen; + err = 0; + } + xfree (relptr); + return err; +#else + return gpg_error (GPG_ERR_NOT_IMPLEMENTED); +#endif +} + + /* Verify a CHV either using using the pinentry or if possibile by using a keypad. PINCB and PINCB_ARG describe the usual callback for the pinentry. CHVNO must be either 1 or 2. SIGCOUNT is only @@ -1588,6 +1633,7 @@ int tag; int need_chv; int special; + unsigned int need_v2:1; } table[] = { { "DISP-NAME", 0x005B, 3 }, { "LOGIN-DATA", 0x005E, 3, 2 }, @@ -1602,6 +1648,7 @@ { "PRIVATE-DO-2", 0x0102, 3 }, { "PRIVATE-DO-3", 0x0103, 2 }, { "PRIVATE-DO-4", 0x0104, 3 }, + { "CERT-3", 0x7F21, 3, 0, 1 }, { NULL, 0 } }; @@ -1610,6 +1657,8 @@ ; if (!table[idx].name) return gpg_error (GPG_ERR_INV_NAME); + if (!table[idx].need_v2) + return gpg_error (GPG_ERR_NOT_SUPPORTED); switch (table[idx].need_chv) { @@ -2719,6 +2768,9 @@ goto leave; } + if (app->card_version >= 0x0200) + app->app_local->extcap.is_v2 = 1; + relptr = get_one_do (app, 0x00C4, &buffer, &buflen, NULL); if (!relptr) { @@ -2743,6 +2795,11 @@ app->app_local->extcap.change_force_chv = !!(*buffer & 0x10); app->app_local->extcap.private_dos = !!(*buffer & 0x08); } + if (buflen >= 10) + { + /* Available with v2 cards. */ + app->app_local->extcap.max_certlen_3 = (buffer[4] << 8 | buffer[5]); + } xfree (relptr); /* Some of the first cards accidently don't set the @@ -2757,6 +2814,7 @@ app->fnc.deinit = do_deinit; app->fnc.learn_status = do_learn_status; + app->fnc.readcert = do_readcert; app->fnc.readkey = do_readkey; app->fnc.getattr = do_getattr; app->fnc.setattr = do_setattr; Modified: trunk/scd/command.c =================================================================== --- trunk/scd/command.c 2008-06-26 19:21:45 UTC (rev 4797) +++ trunk/scd/command.c 2008-07-17 19:40:53 UTC (rev 4798) @@ -611,7 +611,7 @@ -/* READCERT +/* READCERT | Note, that this function may even be used on a locked card. */ From cvs at cvs.gnupg.org Thu Jul 17 21:47:21 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 17 Jul 2008 21:47:21 +0200 Subject: [svn] GnuPG - r4799 - in branches/STABLE-BRANCH-1-4: cipher doc g10 Message-ID: Author: wk Date: 2008-07-17 21:47:19 +0200 (Thu, 17 Jul 2008) New Revision: 4799 Modified: branches/STABLE-BRANCH-1-4/cipher/idea-stub.c branches/STABLE-BRANCH-1-4/cipher/rndunix.c branches/STABLE-BRANCH-1-4/doc/gpgv.texi branches/STABLE-BRANCH-1-4/g10/exec.c branches/STABLE-BRANCH-1-4/g10/gpg.c Log: Revert that last stupid setuid detection fix. Modified: branches/STABLE-BRANCH-1-4/cipher/idea-stub.c =================================================================== --- branches/STABLE-BRANCH-1-4/cipher/idea-stub.c 2008-07-17 19:40:53 UTC (rev 4798) +++ branches/STABLE-BRANCH-1-4/cipher/idea-stub.c 2008-07-17 19:47:19 UTC (rev 4799) @@ -119,7 +119,7 @@ #ifndef _WIN32 /* Make sure we are not setuid. */ - if (getuid() != geteuid()) + if (getuid () != geteuid ()) log_bug("trying to load an extension while still setuid\n"); #endif Modified: branches/STABLE-BRANCH-1-4/cipher/rndunix.c =================================================================== --- branches/STABLE-BRANCH-1-4/cipher/rndunix.c 2008-07-17 19:40:53 UTC (rev 4798) +++ branches/STABLE-BRANCH-1-4/cipher/rndunix.c 2008-07-17 19:47:19 UTC (rev 4799) @@ -804,7 +804,7 @@ if( !gatherer_pid ) { /* make sure we are not setuid */ - if( getuid() != geteuid() ) + if ( getuid () != geteuid () ) BUG(); /* time to start the gatherer process */ if( pipe( pipedes ) ) { Modified: branches/STABLE-BRANCH-1-4/doc/gpgv.texi =================================================================== --- branches/STABLE-BRANCH-1-4/doc/gpgv.texi 2008-07-17 19:40:53 UTC (rev 4798) +++ branches/STABLE-BRANCH-1-4/doc/gpgv.texi 2008-07-17 19:47:19 UTC (rev 4799) @@ -55,8 +55,8 @@ @mansect description @code{@gpgvname} is an OpenPGP signature verification tool. -This program is actually a stripped down version of @code{gpg} which is -only able to check signatures. It is somewhat smaller than the fully blown +This program is actually a stripped-down version of @code{gpg} which is +only able to check signatures. It is somewhat smaller than the fully-blown @code{gpg} and uses a different (and simpler) way to check that the public keys used to make the signature are valid. There are no configuration files and only a few options are implemented. @@ -114,7 +114,7 @@ @mansect return value -The program returns 0 if everything was fine, 1 if at least +The program returns 0 if everything is fine, 1 if at least one signature was bad, and other error codes for fatal errors. @mansect examples @@ -126,7 +126,7 @@ @itemx @gpgvname @code{sigfile} Verify the signature of the file. The second form is used for detached signatures, where @code{sigfile} is the detached -signature (either ASCII armored or binary) and are the signed +signature (either ASCII-armored or binary) and are the signed data; if this is not given the name of the file holding the signed data is constructed by cutting off the extension (".asc", ".sig" or ".sign") from @code{sigfile}. @@ -152,7 +152,7 @@ @table @asis @item ~/.gnupg/trustedkeys.gpg -The default keyring with the allowed keys +The default keyring with the allowed keys. @end table Modified: branches/STABLE-BRANCH-1-4/g10/exec.c =================================================================== --- branches/STABLE-BRANCH-1-4/g10/exec.c 2008-07-17 19:40:53 UTC (rev 4798) +++ branches/STABLE-BRANCH-1-4/g10/exec.c 2008-07-17 19:47:19 UTC (rev 4799) @@ -321,7 +321,7 @@ #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) /* There should be no way to get to this spot while still carrying setuid privs. Just in case, bomb out if we are. */ - if(getuid()!=geteuid()) + if ( getuid () != geteuid () ) BUG(); #endif Modified: branches/STABLE-BRANCH-1-4/g10/gpg.c =================================================================== --- branches/STABLE-BRANCH-1-4/g10/gpg.c 2008-07-17 19:40:53 UTC (rev 4798) +++ branches/STABLE-BRANCH-1-4/g10/gpg.c 2008-07-17 19:47:19 UTC (rev 4799) @@ -2012,7 +2012,7 @@ #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) /* There should be no way to get to this spot while still carrying setuid privs. Just in case, bomb out if we are. */ - if(getuid()!=geteuid()) + if ( getuid () != geteuid () ) BUG(); #endif From cvs at cvs.gnupg.org Thu Jul 17 21:49:52 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 17 Jul 2008 21:49:52 +0200 Subject: [svn] GnuPG - r4800 - in trunk: common g10 Message-ID: Author: wk Date: 2008-07-17 21:49:51 +0200 (Thu, 17 Jul 2008) New Revision: 4800 Modified: trunk/common/ChangeLog trunk/common/exechelp.c trunk/g10/ChangeLog trunk/g10/exec.c trunk/g10/gpg.c Log: Revert that last stupid setuid detection fix. Modified: trunk/common/ChangeLog =================================================================== --- trunk/common/ChangeLog 2008-07-17 19:47:19 UTC (rev 4799) +++ trunk/common/ChangeLog 2008-07-17 19:49:51 UTC (rev 4800) @@ -1,8 +1,3 @@ -2008-07-17 Werner Koch - - * exechelp.c (gnupg_spawn_process_detached): Do not run the setuid - test for root. - 2008-06-26 Werner Koch * estream.c (es_write_sanitized): Loose check for control Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2008-07-17 19:47:19 UTC (rev 4799) +++ trunk/g10/ChangeLog 2008-07-17 19:49:51 UTC (rev 4800) @@ -1,8 +1,3 @@ -2008-07-17 Werner Koch - - * gpg.c (main): Do not run the setuid test for root. - * exec.c (exec_write): Ditto. - 2008-06-25 Marcus Brinkmann * gpg.c (enum cmd_and_opt_values): Remove option Modified: trunk/common/exechelp.c =================================================================== --- trunk/common/exechelp.c 2008-07-17 19:47:19 UTC (rev 4799) +++ trunk/common/exechelp.c 2008-07-17 19:49:51 UTC (rev 4800) @@ -826,7 +826,7 @@ pid_t pid; int i; - if (getuid() && getuid() != geteuid()) + if (getuid() != geteuid()) return gpg_error (GPG_ERR_BUG); if (access (pgmname, X_OK)) Modified: trunk/g10/exec.c =================================================================== --- trunk/g10/exec.c 2008-07-17 19:47:19 UTC (rev 4799) +++ trunk/g10/exec.c 2008-07-17 19:49:51 UTC (rev 4800) @@ -318,8 +318,8 @@ #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) /* There should be no way to get to this spot while still carrying - setuid privs. Just in case, bomb out if we are (and are not root). */ - if (getuid () && getuid () != geteuid ()) + setuid privs. Just in case, bomb out if we are. */ + if ( getuid () != geteuid ()) BUG (); #endif Modified: trunk/g10/gpg.c =================================================================== --- trunk/g10/gpg.c 2008-07-17 19:47:19 UTC (rev 4799) +++ trunk/g10/gpg.c 2008-07-17 19:49:51 UTC (rev 4800) @@ -2015,8 +2015,8 @@ got_secmem = 1; #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) /* There should be no way to get to this spot while still carrying - setuid privs. Just in case, bomb out if we are (and are not root). */ - if (getuid () && getuid () != geteuid ()) + setuid privs. Just in case, bomb out if we are. */ + if ( getuid () != geteuid () ) BUG (); #endif maybe_setuid = 0; From cvs at cvs.gnupg.org Mon Jul 21 09:33:43 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Mon, 21 Jul 2008 09:33:43 +0200 Subject: [svn] GnuPG - r4801 - branches/STABLE-BRANCH-1-4/po Message-ID: Author: wk Date: 2008-07-21 09:33:41 +0200 (Mon, 21 Jul 2008) New Revision: 4801 Modified: branches/STABLE-BRANCH-1-4/po/ChangeLog branches/STABLE-BRANCH-1-4/po/sv.po Log: Update. Modified: branches/STABLE-BRANCH-1-4/po/ChangeLog =================================================================== --- branches/STABLE-BRANCH-1-4/po/ChangeLog 2008-07-17 19:49:51 UTC (rev 4800) +++ branches/STABLE-BRANCH-1-4/po/ChangeLog 2008-07-21 07:33:41 UTC (rev 4801) @@ -1,3 +1,7 @@ +2008-07-21 Daniel Nylander (wk) + + * sv.po: Update. + 2008-06-23 Ludwig H?gelsch?fer (wk) * de.po: 3 typo fixes. Modified: branches/STABLE-BRANCH-1-4/po/sv.po [not shown] From cvs at cvs.gnupg.org Mon Jul 21 09:38:55 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Mon, 21 Jul 2008 09:38:55 +0200 Subject: [svn] GnuPG - r4802 - trunk/po Message-ID: Author: wk Date: 2008-07-21 09:38:53 +0200 (Mon, 21 Jul 2008) New Revision: 4802 Modified: trunk/po/ChangeLog trunk/po/sv.po Log: Update. Modified: trunk/po/ChangeLog =================================================================== --- trunk/po/ChangeLog 2008-07-21 07:33:41 UTC (rev 4801) +++ trunk/po/ChangeLog 2008-07-21 07:38:53 UTC (rev 4802) @@ -1,3 +1,11 @@ +2008-07-21 Werner Koch + + * sv.po: Adjust special size entry. + +2008-07-21 Daniel Nylander (wk) + + * sv.po: Update. + 2008-05-28 Jaime Su?rez (wk) * es.po: Update. All strings for 2.0.9 are no translated. Modified: trunk/po/sv.po [not shown] From cvs at cvs.gnupg.org Wed Jul 23 13:48:01 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed, 23 Jul 2008 13:48:01 +0200 Subject: [svn] pinentry - r184 - in trunk: . secmem Message-ID: Author: wk Date: 2008-07-23 13:48:00 +0200 (Wed, 23 Jul 2008) New Revision: 184 Modified: trunk/ChangeLog trunk/secmem/secmem.c Log: Fix typo. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-05-04 23:38:13 UTC (rev 183) +++ trunk/ChangeLog 2008-07-23 11:48:00 UTC (rev 184) @@ -1,3 +1,8 @@ +2008-07-23 Werner Koch + + * secmem/secmem.c (secmem_init): Fix apostrophe in error + message. Reported by Petr Uzel. + 2008-05-05 Marcus Brinkmann * gtk+-2/gtksecentry.c (GMALLOC_SIZE): New symbol. Modified: trunk/secmem/secmem.c =================================================================== --- trunk/secmem/secmem.c 2008-05-04 23:38:13 UTC (rev 183) +++ trunk/secmem/secmem.c 2008-07-23 11:48:00 UTC (rev 184) @@ -140,7 +140,7 @@ && errno != EAGAIN #endif ) - log_error("can?t lock memory: %s\n", strerror(err)); + log_error("can't lock memory: %s\n", strerror(err)); show_warning = 1; } @@ -177,7 +177,7 @@ && errno != EAGAIN #endif ) - log_error("can?t lock memory: %s\n", strerror(err)); + log_error("can't lock memory: %s\n", strerror(err)); show_warning = 1; } From cvs at cvs.gnupg.org Thu Jul 24 16:49:22 2008 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu, 24 Jul 2008 16:49:22 +0200 Subject: [svn] pinentry - r185 - in trunk: . qt4 Message-ID: Author: marcus Date: 2008-07-24 16:49:21 +0200 (Thu, 24 Jul 2008) New Revision: 185 Added: trunk/qt4/ trunk/qt4/Makefile.am trunk/qt4/main.cpp trunk/qt4/pinentrydialog.cpp trunk/qt4/pinentrydialog.h Modified: trunk/ChangeLog trunk/Makefile.am trunk/NEWS trunk/configure.ac Log: 2008-07-24 Marcus Brinkmann * qt4/pinentrydialog.h, qt4/pinentrydialog.cpp, qt4/main.cpp, qt4/Makefile.am: New files. * configure.ac: Add check for Qt4. (AC_CONFIG_FILES): Add qt4/Makefile.am. * Makefile.am (pinentry_qt4): New variable. (SUBDIRS): Add ${pinentry_qt4}. [The diff below has been truncated] Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-07-23 11:48:00 UTC (rev 184) +++ trunk/ChangeLog 2008-07-24 14:49:21 UTC (rev 185) @@ -1,3 +1,12 @@ +2008-07-24 Marcus Brinkmann + + * qt4/pinentrydialog.h, qt4/pinentrydialog.cpp, qt4/main.cpp, + qt4/Makefile.am: New files. + * configure.ac: Add check for Qt4. + (AC_CONFIG_FILES): Add qt4/Makefile.am. + * Makefile.am (pinentry_qt4): New variable. + (SUBDIRS): Add ${pinentry_qt4}. + 2008-07-23 Werner Koch * secmem/secmem.c (secmem_init): Fix apostrophe in error Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2008-07-23 11:48:00 UTC (rev 184) +++ trunk/Makefile.am 2008-07-24 14:49:21 UTC (rev 185) @@ -47,6 +47,12 @@ pinentry_qt = endif +if BUILD_PINENTRY_QT4 +pinentry_qt4 = qt4 +else +pinentry_qt4 = +endif + if BUILD_PINENTRY_W32 pinentry_w32 = w32 else @@ -54,7 +60,8 @@ endif SUBDIRS = assuan secmem pinentry ${pinentry_curses} \ - ${pinentry_gtk} ${pinentry_gtk_2} ${pinentry_qt} ${pinentry_w32} doc + ${pinentry_gtk} ${pinentry_gtk_2} ${pinentry_qt} ${pinentry_qt4} \ + ${pinentry_w32} doc install-exec-local: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2008-07-23 11:48:00 UTC (rev 184) +++ trunk/NEWS 2008-07-24 14:49:21 UTC (rev 185) @@ -3,6 +3,8 @@ * Make Gtk+-2 pinentry transient to the root window. + * Add Qt4 pinentry. + Noteworthy changes in version 0.7.5 (2008-02-15) ------------------------------------------------ Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-07-23 11:48:00 UTC (rev 184) +++ trunk/configure.ac 2008-07-24 14:49:21 UTC (rev 185) @@ -46,7 +46,7 @@ AC_PROG_CPP AC_PROG_INSTALL AC_PROG_RANLIB -# We need to check for cplusplus here becuase we may not do the test +# We need to check for cplusplus here because we may not do the test # for Qt and autoconf does does not allow that. AC_PROG_CXX AC_PROG_LN_S @@ -355,6 +355,56 @@ dnl fi +dnl +dnl Check for Qt4 pinentry program. +dnl +AC_ARG_ENABLE(pinentry-qt4, + AC_HELP_STRING([--enable-pinentry-qt4], [build Qt4 pinentry]), + pinentry_qt4=$enableval, pinentry_qt4=maybe) + + +dnl +dnl Checks for Qt4 libraries. Deal correctly with $pinentry_qt4 = maybe. +dnl +if test "$pinentry_qt4" != "no"; then +PKG_CHECK_MODULES(QT4_CORE, QtCore,, +if test "$pinentry_qt4" = "yes"; then + AC_MSG_ERROR([[ +*** +*** Qt4 Core is required. +***]]) +else + pinentry_qt4=no +fi) +fi + +if test "$pinentry_qt4" != "no"; then +PKG_CHECK_MODULES(QT4_GUI, QtGui,, +if test "$pinentry_qt4" = "yes"; then + AC_MSG_ERROR([[ +*** +*** Qt4 Gui is required. +***]]) +else + pinentry_qt4=no +fi) +fi + +dnl If we have come so far, Qt4 pinentry can be build. +if test "$pinentry_qt4" != "no"; then + pinentry_qt4=yes +fi +AM_CONDITIONAL(BUILD_PINENTRY_QT4, test "$pinentry_qt4" = "yes") +if test "$pinentry_qt4" = "yes"; then + AC_DEFINE(PINENTRY_QT4, 1, [The Qt4 version of Pinentry is to be build]) +fi + +dnl if test "$pinentry_qt4" = "yes"; then +dnl Additional checks for Qt4 pinentry. +dnl End of additional checks for Qt4 pinentry. +dnl fi + + # # Check whether we should build the W32 pinentry. This is actually # the simplest check as we do this only for that platform. @@ -399,6 +449,7 @@ gtk/Makefile gtk+-2/Makefile qt/Makefile +qt4/Makefile w32/Makefile doc/Makefile Makefile @@ -413,6 +464,7 @@ GTK+ Pinentry: $pinentry_gtk GTK+-2 Pinentry: $pinentry_gtk_2 Qt Pinentry: $pinentry_qt + Qt4 Pinentry: $pinentry_qt4 W32 Pinentry: $pinentry_w32 Fallback to Curses: $fallback_curses Added: trunk/qt4/Makefile.am =================================================================== --- trunk/qt4/Makefile.am 2008-07-23 11:48:00 UTC (rev 184) +++ trunk/qt4/Makefile.am 2008-07-24 14:49:21 UTC (rev 185) @@ -0,0 +1,48 @@ +# Makefile.am +# Copyright (C) 2002 g10 Code GmbH, Klar?lvdalens Datakonsult AB +# Copyright (C) 2008 g10 Code GmbH +# +# This file is part of PINENTRY. +# +# PINENTRY 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. +# +# PINENTRY 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 + +## Process this file with automake to produce Makefile.in + +bin_PROGRAMS = pinentry-qt4 + +if FALLBACK_CURSES +ncurses_include = $(NCURSES_INCLUDE) +libcurses = ../pinentry/libpinentry-curses.a $(LIBCURSES) $(LIBICONV) +else +ncurses_include = +libcurses = +endif + + +AM_CPPFLAGS = -I$(top_srcdir)/assuan -I$(top_srcdir)/secmem \ + $(ncurses_include) -I$(top_srcdir)/pinentry +AM_CXXFLAGS = $(QT4_CORE_CFLAGS) $(QT4_GUI_CFLAGS) +pinentry_qt4_LDADD = $(QT4_CORE_LIBS) $(QT4_GUI_LIBS) $(libcurses) \ + ../pinentry/libpinentry.a $(top_builddir)/assuan/libassuan.a \ + $(top_builddir)/secmem/libsecmem.a $(LIBCAP) + +pinentry_qt4_SOURCES = pinentrydialog.h pinentrydialog.cpp \ + main.cpp +nodist_pinentry_qt4_SOURCES = pinentrydialog.moc + +DISTCLEANFILES = $(nodist_pinentry_qt4_SOURCES) + +%.moc: $(srcdir)/%.h + $(MOC) $< -o $@ Added: trunk/qt4/main.cpp =================================================================== --- trunk/qt4/main.cpp 2008-07-23 11:48:00 UTC (rev 184) +++ trunk/qt4/main.cpp 2008-07-24 14:49:21 UTC (rev 185) @@ -0,0 +1,191 @@ +/* + main.cpp - A (not yet) secure Qt 4 dialog for PIN entry. + + Copyright (C) 2002 Klar??lvdalens Datakonsult AB + Copyright (C) 2003 g10 Code GmbH + Copyright 2007 Ingo Kl??cker + + Written by Steffen Hansen . + Modified by Marcus Brinkmann . + + This program 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. + + This program 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + + +#include +#include + +#include +#include +#include +#include +// #include "secqstring.h" + +#include "pinentrydialog.h" + +#include "pinentry.h" + +extern "C" +{ +#include "memory.h" +} + +#include + +#ifdef FALLBACK_CURSES +#include +#endif + +/* Hack for creating a QWidget with a "foreign" window ID */ +class ForeignWidget : public QWidget +{ +public: + ForeignWidget( WId wid ) : QWidget( 0 ) + { + QWidget::destroy(); + create( wid, false, false ); + } + + ~ForeignWidget() + { + destroy( false, false ); + } +}; + +static int +qt_cmd_handler (pinentry_t pe) +{ + QWidget *parent = 0; + + int want_pass = !!pe->pin; + + if (want_pass) + { + /* FIXME: Add parent window ID to pinentry and GTK. */ + if (pe->parent_wid) + parent = new ForeignWidget (pe->parent_wid); + + PinEntryDialog pinentry (parent, 0, true); + + pinentry.setPrompt (QString::fromUtf8 (pe->prompt)); + pinentry.setDescription (QString::fromUtf8 (pe->description)); + /* If we reuse the same dialog window. */ +#if 0 + pinentry.setText (SecQString::null); +#endif + + if (pe->ok) + pinentry.setOkText (QString::fromUtf8 (pe->ok)); + if (pe->cancel) + pinentry.setCancelText (QString::fromUtf8 (pe->cancel)); + if (pe->error) + pinentry.setError (QString::fromUtf8 (pe->error)); + + bool ret = pinentry.exec (); + if (!ret) + return -1; + + QByteArray pinUtf8 = pinentry.text().toUtf8(); + char *pin = pinUtf8.data(); + if (!pin) + return -1; + + int len = strlen (pin); + if (len >= 0) + { + pinentry_setbufferlen (pe, len + 1); + if (pe->pin) + { + strcpy (pe->pin, pin); + // ::secmem_free (pin); + return len; + } + } + // ::secmem_free (pin); + return -1; + } + else + { + bool ret = QMessageBox::information (parent, "", pe->description, + pe->ok ? pe->ok : "OK", + pe->cancel ? pe->cancel : "Cancel"); + return !ret; + } +} + +pinentry_cmd_handler_t pinentry_cmd_handler = qt_cmd_handler; + +int +main (int argc, char *argv[]) +{ + pinentry_init ("pinentry-qt4"); + +#ifdef FALLBACK_CURSES + if (!pinentry_have_display (argc, argv)) + pinentry_cmd_handler = curses_cmd_handler; + else +#endif + { + /* Qt does only understand -display but not --display; thus we + are fixing that here. The code is pretty simply and may get + confused if an argument is called "--display". */ + char **new_argv, *p; + size_t n; + int i, done; + + for (n=0,i=0; i < argc; i++) + n += strlen (argv[i])+1; + n++; + new_argv = (char**)calloc (argc+1, sizeof *new_argv); + if (new_argv) + *new_argv = (char*)malloc (n); + if (!new_argv || !*new_argv) + { + fprintf (stderr, "pinentry-qt4: can't fixup argument list: %s\n", + strerror (errno)); + exit (EXIT_FAILURE); + + } + for (done=0,p=*new_argv,i=0; i < argc; i++) + if (!done && !strcmp (argv[i], "--display")) + { + new_argv[i] = "-display"; + done = 1; + } + else + { + new_argv[i] = strcpy (p, argv[i]); + p += strlen (argv[i]) + 1; + } + + /* We use a modal dialog window, so we don't need the application + window anymore. */ + i = argc; + new QApplication (i, new_argv); + } + + + /* Consumes all arguments. */ + if (pinentry_parse_opts (argc, argv)) + { + printf ("pinentry-qt4 (pinentry) " /* VERSION */ "\n"); + exit (EXIT_SUCCESS); + } + + if (pinentry_loop ()) + return 1; + + return 0; +} Added: trunk/qt4/pinentrydialog.cpp =================================================================== --- trunk/qt4/pinentrydialog.cpp 2008-07-23 11:48:00 UTC (rev 184) +++ trunk/qt4/pinentrydialog.cpp 2008-07-24 14:49:21 UTC (rev 185) @@ -0,0 +1,178 @@ +/* + pinentrydialog.cpp - A (not yet) secure Qt 4 dialog for PIN entry. + + Copyright (C) 2002 Klar??lvdalens Datakonsult AB + Copyright 2007 Ingo Kl??cker + + Written by Steffen Hansen . + + This program 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. + + This program 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include + +#ifdef WITH_SECURE_QSTRING +#include "secqlineedit.h" +#else +#include +#endif + +#include "pinentrydialog.h" + +PinEntryDialog::PinEntryDialog( QWidget* parent, const char* name, bool modal ) + : QDialog( parent ), _grabbed( false ) +{ + if ( modal ) { + setWindowModality( Qt::ApplicationModal ); + } + + QBoxLayout* top = new QVBoxLayout( this ); + top->setMargin( 6 ); + QBoxLayout* upperLayout = new QHBoxLayout(); + top->addLayout( upperLayout ); + + _icon = new QLabel( this ); + _icon->setPixmap( QMessageBox::standardIcon( QMessageBox::Information ) ); + upperLayout->addWidget( _icon ); + + QBoxLayout* labelLayout = new QVBoxLayout(); + upperLayout->addLayout( labelLayout ); + + _error = new QLabel( this ); + labelLayout->addWidget( _error ); + + _desc = new QLabel( this ); + labelLayout->addWidget( _desc ); + + QBoxLayout* l = new QHBoxLayout(); + top->addLayout( l ); + _prompt = new QLabel( this ); + l->addWidget( _prompt ); + _edit = new SecQLineEdit( this ); + _edit->setMaxLength( 256 ); + _edit->setEchoMode( SecQLineEdit::Password ); + l->addWidget( _edit ); + + l = new QHBoxLayout(); + top->addLayout( l ); + + _ok = new QPushButton( tr("OK"), this ); + _cancel = new QPushButton( tr("Cancel"), this ); + + l->addWidget( _ok ); + l->addStretch(); + l->addWidget( _cancel ); + + _ok->setDefault(true); + + connect( _ok, SIGNAL( clicked() ), + this, SIGNAL( accepted() ) ); + connect( _cancel, SIGNAL( clicked() ), + this, SIGNAL( rejected() ) ); + + connect (this, SIGNAL (accepted ()), + this, SLOT (accept ())); + connect (this, SIGNAL (rejected ()), + this, SLOT (reject ())); + + _edit->setFocus(); +} + +void PinEntryDialog::paintEvent( QPaintEvent* ev ) +{ + // Grab keyboard when widget is mapped to screen + // It might be a little weird to do it here, but it works! + if( !_grabbed ) { + _edit->grabKeyboard(); + _grabbed = true; + } + QDialog::paintEvent( ev ); +} + +void PinEntryDialog::hideEvent( QHideEvent* ev ) +{ + _edit->releaseKeyboard(); + _grabbed = false; + QDialog::hideEvent( ev ); +} + From cvs at cvs.gnupg.org Fri Jul 25 15:46:53 2008 From: cvs at cvs.gnupg.org (svn author marcus) Date: Fri, 25 Jul 2008 15:46:53 +0200 Subject: [svn] pinentry - r187 - in trunk: . qt4 Message-ID: Author: marcus Date: 2008-07-25 15:46:53 +0200 (Fri, 25 Jul 2008) New Revision: 187 Modified: trunk/ChangeLog trunk/qt4/Makefile.am Log: 2008-07-25 Marcus Brinkmann * qt4/Makefile.am (DISTCLEANFILES): Rename to CLEANFILES. (BUILD_SOURCES): New. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-07-25 13:21:02 UTC (rev 186) +++ trunk/ChangeLog 2008-07-25 13:46:53 UTC (rev 187) @@ -1,3 +1,8 @@ +2008-07-25 Marcus Brinkmann + + * qt4/Makefile.am (DISTCLEANFILES): Rename to CLEANFILES. + (BUILD_SOURCES): New. + 2008-07-25 Marcus Brinkmann * configure.ac: Prefer pinentry gtk2 over gtk. Now also choose Modified: trunk/qt4/Makefile.am =================================================================== --- trunk/qt4/Makefile.am 2008-07-25 13:21:02 UTC (rev 186) +++ trunk/qt4/Makefile.am 2008-07-25 13:46:53 UTC (rev 187) @@ -41,8 +41,9 @@ pinentry_qt4_SOURCES = pinentrydialog.h pinentrydialog.cpp \ main.cpp nodist_pinentry_qt4_SOURCES = pinentrydialog.moc +BUILT_SOURCES = pinentrydialog.moc -DISTCLEANFILES = $(nodist_pinentry_qt4_SOURCES) +CLEANFILES = $(nodist_pinentry_qt4_SOURCES) %.moc: $(srcdir)/%.h $(MOC) $< -o $@ From cvs at cvs.gnupg.org Fri Jul 25 15:21:03 2008 From: cvs at cvs.gnupg.org (svn author marcus) Date: Fri, 25 Jul 2008 15:21:03 +0200 Subject: [svn] pinentry - r186 - trunk Message-ID: Author: marcus Date: 2008-07-25 15:21:02 +0200 (Fri, 25 Jul 2008) New Revision: 186 Modified: trunk/ChangeLog trunk/README trunk/configure.ac Log: 2008-07-25 Marcus Brinkmann * configure.ac: Prefer pinentry gtk2 over gtk. Now also choose qt4 (after qt and before w32 native). * README: Document Qt. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-07-24 14:49:21 UTC (rev 185) +++ trunk/ChangeLog 2008-07-25 13:21:02 UTC (rev 186) @@ -1,3 +1,9 @@ +2008-07-25 Marcus Brinkmann + + * configure.ac: Prefer pinentry gtk2 over gtk. Now also choose + qt4 (after qt and before w32 native). + * README: Document Qt. + 2008-07-24 Marcus Brinkmann * qt4/pinentrydialog.h, qt4/pinentrydialog.cpp, qt4/main.cpp, Modified: trunk/README =================================================================== --- trunk/README 2008-07-24 14:49:21 UTC (rev 185) +++ trunk/README 2008-07-25 13:21:02 UTC (rev 186) @@ -16,6 +16,7 @@ GTK+ V2.0 --enable-pinentry-gtk2 Gimp Toolkit Library, Version 2.0 eg. libgtk-x11-2.0 and libglib-2.0 Qt --enable-pinentry-qt Qt, eg. libqt or libqt-mt +Qt4 --enable-pinentry-qt4 Qt4 The GTK+ and Qt pinentries can fall back to the curses mode. The option to enable this is --enable-fallback-curses, but this is also Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-07-24 14:49:21 UTC (rev 185) +++ trunk/configure.ac 2008-07-25 13:21:02 UTC (rev 186) @@ -414,25 +414,30 @@ AM_CONDITIONAL(BUILD_PINENTRY_W32, test "$pinentry_w32" = "yes") -# -# Figure out the default pinentry -# -if test "$pinentry_gtk" = "yes"; then - PINENTRY_DEFAULT=pinentry-gtk +# Figure out the default pinentry. We are very conservative here. +# Please change the order only after verifying that the preferred +# pinentry really is better (more feature-complete and more secure). + +if test "$pinentry_gtk_2" = "yes"; then + PINENTRY_DEFAULT=pinentry-gtk-2 else - if test "$pinentry_gtk_2" = "yes"; then - PINENTRY_DEFAULT=pinentry-gtk-2 + if test "$pinentry_gtk" = "yes"; then + PINENTRY_DEFAULT=pinentry-gtk else if test "$pinentry_qt" = "yes"; then PINENTRY_DEFAULT=pinentry-qt else - if test "$pinentry_curses" = "yes"; then - PINENTRY_DEFAULT=pinentry-curses + if test "$pinentry_qt4" = "yes"; then + PINENTRY_DEFAULT=pinentry-qt4 else - if test "$pinentry_w32" = "yes"; then - PINENTRY_DEFAULT=pinentry-w32 + if test "$pinentry_curses" = "yes"; then + PINENTRY_DEFAULT=pinentry-curses else - AC_MSG_ERROR([[No pinentry enabled.]]) + if test "$pinentry_w32" = "yes"; then + PINENTRY_DEFAULT=pinentry-w32 + else + AC_MSG_ERROR([[No pinentry enabled.]]) + fi fi fi fi From cvs at cvs.gnupg.org Wed Jul 30 12:25:20 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed, 30 Jul 2008 12:25:20 +0200 Subject: [svn] GnuPG - r4803 - trunk/scd Message-ID: Author: wk Date: 2008-07-30 12:25:18 +0200 (Wed, 30 Jul 2008) New Revision: 4803 Modified: trunk/scd/ChangeLog trunk/scd/app-openpgp.c Log: prompt change. Modified: trunk/scd/ChangeLog =================================================================== --- trunk/scd/ChangeLog 2008-07-21 07:38:53 UTC (rev 4802) +++ trunk/scd/ChangeLog 2008-07-30 10:25:18 UTC (rev 4803) @@ -1,3 +1,8 @@ +2008-07-30 Werner Koch + + * app-openpgp.c (verify_a_chv): Use xtrymalloc and make the prompt + for CHV2 more user friendly. + 2008-07-03 Werner Koch * app-openpgp.c (do_readcert): New. Modified: trunk/scd/app-openpgp.c =================================================================== --- trunk/scd/app-openpgp.c 2008-07-21 07:38:53 UTC (rev 4802) +++ trunk/scd/app-openpgp.c 2008-07-30 10:25:18 UTC (rev 4803) @@ -1412,7 +1412,7 @@ #define PROMPTSTRING _("||Please enter the PIN%%0A[sigs done: %lu]") size_t promptsize = strlen (PROMPTSTRING) + 50; - prompt = xmalloc (promptsize); + prompt = xtrymalloc (promptsize); if (!prompt) return gpg_error_from_syserror (); snprintf (prompt, promptsize-1, PROMPTSTRING, sigcount); @@ -1421,7 +1421,7 @@ #undef PROMPTSTRING } else - rc = pincb (pincb_arg, "PIN", pinvalue); + rc = pincb (pincb_arg, _("||Please enter the PIN"), pinvalue); if (rc) { From cvs at cvs.gnupg.org Wed Jul 30 19:53:39 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed, 30 Jul 2008 19:53:39 +0200 Subject: [svn] GpgOL - r262 - in trunk: doc src Message-ID: Author: wk Date: 2008-07-30 19:53:36 +0200 (Wed, 30 Jul 2008) New Revision: 262 Modified: trunk/doc/gpgol.texi trunk/src/ChangeLog trunk/src/Makefile.am trunk/src/engine-assuan.c trunk/src/ext-commands.cpp trunk/src/ext-commands.h trunk/src/gpgol.def trunk/src/mapihelp.cpp trunk/src/mapihelp.h trunk/src/ol-ext-callback.cpp trunk/src/olflange.cpp trunk/src/olflange.h Log: Started with Revert code. Improved version check. [The diff below has been truncated] Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/ChangeLog 2008-07-30 17:53:36 UTC (rev 262) @@ -1,3 +1,17 @@ +2008-07-30 Werner Koch + + * olflange.cpp (Install): Improve version check. + + * revert.cpp, revert.h: New. + * mapihelp.cpp (mapi_attachment_to_body): New. + (mapi_get_old_message_class): New. + (mapi_change_message_class): Do not release newvalue when saving + the old class. + * olflange.cpp (parse_version_number, parse_version_string) + (compare_versions, gpgol_check_version): New. + * ext-commands.cpp (DoCommand): Support a "revert message class" + debug command. + 2008-06-27 Werner Koch * mapihelp.cpp (get_gpgololdmsgclass_tag): New. Modified: trunk/doc/gpgol.texi =================================================================== --- trunk/doc/gpgol.texi 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/doc/gpgol.texi 2008-07-30 17:53:36 UTC (rev 262) @@ -167,7 +167,7 @@ @item GpgOL Old Msg Class This is a STRING8 property which saves the original PR_MESSAGE_CLASS -before GpgOL chnages it. +before GpgOL changes it. @item GpgOL Attach Type This is a property of type LONG and used to further describe the @@ -280,8 +280,7 @@ @code{Install Directory} (as described above). This Registry entry gives the actual command name relative to this directory. If the key does not exist, is is first searched below @code{HKLM} and then it -defaults to @code{bin/kleopatra.exe} (FIXME: The final name will be just - at code{kleopatra.exe}). +defaults to @code{kleopatra.exe}. @item HKCU\Software\GNU\GpgOL:enableDebug Setting this key to the string @code{1} enables a few extra features in @@ -307,7 +306,7 @@ Print data lines while parsing MIME. @end table You may use the regular C-syntax for entering the value. As an -alternative you may use the names ofthe flags, separated by space or +alternative you may use the names of the flags, separated by space or comma. @@ -486,7 +485,7 @@ @end itemize Instead of deleting it should be sufficient to make sure -that such PR_BODYs are not update and don't make it to the disk or a +that such PR_BODYs are not updated and don't make it to the disk or a strage server. Implementing such a feature would really help with end-to-end encryption Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/Makefile.am 2008-07-30 17:53:36 UTC (rev 262) @@ -35,6 +35,7 @@ myexchext.h \ display.cpp display.h \ message.cpp message.h \ + revert.cpp revert.h \ mimeparser.c mimeparser.h \ mimemaker.c mimemaker.h \ msgcache.c msgcache.h \ Modified: trunk/src/engine-assuan.c =================================================================== --- trunk/src/engine-assuan.c 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/engine-assuan.c 2008-07-30 17:53:36 UTC (rev 262) @@ -349,9 +349,8 @@ xfree (uiserver); if (extra_arglen && access (name, F_OK)) { - /* Kleopatra iis not nstalled: Try GPA instead but if it is - also not available still return the Kleopatra - filename. */ + /* Kleopatra is not installed: Try GPA instead but if it is + also not available return the Kleopatra filename. */ const char gpaserver[] = "gpa.exe"; char *name2; @@ -526,7 +525,7 @@ } -/* end the optiona session information. */ +/* Send the optional session information. */ static void send_session_info (assuan_context_t ctx, engine_filter_t filter) { Modified: trunk/src/ext-commands.cpp =================================================================== --- trunk/src/ext-commands.cpp 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/ext-commands.cpp 2008-07-30 17:53:36 UTC (rev 262) @@ -39,8 +39,8 @@ #include "message.h" #include "engine.h" #include "ext-commands.h" +#include "revert.h" - #define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \ SRCNAME, __func__, __LINE__); \ } while (0) @@ -110,6 +110,7 @@ m_nCmdDebug0 = 0; m_nCmdDebug1 = 0; m_nCmdDebug2 = 0; + m_nCmdDebug3 = 0; m_toolbar_info = NULL; m_hWnd = NULL; @@ -532,6 +533,8 @@ &m_nCmdDebug0, opt.enable_debug? "GpgOL Debug-1 (open_inspector)":"", &m_nCmdDebug1, opt.enable_debug? "GpgOL Debug-2 (change msg class)":"", &m_nCmdDebug2, + opt.enable_debug? "GpgOL Debug-3 (revert message class)":"", + &m_nCmdDebug3, NULL); add_toolbar (pTBEArray, nTBECnt, @@ -792,6 +795,22 @@ ul_release (message, __func__, __LINE__); ul_release (mdb, __func__, __LINE__); } + else if (opt.enable_debug && nCommandID == m_nCmdDebug3 + && m_lContext == EECONTEXT_READNOTEMESSAGE) + { + log_debug ("%s:%s: command Debug3 (revert_message_class) called\n", + SRCNAME, __func__); + hr = eecb->GetObject (&mdb, (LPMAPIPROP *)&message); + if (SUCCEEDED (hr)) + { + int rc = gpgol_message_revert (message, 1, + KEEP_OPEN_READWRITE|FORCE_SAVE); + log_debug ("%s:%s: gpgol_message_revert returns %d\n", + SRCNAME, __func__, rc); + } + ul_release (message, __func__, __LINE__); + ul_release (mdb, __func__, __LINE__); + } else { if (debug_commands) Modified: trunk/src/ext-commands.h =================================================================== --- trunk/src/ext-commands.h 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/ext-commands.h 2008-07-30 17:53:36 UTC (rev 262) @@ -50,6 +50,7 @@ UINT m_nCmdDebug0; UINT m_nCmdDebug1; UINT m_nCmdDebug2; + UINT m_nCmdDebug3; /* A list of all active toolbar items. */ toolbar_info_t m_toolbar_info; Modified: trunk/src/gpgol.def =================================================================== --- trunk/src/gpgol.def 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/gpgol.def 2008-07-30 17:53:36 UTC (rev 262) @@ -6,3 +6,8 @@ ExchEntryPoint = ExchEntryPoint at 0 @1 DllRegisterServer = DllRegisterServer at 0 @2 PRIVATE DllUnregisterServer = DllUnregisterServer at 0 @3 PRIVATE + + gpgol_check_version = gpgol_check_version at 4 @11 + gpgol_message_revert = gpgol_message_revert at 12 @12 + + Modified: trunk/src/mapihelp.cpp =================================================================== --- trunk/src/mapihelp.cpp 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/mapihelp.cpp 2008-07-30 17:53:36 UTC (rev 262) @@ -951,7 +951,7 @@ else { /* Save old message class if not yet done. (The second - consition is just a failsafe check). */ + condition is just a failsafe check). */ if (!get_gpgololdmsgclass_tag (message, &tag) && PROP_TYPE (propval->ulPropTag) == PT_STRING8) { @@ -968,7 +968,6 @@ prop.ulPropTag = tag; prop.Value.lpszA = propval->Value.lpszA; hr = message->SetProps (1, &prop, NULL); - xfree (newvalue); if (hr) { log_error ("%s:%s: can't save old message class: hr=%#lx\n", @@ -982,7 +981,7 @@ /* Change message class. */ log_debug ("%s:%s: setting message class to `%s'\n", - SRCNAME, __func__, newvalue); + SRCNAME, __func__, newvalue); prop.ulPropTag = PR_MESSAGE_CLASS_A; prop.Value.lpszA = newvalue; hr = message->SetProps (1, &prop, NULL); @@ -1009,7 +1008,7 @@ /* Return the message class. This function will never return NULL so - it is only useful for debugging. Caller needs to release the + it is mostly useful for debugging. Caller needs to release the returned string. */ char * mapi_get_message_class (LPMESSAGE message) @@ -1040,8 +1039,42 @@ return retstr; } +/* Return the old message class. This function returns NULL if no old + message class has been saved. Caller needs to release the returned + string. */ +char * +mapi_get_old_message_class (LPMESSAGE message) +{ + HRESULT hr; + ULONG tag; + LPSPropValue propval = NULL; + char *retstr; + if (!message) + return NULL; + + if (get_gpgololdmsgclass_tag (message, &tag)) + return NULL; + hr = HrGetOneProp ((LPMAPIPROP)message, tag, &propval); + if (FAILED (hr)) + { + log_error ("%s:%s: HrGetOneProp() failed: hr=%#lx\n", + SRCNAME, __func__, hr); + return NULL; + } + + if ( PROP_TYPE (propval->ulPropTag) == PT_STRING8 ) + retstr = xstrdup (propval->Value.lpszA); + else + retstr = NULL; + + MAPIFreeBuffer (propval); + return retstr; +} + + + /* Return the sender of the message. According to the specs this is an UTF-8 string; we rely on that the UI server handles internationalized domain names. */ @@ -1615,8 +1648,8 @@ /* Return an attachment as a new IStream object. Returns NULL on - failure. If R_ATATCH is not NULL the actual attachment will not be - released by stored at that address; the caller needs to release it + failure. If R_ATTACH is not NULL the actual attachment will not be + released but stored at that address; the caller needs to release it in this case. */ LPSTREAM mapi_get_attach_as_stream (LPMESSAGE message, mapi_attach_item_t *item, @@ -1807,7 +1840,7 @@ } -/* Mark this attachment as the orginal MOSS message. We set a custom +/* Mark this attachment as the original MOSS message. We set a custom property as well as the hidden flag. */ int mapi_mark_moss_attach (LPMESSAGE message, mapi_attach_item_t *item) @@ -1828,13 +1861,6 @@ return -1; } - if (FAILED (hr)) - { - log_error ("%s:%s: can't map %s property: hr=%#lx\n", - SRCNAME, __func__, "GpgOL Attach Type", hr); - goto leave; - } - if (get_gpgolattachtype_tag (message, &prop.ulPropTag) ) goto leave; prop.Value.l = ATTACHTYPE_MOSS; @@ -1977,7 +2003,7 @@ return 0; /* No. */ /* We return False if we have an unknown signature status (?) or the - message has been setn by us and not yet checked (@). */ + message has been sent by us and not yet checked (@). */ if (PROP_TYPE (propval->ulPropTag) == PT_STRING8) yes = !(propval->Value.lpszA && (!strcmp (propval->Value.lpszA, "?") || !strcmp (propval->Value.lpszA, "@"))); @@ -2109,7 +2135,7 @@ } -/* Set the GpgOl charset t an asstachment. +/* Set the GpgOl charset property to an attachment. Note that this function does not call SaveChanges. */ int mapi_set_gpgol_charset (LPMESSAGE obj, const char *charset) @@ -2535,3 +2561,89 @@ return 0; } + +/* Copy the attachment ITEM of the message MESSAGE verbatim to the + PR_BODY property. Returns 0 on success. This function does not + call SaveChanges. */ +int +mapi_attachment_to_body (LPMESSAGE message, mapi_attach_item_t *item) +{ + int result = -1; + HRESULT hr; + LPATTACH att = NULL; + LPSTREAM instream = NULL; + LPSTREAM outstream = NULL; + LPUNKNOWN punk; + + if (!message || !item || item->end_of_table || item->mapipos == -1) + return -1; /* Error. */ + + hr = message->OpenAttach (item->mapipos, NULL, MAPI_BEST_ACCESS, &att); + if (FAILED (hr)) + { + log_error ("%s:%s: can't open attachment at %d: hr=%#lx", + SRCNAME, __func__, item->mapipos, hr); + goto leave; + } + if (item->method != ATTACH_BY_VALUE) + { + log_error ("%s:%s: attachment: method not supported", SRCNAME, __func__); + goto leave; + } + + hr = att->OpenProperty (PR_ATTACH_DATA_BIN, &IID_IStream, + 0, 0, (LPUNKNOWN*) &instream); + if (FAILED (hr)) + { + log_error ("%s:%s: can't open data stream of attachment: hr=%#lx", + SRCNAME, __func__, hr); + goto leave; + } + + + punk = (LPUNKNOWN)outstream; + hr = message->OpenProperty (PR_BODY_A, &IID_IStream, 0, + MAPI_CREATE|MAPI_MODIFY, &punk); + if (FAILED (hr)) + { + log_error ("%s:%s: can't open body stream for update: hr=%#lx", + SRCNAME, __func__, hr); + goto leave; + } + outstream = (LPSTREAM)punk; + + { + ULARGE_INTEGER cb; + cb.QuadPart = 0xffffffffffffffffll; + hr = instream->CopyTo (outstream, cb, NULL, NULL); + } + if (hr) + { + log_error ("%s:%s: can't copy streams: hr=%#lx\n", + SRCNAME, __func__, hr); + goto leave; + } + hr = outstream->Commit (0); + if (hr) + { + log_error ("%s:%s: commiting output stream failed: hr=%#lx", + SRCNAME, __func__, hr); + goto leave; + } + result = 0; + + leave: + if (outstream) + { + if (result) + outstream->Revert (); + outstream->Release (); + } + if (instream) + instream->Release (); + if (att) + att->Release (); + return result; +} + + Modified: trunk/src/mapihelp.h =================================================================== --- trunk/src/mapihelp.h 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/mapihelp.h 2008-07-30 17:53:36 UTC (rev 262) @@ -112,6 +112,7 @@ int mapi_change_message_class (LPMESSAGE message, int sync_override); char *mapi_get_message_class (LPMESSAGE message); +char *mapi_get_old_message_class (LPMESSAGE message); char *mapi_get_sender (LPMESSAGE message); msgtype_t mapi_get_message_type (LPMESSAGE message); int mapi_to_mime (LPMESSAGE message, const char *filename); @@ -158,6 +159,8 @@ int *r_ishtml, int *r_protected); +int mapi_attachment_to_body (LPMESSAGE message, mapi_attach_item_t *item); + #ifdef __cplusplus } #endif Modified: trunk/src/ol-ext-callback.cpp =================================================================== --- trunk/src/ol-ext-callback.cpp 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/ol-ext-callback.cpp 2008-07-30 17:53:36 UTC (rev 262) @@ -75,7 +75,7 @@ wchar_t *wname; const char *s; - log_debug ("%s:%s: looking for `%s'\n", SRCNAME, __func__, name); + // log_debug ("%s:%s: looking for `%s'\n", SRCNAME, __func__, name); pCb = NULL; pObj = NULL; @@ -136,8 +136,8 @@ if (r_dispid) *r_dispid = dispid; - log_debug ("%s:%s: got IDispatch=%p dispid=%u\n", - SRCNAME, __func__, pDisp, (unsigned int)dispid); + //log_debug ("%s:%s: got IDispatch=%p dispid=%u\n", + // SRCNAME, __func__, pDisp, (unsigned int)dispid); return pDisp; } @@ -277,8 +277,8 @@ else if (aVariant.bstrVal) { result = wchar_to_utf8 (aVariant.bstrVal); - log_debug ("%s:%s: `%s' is `%s'", - SRCNAME, __func__, key, result); + //log_debug ("%s:%s: `%s' is `%s'", + // SRCNAME, __func__, key, result); /* From MSDN (Invoke): It is up to the caller to free the return value.*/ SysFreeString (aVariant.bstrVal); } Modified: trunk/src/olflange.cpp =================================================================== --- trunk/src/olflange.cpp 2008-06-27 18:10:42 UTC (rev 261) +++ trunk/src/olflange.cpp 2008-07-30 17:53:36 UTC (rev 262) @@ -48,6 +48,7 @@ #include "property-sheets.h" #include "attached-file-events.h" #include "item-events.h" +#include "ol-ext-callback.h" /* The GUID for this plugin. */ #define CLSIDSTR_GPGOL "{42d30988-1a3a-11da-c687-000d6080e735}" @@ -283,7 +284,84 @@ } +static const char* +parse_version_number (const char *s, int *number) +{ + int val = 0; + if (*s == '0' && digitp (s+1)) + return NULL; /* Leading zeros are not allowed. */ + for (; digitp (s); s++) + { + val *= 10; + val += *s - '0'; + } + *number = val; + return val < 0 ? NULL : s; +} + +static const char * +parse_version_string (const char *s, int *major, int *minor, int *micro) +{ + s = parse_version_number (s, major); + if (!s || *s != '.') + return NULL; + s++; + s = parse_version_number (s, minor); + if (!s || *s != '.') + return NULL; + s++; + s = parse_version_number (s, micro); + if (!s) + return NULL; + return s; /* Patchlevel. */ +} + +static const char * +compare_versions (const char *my_version, const char *req_version) +{ + int my_major, my_minor, my_micro; + int rq_major, rq_minor, rq_micro; From cvs at cvs.gnupg.org Thu Jul 31 14:52:01 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 31 Jul 2008 14:52:01 +0200 Subject: [svn] dirmngr - r303 - in trunk: . doc po Message-ID: Author: wk Date: 2008-07-31 14:51:59 +0200 (Thu, 31 Jul 2008) New Revision: 303 Modified: trunk/AUTHORS trunk/ChangeLog trunk/NEWS trunk/README trunk/configure.ac trunk/doc/dirmngr.texi trunk/po/de.po trunk/po/dirmngr.pot Log: Preparing a release [The diff below has been truncated] Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-16 14:12:53 UTC (rev 302) +++ trunk/ChangeLog 2008-07-31 12:51:59 UTC (rev 303) @@ -1,3 +1,10 @@ +2008-07-31 Werner Koch + + Release 1.0.2. + + * configure.ac: Require libgcrypt 1.2.2 and libskan 1.0.2 becuase + gnupg has the same requirement. + 2008-04-01 Werner Koch * configure.ac (AC_INIT): Fix quoting. Modified: trunk/AUTHORS =================================================================== --- trunk/AUTHORS 2008-06-16 14:12:53 UTC (rev 302) +++ trunk/AUTHORS 2008-07-31 12:51:59 UTC (rev 303) @@ -2,6 +2,7 @@ Maintainer: Werner Koch Bug reports: bug-dirmngr at gnupg.org Security related bug reports: security at gnupg.org +License: GPLv2+ Steffen Hansen @@ -24,7 +25,7 @@ src/cdblib.h which are in the public domain. - Copyright 2003, 2004, 2006 g10 Code GmbH + Copyright 2003, 2004, 2006, 2007, 2008 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 Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2008-06-16 14:12:53 UTC (rev 302) +++ trunk/NEWS 2008-07-31 12:51:59 UTC (rev 303) @@ -1,4 +1,4 @@ -Noteworthy changes in version 1.0.2 +Noteworthy changes in version 1.0.2 (2008-07-31) ------------------------------------------------ * New option --url for the LOOKUP command and dirmngr-client. Modified: trunk/README =================================================================== --- trunk/README 2008-06-16 14:12:53 UTC (rev 302) +++ trunk/README 2008-07-31 12:51:59 UTC (rev 303) @@ -1,7 +1,7 @@ DirMngr - X.509 Directory Manager ------------------------------------- - Version 1.0.1 + Version 1.0.2 Intro Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-06-16 14:12:53 UTC (rev 302) +++ trunk/configure.ac 2008-07-31 12:51:59 UTC (rev 303) @@ -27,7 +27,7 @@ # Set my_issvn to "yes" for non-released code. Remember to run an # "svn up" and "autogen.sh" right before creating a distribution. m4_define([my_version], [1.0.2]) -m4_define([my_issvn], [yes]) +m4_define([my_issvn], [no]) m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \ || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')])) @@ -38,15 +38,15 @@ NEED_GPG_ERROR_VERSION=1.4 NEED_LIBGCRYPT_API=1 -NEED_LIBGCRYPT_VERSION=1.2.0 +NEED_LIBGCRYPT_VERSION=1.2.2 NEED_LIBASSUAN_API=1 NEED_LIBASSUAN_VERSION=1.0.4 NEED_KSBA_API=1 -NEED_KSBA_VERSION=1.0.0 +NEED_KSBA_VERSION=1.0.2 -COPYRIGHT_YEAR_NAME="2007 g10 Code GmbH" +COPYRIGHT_YEAR_NAME="2008 g10 Code GmbH" PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION Modified: trunk/doc/dirmngr.texi =================================================================== --- trunk/doc/dirmngr.texi 2008-06-16 14:12:53 UTC (rev 302) +++ trunk/doc/dirmngr.texi 2008-07-31 12:51:59 UTC (rev 303) @@ -1045,7 +1045,7 @@ @itemize @item Using DirMngr, 2002, Steffen Hansen, Klar?lvdalens Datakonsult AB. - at item Using DirMngr, 2004, 2005, 2006 Werner Koch, g10 Code GmbH. + at item Using DirMngr, 2004, 2005, 2006, 2008 Werner Koch, g10 Code GmbH. @end itemize Modified: trunk/po/de.po [not shown] Modified: trunk/po/dirmngr.pot =================================================================== --- trunk/po/dirmngr.pot 2008-06-16 14:12:53 UTC (rev 302) +++ trunk/po/dirmngr.pot 2008-07-31 12:51:59 UTC (rev 303) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: gpa-dev at gnupg.org\n" -"POT-Creation-Date: 2007-08-16 15:23+0200\n" +"POT-Creation-Date: 2008-06-27 09:59+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,128 +16,132 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: jnlib/logging.c:626 +#: jnlib/logging.c:628 #, c-format msgid "you found a bug ... (%s:%d)\n" msgstr "" -#: src/certcache.c:89 +#: src/certcache.c:105 #, c-format msgid "can't initialize certificate cache lock: %s\n" msgstr "" -#: src/certcache.c:97 +#: src/certcache.c:113 #, c-format msgid "can't acquire read lock on the certificate cache: %s\n" msgstr "" -#: src/certcache.c:105 +#: src/certcache.c:121 #, c-format msgid "can't acquire write lock on the certificate cache: %s\n" msgstr "" -#: src/certcache.c:113 +#: src/certcache.c:129 #, c-format msgid "can't release lock on the certificate cache: %s\n" msgstr "" -#: src/certcache.c:246 +#: src/certcache.c:286 #, c-format msgid "dropping %u certificates from the cache\n" msgstr "" -#: src/certcache.c:331 +#: src/certcache.c:371 #, c-format msgid "can't access directory `%s': %s\n" msgstr "" -#: src/certcache.c:350 src/crlcache.c:2208 src/dirmngr.c:1483 +#: src/certcache.c:390 src/crlcache.c:2234 src/dirmngr.c:1433 #, c-format msgid "can't open `%s': %s\n" msgstr "" -#: src/certcache.c:359 +#: src/certcache.c:399 #, c-format msgid "can't setup KSBA reader: %s\n" msgstr "" -#: src/certcache.c:372 +#: src/certcache.c:412 #, c-format msgid "can't parse certificate `%s': %s\n" msgstr "" -#: src/certcache.c:380 +#: src/certcache.c:420 #, c-format msgid "certificate `%s' already cached\n" msgstr "" -#: src/certcache.c:384 +#: src/certcache.c:424 #, c-format msgid "trusted certificate `%s' loaded\n" msgstr "" -#: src/certcache.c:386 +#: src/certcache.c:426 #, c-format msgid "certificate `%s' loaded\n" msgstr "" -#: src/certcache.c:390 +#: src/certcache.c:430 #, c-format msgid " SHA1 fingerprint = %s\n" msgstr "" -#: src/certcache.c:393 -msgid " name =" +#: src/certcache.c:433 +msgid " issuer =" msgstr "" -#: src/certcache.c:397 +#: src/certcache.c:434 +msgid " subject =" +msgstr "" + +#: src/certcache.c:438 #, c-format msgid "error loading certificate `%s': %s\n" msgstr "" -#: src/certcache.c:473 +#: src/certcache.c:514 #, c-format msgid "permanently loaded certificates: %u\n" msgstr "" -#: src/certcache.c:475 +#: src/certcache.c:516 #, c-format msgid " runtime cached certificates: %u\n" msgstr "" -#: src/certcache.c:490 src/dirmngr-client.c:380 +#: src/certcache.c:531 src/dirmngr-client.c:385 msgid "certificate already cached\n" msgstr "" -#: src/certcache.c:492 +#: src/certcache.c:533 msgid "certificate cached\n" msgstr "" -#: src/certcache.c:494 src/certcache.c:514 src/dirmngr-client.c:384 +#: src/certcache.c:535 src/certcache.c:555 src/dirmngr-client.c:389 #, c-format msgid "error caching certificate: %s\n" msgstr "" -#: src/certcache.c:577 +#: src/certcache.c:618 #, c-format msgid "invalid SHA1 fingerprint string `%s'\n" msgstr "" -#: src/certcache.c:724 src/certcache.c:733 +#: src/certcache.c:1062 src/certcache.c:1071 #, c-format msgid "error fetching certificate by S/N: %s\n" msgstr "" -#: src/certcache.c:887 src/certcache.c:896 +#: src/certcache.c:1225 src/certcache.c:1234 #, c-format msgid "error fetching certificate by subject: %s\n" msgstr "" -#: src/certcache.c:999 src/validate.c:368 +#: src/certcache.c:1338 src/validate.c:436 msgid "no issuer found in certificate\n" msgstr "" -#: src/certcache.c:1009 +#: src/certcache.c:1348 #, c-format msgid "error getting authorityKeyIdentifier: %s\n" msgstr "" @@ -172,7 +176,7 @@ msgid "not removing file `%s'\n" msgstr "" -#: src/crlcache.c:346 src/crlcache.c:1037 +#: src/crlcache.c:346 src/crlcache.c:1041 #, c-format msgid "error closing cache file: %s\n" msgstr "" @@ -240,7 +244,7 @@ msgid "unsupported record type in `%s' line %u skipped\n" msgstr "" -#: src/crlcache.c:599 src/crlcache.c:842 src/dirmngr.c:1409 +#: src/crlcache.c:599 src/crlcache.c:842 src/dirmngr.c:1379 #, c-format msgid "error reading `%s': %s\n" msgstr "" @@ -288,531 +292,531 @@ msgid "error closing `%s': %s\n" msgstr "" -#: src/crlcache.c:866 +#: src/crlcache.c:870 #, c-format msgid "error renaming `%s' to `%s': %s\n" msgstr "" -#: src/crlcache.c:921 +#: src/crlcache.c:925 #, c-format msgid "can't hash `%s': %s\n" msgstr "" -#: src/crlcache.c:929 +#: src/crlcache.c:933 #, c-format msgid "error setting up MD5 hash context: %s\n" msgstr "" -#: src/crlcache.c:945 +#: src/crlcache.c:949 #, c-format msgid "error hashing `%s': %s\n" msgstr "" -#: src/crlcache.c:973 +#: src/crlcache.c:977 #, c-format msgid "invalid formatted checksum for `%s'\n" msgstr "" -#: src/crlcache.c:1026 +#: src/crlcache.c:1030 msgid "too many open cache files; can't open anymore\n" msgstr "" -#: src/crlcache.c:1044 +#: src/crlcache.c:1048 #, c-format msgid "opening cache file `%s'\n" msgstr "" -#: src/crlcache.c:1063 +#: src/crlcache.c:1067 #, c-format msgid "error opening cache file `%s': %s\n" msgstr "" -#: src/crlcache.c:1072 +#: src/crlcache.c:1076 #, c-format msgid "error initializing cache file `%s' for reading: %s\n" msgstr "" -#: src/crlcache.c:1093 +#: src/crlcache.c:1097 msgid "calling unlock_db_file on a closed file\n" msgstr "" -#: src/crlcache.c:1095 +#: src/crlcache.c:1099 msgid "calling unlock_db_file on an unlocked file\n" msgstr "" -#: src/crlcache.c:1149 +#: src/crlcache.c:1153 #, c-format msgid "failed to create a new cache object: %s\n" msgstr "" -#: src/crlcache.c:1204 +#: src/crlcache.c:1208 #, c-format msgid "no CRL available for issuer id %s\n" msgstr "" -#: src/crlcache.c:1211 +#: src/crlcache.c:1215 #, c-format msgid "cached CRL for issuer id %s too old; update required\n" msgstr "" -#: src/crlcache.c:1225 +#: src/crlcache.c:1229 #, c-format msgid "" "force-crl-refresh active and %d minutes passed for issuer id %s; update " "required\n" msgstr "" -#: src/crlcache.c:1233 +#: src/crlcache.c:1237 #, c-format msgid "force-crl-refresh active for issuer id %s; update required\n" msgstr "" -#: src/crlcache.c:1242 +#: src/crlcache.c:1246 #, c-format msgid "available CRL for issuer ID %s can't be used\n" msgstr "" -#: src/crlcache.c:1253 +#: src/crlcache.c:1257 #, c-format msgid "cached CRL for issuer id %s tampered; we need to update\n" msgstr "" -#: src/crlcache.c:1265 +#: src/crlcache.c:1269 msgid "WARNING: invalid cache record length for S/N " msgstr "" -#: src/crlcache.c:1274 +#: src/crlcache.c:1278 #, c-format msgid "problem reading cache record for S/N %s: %s\n" msgstr "" -#: src/crlcache.c:1277 +#: src/crlcache.c:1281 #, c-format msgid "S/N %s is not valid; reason=%02X date=%.15s\n" msgstr "" -#: src/crlcache.c:1288 +#: src/crlcache.c:1292 #, c-format msgid "S/N %s is valid, it is not listed in the CRL\n" msgstr "" -#: src/crlcache.c:1296 +#: src/crlcache.c:1300 #, c-format msgid "error getting data from cache file: %s\n" msgstr "" -#: src/crlcache.c:1432 src/validate.c:763 +#: src/crlcache.c:1436 src/validate.c:833 #, c-format msgid "unknown hash algorithm `%s'\n" msgstr "" -#: src/crlcache.c:1439 +#: src/crlcache.c:1443 #, c-format msgid "gcry_md_open for algorithm %d failed: %s\n" msgstr "" -#: src/crlcache.c:1475 src/crlcache.c:1494 +#: src/crlcache.c:1480 src/crlcache.c:1499 msgid "got an invalid S-expression from libksba\n" msgstr "" -#: src/crlcache.c:1482 src/crlcache.c:1501 src/misc.c:432 +#: src/crlcache.c:1487 src/crlcache.c:1506 src/misc.c:438 #, c-format msgid "converting S-expression failed: %s\n" msgstr "" -#: src/crlcache.c:1516 src/ocsp.c:419 +#: src/crlcache.c:1521 src/ocsp.c:419 #, c-format msgid "creating S-expression failed: %s\n" msgstr "" -#: src/crlcache.c:1573 +#: src/crlcache.c:1589 #, c-format msgid "ksba_crl_parse failed: %s\n" msgstr "" -#: src/crlcache.c:1587 +#: src/crlcache.c:1603 #, c-format msgid "error getting update times of CRL: %s\n" msgstr "" -#: src/crlcache.c:1594 +#: src/crlcache.c:1610 #, c-format msgid "update times of this CRL: this=%s next=%s\n" msgstr "" -#: src/crlcache.c:1598 +#: src/crlcache.c:1614 msgid "nextUpdate not given; assuming a validity period of one day\n" msgstr "" -#: src/crlcache.c:1618 +#: src/crlcache.c:1634 #, c-format msgid "error getting CRL item: %s\n" msgstr "" -#: src/crlcache.c:1633 +#: src/crlcache.c:1649 #, c-format msgid "error inserting item into temporary cache file: %s\n" msgstr "" -#: src/crlcache.c:1660 +#: src/crlcache.c:1676 #, c-format msgid "no CRL issuer found in CRL: %s\n" msgstr "" -#: src/crlcache.c:1673 +#: src/crlcache.c:1691 msgid "locating CRL issuer certificate by authorityKeyIdentifier\n" msgstr "" From cvs at cvs.gnupg.org Thu Jul 31 15:01:27 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 31 Jul 2008 15:01:27 +0200 Subject: [svn] dirmngr - r304 - in trunk: . doc Message-ID: Author: wk Date: 2008-07-31 15:01:23 +0200 (Thu, 31 Jul 2008) New Revision: 304 Modified: trunk/ChangeLog trunk/INSTALL trunk/autogen.sh trunk/compile trunk/config.guess trunk/config.sub trunk/depcomp trunk/doc/mdate-sh trunk/doc/texinfo.tex trunk/install-sh trunk/missing trunk/mkinstalldirs Log: Update some standard files. [The diff below has been truncated] Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-07-31 12:51:59 UTC (rev 303) +++ trunk/ChangeLog 2008-07-31 13:01:23 UTC (rev 304) @@ -2,6 +2,10 @@ Release 1.0.2. + * config.sub, config.guess: Update to version 2007-11-19. + * mkinstalldirs, depcomp, compile, doc/mdate-sh, doc/texinfo.tex + * INSTALL, missing, install-sh: Update to version from + automake 1.10.1. * configure.ac: Require libgcrypt 1.2.2 and libskan 1.0.2 becuase gnupg has the same requirement. Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2008-07-31 12:51:59 UTC (rev 303) +++ trunk/INSTALL 2008-07-31 13:01:23 UTC (rev 304) @@ -1,13 +1,19 @@ -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. +Installation Instructions +************************* - This file is free documentation; the Free Software Foundation gives +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== - These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -20,9 +26,9 @@ It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -32,20 +38,17 @@ may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -64,54 +67,55 @@ all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== - You can compile the package for more than one kind of computer at the +You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular +options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. @@ -122,7 +126,7 @@ Optional Features ================= - Some packages pay attention to `--enable-FEATURE' options to +Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -137,11 +141,11 @@ Specifying the System Type ========================== - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -156,7 +160,7 @@ need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -167,9 +171,9 @@ Sharing Defaults ================ - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -178,7 +182,7 @@ Defining Variables ================== - Variables not defined in a site shell script can be set in the +Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -186,14 +190,18 @@ ./configure CC=/usr/local2/bin/gcc -will cause the specified gcc to be used as the C compiler (unless it is +causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + `configure' Invocation ====================== - `configure' recognizes the following options to control how it -operates. +`configure' recognizes the following options to control how it operates. `--help' `-h' Modified: trunk/autogen.sh =================================================================== --- trunk/autogen.sh 2008-07-31 12:51:59 UTC (rev 303) +++ trunk/autogen.sh 2008-07-31 13:01:23 UTC (rev 304) @@ -206,5 +206,6 @@ echo "Running autoconf${FORCE} ..." $AUTOCONF${FORCE} -echo "You may now run \"./configure --enable-maintainer-mode --sysconfdir=/etc && make\"." +echo "You may now run: + ./configure --enable-maintainer-mode --sysconfdir=/etc && make" echo "(gcc users may want to add the option \"--enable-gcc-warnings\")" Modified: trunk/compile =================================================================== --- trunk/compile 2008-07-31 12:51:59 UTC (rev 303) +++ trunk/compile 2008-07-31 13:01:23 UTC (rev 304) @@ -1,8 +1,9 @@ #! /bin/sh - # Wrapper for compilers which do not understand `-c -o'. -# Copyright 1999, 2000 Free Software Foundation, Inc. +scriptversion=2005-05-14.22 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,91 +18,125 @@ # # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Usage: -# compile PROGRAM [ARGS]... -# `-o FOO.o' is removed from the args passed to the actual compile. +# This file is maintained in Automake, please report +# bugs to or send patches to +# . -# Usage statement added by Billy Biggs . -if [ -z $1 ]; then - echo "Wrapper for compilers which do not understand '-c -o'." - echo "usage: compile PROGRAM [ARGS]..." - echo "'-o FOO.o' is removed from the args passed to the actual compile." - exit 1 -fi +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] -prog=$1 -shift +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; +esac + ofile= cfile= -args= -while test $# -gt 0; do - case "$1" in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we do something ugly here. - ofile=$2 - shift - case "$ofile" in - *.o | *.obj) - ;; - *) - args="$args -o $ofile" - ofile= - ;; - esac - ;; - *.c) - cfile=$1 - args="$args $1" - ;; - *) - args="$args $1" - ;; - esac - shift +eat= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we strip `-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift done if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$prog" $args + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" fi # Name of file we expect compiler to create. -cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. -lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do - if mkdir $lockdir > /dev/null 2>&1; then - break - fi - sleep 1 + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir $lockdir; exit 1" 1 2 15 +trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. -"$prog" $args -status=$? +"$@" +ret=$? if test -f "$cofile"; then - mv "$cofile" "$ofile" + mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + mv "${cofile}bj" "$ofile" fi -rmdir $lockdir -exit $status +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: Modified: trunk/config.guess =================================================================== --- trunk/config.guess 2008-07-31 12:51:59 UTC (rev 303) +++ trunk/config.guess 2008-07-31 13:01:23 UTC (rev 304) @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2006-02-23' +timestamp='2007-11-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -160,6 +161,7 @@ arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -210,7 +212,7 @@ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -328,7 +330,7 @@ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -770,6 +772,8 @@ case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac @@ -777,12 +781,9 @@ i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS_NT-*:*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; i*:windows32*:*) From cvs at cvs.gnupg.org Thu Jul 31 15:07:38 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 31 Jul 2008 15:07:38 +0200 Subject: [svn] dirmngr - r305 - tags Message-ID: Author: wk Date: 2008-07-31 15:07:38 +0200 (Thu, 31 Jul 2008) New Revision: 305 Added: tags/dirmngr-1.0.2/ Log: Release! From cvs at cvs.gnupg.org Thu Jul 31 19:05:28 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 31 Jul 2008 19:05:28 +0200 Subject: [svn] dirmngr - r306 - in trunk: . src tests Message-ID: Author: wk Date: 2008-07-31 19:05:26 +0200 (Thu, 31 Jul 2008) New Revision: 306 Modified: trunk/ChangeLog trunk/NEWS trunk/configure.ac trunk/src/crlcache.c trunk/tests/Makefile.am Log: Minor bug fxes: - Missing -liconv in tests/ - gcry_md_debug was used at one place. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-07-31 13:07:38 UTC (rev 305) +++ trunk/ChangeLog 2008-07-31 17:05:26 UTC (rev 306) @@ -1,5 +1,7 @@ 2008-07-31 Werner Koch + * tests/Makefile.am (LDADD): Add LIBINTL and LIBICONV. + Release 1.0.2. * config.sub, config.guess: Update to version 2007-11-19. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2008-07-31 13:07:38 UTC (rev 305) +++ trunk/NEWS 2008-07-31 17:05:26 UTC (rev 306) @@ -1,3 +1,7 @@ +Noteworthy changes in version 1.0.3 +------------------------------------------------ + + Noteworthy changes in version 1.0.2 (2008-07-31) ------------------------------------------------ Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-07-31 13:07:38 UTC (rev 305) +++ trunk/configure.ac 2008-07-31 17:05:26 UTC (rev 306) @@ -26,8 +26,8 @@ # Remember to change the version number immediately *after* a release. # Set my_issvn to "yes" for non-released code. Remember to run an # "svn up" and "autogen.sh" right before creating a distribution. -m4_define([my_version], [1.0.2]) -m4_define([my_issvn], [no]) +m4_define([my_version], [1.0.3]) +m4_define([my_issvn], [yes]) m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \ || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')])) Modified: trunk/src/crlcache.c =================================================================== --- trunk/src/crlcache.c 2008-07-31 13:07:38 UTC (rev 305) +++ trunk/src/crlcache.c 2008-07-31 17:05:26 UTC (rev 306) @@ -1445,7 +1445,13 @@ return err; } if (DBG_HASHING) - gcry_md_debug (*md, "crl"); + { +#ifdef HAVE_GCRY_MD_DEBUG + gcry_md_debug (*md, "hash.cert"); +#else + gcry_md_start_debug (*md, "crl"); +#endif + } ksba_crl_set_hash_function (crl, HASH_FNC, *md); return 0; Modified: trunk/tests/Makefile.am =================================================================== --- trunk/tests/Makefile.am 2008-07-31 13:07:38 UTC (rev 305) +++ trunk/tests/Makefile.am 2008-07-31 17:05:26 UTC (rev 306) @@ -11,7 +11,8 @@ TESTS = noinst_PROGRAMS = test-dirmngr asschk show-multi percent-escape -LDADD = ../jnlib/libjnlib.a $(LIBASSUAN_LIBS) $(LIBGCRYPT_LIBS) $(KSBA_LIBS) +LDADD = ../jnlib/libjnlib.a $(LIBASSUAN_LIBS) $(LIBGCRYPT_LIBS) $(KSBA_LIBS) \ + $(LIBINTL) $(LIBICONV) asschk_SOURCES = asschk.c