From cvs at cvs.gnupg.org Thu Dec 1 04:01:45 2011 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 01 Dec 2011 04:01:45 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-137-g2c5d021 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 2c5d02191203d54f6bb681a18d12550de6319c55 (commit) from 31f548a18aed729c05ea367f2d8a8104480430d5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2c5d02191203d54f6bb681a18d12550de6319c55 Author: NIIBE Yutaka Date: Thu Dec 1 11:09:51 2011 +0900 Fix pinpad input support diff --git a/scd/ChangeLog b/scd/ChangeLog index d0f779e..80cddec 100644 --- a/scd/ChangeLog +++ b/scd/ChangeLog @@ -1,3 +1,8 @@ +2011-12-01 Niibe Yutaka + + * app-openpgp.c (do_change_pin): Fix pincb messages when + use_keypad == 1. + 2011-11-29 Niibe Yutaka PC/SC pininput support for passphrase modification (2/2) diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 08d641d..b51eb5b 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -1983,7 +1983,7 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, if (chvno == 2) set_resetcode = 1; } - else if (chvno == 1 || chvno == 3) + else if (!use_keypad && (chvno == 1 || chvno == 3)) { char *promptbuf = NULL; const char *prompt; @@ -1998,7 +1998,7 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, } else prompt = _("||Please enter the PIN"); - rc = pincb (pincb_arg, prompt, use_keypad ? NULL : &oldpinvalue); + rc = pincb (pincb_arg, prompt, &oldpinvalue); xfree (promptbuf); promptbuf = NULL; if (rc) @@ -2008,7 +2008,7 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, goto leave; } - if (!use_keypad && strlen (oldpinvalue) < minlen) + if (strlen (oldpinvalue) < minlen) { log_info (_("PIN for CHV%d is too short;" " minimum length is %d\n"), chvno, minlen); @@ -2044,21 +2044,24 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, goto leave; } - rc = pincb (pincb_arg, - _("||Please enter the Reset Code for the card"), - use_keypad ? NULL : &resetcode); - if (rc) - { - log_info (_("PIN callback returned error: %s\n"), - gpg_strerror (rc)); - goto leave; - } - if (!use_keypad && strlen (resetcode) < minlen) + if (!use_keypad) { - log_info (_("Reset Code is too short; minimum length is %d\n"), - minlen); - rc = gpg_error (GPG_ERR_BAD_PIN); - goto leave; + rc = pincb (pincb_arg, + _("||Please enter the Reset Code for the card"), + &resetcode); + if (rc) + { + log_info (_("PIN callback returned error: %s\n"), + gpg_strerror (rc)); + goto leave; + } + if (strlen (resetcode) < minlen) + { + log_info (_("Reset Code is too short; minimum length is %d\n"), + minlen); + rc = gpg_error (GPG_ERR_BAD_PIN); + goto leave; + } } } else @@ -2094,6 +2097,15 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, { if (use_keypad) { + rc = pincb (pincb_arg, + _("||Please enter the Reset Code for the card and New PIN"), + NULL); + if (rc) + { + log_info (_("PIN callback returned error: %s\n"), + gpg_strerror (rc)); + goto leave; + } rc = iso7816_reset_retry_counter_with_rc_kp (app->slot, 0x81, &pininfo); pincb (pincb_arg, NULL, NULL); /* Dismiss the prompt. */ @@ -2120,6 +2132,12 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, if (use_keypad) { rc = pincb (pincb_arg, _("|RN|New Reset Code"), NULL); + if (rc) + { + log_info (_("PIN callback returned error: %s\n"), + gpg_strerror (rc)); + goto leave; + } rc = iso7816_put_data_kp (app->slot, 0xD3, &pininfo); pincb (pincb_arg, NULL, NULL); /* Dismiss the prompt. */ } @@ -2138,6 +2156,12 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, if (use_keypad) { rc = pincb (pincb_arg, _("|N|New PIN"), NULL); + if (rc) + { + log_info (_("PIN callback returned error: %s\n"), + gpg_strerror (rc)); + goto leave; + } rc = iso7816_reset_retry_counter_kp (app->slot, 0x81, &pininfo); pincb (pincb_arg, NULL, NULL); /* Dismiss the prompt. */ } @@ -2174,6 +2198,16 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, if (use_keypad) { + rc = pincb (pincb_arg, + chvno == 3 ? + _("||Please enter the Admin PIN and New Admin PIN") : + _("||Please enter the PIN and New PIN"), NULL); + if (rc) + { + log_info (_("PIN callback returned error: %s\n"), + gpg_strerror (rc)); + goto leave; + } rc = iso7816_change_reference_data_kp (app->slot, 0x80 + chvno, &pininfo); pincb (pincb_arg, NULL, NULL); /* Dismiss the prompt. */ ----------------------------------------------------------------------- Summary of changes: scd/ChangeLog | 5 ++++ scd/app-openpgp.c | 68 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 56 insertions(+), 17 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Dec 1 12:01:11 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 01 Dec 2011 12:01:11 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-138-g2336b09 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 2336b09779d313c1594acf6df3bd8a8486e90458 (commit) from 2c5d02191203d54f6bb681a18d12550de6319c55 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2336b09779d313c1594acf6df3bd8a8486e90458 Author: Werner Koch Date: Thu Dec 1 10:51:36 2011 +0100 Generate the ChangeLog from commit logs. * scripts/gitlog-to-changelog: New script. Taken from gnulib. * scripts/git-log-fix: New file. * scripts/git-log-footer: New file. * doc/HACKING: Describe the ChangeLog policy * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. Rename all ChangeLog files to ChangeLog-2011. diff --git a/ChangeLog b/ChangeLog index 5e5a014..8bd68a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,1383 +1,16 @@ -2011-11-29 Werner Koch +No more ChangeLog files +======================== - * autogen.sh: Make sure HOME et al have no unsafe characters. +Do not modify any of the ChangeLog files in GnuPG. Starting on +December 1st, 2011 we put change information only in the GIT commit +log, and generate a top-level ChangeLog file from logs at "make dist" +time. As such, there are strict requirements on the form of the +commit log messages. See doc/HACKING for details. The old ChangeLog +files have all be renamed to ChangeLog-2011. -2011-11-28 Jim Meyering - accept --with-libgpg-error-prefix as well as --with-gpg-error-prefix - * m4/gpg-error.m4: Update from git master. -2011-09-23 Werner Koch - - * configure.ac: Remove check for gcry_kdf_derive. - -2011-08-10 Werner Koch - - * configure.ac: Fix new autoconf warnings. - -2011-05-20 Werner Koch - - * configure.ac: Require libgpg-error 1.10. - -2011-03-08 Werner Koch - - Release 2.1.0beta2. - - * configure.ac: Require libgcrypt 1.5.0. - (HAVE_GCRY_PK_ECDH, HAVE_GCRY_PK_GET_CURVE): Remove. - (utmp.h): Check for header. - -2011-02-25 Werner Koch - - * configure.ac: Require libksba 1.2. - -2011-02-04 Werner Koch - - * autogen.sh: Ensure that the git pre-commit hoom has been - enabled. Add a cleanpo filter if not yet set. - -2011-02-03 Werner Koch - - * configure.ac (HAVE_GCRY_PK_GET_CURVE): Use AC_TRY_LINK. - -2011-02-01 Werner Koch - - * configure.ac (HAVE_GCRY_PK_GET_CURVE): Define if availabale. - -2011-01-20 Werner Koch - - * configure.ac (AC_CONFIG_FILES): Remove keyserver/. - -2011-01-19 Werner Koch - - * configure.ac: Add new option --enable-gpg2-is-gpg. - (NAME_OF_INSTALLED_GPG): New ac_define. - * autogen.sh [--build-w32ce]: Use --enable-gpg2-is-gpg. - -2011-01-21 Werner Koch - - * configure.ac: Need Libgcrypt 1.4.6 due to AESWRAP. - (HAVE_GCRY_PK_ECDH): Add new test. - -2011-01-03 Werner Koch - - * README.SVN: Rename to README.GIT. - * Makefile.am (EXTRA_DIST): Adjust for that change. - -2010-12-14 Werner Koch - - * configure.ac (BUILD_WITH_GPG, BUILD_WITH_GPGSM) - (BUILD_WITH_AGENT, BUILD_WITH_SCDAEMON, BUILD_WITH_DIRMNGR) - (BUILD_WITH_G13): New defines. - -2010-11-23 Werner Koch - - * am/cmacros.am (extra_bin_ldflags): New. For W32CE set the stack - size to 256k. - -2010-11-17 Werner Koch - - * configure.ac (ENABLE_CARD_SUPPORT): Define. - -2010-10-27 Werner Koch - - * acinclude.m4 (GNUPG_TIME_T_UNSIGNED): New. - * configure.ac (AC_HEADER_TIME): Include before checking time_t. - (GNUPG_TIME_T_UNSIGNED): Add. - -2010-10-26 Werner Koch - - Release 2.1.0beta1. - -2010-10-18 Werner Koch - - * Makefile.am (install-data-hook): Add W32 specific hook. - -2010-10-08 Werner Koch - - * configure.ac: Add option --enable-dirmngr-auto-start. - (USE_DIRMNGR_AUTO_START): New ac_define. - * autogen.sh <--build-w32ce>: Use new option. - -2010-10-06 Werner Koch - - * configure.ac: Make --enable-standard-socket the default. - -2010-10-04 Werner Koch - - * configure.ac (GNUPG_CHECK_FAQPROG): Remove. - -2010-08-19 Werner Koch - - * configure.ac (AH_BOTTOM): Define GPG_ERR_ENABLE_ERRNO_MACROS. - -2010-08-09 Werner Koch - - * configure.ac (inet_pton): Check for it. - -2010-08-05 Werner Koch - - * configure.ac (AH_BOTTOM): Remove HTTP_USE_ESTREAM. - -2010-08-02 Werner Koch - - * configure.ac: Require libksba 1.1.0 due to the use of - ksba_reader_set_release_notify. - -2010-07-30 Werner Koch - - * configure.ac (GNUPG_PTH_PATH) [W32]: Require version 2.0.3. - -2010-07-25 Werner Koch - - * configure.ac (USE_LDAPWRAPPER): AC_DEFINE and AM_CONDITIONAL it. - -2010-06-09 Werner Koch - - * configure.ac (GNUPG_DIRMNGR_LDAP_PGM): Add option - --with-dirmngr-ldap-pgm. - - * am/cmacros.am (-DGNUPG_LOCALSTATEDIR): New. - (GNUPG_DEFAULT_DIRMNGR_LDAP): New. - -2010-06-08 Werner Koch - - * configure.ac: Add build support for dirmngr. - (try_ldap): Rename to try_ks_ldap. - (GNUPG_CHECK_LDAP): Also test if dirmngr is to be build. - - * Makefile.am (SUBDIRS): Add dirmngr. - -2010-06-07 Werner Koch - - * dirmngr/: New. - - * configure.ac: Add option --enable-gpgtar. - -2010-05-31 Werner Koch - - * configure.ac (AC_CHECK_FUNCS): Check for lstat. - -2010-04-30 Werner Koch - - * configure.ac: Add option --enable-standard-socket. - (USE_STANDARD_SOCKET): ac_define it. - -2010-04-14 Werner Koch - - * Makefile.am (keyserver) [W32CE]: Do not build for now. - - * configure.ac (use_zip): New. - (--disable-zip): New option. - (HAVE_ZIP): New. - * autogen.sh : Disable ZIP. - -2010-04-07 Werner Koch - - * autogen.sh: Take a .gnupg-autogen.rc file in account. - - * gl/mkdtemp.c (getpid) [W32CE]: New macro. - -2010-03-24 Werner Koch - - * configure.ac (AH_BOTTOM): Use /gnupg as the default homedir on - dosish systems which don't support drive letters (e.g. W32CE). - - * am/cmacros.am (extra_sys_libs): New. - -2010-03-23 Werner Koch - - * configure.ac (W32SOCKLIBS): Change value for W32CE. - -2010-03-12 Werner Koch - - * configure.ac (AC_INIT): Prepare for using git. - -2010-03-10 Werner Koch - - * jnlib/: Move all code to common/. - * Makefile.am (SUBDIRS): Remove jnlib. - * configure.ac (AC_CONFIG_FILES): Remove jnlib/Makefile. - - * configure.ac (AM_PATH_LIBASSUAN): Remove double test. - * acinclude.m4 (GNUPG_CHECK_ENDIAN): Remove bogus warning. - -2010-03-09 Werner Koch - - * configure.ac: Add option --disable-ccid-driver. - (AH_BOTTOM): Define GPG_ERR_ENABLE_GETTEXT_MACROS. - -2010-02-26 Werner Koch - - * gl/mkdtemp.c (__set_errno) [W32CE]: Use gpg_err_set_errno. - * gl/setenv.c (__set_errno) [W32CE]: Ditto. - * gl/unsetenv.c (__set_errno) [W32CE]: Ditto. - - * configure.ac (HAVE_W32CE_SYSTEM): New ac_define and - am_conditional. - (signal.h, getenv): Check for them. - - * autogen.sh: New option --build-w32ce. Remove obsolete option - --without-included-gettext. - -2009-12-08 Werner Koch - - * configure.ac (USE_DNS_CERT): Support ADNS. - -2009-12-07 Werner Koch - - * configure.ac: Check for ADNS before checking for the BIND - resolver. - (USE_ADNS): Fallback macro for PKA and CERT lookups. - -2009-10-20 Marcus Brinkmann - - * configure.ac: Check for fusermount and encfs. - -2009-10-16 Marcus Brinkmann - - * configure.ac: Check for libassuan instead of libassuan-pth. - -2009-10-12 Werner Koch - - * configure.ac: Use -O3 because newer gcc versions require that - for uninitialized variable warnings. - -2009-09-23 Werner Koch - - * configure.ac (HAVE_ASSUAN_SET_IO_MONITOR): Remove test. - (_ASSUAN_ONLY_GPG_ERRORS): Remove. - -2009-09-23 Marcus Brinkmann - - * configure.ac (NEED_LIBASSUAN_API, NEED_LIBASSUAN_VERSION): - Update to new API (2, 1.1.0). - -2009-09-21 Werner Koch - - Start a new development branch in the SVN trunk. The stable one - is now known in the SVN as branches/GNUPG-STABLE-2-0. - -2009-09-04 Werner Koch - - Release 2.0.13. - -2009-06-29 Werner Koch - - * configure.ac: Take care of --without-adns. Suggested by - Arfrever Frehtes Taifersar Arahesis. - -2009-06-17 Werner Koch - - Release 2.0.12. - -2009-06-05 David Shaw - - * configure.ac: Remove Camellia restriction. - -2009-04-01 Werner Koch - - * configure.ac: Test for fsync. - -2009-03-18 Werner Koch - - * configure.ac: Test for getrlimit. - -2009-03-03 Werner Koch - - Release 2.0.11. - -2009-01-12 Werner Koch - - Release 2.0.10. - -2008-12-09 Werner Koch - - Release 2.0.10rc1. - -2008-10-17 Werner Koch - - * configure.ac: Use more warning options with modern GCCs. - -2008-09-29 Werner Koch - - * configure.ac: Require libgcrypt 1.4. - -2008-08-27 David Shaw - - * configure.ac: Use printf for the most portable SVN version - detection. - - * configure.ac: Darwin's /bin/sh has a builtin echo that doesn't - understand '-n'. Use tr to trim the carriage return instead. - -2008-04-23 Werner Koch - - * configure.ac: Call gl_HEADER_SYS_SOCKET and gl_TYPE_SOCKLEN_T. - -2008-04-07 Werner Koch - - * configure.ac (ADNSLIBS): Test for adns. - (GPGKEYS_KDNS): New. - -2008-04-01 Werner Koch - - * configure.ac: Require curl 7.10 (Oct 1 2002) or later as we use - curl_version_info(). - (AC_INIT): Fix quoting. - -2008-03-27 Werner Koch - - * Makefile.am (dist_doc_DATA): New. Install README. - -2008-03-26 Werner Koch - - Release 2.0.9. - -2008-02-19 Werner Koch - - * configure.ac: Remove --with-pkits-tests. - -2008-02-15 Werner Koch - - * gl/allocsa.h, gl/m4/allocsa.m4: Replace HAVE_LONG_LONG by - HAVE_LONG_LONG_INT. - -2008-02-15 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17. - -2007-12-20 Werner Koch - - Released 2.0.8. - -2007-12-17 Werner Koch - - * configure.ac: Add treatment for HAVE_LDAP_START_TLS_SA. - -2007-12-14 Werner Koch - - Released 2.0.8rc1. - -2007-12-12 Werner Koch - - * configure.ac (USE_CAMELLIA): Define by new option --enable-camellia. - -2007-12-03 Werner Koch - - * configure.ac: Add test gt_LC_MESSAGES.. - -2007-10-01 Werner Koch - - * configure.ac: Require assuan 1.0.4. - -2007-09-14 Werner Koch - - * configure.ac (GNUPG_LIBASSUAN_VERSION): New. - -2007-09-10 Werner Koch - - Released 2.0.7. - -2007-08-27 Werner Koch - - * configure.ac: Remove remaining support for internal regex. - Define DISABLE_REGEX automake conditional. Add option - --with-regex. - * autogen.sh [--build-w32]: Remove --disable-regex. Use --with-regex. - -2007-08-16 Werner Koch - - Released 2.0.6. - -2007-08-08 Werner Koch - - * configure.ac: Use AC_CANONICAL_HOST and not AC_CANONICAL_TARGET. - -2007-07-09 Werner Koch - - * configure.ac (AM_ICONV): Check for it even when building without - NLS. - -2007-07-05 Werner Koch - - Released 2.0.5. - - * configure.ac: Require libassuan 1.0.2. - -2007-07-05 Marcus Brinkmann - - * configure.ac: Invoke AM_LANGINFO_CODESET. - -2007-07-04 Werner Koch - - * Makefile.am (AUTOMAKE_OPTIONS): Add no-dist-gzip. - - Switched entire package to GPLv3+. - - * configure.ac: Require libksba 1.0.2. - - * COPYING: Updated to GPLv3. - * COPYING.LIB: New as jnlib/ uses this license. - - * gl/: Switched to GPLv3+. - - * intl/ Removed. - * configure.ac (AM_GNU_GETTEXT): Add external flag. - (AM_ICONV): New. - -2007-07-03 Werner Koch - - * configure.ac [W32]: Use ws2_32 instead of wsock32. - -2007-06-25 Werner Koch - - * gl/mkdtemp.c (gen_tempname) [MKDIR_TAKES_ONE_ARG]: Avoid - compiler warning by using the proper config macro. - -2007-06-15 Werner Koch - - * configure.ac: Call AM_PO_SUBDIRS. - (W32SOCKLIBS): New. - - * autogen.sh: Use = and not == in test to be POSIXly correct. - : Disable use of regex. - -2007-06-14 Werner Koch - - * configure.ac [AH_BOTTOM]: Remove the hardwired names of modules. - -2007-06-12 Werner Koch - - * configure.ac [AH_BOTTOM]: Define HTTP_NO_WSASTARTUP. - -2007-06-11 Werner Koch - - * am/cmacros.am (libcommonstd, libcommonpth, libcommonstd_ldadd) - (libcommonpth_ldadd): Add macros. - -2007-06-06 Werner Koch - - * configure.ac: Add a few notices message so make browsing of the - log file easier. - (CC_FOR_BUILD): New. - -2007-05-30 Werner Koch - - * configure.ac [W32]: Do not create a symlink to w32-pth.h. - Require the installation of the w32pth package. - -2007-05-29 Werner Koch - - * gl/: Updated to a newer version. - -2007-05-24 Werner Koch - - * configure.ac: Use -Wpointer-arith is possible. - -2007-05-15 Werner Koch - - * configure.ac: Renamed the estream macros. Remove -Wformat-nonliteral. - - * configure.ac: Call ESTREAM_INIT and define the memory - allocators for estream_asprintf. - (gl_MODULES): Remove vasprintf. - -2007-05-09 Werner Koch - - Released 2.0.4. - -2007-05-07 Werner Koch - - * configure.ac: Require libgcrypt 1.2.2 to avoid compiler warnings. - -2007-05-07 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.16.1. - -2007-05-07 Werner Koch - - * configure.ac: Bail out if no C-89 compiler has been found. - -2007-05-04 Werner Koch - - * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --enable-mailto - - * configure.ac: Require automake 1.10 - (AC_CONFIG_FILES): Rename gpgkeys_ to gpg2keys_. - (AM_PROG_CC_C_O): New. - -2007-03-08 Werner Koch - - Released 2.0.3. - - * autogen.sh: Add option --force. - -2007-01-31 Werner Koch - - Released 2.0.2. - -2006-11-30 Werner Koch - - * configure.ac: Save original LIBS when testing for dlopen. - -2006-11-28 Werner Koch - - Released 2.0.1. - -2006-11-23 Werner Koch - - Released 2.0.1rc1. - -2006-11-21 Werner Koch - - * configure.ac [AH_BOTTOM]: Disable PTH soft mapping. - (AC_CHECK_SIZEOF): Check for time_t. - (BUILD_INCLUDED_LIBINTL): Remove AM_PO_SUBDIRS as it is not - required for C. - -2006-11-15 Werner Koch - - * autogen.sh: Add convenience option --build-amd64. - -2006-11-14 Werner Koch - - * configure.ac (HAVE_ASSUAN_SET_IO_MONITOR): Test for it. - -2006-11-11 Werner Koch - - Released 2.0.0. - -2006-11-06 Werner Koch - - Released 1.9.95. - -2006-11-03 Werner Koch - - * configure.ac: Test for pty.h. From Gentoo. - -2006-10-24 Werner Koch - - Released 1.9.94. - -2006-10-20 Werner Koch - - * Makefile.am (stowinstall): Add convenience target. - -2006-10-18 Werner Koch - - * configure.ac: svn revison magic fixes for old bashs. Suggested - by Alain Guibert. - -2006-10-18 Werner Koch - - Released 1.9.93. - -2006-10-17 Werner Koch - - * autogen.sh <--build-w32>: Test also for a host "mingw32". - - * configure.ac: Removed W32LIBS. Use NETLIBS instead. - -2006-10-11 Werner Koch - - Released 1.9.92. - - * configure.ac: Require libassuan 0.9.3. - -2006-10-09 Werner Koch - - * acinclude.m4: Moved pth check to m4/gnupg-pth.m4. - -2006-10-06 Werner Koch - - * configure.ac: Also check for libassuan's pth version. - -2006-10-04 Werner Koch - - Released 1.9.91. - - * configure.ac: Require libassuan 0.9.1 which fixes a problem with - gpgsm. - -2006-09-27 Werner Koch - - * gl/strsep.h, gl/strsep.c, gl/m4/strsep.m4: Removed. - * gl/strpbrk.h, gl/strpbrk.c, gl/m4/strpbrk.m4: Removed. - * gl/Makefile.am: Removed module strsep and strpbrk. - * configure.ac: Check for strsep in the context of jnlib. Remove - check from gl_MODULES. Moved check for timegm into the jnlib context. - -2006-09-27 Marcus Brinkmann - - * Makefile.am: Fix cut & paste error. - -2006-09-25 Werner Koch - - Released 1.9.90. - -2006-09-22 Werner Koch - - * AUTHORS: Add information about used licenses. - -2006-09-20 Werner Koch - - * Makefile.am (dist-hook): Removed distfiles cruft. - (SUBDIRS): Added include - -2006-09-18 Werner Koch - - Released 1.9.23. - - * configure.ac (--enable-agent-only): Donot build tools and doc - (--disable-tools,--disable-doc): New. - * Makefile.am (SUBDIRS): Allow to conditional build tools and doc. - -2006-09-14 Werner Koch - - Replaced all call gpg_error_from_errno(errno) by - gpg_error_from_syserror(). - - * configure.ac: Build gpg by default. - (GNUPG_SYS_SO_PEERCRED): Removed. - -2006-09-13 Werner Koch - - * autogen.sh: Better detection of the cross compiler kit. - -2006-09-06 Marcus Brinkmann - - * configure.ac: New automake conditional RUN_GPG_TESTS. - -2006-09-06 Werner Koch - - * configure.ac: Define _ASSUAN_ONLY_GPG_ERRORS. Require Assuan - 0.9 and libgpg-error 1.4. - -2006-08-31 Werner Koch - - * configure.ac: Require libksba 1.0 and added API check for it. - (GPG_ERR_LOCKED): Removed DECL check as we require 1.2 anyway. - (have_libusb): New to give a feedback about CCID support - -2006-08-21 Werner Koch - - * configure.ac: Removed docbook tests. - (AC_CONFIG_FILES): Added gpgkeys_test and gpgkeys_mailto. - - * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enable gpg. - -2006-08-17 Werner Koch - - * THANKS: Merged with the 1.4 one. - -2006-08-16 Werner Koch - - * configure.ac: Removed test for capabilities and mlock. - -2006-08-15 Werner Koch - - * Makefile.am (keyserver): Enable building of keyserver helpers. - - * configure.ac: Merged with the current configure from 1.4.5. - Require libgpg-error 1.2 and libksba 0.9.16. - -2006-07-29 Marcus Brinkmann - - * README: Spelling fixes. - -2006-07-27 Werner Koch - - Released 1.9.22. - - * configure.ac: Call AB_INIT. - -2006-07-03 Werner Koch - - * configure.ac: Test for ksba_dn_teststr. - -2006-06-30 Werner Koch - - * keyserver/: New. Taken from 1.4.4 - * Makefile.am (SUBDIRS): Include keyserver/. - * configure.ac: Include keyserver/. - (FAKE_CURL, GPGKEYS_CURL): New. - -2006-06-20 Werner Koch - - Released 1.9.21. - -2006-06-08 Marcus Brinkmann - - * configure.ac (PTH_LIBS): Add --all to pth-config invocation. - -2006-05-24 Werner Koch - - * configure.ac: New option --disable-optimization taked from 1.4.3. - -2006-05-23 Werner Koch - - * configure.ac (ZLIBS): New for zlib link commands. Add bzip2 - support. - -2006-05-22 Werner Koch - - * configure.ac (EXEEXT): New. - -2006-04-18 Werner Koch - - * configure.ac (PK_UID_CACHE_SIZE): New. - -2006-04-07 Werner Koch - - * configure.ac: Use new method to include the SVN revison. Now it - is the actual global revision number. - -2005-12-20 Werner Koch - - Released 1.9.20. - -2005-11-28 Werner Koch - - * configure.ac: Append the revision to the version string. - -2005-11-13 Werner Koch - - * am/cmacros.am (-DGNUPG_SYSCONFDIR): Define it. - -2005-11-11 Werner Koch - - * configure.ac (NEED_KSBA_VERSION: Require 0.9.13. - -2005-09-12 Werner Koch - - Released 1.9.19. - -2005-08-01 Werner Koch - - Released 1.9.18. - - * configure.ac: Require libksba 0.9.12 to match new features in gpgsm. - -2005-06-20 Werner Koch - - Released 1.9.17. - -2005-06-02 Werner Koch - - * configure.ac (HAVE_PTH): Define as alias for USE_GNU_PTH. It is - used by common/estream.c. - -2005-06-01 Werner Koch - - * configure.ac (gl_INIT): Add gnulib stuff. - (fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS - by a simple check. - (putc_unlocked): Removed check. Not used. - (strsep, mkdtemp, asprintf): Replaced checks by gnulib checks. - (xsize): Added will probably come handy soon. - (CFLAGS): Use -Wformat-security instead of - -Wformat-nonliteral. Add --Wno-format-y2k. - * gl/, gl/m4/: New. - -2005-05-15 Werner Koch - - * configure.ac: Remove option --disable-threads; require the use - of GNU Pth. - -2005-04-27 Werner Koch - - * configure.ac: Removed OpenSC detection and options. - * acinclude.m4: Ditto. - -2005-04-21 Werner Koch - - Released 1.9.16. - - * configure.ac: Do not build gpg by default. - -2005-04-20 Werner Koch - - * configure.ac: Test whether GPG_ERR_LOCKED is declared and - provide a replacement if not. - -2005-04-15 Werner Koch - - * configure.ac: Require libksba 0.9.11. - -2005-04-15 Marcus Brinkmann - - * configure.ac: Check for /usr/bin/shred and define SHRED. - - * configure.ac: Add --enable-symcryptrun, disabled by default. - Define automake variable BUILD_SYMCRYPTRUN. - Check for openpty -lutil, define LIBUTIL_LIBS. - -2005-03-03 Werner Koch - - * acinclude.m4 (GNUPG_PTH_VERSION_CHECK): Accidently used - --ldflags instead of --cflags. Reported by Kazu Yamamoto. - -2005-02-03 Werner Koch - - * AUTHORS: Copied from 1.4 and edited to refelct the changes in - 1.9. - -2005-01-17 Werner Koch - - * configure.ac: Make --without-included-regex work as expected. - Fixed FTP location info for some libraries. - -2005-01-13 Werner Koch - - Released 1.9.15. - - * acinclude.m4 (GNUPG_PTH_VERSION_CHECK): Link a simple test - program to see whether the installation is sane. - -2005-01-07 Werner Koch - - * configure.ac: Require gpg-error 1.0. - -2005-01-04 Werner Koch - - * configure.ac: Remove hack not to build gpg2 for W32. - * autogen.sh : Pass option --disable-gpg instead. - -2004-12-22 Werner Koch - - Released 1.9.14. - -2004-12-20 Werner Koch - - * configure.ac: Add PATHSEP_C and PATHSEP_S. For W32 let all - directories default to c:/gnupg. Require libassuan 0.6.9. - -2004-12-18 Werner Koch - - * configure.ac (AH_BOTTOM): Define EXEEXT_S. - - * autogen.sh: Updated --build-w32 feature. - -2004-12-15 Werner Koch - - * Makefile.am (SUBDIRS) [W32]: Do not build in tests/. - - * acinclude.m4: Add proper macro name quoting for use with - automake 1.9. - - * configure.ac: Add replacement check for ttyname. - Removed support for a included zlib. - -2004-12-06 Werner Koch - - * configure.ac (have_w32_system): New. Disable Pth checks for W32. - Link jnlib/w32-pth.h to pth.h. - -2004-12-03 Werner Koch - - Released 1.9.13. - -2004-11-26 Werner Koch - - * configure.ac: Replace strsep. Replaced use of "target" by - "host". - -2004-10-22 Werner Koch - - Released 1.9.12. - - * Makefile.am (AUTOMAKE_OPTIONS): Set option to create bzip2 tarball. - -2004-10-01 Werner Koch - - Released 1.9.11. - -2004-09-30 Werner Koch - - * README: Minor updates. - -2004-09-30 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.14.1. - -2004-08-16 Werner Koch - - * configure.ac: Build Makefile for tests/pkits. New option - --with-pkits-tests. - -2004-08-05 Werner Koch - - * configure.ac: Changed tests for libusb to also suuport the - stable version 0.1.x. - -2004-07-22 Werner Koch - - Released 1.9.10. - - * configure.ac: Define AM conditional HAVE_OPENSC. - -2004-07-21 Werner Koch - - * configure.ac: Don't set DIE to no after it might has been set to - yes. - -2004-07-20 Werner Koch - - * Makefile.am (sm): Build kbx only if gpgsm is to be build. - -2004-07-20 Werner Koch - - * configure.ac: New option --enable-agent-only. - -2004-06-08 Werner Koch - - Released 1.9.9. - -2004-06-06 Werner Koch - - * configure.ac: Require libksba 0.9.7. - -2004-04-29 Werner Koch - - Released 1.9.8. - -2004-04-20 Werner Koch - - * configure.ac: Remove the fopencookie test. We don't need the - dummy function because we conditionally use fopencookie, - fpencookie or a replacement at place. - -2004-04-02 Thomas Schwinge - - * autogen.sh: Added ACLOCAL_FLAGS. - -2004-04-06 Werner Koch - - Released 1.9.7. - - * configure.ac: Require libgcrypt 1.1.94. - Introduce PACKAGE_GT and set it to gnupg2. - -2004-03-23 Werner Koch - - * configure.ac: Define SAFE_VERSION_DASH and SAFE_VERSION_DOT. - -2004-03-09 Werner Koch - - * configure.ac (NEED_GPG_ERROR_VERSION): Set to 0.7. - -2004-03-06 Werner Koch - - Released 1.9.6. - - * configure.ac: Check the Libgcrypt API. - -2004-02-25 Werner Koch - - * configure.ac: New option --disable-threads to inhibit - unintentional builds without Pth. - -2004-02-21 Werner Koch - - Released 1.9.5. - -2004-02-20 Werner Koch - - * configure.ac: Fixed URLs in the notice messages. - -2004-02-18 Werner Koch - - * acinclude.m4: Removed macros to detect gpg-error, libgcrypt, - libassuan and ksba as they are now distributed in m4/. - -2004-02-13 Werner Koch - - * configure.ac: Require libksba 0.9.4 and libgcrypt 1.1.92. - -2004-02-12 Werner Koch - - * autogen.sh: Removed cruft from debugging. - - * am/cmacros.am: New. - -2004-02-11 Werner Koch - - * configure.ac: Removed the need for g10defs.h. Reworked the - --with-foo-pgm stuff. - - * autogen.sh (check_version): Removed bashism and simplified. - * acinclude.m4 (AM_PATH_OPENSC): Kludge to avoid error output for - a bad opensc-config. - -2004-01-30 Werner Koch - - Released 1.9.4. - - * configure.ac: Require libksba 0.9.3 due to another bug fix there. - -2004-01-29 Werner Koch - - * README: Updated. - - * configure.ac: Require libksba 0.9.2 due to bug fixes. - -2004-01-24 Werner Koch - - * configure.ac: Now requires libassuan 0.6.3. - -2003-12-23 Werner Koch - - Released 1.9.3. - - * README-alpha: Removed. - * configure.ac, Makefile.am: Add the tests and tools directories. - -2003-12-19 Werner Koch - - * configure.ac: Now require libgcrypt 1.1.91 to help testing the - latest libgcrypt changes. Requires libksab 0.9.1. - -2003-12-17 Werner Koch - - * configure.ac: Requires now libassuan 0.6.2. - (CFLAGS): Add --Wformat-noliteral in gcc mode. - -2003-12-16 Werner Koch - - * configure.ac: Check for funopen and fopencookie as part of the - jnlib checks. - -2003-12-09 Werner Koch - - * configure.ac: Add a min_automake_version. - * README.CVS: New. - * autogen.sh: Revamped except for the --build-w32 hack. - * Makefile.am: Add README.CVS - -2003-11-17 Werner Koch - - Release 1.9.2. - - * configure.ac: Requires now libassuan 0.6.1. - -2003-10-31 Werner Koch - - * configure.ac (NEED_KSBA_VERSION): Set to 0.9.0 due the changed - time interface. - -2003-10-21 Werner Koch - - * configure.ac (PRINTABLE_OS_NAME): Remove special case for The - Hurd; Robert Millan reported that the uname test is now - sufficient. - -2003-10-01 Werner Koch - - * configure.ac (AH_BOTTOM): Define GNUPG_MAJOR_VERSION. - -2003-09-23 Werner Koch - - Merged most of David Shaw's changes in 1.3 since 2003-06-03. - - * configure.ac: Drop all TIGER/192 support. - (uint64_t): Check for UINT64_C to go along with uint64_t. - (getaddrinfo): Check for it. - (sigset_t): Check for sigset_t and struct sigaction. This is for - Forte c89 on Solaris which seems to define only the function call - half of the two pairs by default. - (W32LIBS): Include wsock32 in W32LIBS. This is different from - NETLIBS so we don't need to force other platforms to pull in the - netlibs when they aren't actually needed. - -2003-09-06 Werner Koch - - Released 1.9.1. - - * configure.ac: Require newer versions of some libraries. - -2003-09-02 Werner Koch - - * configure.ac (HAVE_LIBUSB): Added a simple test for libusb. - -2003-08-19 Marcus Brinkmann - - * configure.ac (AM_PATH_GPG_ERROR): Add missing comma in - invocation. - -2003-08-06 Werner Koch - - * configure.ac: Check for libgpg-error. Print infos about missing - libraries more nicely. - * acinclude.m4 (AM_PATH_GPG_ERROR): Added. - -2003-08-05 Werner Koch - - Released 1.9.0. - - * configure.ac (GNUPG_DEFAULT_HONMEDIR): Changed back to ~/.gnupg. - -2003-07-31 Werner Koch - - * Makefile.am (DISTCLEANFILES): Add g10defs.h - -2003-06-18 Werner Koch - - * configure.ac (GNUPG_DEFAULT_HOMEDIR): Changed temporary to - .gnupg2 to avoid accidential use with production keys. - -2003-06-11 Werner Koch - - * configure.ac: Merged all stuff from current 1.3 version in. - * acinclude.m4: Merged required macros from current 1.2 version in. - -2003-06-04 Werner Koch - - * configure.ac, Makefile.am: Enable building of gpg. - -2003-04-29 Werner Koch - - * configure.ac: Build a limited version of scdaemon if libopensc - is not available. - - * configure.ac (ALL_LINUGAS): Removed. - - * Makefile.am (ACLOCAL_AMFLAGS): New. - * configure.ac (AM_GNU_GETTEXT_VERSION): New. Set to 0.11.5. - -2003-04-29 gettextize - - * Makefile.am (SUBDIRS): Add m4. - (ACLOCAL_AMFLAGS): New variable. - (EXTRA_DIST): Add scripts/config.rpath. - * configure.ac (AC_CONFIG_FILES): Add m4/Makefile. - -2003-04-29 Werner Koch - - * assuan/ : Removed. We now use libassuan. - * Makefile.am (SUBDIRS): Removed assuan - - * configure.ac: Check for libassuan. - -2003-01-09 Werner Koch - - * configure.ac (GNUPG_PROTECT_TOOL): New option --with-protect-tool. - (NEED_KSBA_VERSION): Does now require 0.4.6. - - * README: Noted where to find gpg-protect-tool. - -2002-10-31 Neal H. Walfield - - * configure.ac: Check for flockfile and funlockfile. Check for - isascii and putc_unlocked replacing them if not found. - - * configure.ac (PTH_LIBS): If pth is found, add the output of - `$PTH_CONFIG --ldflags`, not just `$PTH_CONFIG --libs`. - -2002-10-19 Werner Koch - - * configure.ac: Bumped version number to 1.9.0-cvs. - - NewPG (Aegypten project) to GnuPG merge. - -2002-09-20 Werner Koch - - Released 0.9.2. - -2002-09-05 Neal H. Walfield - - * configure.ac: Check for makeinfo. - -2002-09-03 Neal H. Walfield - - * autogen.sh (have_version): New function. Generalize and - simplify logic for finding and determining the versions of GNU - programs. Use it. - -2002-08-23 Werner Koch - - Released 0.9.1. - - * acinclude.m4 (AM_PATH_LIBGCRYPT): Updated from Libgcrypt. - (AM_PATH_OPENSC): Strip non-digits from the micro version. - -2002-08-21 Werner Koch - - Released 0.9.0. - - * configure.ac: Changed the default homedir to .gnupg. - * README-alpha: Removed. - -2002-08-19 Werner Koch - - * acinclude.m4: Removed -lpcsclite from KSBA_LIBS; copy+paste bug. - -2002-08-13 Werner Koch - - * acinclude.m4 (AM_PATH_OPENSC, AM_PATH_KSBA): New. - * configure.ac: Use them. - -2002-08-10 Werner Koch - - Released 0.3.10. - - * configure.ac (NEED_LIBKSBA_VERSION): Require 0.4.4. Add support - for gettext. - -2002-07-22 Werner Koch - - * configure.ac: Check for ftello and provide a replacement. - -2002-07-01 Werner Koch - - Released 0.3.9. - - * README: Short note on how to export in pkcs-12 format. - -2002-06-29 Werner Koch - - * configure.ac: Define --with options to set the default location - of the agent, scdaemon, pinentry and dirmngr. - -2002-06-27 Werner Koch - - * README: Short blurb on how to import a PKCS-12 file. - - * configure.ac (AH_BOTTOM): New to define some constants. - -2002-06-25 Werner Koch - - Released 0.3.8. - - * configure.ac (NEED_LIBGCRYPT_VERSION): Set to 1.1.8. - -2002-06-12 Werner Koch - - * configure.ac (NEED_LIBKSBA_VERSION): We need 0.4.3 now. - -2002-06-04 Werner Koch - - Released 0.3.7. - -2002-05-21 Werner Koch - - * configure.ac: We now require libgcrypt 1.1.7 and libksba 0.4.2. - -2002-05-14 Werner Koch - - * doc/: New - * configure.ac, Makefile.am: Added doc/. - -2002-05-03 Werner Koch - - Released 0.3.6. - -2002-04-25 Werner Koch - - * configure.ac: Check for setlocale. - -2002-04-24 Marcus Brinkmann - - * configure.ac: Check for locale.h. - -2002-04-15 Werner Koch - - Released 0.3.5. - - * NEWS: Started to describe release notes. - - * configure.ac (NEED_LIBKSBA_VERSION, NEED_LIBGCRYPT_VERSION): Defined - -2002-04-01 Werner Koch - - Released 0.3.4. - -2002-03-18 Werner Koch - - Released 0.3.3. - -2002-03-08 Werner Koch - - * README: Add some explanation on how to specify a user ID. - -2002-03-06 Werner Koch - - Released 0.3.2. - -2002-03-04 Werner Koch - - Released 0.3.1. - - * README: Explained some options and files. - -2002-02-14 Werner Koch - - * configure.ac: Fixed status messages related to presence of Pth. - -2002-02-13 Werner Koch - - * acinclude.m4 (GNUPG_SYS_SO_PEERCRED): New. - * configure.ac: use it. - -2002-02-12 Werner Koch - - * configure.ac: Check for PTH. Provide replacement fucntions for - apsrintf and fopencookie. - - * acinclude.m4 (GNUPG_PTH_VERSION_CHECK): New. - -2002-02-07 Werner Koch - - Released 0.3.0. - - * configure.ac: Require libgcrypt 1.1.6. - -2002-02-01 Marcus Brinkmann - - * configure.ac (KSBA_CONFIG): Remove superfluous x in front of - variable. - -2002-01-26 Werner Koch - - * configure.ac: Add options to disable the build of some programs - and print a configure status at the end. - * acinclude.m4 (GNUPG_BUILD_PROGRAM): New. - - * scd/ : New. Added to Makefile and configure. - * configure.ac: Check for libopensc - * Makefile.am: Build scd only when libopensc is available - -2002-01-23 Werner Koch - - * configure.ac (mkdtemp): See whether we have to provide a - replacement. - -2001-12-18 Werner Koch - - Released 0.0.0. - -2001-12-17 Werner Koch - - * acinclude.m4: Add AM_PATH_LIBGCRYPT macro. - * configure.ac: and use it here. Figure out the location of libksba - -2001-12-15 Werner Koch - - * configure.ac (missing_dir): Bail out if asprintf and fopencookie - are not available. - -2001-12-04 Werner Koch - - * configure.ac (HAVE_JNLIB_LOGGING): always define it. - - - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007. - 2010 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. +Local Variables: +buffer-read-only: t +mode: text +End: diff --git a/ChangeLog b/ChangeLog-2011 similarity index 98% copy from ChangeLog copy to ChangeLog-2011 index 5e5a014..cfba8f4 100644 --- a/ChangeLog +++ b/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-11-29 Werner Koch * autogen.sh: Make sure HOME et al have no unsafe characters. @@ -635,7 +642,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). * configure.ac: Build gpg by default. @@ -1381,3 +1388,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/Makefile.am b/Makefile.am index 23edae4..292748a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,9 +20,12 @@ ACLOCAL_AMFLAGS = -I m4 -I gl/m4 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip -DISTCHECK_CONFIGURE_FLAGS = --enable-symcryptrun --enable-mailto +DISTCHECK_CONFIGURE_FLAGS = --enable-symcryptrun --enable-mailto --enable-gpgtar -EXTRA_DIST = scripts/config.rpath scripts/potomo autogen.sh README.GIT +EXTRA_DIST = scripts/config.rpath scripts/potomo autogen.sh README.GIT \ + ChangeLog-2011 po/ChangeLog-2011 scripts/ChangeLog-2011 \ + scripts/gitlog-to-changelog \ + scripts/git-log-fix scripts/git-log-footer DISTCLEANFILES = g10defs.h if BUILD_GPGSM @@ -90,7 +93,7 @@ SUBDIRS = m4 gl include common ${kbx} \ dist_doc_DATA = README -dist-hook: +dist-hook: gen-ChangeLog echo "$(VERSION)" > $(distdir)/VERSION if HAVE_W32_SYSTEM @@ -106,5 +109,20 @@ install-data-hook: done endif + +gen_start_date = 2011-12-01T06:00:00 +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d $(top_srcdir)/.git; then \ + (cd $(top_srcdir) && \ + ./scripts/gitlog-to-changelog \ + --amend=scripts/git-log-fix \ + --since=$(gen_start_date) ) > $(distdir)/cl-t; \ + cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t; \ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi + + stowinstall: $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg diff --git a/agent/ChangeLog b/agent/ChangeLog-2011 similarity index 99% rename from agent/ChangeLog rename to agent/ChangeLog-2011 index 2635579..f56be1f 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-11-28 Werner Koch * command-ssh.c (card_key_available): Change wording of no key @@ -1524,7 +1531,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). * call-pinentry.c (start_pinentry): Replaced pipe_connect2 by @@ -3094,3 +3101,7 @@ Fri Aug 18 14:27:14 CEST 2000 Werner Koch 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/agent/Makefile.am b/agent/Makefile.am index f3fb4ea..00b7d43 100644 --- a/agent/Makefile.am +++ b/agent/Makefile.am @@ -25,7 +25,8 @@ libexec_PROGRAMS += gpg-preset-passphrase endif noinst_PROGRAMS = $(TESTS) -# EXTRA_DIST = gpg-agent.ico gpg-agent-resource.rc +EXTRA_DIST = ChangeLog-2011 + AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl diff --git a/common/ChangeLog b/common/ChangeLog-2011 similarity index 99% rename from common/ChangeLog rename to common/ChangeLog-2011 index 96e4e31..7fed0a7 100644 --- a/common/ChangeLog +++ b/common/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-11-30 Werner Koch Rewrite dns-cert.c to not use the gpg-only iobuf stuff. @@ -2481,3 +2488,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/common/ChangeLog.jnlib b/common/ChangeLog.jnlib index f51525e..4ac02f3 100644 --- a/common/ChangeLog.jnlib +++ b/common/ChangeLog.jnlib @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2010-03-10 Werner Koch See gnupg/common/ChangeLog for newer changes. @@ -767,3 +774,7 @@ Mon Jan 24 13:04:28 CET 2000 Werner Koch 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/common/Makefile.am b/common/Makefile.am index 7821e04..bb996ba 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -18,7 +18,7 @@ ## Process this file with automake to produce Makefile.in -EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \ +EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk ChangeLog-2011 \ audit-events.h status-codes.h README.jnlib ChangeLog.jnlib noinst_LIBRARIES = libcommon.a libcommonpth.a libgpgrl.a diff --git a/dirmngr/ChangeLog b/dirmngr/ChangeLog-2011 similarity index 99% rename from dirmngr/ChangeLog rename to dirmngr/ChangeLog-2011 index 0968b41..84cf552 100644 --- a/dirmngr/ChangeLog +++ b/dirmngr/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-11-24 Werner Koch * ks-engine-http.c (ks_http_help): Do not print help for hkp. @@ -1589,3 +1596,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/dirmngr/ChangeLog.1 b/dirmngr/ChangeLog.1 index 6d7a513..f7b50c7 100644 --- a/dirmngr/ChangeLog.1 +++ b/dirmngr/ChangeLog.1 @@ -800,3 +800,7 @@ There are old Dirmngr ChangeLog entries. ldapsearch -v -x -h www.trustcenter.de -b '' userCertificate -t cp /tmp/ testcert.der ./test-dirmngr + +Local Variables: +buffer-read-only: t +End: diff --git a/dirmngr/Makefile.am b/dirmngr/Makefile.am index 6c45681..e90daa4 100644 --- a/dirmngr/Makefile.am +++ b/dirmngr/Makefile.am @@ -19,7 +19,7 @@ ## Process this file with automake to produce Makefile.in -EXTRA_DIST = OAUTHORS ONEWS ChangeLog.1 +EXTRA_DIST = OAUTHORS ONEWS ChangeLog.1 ChangeLog-2011 bin_PROGRAMS = dirmngr dirmngr-client diff --git a/doc/ChangeLog b/doc/ChangeLog-2011 similarity index 98% rename from doc/ChangeLog rename to doc/ChangeLog-2011 index 17c58ec..b830c0e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-10-12 Werner Koch * gpg.texi: Add a bunch of opindex items. @@ -858,3 +865,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/doc/HACKING b/doc/HACKING index 07f09c5..d6cb8ab 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -3,7 +3,30 @@ (Some notes on GNUPG internals.) - ===> Under construction <======= +* No more ChangeLog files + +Do not modify any of the ChangeLog files in GnuPG. Starting on +December 1st, 2011 we put change information only in the GIT commit +log, and generate a top-level ChangeLog file from logs at "make dist" +time. As such, there are strict requirements on the form of the +commit log messages. The old ChangeLog files have all be renamed to +ChangeLog-2011 + + +* Commit log requirements + +Your commit log should always start with a one-line summary, the second +line should be blank, and the remaining lines are usually ChangeLog-style +entries for all affected files. However, it's fine -- even recommended -- +to write a few lines of prose describing the change, when the summary +and ChangeLog entries don't give enough of the big picture. Omit the +leading TABs that you're used to seeing in a "real" ChangeLog file, but +keep the maximum line length at 72 or smaller, so that the generated +ChangeLog lines, each with its leading TAB, will not exceed 80 columns. + + + +===> What follows is probably out of date <=== RFCs @@ -63,7 +86,7 @@ g10/keydb.h g10/keyid.c Helper functions to get the keyid, fingerprint etc. -g10/trustdb.c +g10/trustdb.c g10/trustdb.h g10/tdbdump.c Management of the trustdb.gpg @@ -74,7 +97,7 @@ g10/delkey.c Delete a key g10/kbnode.c Helper for the KBNODE linked list g10/main.h Prototypes and some constants g10/mainproc.c Message processing -g10/armor.c Ascii armor filter +g10/armor.c Ascii armor filter g10/mdfilter.c Filter to calculate hashs g10/textfilter.c Filter to handle CR/LF and trailing white space g10/cipher.c En-/Decryption filter @@ -88,7 +111,7 @@ g10/hkp.h Keyserver access g10/hkp.c g10/packet.h Defintion of OpenPGP structures. g10/passphrase.c Passphrase handling code -g10/pubkey-enc.c +g10/pubkey-enc.c g10/seckey-cert.c g10/seskey.c g10/import.c diff --git a/doc/Makefile.am b/doc/Makefile.am index f9fd008..e228f23 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -34,7 +34,7 @@ EXTRA_DIST = samplekeys.asc \ gnupg-card-architecture.pdf \ FAQ gnupg7.texi \ opt-homedir.texi see-also-note.texi specify-user-id.texi \ - gpgv.texi texi.css yat2m.c + gpgv.texi texi.css yat2m.c ChangeLog-2011 BUILT_SOURCES = gnupg-card-architecture.eps gnupg-card-architecture.png \ gnupg-card-architecture.pdf diff --git a/g10/ChangeLog b/g10/ChangeLog-2011 similarity index 99% rename from g10/ChangeLog rename to g10/ChangeLog-2011 index 4dadaab..31359d8 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-11-30 Werner Koch * keyserver.c (keyserver_import_cert): Adjust for changed @@ -2398,8 +2405,8 @@ * status.h (STATUS_ERROR): New status code. * status.c (get_status_string): Ditto. * mainproc.c (proc_plaintext): Emit it if multiple messages are - detected. Error out if more than one plaintext packet is - encountered. + detected. Error out if more than one plaintext packet is + encountered. * mainproc.c (literals_seen): New. 2007-02-26 Werner Koch @@ -2735,7 +2742,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). 2006-09-13 Werner Koch @@ -4804,7 +4811,7 @@ * tdbio.c (MY_O_BINARY): Need binary mode with Cygwin. From Werner on stable branch. - * g10.c, gpgv.c (main) [__CYGWIN32__]: Don't get the homedir from + * g10.c, gpgv.c (main) [__CYGWIN32__]: Don't get the homedir from the registry. From Werner on stable branch. * keyedit.c (show_key_with_all_names_colon): Make --with-colons @@ -8265,7 +8272,7 @@ (pk_from_block): Removed the namehash arg and changed all callers. (merge_selfsigs): Copy prefs to all keys. * trustdb.c (get_pref_data): Removed. - (is_algo_in_prefs): Removed. + (is_algo_in_prefs): Removed. (make_pref_record): Deleted and removed all class. * pkclist.c (select_algo_from_prefs): Adjusted for the new preference implementation. @@ -12053,3 +12060,7 @@ Thu Feb 12 22:24:42 1998 Werner Koch (wk at frodo) 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/g10/Makefile.am b/g10/Makefile.am index 56d5d10..e9f69b3 100644 --- a/g10/Makefile.am +++ b/g10/Makefile.am @@ -18,7 +18,7 @@ ## Process this file with automake to produce Makefile.in -EXTRA_DIST = options.skel +EXTRA_DIST = options.skel ChangeLog-2011 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common \ -I$(top_srcdir)/include -I$(top_srcdir)/intl diff --git a/g13/ChangeLog b/g13/ChangeLog deleted file mode 100644 index ecd7222..0000000 --- a/g13/ChangeLog +++ /dev/null @@ -1,3 +0,0 @@ -2009-11-04 Werner Koch - - Under initial development - no need for a ChangeLog. diff --git a/g13/ChangeLog-2011 b/g13/ChangeLog-2011 new file mode 100644 index 0000000..5d372c2 --- /dev/null +++ b/g13/ChangeLog-2011 @@ -0,0 +1,14 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + +2009-11-04 Werner Koch + + Under initial development - no need for a ChangeLog. + +Local Variables: +buffer-read-only: t +End: diff --git a/g13/Makefile.am b/g13/Makefile.am index a8ae9eb..b846dcd 100644 --- a/g13/Makefile.am +++ b/g13/Makefile.am @@ -18,6 +18,8 @@ ## Process this file with automake to produce Makefile.in +EXTRA_DIST = ChangeLog-2011 + bin_PROGRAMS = g13 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common diff --git a/include/ChangeLog b/include/ChangeLog-2011 similarity index 97% rename from include/ChangeLog rename to include/ChangeLog-2011 index 09d5b6e..c4b4487 100644 --- a/include/ChangeLog +++ b/include/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-02-01 Werner Koch * cipher.h (PUBKEY_MAX_NPKEY, PUBKEY_MAX_NSKEY): Bump up to @@ -442,3 +449,7 @@ Tue Mar 3 15:11:21 1998 Werner Koch (wk at isil.d.shuttle.de) 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/include/Makefile.am b/include/Makefile.am index 09176de..4d733ba 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1 +1 @@ -EXTRA_DIST = cipher.h types.h host2net.h _regex.h +EXTRA_DIST = cipher.h types.h host2net.h _regex.h ChangeLog-2011 diff --git a/kbx/ChangeLog b/kbx/ChangeLog-2011 similarity index 96% rename from kbx/ChangeLog rename to kbx/ChangeLog-2011 index 9e77118..7641f53 100644 --- a/kbx/ChangeLog +++ b/kbx/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-04-28 Werner Koch * keybox-openpgp.c: Include ../common/openpgpdefs.h. @@ -160,7 +167,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). 2005-10-08 Marcus Brinkmann @@ -383,3 +390,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog-2011 similarity index 98% rename from keyserver/ChangeLog rename to keyserver/ChangeLog-2011 index cc42a64..01cca41 100644 --- a/keyserver/ChangeLog +++ b/keyserver/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-01-20 Werner Koch * gpgkeys_hkp.c (get_name): Remove test for KS_GETNAME. It is @@ -92,7 +99,7 @@ * curl-shim.c (curl_easy_init) [HAVE_W32_SYSTEM]: Call it. * gpgkeys_finger.c: s/_WIN32/HAVE_W32_SYSTEM/. (init_sockets): Remove. - (connect_server) [HAVE_W32_SYSTEM]: Call new function. + (connect_server) [HAVE_W32_SYSTEM]: Call new function. 2008-04-14 David Shaw @@ -105,7 +112,7 @@ 2008-04-07 Werner Koch * gpgkeys_kdns.c: New. - * Makefile.am: Support kdns. + * Makefile.am: Support kdns. * no-libgcrypt.c (gcry_strdup): Fix. It was not used. @@ -117,7 +124,7 @@ 2007-10-25 David Shaw (wk) From 1.4 (July): - + * gpgkeys_ldap.c (main): Fix bug in setting up whether to verify peer SSL cert. This used to work with older OpenLDAP, but is now more strictly handled. @@ -229,7 +236,7 @@ to OpenSSL. This is considered a bug fix and forgives all possible violations, pertaining to this issue, possibly occured in the past. - + * no-libgcrypt.c: Changed license to a simple all permissive one. * Makefile.am (gpg2keys_ldap_LDADD): For license reasons do not @@ -245,7 +252,7 @@ mismatch. 2006-09-19 Werner Koch - + * no-libgcrypt.c: New. Taken from ../tools. * Makefile.am: Add no-libgcrypt to all sources. @@ -714,7 +721,7 @@ 2004-10-28 Werner Koch - * Makefile.am (other_libs): + * Makefile.am (other_libs): 2004-10-18 David Shaw @@ -1346,3 +1353,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/keyserver/Makefile.am b/keyserver/Makefile.am index fd046cf..884b8eb 100644 --- a/keyserver/Makefile.am +++ b/keyserver/Makefile.am @@ -1,5 +1,5 @@ # Makefile.am - Makefile for keyservers -# Copyright (C) 2001, 2002, 2004, 2005, 2006, +# Copyright (C) 2001, 2002, 2004, 2005, 2006, # 2009 Free Software Foundation, Inc. # # This file is part of GnuPG. @@ -8,12 +8,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . ## Process this file with automake to produce Makefile.in @@ -26,7 +26,9 @@ EXTRA_PROGRAMS = gpg2keys_ldap gpg2keys_hkp gpg2keys_finger gpg2keys_curl \ gpg2keys_kdns EXTRA_SCRIPTS = gpg2keys_mailto -AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl +EXTRA_DIST = ChangeLog-2011 + +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) @@ -62,11 +64,11 @@ if FAKE_CURL gpg2keys_curl_SOURCES += curl-shim.c curl-shim.h gpg2keys_curl_CPPFLAGS = $(AM_CPPFLAGS) gpg2keys_curl_LDADD = $(common_libs) $(GPG_ERROR_LIBS) $(NETLIBS) $(DNSLIBS) \ - $(other_libs) + $(other_libs) gpg2keys_hkp_SOURCES += curl-shim.c curl-shim.h gpg2keys_hkp_CPPFLAGS = $(AM_CPPFLAGS) gpg2keys_hkp_LDADD = $(common_libs) $(GPG_ERROR_LIBS) $(NETLIBS) $(DNSLIBS) \ - $(other_libs) + $(other_libs) else # Note that we need to include all other libs here as well because # some compilers don't care about inline functions and insert diff --git a/m4/ChangeLog b/m4/ChangeLog-2011 similarity index 93% rename from m4/ChangeLog rename to m4/ChangeLog-2011 index b13bd4f..d466275 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-09-12 Werner Koch * libcurl.m4: Fix lost hash sign introduced by previous change. @@ -162,3 +169,7 @@ * uintmax_t.m4: New file, from gettext-0.11.5. * ulonglong.m4: New file, from gettext-0.11.5. * Makefile.am: New file. + +Local Variables: +buffer-read-only: t +End: diff --git a/m4/Makefile.am b/m4/Makefile.am index d0d84e2..f94c0c1 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -12,7 +12,4 @@ EXTRA_DIST += estream.m4 EXTRA_DIST += sys_socket_h.m4 socklen.m4 - - - - +EXTRA_DIST += ChangeLog-2011 diff --git a/po/ChangeLog b/po/ChangeLog-2011 similarity index 95% rename from po/ChangeLog rename to po/ChangeLog-2011 index e4e560d..3615b74 100644 --- a/po/ChangeLog +++ b/po/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-05-12 Marcus Brinkmann * cs.po: Merge in dirmngr cs.po. Hope I got that right. @@ -184,7 +191,7 @@ package name mangling breaks make distcheck as it tries to rebuild the po file with the "correct" name. The upshot is never to use GNU in you po directory. - + * de.po: Fix a few fuzzy entries and translate new strings. 2007-07-04 Werner Koch @@ -308,7 +315,6 @@ * POTFILES.in: New. * de.po: New. - Copyright 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc. This file is free software; as a special exception the author gives @@ -318,5 +324,7 @@ 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. - +Local Variables: +buffer-read-only: t +End: diff --git a/po/de.po b/po/de.po index 51d7e03..fe83f79 100644 --- a/po/de.po +++ b/po/de.po @@ -111,8 +111,8 @@ msgstr "Fehler beim Holen der Karten-Seriennummer: %s\n" msgid "detected card with S/N: %s\n" msgstr "Erkannte Karte hat die Seriennummer: %s\n" -#, c-format -msgid "error getting default authentication keyID of card: %s\n" +#, fuzzy, c-format +msgid "no authentication key for ssh on card: %s\n" msgstr "Fehler beim Holen der Authentisierungsschl?ssel-ID der Karte: %s\n" #, c-format @@ -131,7 +131,9 @@ msgstr "Fehler beim Schreiben des Schl?ssels: %s\n" msgid "" "An ssh process requested the use of key%%0A %s%%0A (%s)%%0ADo you want to " "allow this?" -msgstr "Ein SSH Processs m?chte folgenden Schl?ssel verwenden:%%0A %s%%0A (%s)%%0AErlauben Sie dies?" +msgstr "" +"Ein SSH Processs m?chte folgenden Schl?ssel verwenden:%%0A %s%%0A (%s)%%" +"0AErlauben Sie dies?" msgid "Allow" msgstr "Erlauben" @@ -141,7 +143,9 @@ msgstr "Verweigern" #, c-format msgid "Please enter the passphrase for the ssh key%%0A %F%%0A (%c)" -msgstr "Bitte geben Sie die Passphrase f?r den SSH-Schl?ssel%%0A %F%%0A (%c)%%0Aein." +msgstr "" +"Bitte geben Sie die Passphrase f?r den SSH-Schl?ssel%%0A %F%%0A (%c)%%" +"0Aein." msgid "Please re-enter this passphrase" msgstr "Bitte geben Sie die Passphrase noch einmal ein:" @@ -152,7 +156,8 @@ msgid "" "s%%0Awithin gpg-agent's key storage" msgstr "" "Bitte geben Sie eine Passphrase ein, um den empfangenen geheimen\n" -"Schl?ssel%%0A %s%%0A %s%%0Aim Schl?sselspeicher des Gpg-Agenten zu sch?tzen." +"Schl?ssel%%0A %s%%0A %s%%0Aim Schl?sselspeicher des Gpg-Agenten zu " +"sch?tzen." msgid "does not match - try again" msgstr "Keine ?bereinstimmung - bitte nochmal versuchen." @@ -5429,6 +5434,18 @@ msgstr "|AN|Neue Admin-PIN" msgid "|N|New PIN" msgstr "|N|Neue PIN" +#, fuzzy +msgid "||Please enter the Reset Code for the card and New PIN" +msgstr "Bitte geben Sie den R?ckstellcode f?r diese Karte ein" + +#, fuzzy +msgid "||Please enter the Admin PIN and New Admin PIN" +msgstr "|A|Bitte die Admin-PIN eingeben." + +#, fuzzy +msgid "||Please enter the PIN and New PIN" +msgstr "||Bitte die PIN eingeben" + msgid "error reading application data\n" msgstr "Fehler beim Lesen der Anwendungsdaten\n" diff --git a/scd/ChangeLog b/scd/ChangeLog-2011 similarity index 99% rename from scd/ChangeLog rename to scd/ChangeLog-2011 index 80cddec..9184af4 100644 --- a/scd/ChangeLog +++ b/scd/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-12-01 Niibe Yutaka * app-openpgp.c (do_change_pin): Fix pincb messages when @@ -1092,7 +1099,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). * command.c (scd_command_handler): Replaced @@ -2579,3 +2586,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/scd/Makefile.am b/scd/Makefile.am index 9153a44..bdd457a 100644 --- a/scd/Makefile.am +++ b/scd/Makefile.am @@ -17,6 +17,8 @@ ## Process this file with automake to produce Makefile.in +EXTRA_DIST = ChangeLog-2011 + bin_PROGRAMS = scdaemon if ! HAVE_W32_SYSTEM libexec_PROGRAMS = gnupg-pcsc-wrapper diff --git a/scripts/ChangeLog b/scripts/ChangeLog-2011 similarity index 81% rename from scripts/ChangeLog rename to scripts/ChangeLog-2011 index 1a664ca..9a3eed3 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-11-29 Werner Koch * build-all.sh: Make sure HOME has no unsafe characters. @@ -49,3 +56,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/scripts/git-log-fix b/scripts/git-log-fix new file mode 100644 index 0000000..af702fe --- /dev/null +++ b/scripts/git-log-fix @@ -0,0 +1,3 @@ +# This file is expected to be used via gitlog-to-changelog's --amend=FILE +# option. It specifies what changes to make to each given SHA1's commit +# log and metadata, using Perl-eval'able expressions. diff --git a/scripts/git-log-footer b/scripts/git-log-footer new file mode 100644 index 0000000..c31fe93 --- /dev/null +++ b/scripts/git-log-footer @@ -0,0 +1,14 @@ + +2011-12-01 Werner Koch + + NB: Changes done before December 1st, 2011 are described in + per directory files named ChangeLog-2011. See doc/HACKING for + details. + + ----- + Copyright (C) 2011 Free Software Foundation, Inc. + + Copying and distribution of this file and/or the original GIT + commit log messages, with or without modification, are + permitted provided the copyright notice and this notice are + preserved. diff --git a/scripts/gitlog-to-changelog b/scripts/gitlog-to-changelog new file mode 100755 index 0000000..40a8035 --- /dev/null +++ b/scripts/gitlog-to-changelog @@ -0,0 +1,345 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2011-11-02 07:53'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2011 Free Software Foundation, Inc. + +# 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 3 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, see . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try `$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on +a line) referring to a commit in the current project, and CODE refers to one +or more consecutive lines of Perl code. Pairs must be separated by one or +more blank line. + +Here is sample input for use with --amend=FILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert , + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = )) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + ) or usage 1; + + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = (qw (git log --log-size), + '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = ) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest = $_; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); + + # Format 'Co-authored-by: A U Thor ' lines in + # standard multi-author ChangeLog format. + my @coauthors = grep /^Co-authored-by:.*$/, @line; + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If this header would be the same as the previous date/name/email/ + # coauthors header, then arrange not to print it. + if ($date_line ne $prev_date_line or "@coauthors" ne "@prev_coauthors") + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line = $date_line; + @prev_coauthors = @coauthors; + + # Omit "Co-authored-by..." and "Signed-off-by..." lines. + @line = grep !/^Signed-off-by: .*>$/, @line; + @line = grep !/^Co-authored-by: /, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/sm/ChangeLog b/sm/ChangeLog-2011 similarity index 99% rename from sm/ChangeLog rename to sm/ChangeLog-2011 index a77c7a8..4a4df86 100644 --- a/sm/ChangeLog +++ b/sm/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-09-20 Werner Koch * verify.c (gpgsm_verify): s/gcry_md_start_debug/gcry_md_debug/ @@ -1284,7 +1291,7 @@ h2007-11-22 Werner Koch 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). 2006-09-13 Werner Koch @@ -2955,3 +2962,7 @@ h2007-11-22 Werner Koch 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/sm/Makefile.am b/sm/Makefile.am index 89b5538..e8dfe05 100644 --- a/sm/Makefile.am +++ b/sm/Makefile.am @@ -17,6 +17,7 @@ ## Process this file with automake to produce Makefile.in +EXTRA_DIST = ChangeLog-2011 bin_PROGRAMS = gpgsm diff --git a/tests/ChangeLog b/tests/ChangeLog-2011 similarity index 92% rename from tests/ChangeLog rename to tests/ChangeLog-2011 index aa93f07..972dbf5 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-09-20 Jim Meyering avoid use of free'd pointer @@ -139,3 +146,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/tests/Makefile.am b/tests/Makefile.am index 70b5fe2..2142d33 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -37,7 +37,7 @@ TESTS_ENVIRONMENT = GNUPGHOME=`/bin/pwd` GPG_AGENT_INFO= LC_ALL=C \ testscripts = sm-sign+verify sm-verify -EXTRA_DIST = runtest inittests $(testscripts) \ +EXTRA_DIST = runtest inittests $(testscripts) ChangeLog-2011 \ text-1.txt text-2.txt text-3.txt \ text-1.osig.pem text-1.dsig.pem text-1.osig-bad.pem \ text-2.osig.pem text-2.osig-bad.pem \ diff --git a/tests/openpgp/ChangeLog b/tests/openpgp/ChangeLog-2011 similarity index 97% rename from tests/openpgp/ChangeLog rename to tests/openpgp/ChangeLog-2011 index 18fbad8..4013a08 100644 --- a/tests/openpgp/ChangeLog +++ b/tests/openpgp/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-02-10 Werner Koch * ecc.test: New. @@ -411,3 +418,7 @@ Mon May 18 15:40:02 1998 Werner Koch (wk at isil.d.shuttle.de) 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/tests/openpgp/Makefile.am b/tests/openpgp/Makefile.am index 8d6e590..ea1d54f 100644 --- a/tests/openpgp/Makefile.am +++ b/tests/openpgp/Makefile.am @@ -67,7 +67,7 @@ sample_keys = samplekeys/ecc-sample-1-pub.asc \ samplekeys/ecc-sample-2-sec.asc \ samplekeys/ecc-sample-3-sec.asc -EXTRA_DIST = defs.inc pinentry.sh $(TESTS) $(TEST_FILES) \ +EXTRA_DIST = defs.inc pinentry.sh $(TESTS) $(TEST_FILES) ChangeLog-2011 \ mkdemodirs signdemokey $(priv_keys) $(sample_keys) CLEANFILES = prepared.stamp x y yy z out err $(data_files) \ diff --git a/tests/pkits/ChangeLog b/tests/pkits/ChangeLog-2011 similarity index 83% rename from tests/pkits/ChangeLog rename to tests/pkits/ChangeLog-2011 index 992d1df..d66e474 100644 --- a/tests/pkits/ChangeLog +++ b/tests/pkits/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2009-03-03 Werner Koch * inittests (clean_files): Use /bin/pwd here as well. @@ -11,11 +18,11 @@ 2008-02-19 Werner Koch - * inittests: Unpack test data onlyu if available. + * inittests: Unpack test data onlyu if available. * common.sh: Skip tests if PKITS test data is not available. * Makefile.am: Do not distribute test data. This allows to include the test suite in the distribution. - + * signature-verification: New. * validity-periods: New. * verifying-name-chaining: New. @@ -62,3 +69,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/tests/pkits/Makefile.am b/tests/pkits/Makefile.am index f59e5ec..8098ad2 100644 --- a/tests/pkits/Makefile.am +++ b/tests/pkits/Makefile.am @@ -1,18 +1,18 @@ # Makefile.am - tests using NIST's PKITS # Copyright (C) 2004, 2008 Free Software Foundation, Inc. -# +# # This file is part of GnuPG. -# +# # GnuPG is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . @@ -43,8 +43,8 @@ testscripts = import-all-certs validate-all-certs \ private-certificate-extensions -EXTRA_DIST = inittests runtest common.sh $(testscripts) - import-all-certs.data +EXTRA_DIST = inittests runtest common.sh $(testscripts) ChangeLog-2011 \ + import-all-certs.data TESTS = $(testscripts) diff --git a/tools/ChangeLog b/tools/ChangeLog-2011 similarity index 99% rename from tools/ChangeLog rename to tools/ChangeLog-2011 index 9ae75d1..6821a87 100644 --- a/tools/ChangeLog +++ b/tools/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-26 Werner Koch * gpgconf-comp.c (gc_component): Mark for translation. Suggested @@ -766,7 +773,7 @@ 2006-09-12 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). * gpg-connect-agent.c (read_and_print_response): With verbosity @@ -1271,3 +1278,7 @@ 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. + +Local Variables: +buffer-read-only: t +End: diff --git a/tools/Makefile.am b/tools/Makefile.am index 5849670..66be272 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -20,7 +20,7 @@ EXTRA_DIST = \ Manifest watchgnupg.c \ addgnupghome applygnupgdefaults gpgsm-gencert.sh \ lspgpot mail-signed-keys convert-from-106 sockprox.c \ - ccidmon.c + ccidmon.c ChangeLog-2011 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common ----------------------------------------------------------------------- Summary of changes: ChangeLog | 1391 +-------------------------- ChangeLog => ChangeLog-2011 | 13 +- Makefile.am | 24 +- agent/{ChangeLog => ChangeLog-2011} | 13 +- agent/Makefile.am | 3 +- common/{ChangeLog => ChangeLog-2011} | 11 + common/ChangeLog.jnlib | 11 + common/Makefile.am | 2 +- dirmngr/{ChangeLog => ChangeLog-2011} | 11 + dirmngr/ChangeLog.1 | 4 + dirmngr/Makefile.am | 2 +- doc/{ChangeLog => ChangeLog-2011} | 11 + doc/HACKING | 31 +- doc/Makefile.am | 2 +- g10/{ChangeLog => ChangeLog-2011} | 21 +- g10/Makefile.am | 2 +- g13/ChangeLog | 3 - g13/ChangeLog-2011 | 14 + g13/Makefile.am | 2 + include/{ChangeLog => ChangeLog-2011} | 11 + include/Makefile.am | 2 +- kbx/{ChangeLog => ChangeLog-2011} | 13 +- keyserver/{ChangeLog => ChangeLog-2011} | 23 +- keyserver/Makefile.am | 14 +- m4/{ChangeLog => ChangeLog-2011} | 11 + m4/Makefile.am | 5 +- po/{ChangeLog => ChangeLog-2011} | 14 +- po/de.po | 27 +- scd/{ChangeLog => ChangeLog-2011} | 13 +- scd/Makefile.am | 2 + scripts/{ChangeLog => ChangeLog-2011} | 11 + scripts/git-log-fix | 3 + scripts/git-log-footer | 14 + scripts/gitlog-to-changelog | 345 +++++++ sm/{ChangeLog => ChangeLog-2011} | 13 +- sm/Makefile.am | 1 + tests/{ChangeLog => ChangeLog-2011} | 11 + tests/Makefile.am | 2 +- tests/openpgp/{ChangeLog => ChangeLog-2011} | 11 + tests/openpgp/Makefile.am | 2 +- tests/pkits/{ChangeLog => ChangeLog-2011} | 15 +- tests/pkits/Makefile.am | 12 +- tools/{ChangeLog => ChangeLog-2011} | 13 +- tools/Makefile.am | 2 +- 44 files changed, 720 insertions(+), 1441 deletions(-) copy ChangeLog => ChangeLog-2011 (98%) rename agent/{ChangeLog => ChangeLog-2011} (99%) rename common/{ChangeLog => ChangeLog-2011} (99%) rename dirmngr/{ChangeLog => ChangeLog-2011} (99%) rename doc/{ChangeLog => ChangeLog-2011} (98%) rename g10/{ChangeLog => ChangeLog-2011} (99%) delete mode 100644 g13/ChangeLog create mode 100644 g13/ChangeLog-2011 rename include/{ChangeLog => ChangeLog-2011} (97%) rename kbx/{ChangeLog => ChangeLog-2011} (96%) rename keyserver/{ChangeLog => ChangeLog-2011} (98%) rename m4/{ChangeLog => ChangeLog-2011} (93%) rename po/{ChangeLog => ChangeLog-2011} (95%) rename scd/{ChangeLog => ChangeLog-2011} (99%) rename scripts/{ChangeLog => ChangeLog-2011} (81%) create mode 100644 scripts/git-log-fix create mode 100644 scripts/git-log-footer create mode 100755 scripts/gitlog-to-changelog rename sm/{ChangeLog => ChangeLog-2011} (99%) rename tests/{ChangeLog => ChangeLog-2011} (92%) rename tests/openpgp/{ChangeLog => ChangeLog-2011} (97%) rename tests/pkits/{ChangeLog => ChangeLog-2011} (83%) rename tools/{ChangeLog => ChangeLog-2011} (99%) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Dec 1 16:44:19 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 01 Dec 2011 16:44:19 +0100 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.10-29-ga7eb1be Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via a7eb1bec2b76318bd17d4413d7f44197a241e3bc (commit) via 5a0d2a5abc0a707c20449b6afd37daa9fd373a18 (commit) via 9d75d671d66386ad862db0466c4dd67a246dfe72 (commit) from aaa3f53457369125bcfa6eeaf283df77df87d4f9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a7eb1bec2b76318bd17d4413d7f44197a241e3bc Author: Werner Koch Date: Thu Dec 1 15:52:38 2011 +0100 Remove non-source file from the repo. * po/remove-potcdate.sed: Remove. diff --git a/po/remove-potcdate.sed b/po/remove-potcdate.sed deleted file mode 100644 index edb38d7..0000000 --- a/po/remove-potcdate.sed +++ /dev/null @@ -1,11 +0,0 @@ -/^"POT-Creation-Date: .*"$/{ -x -s/P/P/ -ta -g -d -bb -:a -x -:b -} commit 5a0d2a5abc0a707c20449b6afd37daa9fd373a18 Author: Werner Koch Date: Thu Dec 1 15:48:55 2011 +0100 Fix for newer autoconf version. * Makefile.am (EXTRA_DIST): Fix filename. * configure.ac (my_full_version): New. (AC_INIT): Use new macro. Change bug address to the bug tracker URL. diff --git a/.gitignore b/.gitignore index 6b8851e..e7fc0df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ +*.lo +*.o +.deps/ +.libs/ +po/*.gmo +po/messages.mo Makefile.in aclocal.m4 autom4te.cache/ @@ -5,3 +11,36 @@ configure config.h.in src/err-codes.h src/err-sources.h +/lang/Makefile +/lang/cl/Makefile +/lang/cl/gpg-error-codes.lisp +/lang/cl/gpg-error.asd +/libtool +/m4/Makefile +/po/Makefile +/po/POTFILES +/po/stamp-po +/config.log +/config.status +/config.h +/Makefile +/src/Makefile +/src/code-from-errno.h +/src/code-to-errno.h +/src/err-codes-sym.h +/src/err-sources-sym.h +/src/errnos-sym.h +/src/extra-h.in +/src/gpg-error +/src/gpg-error-config +/src/gpg-error.def +/src/gpg-error.h +/src/libgpg-error.la +/src/mkerrcodes +/src/mkerrcodes.h +/src/mkw32errmap.map.c +/src/versioninfo.rc +/stamp-h1 +/tests/Makefile +/tests/t-strerror +/tests/t-syserror diff --git a/Makefile.am b/Makefile.am index e92925b..7c92ff6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,7 @@ AUTOMAKE_OPTIONS = dist-bzip2 EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in \ COPYING COPYING.LIB potomo doc/HACKING ChangeLog-2011 \ - po/ChangeLog-2011m4/ChangeLog-2011 contrib/ChangeLog-2011 \ + po/ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 \ build-aux/gitlog-to-changelog build-aux/git-log-footer \ build-aux/git-log-fix diff --git a/configure.ac b/configure.ac index a2ad1dd..ee42f9e 100644 --- a/configure.ac +++ b/configure.ac @@ -31,10 +31,9 @@ m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \ | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)])) m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \ | awk '/^\* / {printf "%s",$3}'])) -AC_INIT([libgpg-error], - [my_version[]m4_if(my_issvn,[yes], - [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])], - [bug-gnupg at gnupg.org]) +m4_define([my_full_version], [my_version[]m4_if(my_issvn,[yes], + [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])]) +AC_INIT([libgpg-error],[my_full_version], [http://bugs.gnupg.org]) # LT Version numbers, remember to change them just *before* a release. # (Code changed: REVISION++) # (Interfaces added/removed/changed: CURRENT++, REVISION=0) @@ -150,7 +149,6 @@ AC_SUBST(GPG_ERROR_CONFIG_LIBS) AC_SUBST(GPG_ERROR_CONFIG_CFLAGS) AC_SUBST(GPG_ERROR_CONFIG_ISUBDIRAFTER) AC_SUBST(GPG_ERROR_CONFIG_HOST) -AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config]) # Special defines for certain platforms @@ -193,6 +191,7 @@ AC_CONFIG_FILES([po/Makefile.in m4/Makefile]) AC_CONFIG_FILES([src/Makefile tests/Makefile]) AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd]) AC_CONFIG_FILES([src/versioninfo.rc]) +AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config]) AC_OUTPUT commit 9d75d671d66386ad862db0466c4dd67a246dfe72 Author: Werner Koch Date: Thu Dec 1 14:57:15 2011 +0100 Generate the ChangeLog from commit logs. * build-aux/gitlog-to-changelog: New script. Taken from gnulib. * build-aux/git-log-fix: New file. * build-aux/git-log-footer: New file. * doc/HACKING: New file. * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. Rename all ChangeLog files to ChangeLog-2011. diff --git a/ChangeLog b/ChangeLog index b838b86..3994986 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,1204 +1,16 @@ -2011-11-28 Jim Meyering +No more ChangeLog files +======================== - accept --with-libgpg-error-prefix as well as --with-gpg-error-prefix - * src/gpg-error.m4 (AM_PATH_GPG_ERROR): Also accept - --with-libgpg-error-prefix=PFX, for consistency with our three - library sibling packages. +Do not modify any of the ChangeLog files in Libgpg-error. Starting on +December 1st, 2011 we put change information only in the GIT commit +log, and generate a top-level ChangeLog file from logs at "make dist" +time. As such, there are strict requirements on the form of the +commit log messages. See doc/HACKING for details. The old ChangeLog +files have all be renamed to ChangeLog-2011. -2011-08-23 Werner Koch - * src/err-codes.h.in: Add GPG_ERR_DUP_KEY and GPG_ERR_AMBIGUOUS. -2011-04-06 Werner Koch - - * autogen.sh: Support option --build-w64. - * configure.ac (HAVE_W64_SYSTEM): New. - - * src/gpg-error.m4: Test whether gpg-error-config exists. - -2011-02-23 Werner Koch - - * autogen.sh: Check git setup. - - * src/gpg-error-config.in: Add option --host. - * configure.ac (GPG_ERROR_CONFIG_HOST): New. - * src/gpg-error.m4: Use AC_PATH_TOOL to look for - gpg-error-config. Print a warning if host does not match. - -2011-02-01 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_INV_CURVE and GPG_ERR_UNKNOWN_CURVE. - -2011-01-06 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_NO_KEYSERVER. - -2010-12-23 Werner Koch - - * configure.ac: Support git_revision. - -2010-11-01 Marcus Brinkmann - - * src/w32-gettext.c (CreateFileA): Rename to ... - (MyCreateFileA): ... this, but provide macro CreateFileA. - -2010-10-31 Werner Koch - - * src/init.c (abort): Use TerminateProcess; exit would call atexit - functions. - -2010-10-29 Marcus Brinkmann - - * src/w32-gettext.c: Guard include of . Do not - include . - (CreateFileA) [HAVE_W32CE_SYSTEM]: New wrapper function. - (load_domain): Use native Windows API. - - * src/init.c (TLS_OUT_OF_INDEXES) [HAVE_W32CE_SYSTEM, - !TLS_OUT_OF_INDEXES]: Define it. - (abort) [!__MINGW32CE__]: Define it. - -2010-10-28 Werner Koch - - * src/mkstrtable.awk: s/inline/GPG_ERR_INLINE/ - * src/w32-gettext.c: Include gpg-error.h and replace all - __inline__ by GPG_ERR_INLINE. - (module_init): Use _GPG_ERR_CONSTRUCTOR. - (_gpg_w32__init_gettext_module): Build also if we don't have - constructors - * src/gpg-error.h.in (GPG_ERR_INLINE) [_MSC_VER]: Define as __inline. - -2010-10-26 Werner Koch - - Release 1.10. - - * configure.ac: Set LT version to C8/A8/R0. - * config.guess: Update to version 2010-09-24. - * config.sub: Update to version 2010-09-11. - -2010-10-20 Werner Koch - - * potomo: New. Copied from GnuPG. - * Makefile.am (install-data-hook) [W32]: New. - - * src/init.c (get_locale_dir): Strip the "bin" part. - * src/gpg-error.c (get_locale_dir): Ditto. - -2010-09-30 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_FULLY_CANCELED. - -2010-09-16 Werner Koch - - * src/w32-gettext.c (module_init): Do not set a constructur if not - build as DLL. - (_gpg_w32__init_gettext_module): New. - -2010-09-16 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17. - -2010-09-16 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_MISSING_ISSUER_CERT. - - * src/Makefile.am (err-sources.h, err-codes.h): Built them in the - source directory. - -2010-09-02 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_NOT_INITIALIZED. - -2010-08-19 Werner Koch - - * configure.ac (AH_BOTTOM): Define GPG_ERR_ENABLE_ERRNO_MACROS. - * src/w32ce-add.h (strerror) [!GPG_ERR_ENABLE_ERRNO_MACROS]: Do - not define. - -2010-07-21 Werner Koch - - Release 1.9. - - * configure.ac: Set LT version to C7/A7/R0. - -2010-07-20 Werner Koch - - * src/init.c (DllMain) [!DLL_EXPORT]: Do not build. - (gpg_err_init) [W32][!DLL_EXPORT]: Init TLS. - (gpg_err_deinit): New. - * src/gpg-error.def.in: Add gpg_err_deinit. - * src/gpg-error.h.in: Add gpg_err_deinit. - -2010-07-05 Werner Koch - - * src/err-codes.h.in (GPG_ERR_TOO_MANY, GPG_ERR_LIMIT_REACHED): New. - -2010-06-18 Werner Koch - - * src/err-codes.h.in (GPG_ERR_MISSING_KEY): New. - -2010-05-06 Werner Koch - - Release 1.8. - - * configure.ac: Set LT version to C6/A6/R0. - -2010-04-14 Werner Koch - - * src/init.c (_gpg_w32ce_get_errno): Add native error mapping. - * src/Makefile.am (mkw32errmap.map.c): New. - * src/mkw32errmap.c (struct table_s): Add field W32CODE2. - (table): Init this field. - (main): Add option --map. - -2010-03-15 Werner Koch - - * src/mkheader.awk: Add emacs local-var line. - - * src/w32-add.h (gettext_localename): Fix type in name. - -2010-03-09 Werner Koch - - * src/w32-add.h [!GPG_ERR_ENABLE_GETTEXT_MACROS]: Do not provide - gettext macros. - -2010-03-08 Werner Koch - - * src/w32-add.h (_GPG_ERR_ATTR_FORMAT_ARG): New. - (_gpg_w32_gettext, _gpg_w32_dgettext, _gpg_w32_dngettext): Use it. - -2010-03-01 Werner Koch - - * src/mkw32errmap.c: Map ESPIPE. - -2010-02-17 Werner Koch - - * src/Makefile.am: Revert last change. - (gpg_extra_headers): New. - (nobase_include_HEADERS): Rename to include_HEADERS and remove - extra_headers. - (mkerrcodes.h): Depend on gpg_extra_headers. - (install-data-local): New. - (gpg-extra/errno.h): Create gpg-extra dir if needed. - -2010-02-17 Werner Koch - - * src/Makefile.am (extra_headers): Remove. - -2010-01-21 Werner Koch - - * configure.ac (have_w32ce_system): Initialize to no. - - * src/mkstrtable.awk (END): Do not print PREFIX before - LAST_MSGSTR. - - * src/init.c (get_locale_dir): Rework to match what gnupg is doing. - (get_root_key, read_w32_registry_string): Remove. - * src/gpg-error.c (get_locale_dir): Replace by code from init.c - (get_root_key, read_w32_registry_string): Remove. - -2010-01-20 Werner Koch - - * src/init.c (gpg_err_init): Factor code out to .. - (real_init): .. new. - - * src/Makefile.am (gpg_error_SOURCES): Remove arch_sources. - (export_symbols): Do not prefix gpg-error-def with srcdir. - -2010-01-19 Werner Koch - - * src/init.c (DllMain): Call _w32_gettext_init. - (get_tls): Use it also for standard Windows. - (DllMain): Ditto. - (struct tls_space_s): Move to .. - (get_tls): Make global. - * src/init.h: .. New. - * src/gettext.h: Do not include w32-gettext.h. - * src/w32-gettext.c: Replace by version from GnuPG. - (my_nl_locale_name) [W32CE]: Do not use getenv. Use - GetSystemDefaultLCID. - (struct loaded_domain): Use uint16_t for NSTRINGS and MAPPED to - save space. - (load_domain): Check for too large MO files. - (utf8_to_wchar): Use gpg_err_set_errno. - (bindtextdomain): Rename to _gpg_w32_bindtextdomain. - (textdomain): Rename to _gpg_w32_textdomain. - (gettext): Rename to _gpg_w32_gettext. - (dgettext): Rename to _gpg_w32_dgettext. - (ngettext): Remove. - (gettext_localename): Rename to _gpg_w32_gettext_localename. - (gettext_select_utf8): Rename to _gpg_w32_gettext_use_utf8. - (_gpg_w32_bindtextdomain): Change to only register the directory. - Return the current directory if asked to. - (do_gettext): Add DOMAINNAME arg and take care of it. - * src/w32-add.h: New. - * src/w32-gettext.h: Remove. - * src/Makefile.am (extra-h.in): Process w32-add.h. - (arch_sources): Remove w32-gettext.h. - -2010-01-18 Werner Koch - - * src/init.c (wchar_to_utf8, utf8_to_wchar): New. - - * src/gpg-error.c (main): Add option --list. - -2010-01-18 Werner Koch - - * ltmain.sh (wrappers_required): Don't set for mingw32ce. - - * tests/Makefile.am (extra_includes): New. - * tests/t-syserror.c (main): Use gpg_err_set_errno. - - * src/w32ce-add.h: New. - * src/Makefile.am (EXTRA_DIST): Add it - (extra-h.in): New rule - (gpg-error.h): Pass extra-h.in to mkheader. - * src/mkheader.awk (extra_body): New. - - * src/gpg-error.c (get_err_from_number): Use gpg_err_set_errno. - - * src/mkw32errmap.c: New - * src/gpg-error.def: Rename to .. - * src/gpg-error.def.in: .. this. - (_gpg_errno_location): New. - * src/init.c (struct tls_space_s, tls_index): New. - (get_tls, _gpg_errno_location, DllMain): New. - (read_w32_registry_string) [W32CE]: Don't expand envvars. - (_gpg_w32ce_strerror): New. - * src/Makefile.am (extra_headers, extra_cppflags): New. - (include_HEADERS): Add extra_headers. Prefix with nobase_. - (libgpg_error_la_CPPFLAGS, gpg_error_CPPFLAGS) - (mkerrcodes.h): Add extra_cppflags. - (RCCOMPILE): Replace libgpg_error_la_CPPFLAGS by direct inclusion - of -DLOCALEDIR. - * configure.ac (HAVE_W32CE_SYSTEM): New AM_CONDITIONAL and - AC_DEFINE. - (GPG_ERROR_CONFIG_ISUBDIRAFTER): New. - * src/gpg-error-config.in <--libs>: Replace fixed -lgpg-error - by subst variable. - (isubdirafter): New. - <--cflags>: Take subst variable in account. Add idirafter stuff. - -2009-10-26 Marcus Brinkmann - - * src/gpg-error.h.in (GPG_ERR_SOURCE_DIM): Reduce to 128. - -2009-09-29 Werner Koch - - * src/err-codes.h.in (GPG_ERR_NO_ENGINE): New. - -2009-09-21 Werner Koch - - * src/err-sources.h.in (GPG_ERR_SOURCE_G13): New. - -2009-08-20 Werner Koch - - * src/err-codes.h.in: s/octadecimal/octal/. Reported by Petr Pisar. - -2009-07-23 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_NOT_ENABLED. - -2009-07-17 Marcus Brinkmann - - * src/mkerrnos.awk: Output code to cause WSA Errors to be found - from gpg error codes. - * README: Add problem of translating error codes back and forth. - - * src/mkerrcodes1.awk: Output code to cause WSA Errors to be - transparently translated. - * src/code-from-errno.c [HAVE_W32_SYSTEM]: Don't include winsock2.h. - (w32_special_errnos) [HAVE_W32_SYSTEM]: Removed. - (gpg_err_code_from_errno) [HAVE_W32_SYSTEM]: Remove special case. - * README: Document problem with printing some WSA Errors. - -2009-06-23 Marcus Brinkmann - - Update to libtool 2.2.6a. - * configure.ac: Invoke AC_CONFIG_MACRO_DIR. - (AC_LIBTOOL_WIN32_DLL, AC_LIBTOOL_RC): Replace by ... - (LT_PREREQ, LT_INIT, LT_LANG): ... these. - * config.guess, config.sub, install-sh, ltmain.sh, m4/libtool.m4: - Updated to libtool 2.2.6a. - * m4/ltoptions.m4, m4/ltsugar.m4, m4/ltversion.m4, - m4/lt~obsolete.m4: New files from libtool 2.2.6a. - * src/Makefile.am (LTRCCOMPILE): Refactor with ... - (RCCOMPILE): ... this new macro. Add $(libgpg_error_la_CPPFLAGS). - (SUFFIXES): Add .lo. - (.rc.o): Change to ... - (.rc.lo): ... this implicit rule. - (gpg_error_res_ldflag): Removed. - (gpg_error_res): Use libtool object file name here. - (install-def-file): Fix typo. - (libgpg_error_la_LDFLAGS): Remove gpg_error_res_ldflag usage. - (libgpg_error_la_LIBADD): Add gpg_error_res. - -2008-11-26 Werner Koch - - Release 1.7. - - * configure.ac: Set LT version to C5/A5/R0. - -2008-11-12 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_NO_PASSPHRASE and GPG_ERR_NO_PIN. - -2008-11-08 Moritz - - * lang/cl/gpg-error.lisp ("gpg_err_code_from_syserror"): Fix - defcfun: removed "(void)". - - * lang/cl/gpg-error.lisp (size-t): Wrong call to defctype: - function accepts optional, not keyword argument. - (gpg-error-t): Likewise. - -2008-10-29 Marcus Brinkmann - - * src/mkstrtable.awk: Make generated code -W clean to silence gcc - warnings. - -2008-08-06 Werner Koch - - * src/err-codes.h.in (GPG_ERR_NOT_OPERATIONAL): New. - -2008-04-01 Werner Koch - - * configure.ac (AC_INIT): Fix m4 quoting. - -2007-12-11 Werner Koch - - * Makefile.am (EXTRA_DIST): Add COPYING. - -2007-10-29 Werner Koch - - Released 1.6. - - * configure.ac: Set LT version to C4/A4/R0. - - * config.guess, config.sub: Updated. - - * src/err-sources.h.in: (GPG_ERR_SOURCE_KLEO): New. - - * w32-gettext.c (SUBLANG_BENGALI_BANGLADESH): Fix to 2 as per MSDN. - (SUBLANG_PUNJABI_PAKISTAN): Remove as it is not in MSDN. - (SUBLANG_ROMANIAN_MOLDOVA): Remove as it is not in MSDN. - (SUBLANG_ROMANIAN_ROMANIA): Change to value 1 as per MSDN. - -2007-09-27 Marcus Brinkmann - - * src/Makefile.am (%.o): Replace pattern rule with suffix rule. - (SUFFIXES): New variable. - -2007-09-27 Werner Koch - - * src/err-sources.h.in (GPG_ERR_SOURCE_GPA): New. - * src/err-codes.h.in (GPG_ERR_UNFINISHED): New. - -2007-08-03 Marcus Brinkmann - - * configure.ac: Call AM_PROG_CC_C_O. Allow --disable-languages. - * autogen.sh: Use = not == in test. - * lang/cl/Makefile.am: Do not use :=, but =. - * Makefile.am [!LANGUAGES_SOME]: Don't add lang to subdirs. - * m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4: New files. - -2007-05-19 Marcus Brinkmann - - * lang/cl/gpg-error.lisp (gpg-err-source-t): Add - :gpg-err-source-any. - -2007-06-18 Werner Koch - - * src/code-from-errno.c (w32_special_errnos) [W32]: New. This is - to provide some common mappings for winsocket error codes. - (gpg_err_code_from_errno, gpg_err_code_from_syserror): Use it. - -2007-05-09 Werner Koch - - * src/gpg-error.m4: Print found version on success. - -2006-12-09 Marcus Brinkmann - - * src/Makefile.am (EXTRA_DIST): Add README. - * src/README: New file. - -2006-12-01 Marcus Brinkmann - - * src/gpg-error.c (get_err_from_number): Fix last change. - - * src/gpg-error.c (get_err_from_number): Support source and code - number in split format like "7.17". - -2006-11-30 Werner Koch - - Released 1.5. - - * configure.ac: Set LT version to C3/A3/R1. - - * README: Switch to tar.bz2 and sha1sum. - - * src/gpg-error.c (main): Add option --version. - - * autogen.sh (FORCE): Add option --force. - - * intl/: Removed. - * Makefile.am (SUBDIRS): Removed intl. - * configure.ac (AM_GNU_GETTEXT): Use external flag - * src/Makefile.am: Removed -I../intl. - -2006-11-23 Werner Koch - - * configure.ac: Display configuration status after AC_OUTPUT. - (AC_INIT): Use SVN revision magic. - (AC_GNU_SOURCE): New. - -2006-11-23 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.15. - -2006-11-15 Werner Koch - - * autogen.sh: Add convenience option --build-amd64. - -2006-10-20 Werner Koch - - * Makefile.am (stowinstall): New convenience target. - -2006-09-18 Werner Koch - - * src/gpg-error.def: Added gpg_err_code_from_syserror. - -2006-09-14 Werner Koch - - Released 1.4. - - * configure.ac: Set LT version to C3/A3/R0. - (AB_INIT): New. - - * autogen.sh (--build-w32): Better cross-compiler locating. - - * src/strerror.c (system_strerror_r): Made static. - - * tests/t-syserror.c: New. - * tests/Makefile.am (TESTS): Added new test. - - * lang/cl/gpg-error.lisp ("gpg_err_code_from_syserror"): New. - (gpg-err-code-from-syserror): New. - (gpg-error-from-syserror): New. - * lang/cl/gpg-error-package.lisp: Export new functions - - * src/gpg-error.h.in (gpg_error_from_syserror): New. - * src/code-from-errno.c (gpg_err_code_from_errno): Cosmetic change - to first check whether ERR is zero. - (gpg_err_code_from_syserror): New. - -2006-09-06 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_UNKNOWN_OPTION and - GPG_ERR_UNKNOWN_COMMAND. - -2006-09-05 Werner Koch - - * src/err-sources.h.in (GPG_ERR_SOURCE_ANY): New. This is so that - we have source distinguished from the Unknown one but declaring - that it is an gpg-error style error code. - - * src/err-codes.h.in: Added GPG_ERR_ASS_* codes, rabnge 257-281. - (GPG_ERR_MISSING_ERRNO): New. - -2006-07-04 Marcus Brinkmann - - * src/init.c (get_locale_dir): Return NULL instead of garbage. - * src/gpg-error.c (get_locale_dir): Likewise. - Reported by Simon Josefsson . - -2006-05-30 Marcus Brinkmann - - * lang/cl/gpg-error.asd.in (gpg-error): Add "depends-on" on cffi. - -2006-05-29 Marcus Brinkmann - - * src/init.c (gpg_err_init) [!ENABLE_NLS]: Do not initialize the - locale. - * src/gpg-error.c (i18n_init) [!ENABLE_NLS]: Likewise. - Patch submitted by Nils Durner . - -2006-05-25 Marcus Brinkmann - - * lang/cl/gpg-error.asd: Renamed to ... - * lang/cl/gpg-error.asd.in: ... this. - * configure.ac (AC_CONFIG_FILES): Add lang/cl/gpg-error.asd.in. - - * lang/cl/mkerrcodes.awk, lang/cl/gpg-error-package.lisp, - lang/cl/gpg-error.lisp, lang/cl/gpg-error.asd, lang/cl/Makefile.am - (clfilesdir): Fix package and file names. - - * lang/cl/Makefile.am (clfilesdir): Use datadir, not prefix. - -2006-05-05 Marcus Brinkmann - - * configure.ac (AC_CONFIG_FILES): Add lang/Makefile and - lang/cl/Makefile. - * Makefile.am (SUBDIRS): Add lang. - * lang: New directory. - * lang/README, lang/Makefile.am: New files. - * lang/cl: New directory. - * lang/cl/Makefile.am, lang/cl/README, lang/cl/gpg-error.asd, - lang/cl/gpg-error-package.lisp, lang/cl/gpg-error.lisp, - lang/cl/mkerrcodes.awk: New files. - -2006-03-14 Marcus Brinkmann - - Released 1.3. - - * configure.ac (LIBGPG_ERROR_LT_REVISION): Bump for release. - - Many files regenerated. - * src/Makefile.am (gpg_error_CPPFLAGS, libgpg_error_la_CPPFLAGS): - Add -I../intl. - * Makefile.am (SUBDIRS): Add intl. - * configure.ac (AC_CONFIG_FILES): Add intl/Makefile. - (AM_GNU_GETTEXT_VERSION): Bump to 0.14.5. - -2006-03-06 Marcus Brinkmann - - * configure.ac (min_automake_version): Bump to 1.9.6. - * mkinstalldirs, depcomp, compile, INSTALL, COPYING, missing, - install-sh: Update from automake 1.9.6. - ltmain.sh: Update from libtool 1.5.22. - -2006-03-03 Marcus Brinkmann - - * configure.ac (LIBGPG_ERROR_LT_CURRENT, LIBGPG_ERROR_LT_AGE): - Bump for release. - (LIBGPG_ERROR_LT_REVISION): Reset to 0 for release. - -2005-11-02 Werner Koch - - * src/Makefile.am (gpg_error_SOURCES): Include ARCH_SOURCES. - * src/gpg-error.c [W32]: Include gettext.h instead of libintl.h. - - * configure.ac (AH_BOTTOM): Define ENABLE_NLS for W32 builds. - * src/w32-gettext.h (dgettext): Changed prototype from - libintl_dgettext. - * src/w32-gettext.c: Replaced use of WIN32 by HAVE_W32_SYSTEM on - demand of the holy GNUquisition. - (bindtextdomain, textdomain, dgettext): Need to cast the const way - from the return value. - -2005-10-26 Werner Koch - - * Makefile.am: Used dist-bzip2 option. - -2005-10-25 Marcus Brinkmann - - * src/w32-gettext.c (get_string): Remove extra arguments to - utf8_to_native_invocation. - (utf8_to_wchar, wchar_to_native): New function. - (utf8_to_native): Rewritten. - - * src/Makefile.am (gpg_error_CPPFLAGS): New variable. - * src/gpg-error.c (i18n_init): Don't return anything. - - * src/Makefile.am (arch_sources): New variable. - (libgpg_error_la_SOURCES): Add $(arch_sources). - * src/gettext.h [HAVE_W32_SYSTEM]: Include w32-gettext.h. - * src/w32-gettext.h: New file. - * src/w32-gettext.c: New file. - * src/gpg-error.h.in: Check for gcc's constructor attribute. - Use it for gpg_err_init. - (GPG_ERR_INITIALIZED): Define if constructor is available. - * src/gpg-error.c (main) [GPG_ERR_INITIALIZED]: Don't invoke - gpg_err_init. - (i18n_init): Call bindtextdomain as well. Now that gpg-error has - its own gettext implementation, we can't rely on it anymore. - Also, repeat all the w32 stuff for fetching the registry. - -2005-10-23 Marcus Brinkmann - - * src/Makefile.am (libgpg_error_la_SOURCES): Add init.c. - * src/init.c: New file. - * src/gpg-error.h.in (gpg_error_init): New function. - * src/gpg-error.def: Add gpg_err_init. - * src/gpg-error.c: Remove SIMPLE_GETTEXT stuff. - (i18n_init): Don't bind text domain. - (main): Call gpg_err_init. - -2005-10-20 Marcus Brinkmann - - * configure.ac: Instead checking for windres and dlltool, invoke - AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_RC. - * src/Makefile.am [HAVE_W32_SYSTEM]: Use libtool, which simplifies - the rules. - -2005-10-02 Marcus Brinkmann - - * configure.ac: Escape arguments in AC_INIT invocation. - * config.guess, config.sub, ltmain.sh: Update. - -2005-08-19 Werner Koch - - * configure.ac: Add code to allow building a W32 DLL. - * src/Makefile.am: Changed to allow building for W32. - * src/versioninfo.rc.in: New. - * src/gpg-error.def: New. - -2005-06-20 Marcus Brinkmann - - Released 1.1. - - * configure.ac: Bump up LIBGPG_ERROR_LT_REVISION, update version - field. - -2005-06-16 Marcus Brinkmann - - * src/mkerrcodes.awk: Fix comment. Allow any non-empty line to - start the processing, not only lines starting with numbers. - Reported by Guillaume Libersat . - -2005-01-05 Marcus Brinkmann - - * configure.ac: Check for locale.h. - -2005-04-20 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_LOCKED. - -2005-04-18 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_UNKNOWN_EXTN and - GPG_ERR_UNKNOWN_CRIT_EXTN. - -2004-12-18 Werner Koch - - * autogen.sh: Add option --build-w32. - -2004-09-14 Marcus Brinkmann - - * src/gpg-error.m4: Add copyright note. - - * configure.ac: Call AC_CANONICAL_HOST. Suppress warning about - lack of strerror_r on all Solaris platforms. - -2004-07-30 Werner Koch - - Released 1.0. - - * configure.ac: Bumbed version to 1.0, LT to C1/A1/R3. - -2004-07-15 Werner Koch - - * src/err-codes.h.in: Renamed description for CARD_RESET. - -2004-06-28 Werner Koch - - * src/err-codes.h.in: Add GPG_ERR_INV_REQUEST. - -2004-06-08 Marcus Brinkmann - - * src/Makefile.am (mkerrcodes): Prefix mkerrcodes.c with $(srcdir) - to fix VPATH build. - -2004-05-25 Marcus Brinkmann - - * src/err-codes.h.in: Add GPG_ERR_PROTOCOL_VIOLATION and - GPG_ERR_INV_MAC. - -2004-04-23 Marcus Brinkmann - - * src/Makefile.am (mkerrcodes): Do not use $< in non-inference rule. - (code-from-errno.h): Likewise. - -2004-04-22 Marcus Brinkmann - - * src/Makefile.am (gpg_error_CPPFLAGS): New variable. - (localedir): Likewise. - * gpg-error.c: Include the gettext headers. - (init_i18n): New function. - (main): Call init_i18n, gettextize messages. - -2004-04-02 Thomas Schwinge - - * autogen.sh: Added ACLOCAL_FLAGS. - -2004-04-19 Marcus Brinkmann - - * src/gpg-error.m4: Quote first argument to AC_DEFUN. - - * src/mkerrcodes.awk: Allow whitespace before expanded - preprocessor macro (ie, the error code value). Needed for Solaris 2.8. - -2004-04-08 Moritz Schulte - - * src/gpg-error.c (main): Return zero on success. - -2004-03-09 Marcus Brinkmann - - * libgpg-error.spec.in (%files): Add gpg-error. Submitted by - Albrecht Dre? . - - * src/mkerrcodes.c (main): Fix type of argv. Return something. - -2004-03-09 Werner Koch - - * Makefile.am (dist-hook): Create a VERSION file for use by mkdiff. - - * src/Makefile.am (mkerrcodes.h): Let CPP work on a temporary file. - (CLEANFILES): Add that temporary file. - * configure.ac (AC_PROG_CPP): Added. - - * src/err-codes.h.in: Removed trailing spaces from - GPG_ERR_NOT_LOCKED. - -2004-03-08 Werner Koch - - * src/err-sources.h.in: Added GPG_ERR_SOURCE_GSTI. - -2004-03-07 Marcus Brinkmann - - Released 0.7. - - * configure.ac: Bumbed up LIBGPG_ERROR_LT_REVISON. - - * src/gpg-error-config.in: Fix last change. - * src/gpg-error-config.in (Options): Do not emit include and lib - directory for prefix "/usr" or "". - - * tests/Makefile.am (INCLUDES): Change to -I$(top_srcdir)/src to - -I$(top_builddir). - -2004-03-01 Marcus Brinkmann - - * configure.ac: Define CC_FOR_BUILD. - * src/Makefile.am (BUILT_SOURCES): Add gpg-error.h. - (EXTRA_DIST): Add mkerrcodes.awk and mkerrcodes.c. - (CLEANFILES): Add mkerrcodes.h and mkerrcodes. - (mkerrcodes.h): New target. - (mkerrcodes): New target. - (code-from-errno.h): Rewritten. - - * src/errnos.in: Remove include statement (which was ignored - anyway). - * src/mkerrcodes.awk: New file. - * src/mkerrcodes.c: New file. - -2004-02-27 Marcus Brinkmann - - * src/Makefile.am (noinst_PROGRAMS): Rename to ... - (bin_PROGRAMS): ... this. - - * src/gpg-error.h.in: Add extern "C" closure for C-- compilers. - - * src/Makefile.am (noinst_PROGRAMS): New variable. - (gpg_error_LDADD): New variable. - (gpg_error_SOURCES): New variable. - (EXTRA_DIST): Add mkheader.awk and gpg-error.h.in. - (BUILT_SOURCES): Add err-sources-sym.h, err-codes-sym.h and - errnos-sym.h. - (CLEANFILES): Add err-sources-sym.h, err-codes-sym.h, - errnos-sym.h and gpg-error.h. - (err-codes.h, err-sources.h): Add -v textidx=3 to mkstrtable.awk - invocation. - (err-codes-sym.h): New target. - (err-sources-sym.h): New target. - (gpg-error.h): New rule. - * src/mkstrtable.awk: Skip the second field (which contains the - error code symbol). - (FS): Allow more than one tab as field separator. - Allow to specify the field to be used as text with the variable - textidx. - Allow to suppress gettext markers in the output. - Allow to specify a prefix to the messages. - Allow to specify a namespace for the variable and macro names. - * src/mkerrnos.awk (FS): Initialize. Understand variable - errnoidx, which defaults to 2, to cope with the error names being - in a different column than the first. - * src/mkerrcodes1.awk: Likewise. Use \t as separator. - * src/mkheader.awk: New file. - * src/errnos.in: Add error code numbers (relativ to - GPG_ERR_SYSTEM_ERROR). - * src/strerror-sym.c: New file. - * src/strsources-sym.c: New file. - * src/err-codes.h.in: Add the error code symbol for every error - code. - (GPG_ERR_BUFFER_TOO_SHORT): Fix error code (it is 200, not 199). - * src/err-sources.h.in: Likewise. - * src/gpg-error.h.in: New file. - * src/gpg-error.h: File removed. - * src/gpg-error.c: New file. - -2004-02-18 Werner Koch - - * src/gpg-error-config.in: Ignore setting of --prefix. - -2004-02-11 Werner Koch - - * autogen.sh (check_version): Removed bashism and simplified. - -2004-02-03 Werner Koch - - * src/gpg-error.h: Added GPG_ERR_NOT_LOCKED. - -2003-12-22 Werner Koch - - * src/gpg-error.h: Added GPG_ERR_LOCALE_PROBLEM. - -2003-12-12 Werner Koch - - * src/err-codes.h.in: s/revoced/revoked/. - -2003-12-08 Werner Koch - - * README.CVS: Enhanced. - - * autogen.sh: New. - * Makefile.am (EXTRA_DIST): Added autogen.sh. - -2003-11-14 Werner Koch - - * configure.ac: Bumbed version number to 0.7. - - Released 0.6. - - * configure.ac: Bumbed up LIBGPG_ERROR_LT_REVISON. - -2003-11-13 Werner Koch - - * src/gpg-error.h, src/err-codes.h.in: Removed: GPG_ERR_IO_ERROR, - GPG_ERR_FILE_ERROR, GPG_ERR_READ_ERROR, GPG_ERR_WRITE_ERROR, - GPG_ERR_LOCK_ERROR. - - * src/gpg-error.h (GPG_ERR_SOURCE_DIRMNGR): Fixed typo. - -2003-11-12 Werner Koch - - * src/gpg-error.h, src/err-codes.h.in: Added these codes: - GPG_ERR_INV_ATTR, GPG_ERR_NO_VALUE, GPG_ERR_NOT_FOUND, - GPG_ERR_VALUE_NOT_FOUND, GPG_ERR_SYNTAX, GPG_ERR_INV_CRL, - GPG_ERR_BAD_BER, GPG_ERR_INV_BER, GPG_ERR_ELEMENT_NOT_FOUND, - GPG_ERR_IDENTIFIER_NOT_FOUND, GPG_ERR_INV_TAG, GPG_ERR_INV_LENGTH, - GPG_ERR_INV_KEYINFO, GPG_ERR_UNEXPECTED_TAG, GPG_ERR_NOT_DER_ENCODED, - GPG_ERR_NO_CMS_OBJ, GPG_ERR_INV_CMS_OBJ, GPG_ERR_UNKNOWN_CMS_OBJ, - GPG_ERR_UNSUPPORTED_CMS_OBJ, GPG_ERR_UNSUPPORTED_ENCODING, - GPG_ERR_UNSUPPORTED_CMS_VERSION, GPG_ERR_UNKNOWN_ALGORITHM, - GPG_ERR_ENCODING_PROBLEM, GPG_ERR_INV_STATE, GPG_ERR_DUP_VALUE, - GPG_ERR_MISSING_ACTION, GPG_ERR_MODULE_NOT_FOUND, - GPG_ERR_INV_OID_STRING, GPG_ERR_INV_TIME, GPG_ERR_INV_CRL_OBJ, - GPG_ERR_UNSUPPORTED_CRL_VERSION, GPG_ERR_INV_CERT_OBJ, - GPG_ERR_UNKNOWN_NAME, GPG_ERR_IO_ERROR, GPG_ERR_FILE_ERROR, - GPG_ERR_READ_ERROR, GPG_ERR_WRITE_ERROR, GPG_ERR_LOCK_ERROR, - GPG_ERR_BUFFER_TOO_SHORT. - -2003-11-06 Werner Koch - - * src/gpg-error.h, src/err-sources.h.in: Added error sources for - Libksba and Dirmngr. Added GPG_ERR_TRUNCATED. - -2003-11-03 Werner Koch - - * src/gpg-error.h: Allow GPG_ERR_INLINE to get overriden, so that - one can use the -D flag to specify the inline keyword. Suggested - by Philip Brown. - -2003-10-28 Moritz Schulte - - * src/gpg-error.h (gpg_err_code_t): Added: - GPG_ERR_NO_ENCODING_METHOD, GPG_ERR_NO_ENCRYPTION_SCHEME, - GPG_ERR_NO_SIGNATURE_SCHEME. - * src/err-codes.h.in: Likewise. - -2003-10-25 Werner Koch - - * src/strerror.c: Include stdio.h for snprintf - prototype. Suggested by papadopo at shfj.cea.fr, fixes #gnupg/214. - -2003-10-11 Moritz Schulte - - * src/gpg-error.m4: Do not ask gpg-error-config to change the - prefix, if --with-gpg-error-prefix=... is used. - -2003-10-06 Marcus Brinkmann - - Released 0.5. - - * configure.ac (LIBGPG_ERROR_LT_CURRENT, LIBGPG_ERROR_LT_AGE): - Bump up by one. - -2003-09-30 Marcus Brinkmann - - * src/gpg-error.h: Include . - (gpg_strerror_r): Change prototype to match POSIX. Rewritten for - that prototype. - * src/strerror.c: Include . - (gpg_strerror_r, system_strerror_r): Change prototype to match - POSIX. Rewritten for that prototype. Rewritten for that - prototype. - -2003-09-30 Werner Koch - - * src/gpg-error.h: Add PIN_NOT_SYNCED. - -2003-09-13 Marcus Brinkmann - - * configure.ac: Invoke AC_FUNC_STRERROR_R. - * src/gpg-error.h (gpg_strerror_r): New prototype. - * src/strerror.c (system_strerror_r): New function. - (gpg_strerror_r): New function. - -2003-09-04 Marcus Brinkmann - - * libgpg-error.spec.in: New file. - * Makefile.am (EXTRA_DIST): Add libgpg-error.spec.in. - * AUTHORS (Maintainer): Add Robert Schiele as contributor. - -2003-09-03 Marcus Brinkmann - - * src/gpg-error-config.in: Rewritten. - -2003-09-03 Marcus Brinkmann - - * configure.ac (AC_INIT): Bump up version number. - -2003-09-03 Marcus Brinkmann - - Released 0.4. - - * src/gpg-error.h: Define GPG_ERR_INLINE to nothing if the - compiler does not implement C99. - * configure.ac: (AC_INIT): Bump up version number. - -2003-09-02 Moritz Schulte - - * src/gpg-error.h (gpg_err_code_t): Added: GPG_ERR_NO_PRIME. - * src/err-codes.h.in: Likewise. - -2003-08-19 Marcus Brinkmann - - * src/gpg-error.h (GPG_ERR_SYSTEM_ERROR): Fix value (should have - been 2^15, was 2^14). - (GPG_ERR_CODE_DIM): Fix value (should have been 65536, was 32768). - Change the error codes of all system errors to have the - GPG_ERR_SYSTEM_ERROR bit set. - -2003-08-06 Marcus Brinkmann - - * code-from-errno.c, code-to-errno.c, err-codes.h.in, - err-sources.h.in, errnos.in, gpg-error.h, strerror.c, strsource.c: - Fix typo in copyright notice. - -2003-07-31 Marcus Brinkmann - - * README: Clarify copyright conditions. - * src/mkstrtable.awk: Don't claim in the copyright information - that this program is part of libgpg-error. - * src/mkerrnos.awk: Likewise. - * src/mkerrcodes1.awk: Likewise. - * src/mkerrcodes2.awk: Likewise. - -2003-07-31 Marcus Brinkmann - - * src/strerror.c (gpg_strerror): Use CODE, not ERR to map error - code to errno. - - * configure.ac (AC_INIT): Bump version to 0.3. - - Released 0.3. - -2003-07-30 Marcus Brinkmann - - * configure.ac (AC_INIT): Bump version to 0.2. - - Released 0.2. - -2003-07-17 Werner Koch - - * src/gpg-error.h: Add HARDWARE, PIN_BLOCKED and USE_CONDITIONS. - -2003-07-16 Moritz Schulte - - * src/gpg-error.h (gpg_err_code): Cast return value to - gpg_err_code_t. Thanks to Ralf Schneider - . - (gpg_err_source): Cast return value to gpg_err_source_t. Thanks - to Ralf Schneider . - -2003-07-15 Moritz Schulte - - * src/gpg-error.m4 (AM_PATH_GPG_ERROR): Use `0.0' instead of - `0.0.0' in case no version number is given, since the following - sed commands expect the former form, not a triplet. - -2003-07-06 Marcus Brinkmann - - * src/gpg-error.h (GPG_ERR_INLINE): Define macro. Use it instead - of __inline__ in this file. - -2003-06-30 Werner Koch - - * src/gpg-error.h: Add WRONG_CARD. - -2003-06-22 Marcus Brinkmann - - * src/gpg-error.h: Fix value of GPG_ERR_CANCELED. - -2003-06-06 Marcus Brinkmann - - * configure.ac: Define GPG_ERROR_CONFIG_LIBS and - GPG_ERROR_CONFIG_CFLAGS. - Add src/gpg-error-config to config files. - * src/Makefile.am (EXTRA_DIST): Add gpg-error-config.in and - gpg-error.m4. - (bin_SCRIPTS): New variable. - (m4datadir, m4data_DATA): New variables. - * src/gpg-error-config.in: New file. - * src/gpg-error.m4: New file. - - Released 0.1. - -2003-06-05 Marcus Brinkmann - - * src/gpg-error.h (gpg_err_make_from_errno): Fix implementation. - - * src/gpg-error.h (gpg_err_code_t): Add GPG_ERR_SIG_EXPIRED. - (err-codes.h.in): Likewise. - - * src/gpg-error.h (gpg_error_from_errno): Change return type to - gpg_error_t. - -2003-06-04 Marcus Brinkmann - - * src/gpg-error.h (gpg_err_code_t): Add GPG_ERR_INV_ENGINE, - GPG_ERR_PUBKEY_NOT_TRUSTED, GPG_ERR_DECRYPT_FAILED, - GPG_ERR_KEY_EXPIRED. - (gpg_make_error): Rename to gpg_err_make. - (gpg_error): Use here. - * tests/t-strerror.c (main): And here. - (gpg_make_error_from_errno): Rename to gpg_err_make_from_errno. - - * src/gpg-error.h (gpg_make_error_from_errno): New inline function. - (gpg_error_from_errno): Likewise. - - * src/code-from-errno.c (gpg_err_code_from_errno): Handle the case - of no error at all. - -2003-06-04 Marcus Brinkmann - - * src/gpg-error.h (gpg_err_source_t): Add GPG_ERR_SOURCE_USER_1 to - GPG_ERR_SOURCE_USER_4. - (gpg_err_code_t): Add GPG_ERR_USER_1 to GPG_ERR_USER_16. - * src/err-sources.h.in: Likewise. - * src/err-codes.h.in: Likewise. - - * src/gpg-error.h: Rename GPG_ERR_INVALID_RESPONSE to - GPG_ERR_INV_RESPONSE, GPG_ERR_INVALID_CARD to GPG_ERR_INV_CARD, - GPG_ERR_INVALID_INDEX to GPG_ERR_INV_INDEX, GPG_ERR_INVALID_ID to - GPG_ERR_INV_ID, GPG_ERR_AGENT_ERROR to GPG_ERR_AGENT, - GPG_ERR_ASSUAN_ERROR to GPG_ERR_ASSUAN, GPG_ERR_PIN_ENTRY_ERROR to - GPG_ERR_PIN_ENTRY, GPG_ERR_DIRMNGR_ERROR to GPG_ERR_DIRMNGR, - GPG_ERR_CARD_ERROR to GPG_ERR_CARD, GPG_ERR_CONFIGURATION_ERROR to - GPG_ERR_CONFIGURATION, GPG_ERR_SCDAEMON_ERROR to GPG_ERR_SCDAEMON. - -2003-06-03 Werner Koch - - * src/gpg-error.h, src/err-codes.h.in: Add codes for TIMEOUT, - INV_HANDLE, NOTHING_FOUND, WRONG_BLOB_TYPE and MISSING_VALUE. - * src/gpg-error.h, src/err-sources.h.in: Add KEYBOX which is the - keybox subsystem of GnuPG. - -2003-06-02 Moritz Schulte - - * src/gpg-error.h: Fix description of gpg_err_code_to_errno - (i.e. substitute `ERR' with `CODE'). - * src/code-to-errno.c: Likewise. - - * tests/t-strerror.c: Include instead of - . - -2003-06-01 Marcus Brinkmann - - * src/strerror.c: Include . - - * src/gpg-error.h (gpg_err_code_t): Remove GPG_ERR_FILE_READ, - GPG_ERR_FILE_WRITE, GPG_ERR_FILE_OPEN, GPG_ERR_FILE_CREATE, - GPG_ERR_FILE_CLOSE, GPG_ERR_FILE_DELETE, GPG_ERR_FILE_EXISTS, - GPG_ERR_FILE, GPG_ERR_IO, GPG_ERR_OUT_OF_CORE, GPG_ERR_READ_ERROR, - GPG_ERR_WRITE_ERROR. - * src/err-codes.h.in: Likewise. - - * src/Makefile.am (EXTRA_DIST): Add err-sources.h and err-codes.h. - - * src/mkerrcodes1.awk: New file. - * src/mkerrcodes2.awk: New file. - * src/mkerrnos.awk: New file. - * src/errnos.in: New file. - * src/code-from-errno.c: New file. - * src/code-to-errno.c: New file. - * src/Makefile.am (libgpg_error_la_SOURCES): Remove err-sources.h - and err-codes.h. Add code-to-errno.c and code-from-errno.c. - (code-to-errno.h): New target. - (code-from-errno.h): Likewise. - (EXTRA_DIST): Add mkerrnos.awk, errnos.in, and mkerrcodes1.awk. - (BUILT_SOURCES): Add code-to-errno.h and code-from-errno.h. - (CLEANFILES): Likewise. - * src/strerror.c (gpg_strerror): Use strerror for system errors. - * src/err-codes.h.in: Add 16382 (Unknown system error). - * src/gpg-error.h (gpg_err_code_t): Add system errors. - (GPG_ERR_CODE_DIM): Change to 32768. - (GPG_ERR_SYSTEM_ERROR): New macro. - (gpg_err_code_from_errno): New prototype. - (gpg_err_code_to_errno): Likewise. - - * src/Makefile.am (nobase_include_HEADERS): Rename target to ... - (include_HEADERS): ... this. Change file to gpg-error.h - (libgpg_error_la_SOURCES): Change gpg/error.h to gpg-error.h. - * src/gpg/error.h: Move to ... - * src/gpg-error.h: ... here. New file. - * src/strerror.c: Include , not . - * src/strsource.c: Likewise. - - * src/gpg/error.h (gpg_error_t): Change type to unsigned int, not - long. - -2003-05-26 Marcus Brinkmann - - * src/gpg/error.h (gpg_make_error): Only OR in the error source if - there is an error, this allows to test for success with "if (!err)" - and similar tests. - -2003-05-15 Marcus Brinkmann - - * src/mkstrtable.awk: Add exception clause to license about the - output of the script. - * configure.ac: Change license to LGPL 2.1 or later. - * Makefile.am: Likewise. - * src/Makefile.am: Likewise. - * src/err-codes.h.in: Likewise. - * src/err-sources.h.in: Likewise. - * src/strsource.c: Likewise. - * src/strerror.c: Likewise. - * src/gpg/error.h: Likewise. - * tests/Makefile.am: Likewise. - - * src/mkstrtable.awk: New variable HEADER. Copy input until first - line with an actual code and description occurs. - * src/err-codes.h.in: Uncomment license, so it is copied into the - output. - * src/err-sources.h.in: Likewise. - -2003-05-15 Marcus Brinkmann - - * COPYING.LIB: New file. - -2003-05-15 Marcus Brinkmann - - * Initial check-in. - - Copyright 2003, 2004, 2005, 2006, 2007, 2010, 2011 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 - 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. +Local Variables: +buffer-read-only: t +mode: text +End: diff --git a/ChangeLog b/ChangeLog-2011 similarity index 99% copy from ChangeLog copy to ChangeLog-2011 index b838b86..474164c 100644 --- a/ChangeLog +++ b/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-11-28 Jim Meyering accept --with-libgpg-error-prefix as well as --with-gpg-error-prefix diff --git a/Makefile.am b/Makefile.am index d0d3000..e92925b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,18 +1,18 @@ # Makefile.am for libgpg-error. # Copyright (C) 2003, 2006, 2007 g10 Code GmbH -# +# # This file is part of libgpg-error. -# +# # libgpg-error 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. -# +# # libgpg-error is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. -# +# # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA @@ -20,8 +20,11 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = dist-bzip2 -EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in COPYING COPYING.LIB \ - potomo +EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in \ + COPYING COPYING.LIB potomo doc/HACKING ChangeLog-2011 \ + po/ChangeLog-2011m4/ChangeLog-2011 contrib/ChangeLog-2011 \ + build-aux/gitlog-to-changelog build-aux/git-log-footer \ + build-aux/git-log-fix if LANGUAGES_SOME lang_subdirs = lang @@ -32,11 +35,26 @@ endif SUBDIRS = m4 src tests po $(lang_subdirs) -dist-hook: +dist-hook: gen-ChangeLog sed -e 's/@pkg_version@/$(VERSION)/g' \ $(top_srcdir)/libgpg-error.spec.in > $(distdir)/libgpg-error.spec @set -e; echo "$(VERSION)" > $(distdir)/VERSION + +gen_start_date = 2011-12-01T00:00:00 +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d $(top_srcdir)/.git; then \ + (cd $(top_srcdir) && \ + ./build-aux/gitlog-to-changelog \ + --amend=build-aux/git-log-fix \ + --since=$(gen_start_date) ) > $(distdir)/cl-t; \ + cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi + + if HAVE_W32_SYSTEM install-data-hook: set -e; \ @@ -49,6 +67,6 @@ install-data-hook: done endif -stowinstall: +stowinstall: $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgpg-error diff --git a/build-aux/git-log-fix b/build-aux/git-log-fix new file mode 100644 index 0000000..af702fe --- /dev/null +++ b/build-aux/git-log-fix @@ -0,0 +1,3 @@ +# This file is expected to be used via gitlog-to-changelog's --amend=FILE +# option. It specifies what changes to make to each given SHA1's commit +# log and metadata, using Perl-eval'able expressions. diff --git a/build-aux/git-log-footer b/build-aux/git-log-footer new file mode 100644 index 0000000..c31fe93 --- /dev/null +++ b/build-aux/git-log-footer @@ -0,0 +1,14 @@ + +2011-12-01 Werner Koch + + NB: Changes done before December 1st, 2011 are described in + per directory files named ChangeLog-2011. See doc/HACKING for + details. + + ----- + Copyright (C) 2011 Free Software Foundation, Inc. + + Copying and distribution of this file and/or the original GIT + commit log messages, with or without modification, are + permitted provided the copyright notice and this notice are + preserved. diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..40a8035 --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,345 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2011-11-02 07:53'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2011 Free Software Foundation, Inc. + +# 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 3 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, see . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try `$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on +a line) referring to a commit in the current project, and CODE refers to one +or more consecutive lines of Perl code. Pairs must be separated by one or +more blank line. + +Here is sample input for use with --amend=FILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert , + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = )) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + ) or usage 1; + + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = (qw (git log --log-size), + '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = ) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest = $_; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); + + # Format 'Co-authored-by: A U Thor ' lines in + # standard multi-author ChangeLog format. + my @coauthors = grep /^Co-authored-by:.*$/, @line; + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If this header would be the same as the previous date/name/email/ + # coauthors header, then arrange not to print it. + if ($date_line ne $prev_date_line or "@coauthors" ne "@prev_coauthors") + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line = $date_line; + @prev_coauthors = @coauthors; + + # Omit "Co-authored-by..." and "Signed-off-by..." lines. + @line = grep !/^Signed-off-by: .*>$/, @line; + @line = grep !/^Co-authored-by: /, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/contrib/ChangeLog b/contrib/ChangeLog deleted file mode 100644 index c109306..0000000 --- a/contrib/ChangeLog +++ /dev/null @@ -1,19 +0,0 @@ -2010-11-15 Marcus Brinkmann - - * conf-w32ce-msc/stdint.h: New file. - * conf-w32ce-msc/build.mk (conf_sources): Add stdint.h. - -2010-11-15 Werner Koch - - * conf-w32ce-msc/build.mk (clean): New. - -2010-11-02 Werner Koch - - * conf-w32ce-msc/build.mk: Change directory layout. Provide - install target. - -2010-10-28 Werner Koch - - * contrib/conf-w32ce-msc/build.mk: New. - * contrib/conf-w32ce-msc/config.h: New. - diff --git a/contrib/ChangeLog-2011 b/contrib/ChangeLog-2011 new file mode 100644 index 0000000..87c1aa4 --- /dev/null +++ b/contrib/ChangeLog-2011 @@ -0,0 +1,25 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + +2010-11-15 Marcus Brinkmann + + * conf-w32ce-msc/stdint.h: New file. + * conf-w32ce-msc/build.mk (conf_sources): Add stdint.h. + +2010-11-15 Werner Koch + + * conf-w32ce-msc/build.mk (clean): New. + +2010-11-02 Werner Koch + + * conf-w32ce-msc/build.mk: Change directory layout. Provide + install target. + +2010-10-28 Werner Koch + + * contrib/conf-w32ce-msc/build.mk: New. + * contrib/conf-w32ce-msc/config.h: New. diff --git a/doc/HACKING b/doc/HACKING new file mode 100644 index 0000000..e30b2f8 --- /dev/null +++ b/doc/HACKING @@ -0,0 +1,25 @@ +# HACKING -*- org -*- +#+TITLE: Various hacking notes +#+STARTUP: showall + +* No more ChangeLog files + + Do not modify any of the ChangeLog files in Libgpg-error. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist" time. As such, there are strict requirements on the + form of the commit log messages. The old ChangeLog files have all + be renamed to ChangeLog-2011 + + +* Commit log requirements + + Your commit log should always start with a one-line summary, the + second line should be blank, and the remaining lines are usually + ChangeLog-style entries for all affected files. However, it's fine + -- even recommended -- to write a few lines of prose describing the + change, when the summary and ChangeLog entries don't give enough of + the big picture. Omit the leading TABs that you're used to seeing + in a "real" ChangeLog file, but keep the maximum line length at 72 + or smaller, so that the generated ChangeLog lines, each with its + leading TAB, will not exceed 80 columns. diff --git a/m4/ChangeLog b/m4/ChangeLog-2011 similarity index 93% rename from m4/ChangeLog rename to m4/ChangeLog-2011 index 10adb6c..d803b60 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2010-09-16 gettextize * gettext.m4: Upgrade to gettext-0.17. @@ -104,4 +111,3 @@ * uintmax_t.m4: New file, from gettext-0.11.5. * ulonglong.m4: New file, from gettext-0.11.5. * Makefile.am: New file. - diff --git a/po/ChangeLog b/po/ChangeLog-2011 similarity index 91% rename from po/ChangeLog rename to po/ChangeLog-2011 index 46959ce..ddc40f9 100644 --- a/po/ChangeLog +++ b/po/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2010-09-16 Jakub Bogusz (wk) * pl.po: Update. ----------------------------------------------------------------------- Summary of changes: .gitignore | 39 ++ ChangeLog | 1212 +------------------------------------- ChangeLog => ChangeLog-2011 | 7 + Makefile.am | 34 +- build-aux/git-log-fix | 3 + build-aux/git-log-footer | 14 + build-aux/gitlog-to-changelog | 345 +++++++++++ configure.ac | 9 +- contrib/ChangeLog | 19 - contrib/ChangeLog-2011 | 25 + doc/HACKING | 25 + m4/{ChangeLog => ChangeLog-2011} | 8 +- po/{ChangeLog => ChangeLog-2011} | 7 + po/remove-potcdate.sed | 11 - 14 files changed, 514 insertions(+), 1244 deletions(-) copy ChangeLog => ChangeLog-2011 (99%) create mode 100644 build-aux/git-log-fix create mode 100644 build-aux/git-log-footer create mode 100755 build-aux/gitlog-to-changelog delete mode 100644 contrib/ChangeLog create mode 100644 contrib/ChangeLog-2011 create mode 100644 doc/HACKING rename m4/{ChangeLog => ChangeLog-2011} (93%) rename po/{ChangeLog => ChangeLog-2011} (91%) delete mode 100644 po/remove-potcdate.sed hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Thu Dec 1 19:06:18 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 01 Dec 2011 19:06:18 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-139-g29e96e6 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 29e96e6b9a8e68e6554dd48bc2ce68ae9525d29f (commit) from 2336b09779d313c1594acf6df3bd8a8486e90458 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 29e96e6b9a8e68e6554dd48bc2ce68ae9525d29f Author: Werner Koch Date: Thu Dec 1 18:13:44 2011 +0100 Add hook to check the commit log syntax. * autogen.sh: Install commit-msg hook for git. diff --git a/autogen.sh b/autogen.sh index 8a424bc..0ec134d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -296,6 +296,13 @@ EOF git config --add filter.cleanpo.clean \ "awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" fi + if [ -f scripts/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then + cat <&2 +*** Activating commit log message check hook. *** +EOF + cp -av scripts/git-hooks/commit-msg .git/hooks/commit-msg + chmod -c +x .git/hooks/commit-msg + fi fi echo "Running aclocal -I m4 -I gl/m4 ${ACLOCAL_FLAGS:+$ACLOCAL_FLAGS }..." diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg new file mode 100755 index 0000000..5a697c7 --- /dev/null +++ b/scripts/git-hooks/commit-msg @@ -0,0 +1,127 @@ +eval '(exit $?0)' && eval 'exec perl -w "$0" ${1+"$@"}' + & eval 'exec perl -w "$0" $argv:q' + if 0; + +# An hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, copy it to "~/.git/hooks/commit-msg". +# +# This script is based on the one from GNU coreutils. + +use strict; +use warnings; +(my $ME = $0) =~ s|.*/||; + +my $editor = $ENV{EDITOR} || 'vi'; +$ENV{PATH} = '/bin:/usr/bin'; + +# Rewrite the $LOG_FILE (old contents in @$LINE_REF) with an additional +# commented diagnostic "# $ERR" line at the top. +sub rewrite($$$) +{ + my ($log_file, $err, $line_ref) = @_; + local *LOG; + open LOG, '>', $log_file + or die "$ME: $log_file: failed to open for writing: $!"; + print LOG "# $err"; + print LOG @$line_ref; + close LOG + or die "$ME: $log_file: failed to rewrite: $!\n"; +} + +sub re_edit($) +{ + my ($log_file) = @_; + + warn "Interrupt (Ctrl-C) to abort...\n"; + + system 'sh', '-c', "$editor $log_file"; + ($? & 127) || ($? >> 8) + and die "$ME: $log_file: the editor ($editor) failed, aborting\n"; +} + +# Given a $LOG_FILE name and a \@LINE buffer, +# read the contents of the file into the buffer and analyze it. +# If the log message passes muster, return the empty string. +# If not, return a diagnostic. +sub check_msg($$) +{ + my ($log_file, $line_ref) = @_; + + local *LOG; + open LOG, '<', $log_file + or return "failed to open for reading: $!"; + @$line_ref = ; + close LOG; + + my @line = @$line_ref; + chomp @line; + + # Don't filter out blank or comment lines; git does that already, + # and if we were to ignore them here, it could lead to committing + # with lines that start with "#" in the log. + + # Filter out leading blank and comment lines. + # while (@line && $line[0] =~ /^(?:#.*|[ \t]*)$/) { shift @line; } + + # Filter out blank and comment lines at EOF. + # while (@line && $line[$#line] =~ /^(?:#.*|[ \t]*)$/) { pop @line; } + + @line == 0 + and return 'no log message'; + + # The first line should not be too short + 8 < length $line[0] || return 'summary line too short'; + + # The first line should not start with an asterisk or a hash sign. + # An asterisk might indicate that a change entry was started right + # at the first line. + $line[0] =~ /^[*#]/ && return "summary line starts with an * or #"; + + # Second line should be blank or not present. + 2 <= @line && length $line[1] + and return 'second line must be empty'; + + # Limit line length to allow for the ChangeLog's leading TAB. + foreach my $line (@line) + { + 72 < length $line && $line =~ /^[^#]/ + and return 'line longer than 72 characters'; + } + + return ''; +} + +{ + @ARGV == 1 + or die; + + my $log_file = $ARGV[0]; + + while (1) + { + my @line; + my $err = check_msg $log_file, \@line; + $err eq '' + and last; + $err = "$ME: $err\n"; + warn $err; + exit 1; + + # Insert the diagnostic as a comment on the first line of $log_file. + #rewrite $log_file, $err, \@line; + #re_edit $log_file; + # + ## Stop if our parent is killed. + #getppid() == 1 + # and last; + } +} + +# Local Variables: +# mode: perl +# End: ----------------------------------------------------------------------- Summary of changes: autogen.sh | 7 ++ scripts/git-hooks/commit-msg | 127 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 0 deletions(-) create mode 100755 scripts/git-hooks/commit-msg hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Dec 1 23:47:18 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 01 Dec 2011 23:47:18 +0100 Subject: [git] Assuan - branch, master, updated. libassuan-2.0.2-5-g165a57d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 165a57d29d2ac84159aa48b171b6098c629bc798 (commit) from 2e037baefdc40da6961721ad56fc7c38d4e492a8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 165a57d29d2ac84159aa48b171b6098c629bc798 Author: Werner Koch Date: Thu Dec 1 22:53:03 2011 +0100 Generate the ChangeLog from commit logs. * build-aux/gitlog-to-changelog: New script. Taken from gnulib. * build-aux/git-log-fix: New file. * build-aux/git-log-footer: New file. * doc/HACKING: New file. * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. * autogen.sh: Install commit-msg hook for git. Rename all ChangeLog files to ChangeLog-2011. diff --git a/ChangeLog b/ChangeLog index ee8e140..34fda85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,438 +1,16 @@ -2011-11-28 Jim Meyering +No more ChangeLog files +======================== - accept --with-libgpg-error-prefix as well as --with-gpg-error-prefix - * m4/gpg-error.m4: Update from git master. +Do not modify any of the ChangeLog files in Libassuan. Starting on +December 1st, 2011 we put change information only in the GIT commit +log, and generate a top-level ChangeLog file from logs at "make dist" +time. As such, there are strict requirements on the form of the +commit log messages. See doc/HACKING for details. The old ChangeLog +files have all be renamed to ChangeLog-2011. -2011-08-10 Werner Koch - * configure.ac: Use http://bugs.gnupg.org as bug reporting - address. Fix new autoconf warnings. - Update libtool to version 2.4. - - * config.guess, config.sub: Update to version 2011-06-03. - -2011-06-16 Marcus Brinkmann - - Release 2.0.2 - - * configure.ac: Set LT version to C2/A2/R0. - -2011-04-20 Werner Koch - - * Makefile.am (EXTRA_DIST): s/README.SVN/README.GIT/ - -2011-04-06 Werner Koch - - * autogen.sh: Check the git setup. Add option --build-w64. - * configure.ac (HAVE_W64_SYSTEM): Define. - (LIBGCRYPT_CONFIG_HOST): New. - - * m4/gpg-error.m4: Update from current libgpg-error repo. - -2011-03-28 Werner Koch - - * configure.ac (AC_CHECK_HEADERS): Check for sys/select.h which is - needed by one test utility. - -2010-12-23 Werner Koch - - * configure.ac: Add a git commit identifier to the version. - -2010-11-01 Marcus Brinkmann - - * configure.ac: Check for fcntl.h. - -2010-11-01 Werner Koch - - * configure.ac: Check for sys/types.h, sys/stat.h, sys/time and - unistd.h - -2010-08-19 Werner Koch - - * configure.ac (AH_TOP, AH_BOTTOM): New. Define - GPG_ERR_ENABLE_ERRNO_MACROS. - -2010-08-09 Werner Koch - - Release 2.0.1 - - * configure.ac: Set LT version to C1/A1/R0. - -2010-04-20 Werner Koch - - * configure.ac: Change wording of the no-funopen warning. - -2010-03-22 Werner Koch - - * configure.ac (CC_FOR_BUILD): Add test. - -2010-03-17 Werner Koch - - * tests/ChangeLog: New. Move all relevant entries to there. - -2010-02-25 Werner Koch - - * m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): Fix for non x86 mingw - targets. - -2010-02-11 Werner Koch - - * configure.ac (inet_pton): Check for it. - -2010-02-04 Werner Koch - - * configure.ac (AC_TYPE_UINT16_T): New. - -2010-01-26 Werner Koch - - * configure.ac (NETLIBS) [W32CE]: Use -lws2. - -2010-01-22 Werner Koch - - * configure.ac: Require libgpg-error 1.8. - (HAVE_W32CE_SYSTEM): New am_defines and am_conditionals. - * ltmain.sh (wrappers_required): Don't set for mingw32ce. - * autogen.sh: Add option --build-w32ce. Remove --disable-shared - from --build-w32. - -2010-01-08 Marcus Brinkmann - - Released 2.0.0. - -2010-01-05 Marcus Brinkmann - - * configure.ac (_DARWIN_C_SOURCE): Define on frapple. - -2009-12-22 Marcus Brinkmann - - * configure.ac: Do not use echo -n. - -2009-12-15 Marcus Brinkmann - - * configure.ac: Bump version to 2.0.0. - -2009-10-16 Marcus Brinkmann - - * autogen.sh: Remove --with-pth-prefix from configure invocation. - * configure.ac (_ASSUAN_IN_LIBASSUAN, PTH_SYSCALL_SOFT): Do not - set anymore. - (GNUPG_PATH_PTH): Don't invoke. - (HAVE_PTH): Remove conditional. - (LIBASSUAN_CONFIG_THREAD_MODULES): Removed. - -2009-10-08 Marcus Brinkmann - - * configure.ac: AC_REPLACE_FUNCS for vasprintf. - -2009-09-19 Marcus Brinkmann - - * configure.ac: Check for stdint.h and inttypes.h. Invoke - AC_TYPE_UINTPTR_T. - -2009-09-08 Marcus Brinkmann - - * m4/gpg-error.m4: New file. - -2009-09-01 Marcus Brinkmann - - * configure.ac: Set BUILD_REVISION and update calculation of data - for build info. Update libtool macros. Set NETLIBS for W32 - targets. - -2009-08-26 Marcus Brinkmann - - * configure.ac: Test for versioned symbols support. - (LIBASSUAN_LT_CURRENT, LIBASSUAN_LT_AGE) - (LIBASSUAN_LT_REVISION): New, set to 0. - (LIBASSUAN_CONFIG_API_VERSION): Bump to 2. - (AC_CONFIG_MACRO_DIR, AC_DISABLE_STATIC, AC_LIBTOOL_WIN32_DLL) - (AC_LIBTOOL_RC, AC_PROG_LIBTOOL, AM_PATH_GPG_ERROR): Invoke. - (AC_PROG_RANLIB): Don't invoke. - (HAVE_W32_SYSTEM): New AM conditional. - (AC_CONFIG_FILES): Add src/versioninfo.rc. - * ltmain.sh, m4/libtool.m4, m4/ltoptions.m4, m4/ltsugar.m4, - m4/ltversion.m4, m4/lt~obsolete.m4: New files from libtool 2.2.6. - -2009-01-22 Werner Koch - - * configure.ac: Check for nanoleep only in libc. - -2008-05-25 Werner Koch - - Released 1.0.5. - -2008-05-23 Werner Koch - - * configure.ac: Use -fPIC with GCC under Linux. - -2007-12-12 Werner Koch - - Released 1.0.4. - - * config.sub, config.guess: Update to version 2007-11-19. - -2007-08-24 Werner Koch - - Released 1.0.3. - - Switched license of the library code back to LGPLv2.1. See NEWS. - - * COPYING.LIB: Replaced by LPGLv2.1 - -2007-07-05 Werner Koch - - Released 1.0.2. - - Relicensed to LGPLv3. - - * COPYING: Replaced by GPLv3. - * COPYING.LESSER: Removed. - * COPYING.LIB: New. - - * Makefile.am (ACLOCAL_AMFLAGS): Do not create gzipped tarball. - -2007-07-03 Werner Koch - - * configure.ac (NETLIBS): Use ws2_32 instead of wsock32. - -2007-06-15 Werner Koch - - * autogen.sh: Use = and not == in test to be POSIXly correct. - Change shell back to /bin/sh. - -2007-06-15 Marcus Brinkmann - - * autogen.sh: Require bash. - -2007-05-30 Werner Koch - - * autogen.sh <--build-w32>: Modernize. - -2007-05-29 Werner Koch - - * configure.ac: Require automake 1.10 and autoconf 2.61. - (AM_PROG_CC_C_O): New. Error out if no C-89 cc is installed. - (gl_HEADER_SYS_SOCKET): Explicitly add this for documentation. - -2007-05-24 Werner Koch - - * configure.ac: Use -Wpointer-arith is possible. - -2006-11-22 Werner Koch - - Released 1.0.1. - -2006-11-21 Werner Koch - - * configure.ac (AH_BOTTOM): Define PTH_SYSCALL_SOFT to 0. - (AC_INIT): Use the SVN magic. - - * m4/gnupg-pth.m4 (GNUPG_PTH_VERSION_CHECK): Use --all with - pth-config. - -2006-11-15 Werner Koch - - * autogen.sh: Add convenience option --build-amd64. - -2006-10-31 Werner Koch - - Released 1.0.0. - -2006-10-20 Werner Koch - - * Makefile.am (stowinstall): New convenience target. - -2006-10-10 Werner Koch - - Released 0.9.3. - - * configure.ac: Check for cmsghdr. - (USE_DESCRIPTOR_PASSING): Define it then. - -2006-10-09 Werner Koch - - * m4/gnupg-pth.m4: New. Taked from GnuPG. - -2006-10-04 Werner Koch - - Released 0.9.2. - -2006-10-04 Werner Koch - - Released 0.9.1. - - * configure.ac (AB_INIT): New. - - * m4/autobuild.m4: New. - -2006-09-14 Werner Koch - - Released 0.9.0. - - * configure.ac: Check for S_PEERCRED. Include check for socklen_t. - * m4/sys_socket_h.m4, m4/onceonly.m4, m4/socklen.m4: New. - * m4/Makefile.am: New. - -2006-09-05 Werner Koch - - * configure.ac (AH_BOTTOM): Define _ASSUAN_IN_LIBASSUAN. - -2005-10-24 Werner Koch - - * COPYING.LESSER: Added. - * README.CVS: Renamed to .. - * README.SVN: .. this. - -2005-10-08 Marcus Brinkmann - - * configure.ac: Check for socket library and add it to - LIBASSUAN_CONFIG_LIBS if necessary. - -2005-10-07 Marcus Brinkmann - - * configure.ac: Invoke AC_CANONICAL_HOST. Define _XOPEN_SOURCE, - _XOPEN_SOURCE_EXTENDED and __EXTENSIONS__ on Solaris. - Add stpcy as replacement function. - Add setenv as replacement function (and check for unistd.h). - -2005-06-20 Werner Koch - - Released 0.6.10. - -2004-12-22 Werner Koch - - Released 0.6.9. - - For security reasons switched to automake 1.9. - -2004-12-18 Werner Koch - - * autogen.sh: Add Option --build-w32. - -2004-12-07 Werner Koch - - * configure.ac: Define HAVE_W32_SYSTEM and HAVE_DOSISH_SYSTEM. - Add -lwsock2 to the config lib flags for W32. - -2004-11-25 Werner Koch - - Released 0.6.8. - -2004-09-27 Werner Koch - - * config.sub, config.guess: Updated. - -2004-06-23 Marcus Brinkmann - - * configure.ac: Check for . - -2004-06-08 Werner Koch - - Released 0.6.6. - -2004-04-02 Thomas Schwinge - - * autogen.sh: Added ACLOCAL_FLAGS. - -2004-02-20 Werner Koch - - Released 0.6.4. - -2004-02-11 Werner Koch - - * autogen.sh (check_version): Removed bashism and simplified. - -2004-01-29 Werner Koch - - Released 0.6.3. - -2003-12-18 Werner Koch - - Released 0.6.2. - -2003-12-08 Werner Koch - - * TODO: New. - * Makefile.am: Add README.CVS and autogen.sh. Removed m4/Makefile. - * README.CVS: New. - * autogen.sh: Revamped. - * configure.ac: Add automake version number for autogen.sh use. - -2003-11-17 Werner Koch - - Released 0.6.1. - -2003-08-06 Werner Koch - - Released 0.6.0. - -2003-07-29 Werner Koch - - * configure.ac: Cleanups for newer autoconf. - -2003-07-29 gettextize - - * Makefile.am (EXTRA_DIST): Add config.rpath. - * configure.ac (AC_CONFIG_FILES): Add po/Makefile.in, - -2003-04-28 gettextize - - * Makefile.am (SUBDIRS): Add m4. - (ACLOCAL_AMFLAGS): New variable. - (EXTRA_DIST): New variable. - * configure.ac (AC_CONFIG_FILES): Add po/Makefile.in, - -2003-02-18 Neal H. Walfield - - * COPYING: New file. - -2003-02-18 Neal H. Walfield - - * configure.ac: Fix typo. - (AC_CONFIG_FILES): Remove common/Makefile.am. - * common: Remove directory. - -2003-02-18 Neal H. Walfield - - * common: New directory. - * Makefile.am (SUBDIRS): Add common. - - * configure.ac: Check for funopen. If not present, check for - fopencookie and implement it in terms of that. Otherwise, fail. - (AC_CONFIG_FILES): Add common/Makefile. - -2003-02-18 Neal H. Walfield - - * configure.ac (AC_CONFIG_FILES): Add src/libassuan-config. - (LIBASSUAN_CONFIG_LIBS, LIBASSUAN_CONFIG_CFLAGS): New variables. - AC_SUBST them. - -2003-02-17 Neal H. Walfield - - * AUTHORS: New file. - * INSTALL: New file. - * Makefile.am: New file. - * NEWS: New file. - * README: New file. - * autogen.sh: New file, copied from newpg. - * configure.ac: New file, imported from newpg. - * depcomp: New file. - * install-sh: New file. - * missing: New file. - * mkinstalldirs: New file. - - * doc: New directory. - * src: New directory. - * tests: New directory. - - - Copyright 2003, 2004, 2005, 2006, 2007, 2010 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. +Local Variables: +buffer-read-only: t +mode: text +End: diff --git a/ChangeLog b/ChangeLog-2011 similarity index 97% copy from ChangeLog copy to ChangeLog-2011 index ee8e140..f8a5dfc 100644 --- a/ChangeLog +++ b/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-11-28 Jim Meyering accept --with-libgpg-error-prefix as well as --with-gpg-error-prefix diff --git a/Makefile.am b/Makefile.am index 55040e7..e7eeee5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,14 +21,32 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip -EXTRA_DIST = config.rpath autogen.sh README.GIT +EXTRA_DIST = config.rpath autogen.sh README.GIT \ + ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \ + tests/ChangeLog-2011 contrib/ChangeLog-2011 \ + build-aux/gitlog-to-changelog build-aux/git-log-footer \ + build-aux/git-log-fix SUBDIRS = m4 src doc tests -dist-hook: +dist-hook: gen-ChangeLog echo "$(VERSION)" > $(distdir)/VERSION +gen_start_date = 2011-12-01T00:00:00 +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d $(top_srcdir)/.git; then \ + (cd $(top_srcdir) && \ + ./build-aux/gitlog-to-changelog \ + --amend=build-aux/git-log-fix \ + --since=$(gen_start_date) ) > $(distdir)/cl-t; \ + cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi + + stowinstall: $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libassuan diff --git a/autogen.sh b/autogen.sh index 30a247a..42e00d5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -261,6 +261,13 @@ EOF cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit chmod -c +x .git/hooks/pre-commit fi + if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then + cat <&2 +*** Activating commit log message check hook. *** +EOF + cp -av build-aux/git-hooks/commit-msg .git/hooks/commit-msg + chmod -c +x .git/hooks/commit-msg + fi fi diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg new file mode 100755 index 0000000..5a697c7 --- /dev/null +++ b/build-aux/git-hooks/commit-msg @@ -0,0 +1,127 @@ +eval '(exit $?0)' && eval 'exec perl -w "$0" ${1+"$@"}' + & eval 'exec perl -w "$0" $argv:q' + if 0; + +# An hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, copy it to "~/.git/hooks/commit-msg". +# +# This script is based on the one from GNU coreutils. + +use strict; +use warnings; +(my $ME = $0) =~ s|.*/||; + +my $editor = $ENV{EDITOR} || 'vi'; +$ENV{PATH} = '/bin:/usr/bin'; + +# Rewrite the $LOG_FILE (old contents in @$LINE_REF) with an additional +# commented diagnostic "# $ERR" line at the top. +sub rewrite($$$) +{ + my ($log_file, $err, $line_ref) = @_; + local *LOG; + open LOG, '>', $log_file + or die "$ME: $log_file: failed to open for writing: $!"; + print LOG "# $err"; + print LOG @$line_ref; + close LOG + or die "$ME: $log_file: failed to rewrite: $!\n"; +} + +sub re_edit($) +{ + my ($log_file) = @_; + + warn "Interrupt (Ctrl-C) to abort...\n"; + + system 'sh', '-c', "$editor $log_file"; + ($? & 127) || ($? >> 8) + and die "$ME: $log_file: the editor ($editor) failed, aborting\n"; +} + +# Given a $LOG_FILE name and a \@LINE buffer, +# read the contents of the file into the buffer and analyze it. +# If the log message passes muster, return the empty string. +# If not, return a diagnostic. +sub check_msg($$) +{ + my ($log_file, $line_ref) = @_; + + local *LOG; + open LOG, '<', $log_file + or return "failed to open for reading: $!"; + @$line_ref = ; + close LOG; + + my @line = @$line_ref; + chomp @line; + + # Don't filter out blank or comment lines; git does that already, + # and if we were to ignore them here, it could lead to committing + # with lines that start with "#" in the log. + + # Filter out leading blank and comment lines. + # while (@line && $line[0] =~ /^(?:#.*|[ \t]*)$/) { shift @line; } + + # Filter out blank and comment lines at EOF. + # while (@line && $line[$#line] =~ /^(?:#.*|[ \t]*)$/) { pop @line; } + + @line == 0 + and return 'no log message'; + + # The first line should not be too short + 8 < length $line[0] || return 'summary line too short'; + + # The first line should not start with an asterisk or a hash sign. + # An asterisk might indicate that a change entry was started right + # at the first line. + $line[0] =~ /^[*#]/ && return "summary line starts with an * or #"; + + # Second line should be blank or not present. + 2 <= @line && length $line[1] + and return 'second line must be empty'; + + # Limit line length to allow for the ChangeLog's leading TAB. + foreach my $line (@line) + { + 72 < length $line && $line =~ /^[^#]/ + and return 'line longer than 72 characters'; + } + + return ''; +} + +{ + @ARGV == 1 + or die; + + my $log_file = $ARGV[0]; + + while (1) + { + my @line; + my $err = check_msg $log_file, \@line; + $err eq '' + and last; + $err = "$ME: $err\n"; + warn $err; + exit 1; + + # Insert the diagnostic as a comment on the first line of $log_file. + #rewrite $log_file, $err, \@line; + #re_edit $log_file; + # + ## Stop if our parent is killed. + #getppid() == 1 + # and last; + } +} + +# Local Variables: +# mode: perl +# End: diff --git a/build-aux/git-log-fix b/build-aux/git-log-fix new file mode 100644 index 0000000..af702fe --- /dev/null +++ b/build-aux/git-log-fix @@ -0,0 +1,3 @@ +# This file is expected to be used via gitlog-to-changelog's --amend=FILE +# option. It specifies what changes to make to each given SHA1's commit +# log and metadata, using Perl-eval'able expressions. diff --git a/build-aux/git-log-footer b/build-aux/git-log-footer new file mode 100644 index 0000000..c31fe93 --- /dev/null +++ b/build-aux/git-log-footer @@ -0,0 +1,14 @@ + +2011-12-01 Werner Koch + + NB: Changes done before December 1st, 2011 are described in + per directory files named ChangeLog-2011. See doc/HACKING for + details. + + ----- + Copyright (C) 2011 Free Software Foundation, Inc. + + Copying and distribution of this file and/or the original GIT + commit log messages, with or without modification, are + permitted provided the copyright notice and this notice are + preserved. diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..40a8035 --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,345 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2011-11-02 07:53'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2011 Free Software Foundation, Inc. + +# 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 3 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, see . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try `$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on +a line) referring to a commit in the current project, and CODE refers to one +or more consecutive lines of Perl code. Pairs must be separated by one or +more blank line. + +Here is sample input for use with --amend=FILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert , + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = )) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + ) or usage 1; + + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = (qw (git log --log-size), + '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = ) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest = $_; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); + + # Format 'Co-authored-by: A U Thor ' lines in + # standard multi-author ChangeLog format. + my @coauthors = grep /^Co-authored-by:.*$/, @line; + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If this header would be the same as the previous date/name/email/ + # coauthors header, then arrange not to print it. + if ($date_line ne $prev_date_line or "@coauthors" ne "@prev_coauthors") + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line = $date_line; + @prev_coauthors = @coauthors; + + # Omit "Co-authored-by..." and "Signed-off-by..." lines. + @line = grep !/^Signed-off-by: .*>$/, @line; + @line = grep !/^Co-authored-by: /, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/contrib/ChangeLog b/contrib/ChangeLog-2011 similarity index 67% rename from contrib/ChangeLog rename to contrib/ChangeLog-2011 index 2d2c7b6..65306e3 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2010-11-15 Marcus Brinkmann * conf-w32ce-msc/stdint.h: New file. diff --git a/doc/ChangeLog b/doc/ChangeLog-2011 similarity index 92% rename from doc/ChangeLog rename to doc/ChangeLog-2011 index 5e1e198..4f8b568 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2009-12-08 Marcus Brinkmann * assuan.texi: Use our own copy of the setfont macro, as it takes @@ -100,7 +107,7 @@ 2007-07-05 Werner Koch - * lgpl.texi: New. Taken from COPYING.LIB and reformatted. + * lgpl.texi: New. Taken from COPYING.LIB and reformatted. * gpl.texi: Updated to v3. * assuan.texi (Utilities): Explain ASSUAN_CONFIDENTIAL. @@ -145,4 +152,3 @@ 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. - diff --git a/doc/HACKING b/doc/HACKING new file mode 100644 index 0000000..b7d6b10 --- /dev/null +++ b/doc/HACKING @@ -0,0 +1,25 @@ +# HACKING -*- org -*- +#+TITLE: Hacking notes for Libassuan +#+STARTUP: showall + +* No more ChangeLog files + + Do not modify any of the ChangeLog files in Libassuan. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist" time. As such, there are strict requirements on the + form of the commit log messages. The old ChangeLog files have all + be renamed to ChangeLog-2011 + + +* Commit log requirements + + Your commit log should always start with a one-line summary, the + second line should be blank, and the remaining lines are usually + ChangeLog-style entries for all affected files. However, it's fine + -- even recommended -- to write a few lines of prose describing the + change, when the summary and ChangeLog entries don't give enough of + the big picture. Omit the leading TABs that you're used to seeing + in a "real" ChangeLog file, but keep the maximum line length at 72 + or smaller, so that the generated ChangeLog lines, each with its + leading TAB, will not exceed 80 columns. diff --git a/doc/Makefile.am b/doc/Makefile.am index daea6e0..cc41a78 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -18,7 +18,7 @@ ## Process this file with automake to produce Makefile.in -EXTRA_DIST = README.apichanges +EXTRA_DIST = README.apichanges HACKING info_TEXINFOS = assuan.texi diff --git a/src/ChangeLog b/src/ChangeLog-2011 similarity index 99% rename from src/ChangeLog rename to src/ChangeLog-2011 index ddbad5e..2f32ea2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-10 Werner Koch * assuan.h.in (ASSUAN_FORCE_CLOSE): New. diff --git a/tests/ChangeLog b/tests/ChangeLog-2011 similarity index 87% rename from tests/ChangeLog rename to tests/ChangeLog-2011 index 8d402ad..e2a3a63 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-03-28 Werner Koch * ce-server.c: Include sys/select.h if needed. Fixes bug#1328. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 446 +-------------------------------- ChangeLog => ChangeLog-2011 | 7 + Makefile.am | 22 ++- autogen.sh | 7 + build-aux/git-hooks/commit-msg | 127 ++++++++++ build-aux/git-log-fix | 3 + build-aux/git-log-footer | 14 + build-aux/gitlog-to-changelog | 345 +++++++++++++++++++++++++ contrib/{ChangeLog => ChangeLog-2011} | 7 + doc/{ChangeLog => ChangeLog-2011} | 10 +- doc/HACKING | 25 ++ doc/Makefile.am | 2 +- src/{ChangeLog => ChangeLog-2011} | 7 + tests/{ChangeLog => ChangeLog-2011} | 7 + 14 files changed, 590 insertions(+), 439 deletions(-) copy ChangeLog => ChangeLog-2011 (97%) create mode 100755 build-aux/git-hooks/commit-msg create mode 100644 build-aux/git-log-fix create mode 100644 build-aux/git-log-footer create mode 100755 build-aux/gitlog-to-changelog rename contrib/{ChangeLog => ChangeLog-2011} (67%) rename doc/{ChangeLog => ChangeLog-2011} (92%) create mode 100644 doc/HACKING rename src/{ChangeLog => ChangeLog-2011} (99%) rename tests/{ChangeLog => ChangeLog-2011} (87%) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Fri Dec 2 00:29:19 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 02 Dec 2011 00:29:19 +0100 Subject: [git] KSBA - branch, master, updated. libksba-1.2.0-3-g3f957f4 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via 3f957f48388756732b5795b77b65d5ab7c0c8298 (commit) via 1120a33155aa3246b6aeed2dcd6a1315969c632d (commit) from 95d25a9bd2c638db9e7c45b38a37fa8222337411 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3f957f48388756732b5795b77b65d5ab7c0c8298 Author: Werner Koch Date: Thu Dec 1 23:36:49 2011 +0100 Post release updates. diff --git a/.gitignore b/.gitignore index 5d01320..6a26f3b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,18 @@ +*.lo +*.o +.deps/ +.libs/ +/aclocal.m4 +/autom4te.cache +/config.h.in +/config.h +/config.log +/config.status +/configure +/libtool +/stamp-h1 /Makefile.in +/Makefile /aclocal.m4 /config.h.in /configure @@ -7,3 +21,6 @@ /gl/Makefile.in /m4/Makefile.in /src/Makefile.in +/doc/Makefile.in +/doc/ksba.info +/tests/Makefile.in diff --git a/configure.ac b/configure.ac index fcfb450..9e891b5 100644 --- a/configure.ac +++ b/configure.ac @@ -25,17 +25,17 @@ min_automake_version="1.10" # 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.2.0]) -m4_define([my_issvn], [no]) +m4_define([my_version], [1.2.1]) +m4_define([my_issvn], [yes]) m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \ | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)])) m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \ | awk '/^\* / {printf "%s",$3}'])) -AC_INIT([libksba], - [my_version[]m4_if(my_issvn,[yes], - [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])], - [gnupg-devel at gnupg.org]) +m4_define([my_full_version], [my_version[]m4_if(my_issvn,[yes], + [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])]) + +AC_INIT([libksba],[my_full_version],[http://bugs.gnupg.org]) # LT Version numbers: Remember to change them just *before* a release. # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) commit 1120a33155aa3246b6aeed2dcd6a1315969c632d Author: Werner Koch Date: Thu Dec 1 23:30:50 2011 +0100 Generate the ChangeLog from commit logs. * build-aux/gitlog-to-changelog: New script. Taken from gnulib. * build-aux/git-log-fix: New file. * build-aux/git-log-footer: New file. * doc/HACKING: New file. * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. * autogen.sh: Install commit-msg hook for git. Rename all ChangeLog files to ChangeLog-2011. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5d01320 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +/Makefile.in +/aclocal.m4 +/config.h.in +/configure +/doc/stamp-vti +/doc/version.texi +/gl/Makefile.in +/m4/Makefile.in +/src/Makefile.in diff --git a/ChangeLog b/ChangeLog index ce9a49d..d9c1187 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,459 +1,16 @@ -2011-11-28 Jim Meyering +No more ChangeLog files +======================== - accept --with-libgpg-error-prefix as well as --with-gpg-error-prefix - * m4/gpg-error.m4: Update from git master. +Do not modify any of the ChangeLog files in Libksba. Starting on +December 1st, 2011 we put change information only in the GIT commit +log, and generate a top-level ChangeLog file from logs at "make dist" +time. As such, there are strict requirements on the form of the +commit log messages. See doc/HACKING for details. The old ChangeLog +files have all be renamed to ChangeLog-2011. -2011-03-01 Werner Koch - Release 1.2.0. - * configure.ac: Bump LT version to C19/A11/R0. - -2011-02-25 Werner Koch - - * configure.ac (KSBA_CONFIG_HOST): New. - * m4/libgcrypt.m4, m4/gpg-error.m4: Update from their git masters. - -2011-01-03 Werner Koch - - * configure.ac [BUILD_REVISION]: Shorten git commit identifier. - -2010-12-22 Werner Koch - - * configure.ac: Add a git commit identifier to the version. - -2010-10-26 Werner Koch - - Release 1.1.0. - - * configure.ac: Bump LT version to C18/A10/R0. - * config.guess: Update to version 2010-09-24. - * config.sub: Update to version 2010-09-11. - -2010-08-19 Werner Koch - - * configure.ac (AH_TOP, AH_BOTTOM): New. Define - GPG_ERR_ENABLE_ERRNO_MACROS. - -2010-07-15 Werner Koch - - Release 1.0.8. - - * configure.ac: Bump LT version to C17/A9/R8. - -2010-01-22 Werner Koch - - * autogen.sh: Support --build-w32ce. - - * configure.ac: Require libgpg-error 1.8. - (HAVE_W32CE_SYSTEM): New am_defines and am_conditionals. - (AC_CHECK_FUNCS): Check for getenv. - - * ltmain.sh (wrappers_required): Don't set for mingw32ce. - -2009-12-08 Marcus Brinkmann - - Update to libtool 2.2.6a. - * configure.ac: Invoke AC_CONFIG_MACRO_DIR. - (AC_LIBTOOL_WIN32_DLL, AC_LIBTOOL_RC): Replace by ... - (LT_PREREQ, LT_INIT, LT_LANG): ... these. - * config.guess, config.sub, install-sh, ltmain.sh, m4/libtool.m4: - Updated to libtool 2.2.6a. - * m4/ltoptions.m4, m4/ltsugar.m4, m4/ltversion.m4, - m4/lt~obsolete.m4: New files from libtool 2.2.6a. - -2009-12-08 Marcus Brinkmann - - * configure.ac: Allow cross compiling to be "maybe". - -2009-07-03 Werner Koch - - * configure.ac: Bump LT version to C17/A9/R7. Unfortunately only - after the release so to anticipate fixes by distributions. - -2009-07-03 Werner Koch - - Release 1.0.7. - -2009-06-05 Werner Koch - - Release 1.0.6. - - * configure.ac: Bump LT version to C17/A9/R6. - -2009-01-09 Werner Koch - - Release 1.0.5. - - * configure.ac: Bump LT version to C17/A9/R5. - -2008-10-30 Werner Koch - - * configure.ac: Use more strict warnings with newer gcc versions. - -2008-09-22 Werner Koch - - Release 1.0.4. - - * configure.ac: Bump LT version to C17/A9/R4. - - * configure.ac: Update svn_revision macro. - -2008-02-25 Werner Koch - - * configure.ac (KSBA_USE_VISIBILITY): Define if system supports - the visibility attribute. - -2008-02-12 Werner Koch - - Released 1.0.3. - - * configure.ac: Bump LT version to C17/A9/R3. - - * config.guess, config.sub: Update to version 2007-11-19. - -2007-11-07 Werner Koch - - * configure.ac: Add option --disable-optimization. - -2007-08-08 Werner Koch - - * configure.ac: Use $host and not $target. Reported by Peter - Eisentraut . - -2007-07-04 Werner Koch - - Released 1.0.2. - - * configure.ac: Bumped LT version to C17/A9/R2. - - Changed license to GPLv3. - - * COPYING: Updated to GPLv3. - - * config.guess, config.sub: Updated from Savannah CVS and switched - license to GPLv3+ and the old exception. - - * acinclude.m4: Remove. - * Makefile.am (SUBDIRS): Include m4. - * m4/gnupg-typedef.m4: New. - * m4/Makefile.am: New. - -2007-06-15 Werner Koch - - * autogen.sh: Use = and not == in test to be POSIXly correct. - -2007-05-29 Werner Koch - - * configure.ac (AC_LIBTOOL_WIN32_DLL): New. - (HAVE_W32_SYSTEM): New. - (BUILD_REVISION, BUILD_TIMESTAMP, BUILD_FILEVERSION): New. - (AC_CANONICAL_TARGET): New. - - * autogen.sh: Add Option --force. Modernized cross compiler - selection for --build-w32. - -2007-05-24 Werner Koch - - * configure.ac: Use -Wpointer-arith if possible. - -2007-04-06 Werner Koch - - * configure.ac: Require libgpg-error 1.4. - -2006-11-29 Werner Koch - - Released 1.0.1. - - * configure.ac: Bumped LT version to C17/A9/R1. - - * gl/dummyobj.c: New. - -2006-11-15 Werner Koch - - * autogen.sh: Add convenience option --build-amd64. - -2006-10-20 Werner Koch - - * Makefile.am (stowinstall): New convenience target. - -2006-08-31 Werner Koch - - Released 1.0.0. - - * configure.ac: Bumped LT version to C17/A9/R0. - - * configure.ac: Require libgpg-error 1.2. Removed test on - GPG_ERR_UNKNOWN_CRIT_EXTN. - -2006-08-01 Werner Koch - - Released 0.9.16. - - * configure.ac: Bumped LT version to C16/A8/R0. - - * configure.ac: Changed to new style auto-svn init. - -2006-06-20 Werner Koch - - Released 0.9.15. - - * configure.ac: Bumbed LT version to C15/A7/R2. - -2006-05-16 Werner Koch - - Released 0.9.14. - - * configure.ac: Bumped LT version to C15/A7/R1. - - * config.guess, config.sub: Updated. - * ltmain.sh: Updated. - -2006-05-11 Werner Koch - - * configure.ac: Use -Wno-pointer-sign. - -2005-11-24 Werner Koch - - Released 0.9.13. - - * configure.ac: Bumped LT vesion to C15/A7/R0. - -2005-08-01 Werner Koch - - Released 0.9.12. - - * configure.ac: Bumped LT version to C14/A6/R1. - -2005-06-02 Werner Koch - - * gl/, gl/m4/: New. - * configure.ac: Add test for gnulib module alloca. - * Makefile.am (SUBDIRS): Include gl/ - -2005-04-20 Werner Koch - - * configure.ac: Fixed typo in saving CFLAGS for gpg-error symbol - test. - - Released 0.9.11. - -2005-04-19 Werner Koch - - * configure.ac: Bumped LT version to C14/A6/R0 due to a new - interface. - - * acinclude.m4 (GNUPG_CHECK_TYPEDEF): Added. Taken from gnupg 1.4 - -2005-04-18 Werner Koch - - * configure.ac: Check for a new gpg-error symbol. - -2005-03-16 Werner Koch - - * Makefile.am (AUTOMAKE_OPTIONS): Add option to create bzip 2 file - and to use the m4 directory. - * acinclude.m4: Removed all code. It belongs into m4/. - -2004-12-18 Werner Koch - - * configure.ac: Print a hint about failed corss compilations. - * autogen.sh: Add --build-w32 option. - -2004-12-03 Werner Koch - - Released 0.9.10. - - * configure.ac: Bumped LT version to C13/A5/R2. - -2004-11-25 Werner Koch - - * configure.ac: Define CROSS_COMPILING make conditional - * Makefile.am (SUBDIRS): Don't run tests when cross compiling. - -2004-09-27 Werner Koch - - Released 0.9.9. - - * configure.ac: Bumped LT version to C13/A5/R2. - - * configure.ac: AC_GNU_SOURCE instead of AH_TOP. - * config.guess, config.sub: Updated. - * ltmain.sh: Updated to 1.5.6 - -2004-07-22 Werner Koch - - Released 0.9.8. - - * configure.ac: Bumped LT version to C13/A5/R1. - -2004-06-08 Werner Koch - - Released 0.9.7. - - * configure.ac: Bumped LT version to C13/A5/R0. - -2004-04-29 Werner Koch - - Released 0.9.6. - - * configure.ac: Bumped LT version to C12/A4/R0. - -2004-04-02 Thomas Schwinge - - * autogen.sh: Added ACLOCAL_FLAGS. - -2004-04-06 Werner Koch - - Released 0.9.5. - - * configure.ac: Bumped LT versions to C11/A3/R0. - * config.guess, config.sub, ltmain.sh: Updated to those from - libtools 1.5.4. - -2004-03-15 Werner Koch - - * configure.ac: New option --enable-ld-version-script. - -2004-02-20 Werner Koch - - Released 0.9.4. - - * configure.ac: Bumped LT version to C10/A2/R0. - -2004-02-11 Werner Koch - - * autogen.sh (check_version): Removed bashism and simplified. - -2004-01-30 Werner Koch - - Released 0.9.3. - - * configure.ac: Bumped LT vesion to C9/A1/R2. - -2004-01-29 Werner Koch - - Released 0.9.2. - - * configure.ac: Bumbed LT version to C9/A1/R1. - -2003-12-19 Werner Koch - - Released 0.9.1. - - * configure.ac: Bumbed LT version to C9/A1/R0. - -2003-12-08 Werner Koch - - * README.CVS: Enhanced - * autogen.sh: Reworked. - * configure.ac: Add version numbers for autogen.sh. - -2003-11-17 Werner Koch - - Released 0.9.0. - -2003-11-12 Werner Koch - - * acinclude.m4: New. - * configure.ac (AM_PATH_GPG_ERROR): New. - -2003-10-31 Werner Koch - - * configure.ac (AC_CHECK_FUNCS): Removed timegm. Add gmtime_r. - Set version number to 0.9.0-cvs, bumped LT version to C8/A0/R0. - -2003-03-17 Werner Koch - - Released 0.4.7. - - * configure.ac: Set LT version to 7/7/1. - -2002-12-04 Werner Koch - - Released 0.4.6. - - * configure.ac: Set LT version to 7/7/0. - -2002-11-25 Werner Koch - - * configure.ac: Bumbed version number. - -2002-11-12 Werner Koch - - * config.sub, config.guess: Updated from ftp.gnu.org/gnu/config - to version 2002-11-08. - -2002-08-23 Werner Koch - - Released 0.4.5. - - * configure.ac (KSBA_CONFIG_LIBS): Renamed from KSBA_LIBS and - removed the libdir because it is set by the config script. - -2002-08-09 Werner Koch - - Released 0.4.4. - -2002-06-25 Werner Koch - - Released 0.4.3. - - * configure.ac: Set LT version to 6/6/0. - -2002-06-17 Werner Koch - - * configure.ac: Don't check for ranlib because it is done by libtool. - -2002-06-04 Werner Koch - - Released 0.4.2. - - * configure.ac: Bumbed libversion due to added interfaces. - -2002-05-03 Werner Koch - - Released 0.4.1. - -2002-04-15 Werner Koch - - Released 0.4.0. - - * configure.ac: Bumbed libversion due to added interfaces. - * NEWS: Started tracking news. - -2002-04-01 Werner Koch - - Released 0.2.3. - -2002-03-13 Werner Koch - - Released 0.2.2. - -2002-03-04 Werner Koch - - * configure.ac: Bumbed version to 0.2.1 - -2002-02-07 Werner Koch - - * configure.ac: Bumped version to 0.2.0 - * Makefile.am: Add doc directory and VERSION kludge - -2002-01-11 Werner Koch - - * configure.ac (AC_C_INLINE): New. - -2001-12-17 Werner Koch - - * configure.ac (KSBA_LIBS,KSBA_CFLAGS): Set them. - - - Copyright 2001, 2002 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 - 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. +Local Variables: +buffer-read-only: t +mode: text +End: diff --git a/ChangeLog b/ChangeLog-2011 similarity index 97% copy from ChangeLog copy to ChangeLog-2011 index ce9a49d..a9eecb8 100644 --- a/ChangeLog +++ b/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-11-28 Jim Meyering accept --with-libgpg-error-prefix as well as --with-gpg-error-prefix diff --git a/Makefile.am b/Makefile.am index da26216..d061ca1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,11 @@ ACLOCAL_AMFLAGS = -I m4 -I gl/m4 AUTOMAKE_OPTIONS = dist-bzip2 -EXTRA_DIST = autogen.sh +EXTRA_DIST = autogen.sh \ + ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \ + tests/ChangeLog-2011 \ + build-aux/gitlog-to-changelog build-aux/git-log-footer \ + build-aux/git-log-fix if CROSS_COMPILING @@ -33,8 +37,24 @@ endif SUBDIRS = m4 gl src ${tests} doc -dist-hook: +dist-hook: gen-ChangeLog @set -e; echo "$(VERSION)" > $(distdir)/VERSION + +gen_start_date = 2011-12-01T00:00:00 +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d $(top_srcdir)/.git; then \ + (cd $(top_srcdir) && \ + ./build-aux/gitlog-to-changelog \ + --amend=build-aux/git-log-fix \ + --since=$(gen_start_date) ) > $(distdir)/cl-t; \ + cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi + + + stowinstall: $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libksba diff --git a/README-alpha b/README-alpha deleted file mode 100644 index 0f748e3..0000000 --- a/README-alpha +++ /dev/null @@ -1 +0,0 @@ - THIS IS WORK IN PROGRESS !!!! \ No newline at end of file diff --git a/autogen.sh b/autogen.sh index 37b82e2..86d0f95 100755 --- a/autogen.sh +++ b/autogen.sh @@ -254,6 +254,13 @@ EOF cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit chmod -c +x .git/hooks/pre-commit fi + if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then + cat <&2 +*** Activating commit log message check hook. *** +EOF + cp -av build-aux/git-hooks/commit-msg .git/hooks/commit-msg + chmod -c +x .git/hooks/commit-msg + fi fi echo "Running aclocal -I m4 -I gl/m4 ${ACLOCAL_FLAGS:+$ACLOCAL_FLAGS }..." diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg new file mode 100755 index 0000000..5a697c7 --- /dev/null +++ b/build-aux/git-hooks/commit-msg @@ -0,0 +1,127 @@ +eval '(exit $?0)' && eval 'exec perl -w "$0" ${1+"$@"}' + & eval 'exec perl -w "$0" $argv:q' + if 0; + +# An hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, copy it to "~/.git/hooks/commit-msg". +# +# This script is based on the one from GNU coreutils. + +use strict; +use warnings; +(my $ME = $0) =~ s|.*/||; + +my $editor = $ENV{EDITOR} || 'vi'; +$ENV{PATH} = '/bin:/usr/bin'; + +# Rewrite the $LOG_FILE (old contents in @$LINE_REF) with an additional +# commented diagnostic "# $ERR" line at the top. +sub rewrite($$$) +{ + my ($log_file, $err, $line_ref) = @_; + local *LOG; + open LOG, '>', $log_file + or die "$ME: $log_file: failed to open for writing: $!"; + print LOG "# $err"; + print LOG @$line_ref; + close LOG + or die "$ME: $log_file: failed to rewrite: $!\n"; +} + +sub re_edit($) +{ + my ($log_file) = @_; + + warn "Interrupt (Ctrl-C) to abort...\n"; + + system 'sh', '-c', "$editor $log_file"; + ($? & 127) || ($? >> 8) + and die "$ME: $log_file: the editor ($editor) failed, aborting\n"; +} + +# Given a $LOG_FILE name and a \@LINE buffer, +# read the contents of the file into the buffer and analyze it. +# If the log message passes muster, return the empty string. +# If not, return a diagnostic. +sub check_msg($$) +{ + my ($log_file, $line_ref) = @_; + + local *LOG; + open LOG, '<', $log_file + or return "failed to open for reading: $!"; + @$line_ref = ; + close LOG; + + my @line = @$line_ref; + chomp @line; + + # Don't filter out blank or comment lines; git does that already, + # and if we were to ignore them here, it could lead to committing + # with lines that start with "#" in the log. + + # Filter out leading blank and comment lines. + # while (@line && $line[0] =~ /^(?:#.*|[ \t]*)$/) { shift @line; } + + # Filter out blank and comment lines at EOF. + # while (@line && $line[$#line] =~ /^(?:#.*|[ \t]*)$/) { pop @line; } + + @line == 0 + and return 'no log message'; + + # The first line should not be too short + 8 < length $line[0] || return 'summary line too short'; + + # The first line should not start with an asterisk or a hash sign. + # An asterisk might indicate that a change entry was started right + # at the first line. + $line[0] =~ /^[*#]/ && return "summary line starts with an * or #"; + + # Second line should be blank or not present. + 2 <= @line && length $line[1] + and return 'second line must be empty'; + + # Limit line length to allow for the ChangeLog's leading TAB. + foreach my $line (@line) + { + 72 < length $line && $line =~ /^[^#]/ + and return 'line longer than 72 characters'; + } + + return ''; +} + +{ + @ARGV == 1 + or die; + + my $log_file = $ARGV[0]; + + while (1) + { + my @line; + my $err = check_msg $log_file, \@line; + $err eq '' + and last; + $err = "$ME: $err\n"; + warn $err; + exit 1; + + # Insert the diagnostic as a comment on the first line of $log_file. + #rewrite $log_file, $err, \@line; + #re_edit $log_file; + # + ## Stop if our parent is killed. + #getppid() == 1 + # and last; + } +} + +# Local Variables: +# mode: perl +# End: diff --git a/build-aux/git-log-fix b/build-aux/git-log-fix new file mode 100644 index 0000000..af702fe --- /dev/null +++ b/build-aux/git-log-fix @@ -0,0 +1,3 @@ +# This file is expected to be used via gitlog-to-changelog's --amend=FILE +# option. It specifies what changes to make to each given SHA1's commit +# log and metadata, using Perl-eval'able expressions. diff --git a/build-aux/git-log-footer b/build-aux/git-log-footer new file mode 100644 index 0000000..7eff5c9 --- /dev/null +++ b/build-aux/git-log-footer @@ -0,0 +1,14 @@ + +2011-12-01 Werner Koch + + NB: Changes done before December 1st, 2011 are described in + per directory files named ChangeLog-2011. See doc/HACKING for + details. + + ----- + Copyright (C) 2011 g10 Code GmbH + + Copying and distribution of this file and/or the original GIT + commit log messages, with or without modification, are + permitted provided the copyright notice and this notice are + preserved. diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..40a8035 --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,345 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2011-11-02 07:53'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2011 Free Software Foundation, Inc. + +# 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 3 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, see . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try `$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on +a line) referring to a commit in the current project, and CODE refers to one +or more consecutive lines of Perl code. Pairs must be separated by one or +more blank line. + +Here is sample input for use with --amend=FILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert , + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = )) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + ) or usage 1; + + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = (qw (git log --log-size), + '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = ) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest = $_; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); + + # Format 'Co-authored-by: A U Thor ' lines in + # standard multi-author ChangeLog format. + my @coauthors = grep /^Co-authored-by:.*$/, @line; + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If this header would be the same as the previous date/name/email/ + # coauthors header, then arrange not to print it. + if ($date_line ne $prev_date_line or "@coauthors" ne "@prev_coauthors") + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line = $date_line; + @prev_coauthors = @coauthors; + + # Omit "Co-authored-by..." and "Signed-off-by..." lines. + @line = grep !/^Signed-off-by: .*>$/, @line; + @line = grep !/^Co-authored-by: /, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/doc/ChangeLog b/doc/ChangeLog-2011 similarity index 86% rename from doc/ChangeLog rename to doc/ChangeLog-2011 index 58e3bfa..413a168 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2008-11-12 Marcus Brinkmann * ksba.texi: Clear up wording on reference counting. diff --git a/doc/HACKING b/doc/HACKING new file mode 100644 index 0000000..918ab74 --- /dev/null +++ b/doc/HACKING @@ -0,0 +1,25 @@ +# HACKING -*- org -*- +#+TITLE: Hacking notes for Libksba +#+STARTUP: showall + +* No more ChangeLog files + + Do not modify any of the ChangeLog files in Libksba. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist" time. As such, there are strict requirements on the + form of the commit log messages. The old ChangeLog files have all + be renamed to ChangeLog-2011 + + +* Commit log requirements + + Your commit log should always start with a one-line summary, the + second line should be blank, and the remaining lines are usually + ChangeLog-style entries for all affected files. However, it's fine + -- even recommended -- to write a few lines of prose describing the + change, when the summary and ChangeLog entries don't give enough of + the big picture. Omit the leading TABs that you're used to seeing + in a "real" ChangeLog file, but keep the maximum line length at 72 + or smaller, so that the generated ChangeLog lines, each with its + leading TAB, will not exceed 80 columns. diff --git a/doc/Makefile.am b/doc/Makefile.am index a332e88..7d70e0d 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -20,6 +20,9 @@ DISTCLEANFILES = ksba.cps +EXTRA_DIST = HACKING + + info_TEXINFOS = ksba.texi ksba_TEXINFOS = gpl.texi diff --git a/gl/alloca.h b/gl/alloca.h deleted file mode 100644 index f0359b6..0000000 --- a/gl/alloca.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Memory allocation on the stack. - - Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004 Free Software - Foundation, Inc. - - 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 3, 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, see . - */ - -/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H - means there is a real alloca function. */ -#ifndef _GNULIB_ALLOCA_H -# define _GNULIB_ALLOCA_H - -/* alloca (N) returns a pointer to N bytes of memory - allocated on the stack, which will last until the function returns. - Use of alloca should be avoided: - - inside arguments of function calls - undefined behaviour, - - in inline functions - the allocation may actually last until the - calling function returns, - - for huge N (say, N >= 65536) - you never know how large (or small) - the stack is, and when the stack cannot fulfill the memory allocation - request, the program just crashes. - */ - -#ifdef __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#elif defined _MSC_VER -# include -# define alloca _alloca -#else -# include -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -#endif - -#endif /* _GNULIB_ALLOCA_H */ diff --git a/src/ChangeLog b/src/ChangeLog-2011 similarity index 99% rename from src/ChangeLog rename to src/ChangeLog-2011 index e2b1176..8bed698 100644 --- a/src/ChangeLog +++ b/src/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-02-28 Werner Koch * keyinfo.c (_ksba_algoinfo_from_sexp): New. diff --git a/tests/ChangeLog b/tests/ChangeLog-2011 similarity index 95% rename from tests/ChangeLog rename to tests/ChangeLog-2011 index a451d6a..c0c2506 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2010-08-04 Werner Koch * t-cms-parser.c (one_file): Use print_sexp_hex for the s/n. ----------------------------------------------------------------------- Summary of changes: .gitignore | 26 ++ ChangeLog | 467 +---------------------------------- ChangeLog => ChangeLog-2011 | 7 + Makefile.am | 24 ++- README-alpha | 1 - autogen.sh | 7 + build-aux/git-hooks/commit-msg | 127 ++++++++++ build-aux/git-log-fix | 3 + build-aux/git-log-footer | 14 + build-aux/gitlog-to-changelog | 345 ++++++++++++++++++++++++++ configure.ac | 12 +- doc/{ChangeLog => ChangeLog-2011} | 7 + doc/HACKING | 25 ++ doc/Makefile.am | 3 + gl/alloca.h | 51 ---- src/{ChangeLog => ChangeLog-2011} | 7 + tests/{ChangeLog => ChangeLog-2011} | 7 + 17 files changed, 618 insertions(+), 515 deletions(-) create mode 100644 .gitignore copy ChangeLog => ChangeLog-2011 (97%) delete mode 100644 README-alpha create mode 100755 build-aux/git-hooks/commit-msg create mode 100644 build-aux/git-log-fix create mode 100644 build-aux/git-log-footer create mode 100755 build-aux/gitlog-to-changelog rename doc/{ChangeLog => ChangeLog-2011} (86%) create mode 100644 doc/HACKING delete mode 100644 gl/alloca.h rename src/{ChangeLog => ChangeLog-2011} (99%) rename tests/{ChangeLog => ChangeLog-2011} (95%) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Fri Dec 2 06:52:38 2011 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 02 Dec 2011 06:52:38 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-140-gbf37c32 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via bf37c32367ba149559385ee90b6435cef8bd6412 (commit) from 29e96e6b9a8e68e6554dd48bc2ce68ae9525d29f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bf37c32367ba149559385ee90b6435cef8bd6412 Author: NIIBE Yutaka Date: Fri Dec 2 13:57:12 2011 +0900 Fix pinpad input support for passphrase modification. * apdu.c (pcsc_keypad_verify): Have dummy Lc field with value 0. (pcsc_keypad_modify): Likewise. (pcsc_keypad_modify): It's only for ISO7816_CHANGE_REFERENCE_DATA. bConfirmPIN value is determined by the parameter p0. * app-openpgp.c (do_change_pin): The flag use_keypad should be 0 when reset_mode is on, or resetcode is on. use_keypad only makes sense for iso7816_change_reference_data_kp. * iso7816.h (iso7816_put_data_kp): Remove. (iso7816_reset_retry_counter_kp): Remove. (iso7816_reset_retry_counter_with_rc_kp): Remove. (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE. * iso7816.c (iso7816_put_data_kp): Remove. (iso7816_reset_retry_counter_kp): Remove. (iso7816_reset_retry_counter_with_rc_kp): Remove. (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE. diff --git a/scd/apdu.c b/scd/apdu.c index 4d11157..c130d89 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2043,7 +2043,7 @@ check_pcsc_keypad (int slot, int command, int pin_mode, } -#define PIN_VERIFY_STRUCTURE_SIZE 23 +#define PIN_VERIFY_STRUCTURE_SIZE 24 static int pcsc_keypad_verify (int slot, int class, int ins, int p0, int p1, struct pininfo_s *pininfo) @@ -2096,7 +2096,7 @@ pcsc_keypad_verify (int slot, int class, int ins, int p0, int p1, pin_verify[12] = 0x00; /* bTeoPrologue[0] */ pin_verify[13] = 0x00; /* bTeoPrologue[1] */ pin_verify[14] = 0x00; /* bTeoPrologue[2] */ - pin_verify[15] = 0x04; /* ulDataLength */ + pin_verify[15] = 0x05; /* ulDataLength */ pin_verify[16] = 0x00; /* ulDataLength */ pin_verify[17] = 0x00; /* ulDataLength */ pin_verify[18] = 0x00; /* ulDataLength */ @@ -2104,6 +2104,7 @@ pcsc_keypad_verify (int slot, int class, int ins, int p0, int p1, pin_verify[20] = ins; /* abData[1] */ pin_verify[21] = p0; /* abData[2] */ pin_verify[22] = p1; /* abData[3] */ + pin_verify[23] = 0x00; /* abData[4] */ sw = control_pcsc (slot, reader_table[slot].pcsc.verify_ioctl, pin_verify, len, result, &resultlen); @@ -2115,7 +2116,7 @@ pcsc_keypad_verify (int slot, int class, int ins, int p0, int p1, } -#define PIN_MODIFY_STRUCTURE_SIZE 28 +#define PIN_MODIFY_STRUCTURE_SIZE 29 static int pcsc_keypad_modify (int slot, int class, int ins, int p0, int p1, struct pininfo_s *pininfo) @@ -2125,32 +2126,6 @@ pcsc_keypad_modify (int slot, int class, int ins, int p0, int p1, unsigned long len = PIN_MODIFY_STRUCTURE_SIZE; unsigned char result[2]; size_t resultlen = 2; - unsigned char confirm_pin; - - /* bConfirmPIN - * 0x00: new PIN once - * 0x01: new PIN twice (confirmation) - * 0x02: old PIN and new PIN once - * 0x03: old PIN and new PIN twice (confirmation) - */ - switch (ins) - { - case ISO7816_CHANGE_REFERENCE_DATA: - confirm_pin = 0x03; - break; - case 0xDA: /* PUT_DATA */ - confirm_pin = 0x01; - break; - case ISO7816_RESET_RETRY_COUNTER: - if (p0 == 0) - confirm_pin = 0x03; - else - confirm_pin = 0x01; - break; - default: - confirm_pin = 0x00; - break; - } if (!reader_table[slot].atrlen && (sw = reset_pcsc_reader (slot))) @@ -2186,7 +2161,13 @@ pcsc_keypad_modify (int slot, int class, int ins, int p0, int p1, pin_modify[6] = 0x00; /* bInsertionOffsetNew */ pin_modify[7] = pininfo->maxlen; /* wPINMaxExtraDigit */ pin_modify[8] = pininfo->minlen; /* wPINMaxExtraDigit */ - pin_modify[9] = confirm_pin; + pin_modify[9] = (p0 == 0 ? 0x03 : 0x01); + /* bConfirmPIN + * 0x00: new PIN once + * 0x01: new PIN twice (confirmation) + * 0x02: old PIN and new PIN once + * 0x03: old PIN and new PIN twice (confirmation) + */ pin_modify[10] = 0x02; /* bEntryValidationCondition: Validation key pressed */ if (pininfo->minlen && pininfo->maxlen && pininfo->minlen == pininfo->maxlen) pin_modify[10] |= 0x01; /* Max size reached. */ @@ -2199,7 +2180,7 @@ pcsc_keypad_modify (int slot, int class, int ins, int p0, int p1, pin_modify[17] = 0x00; /* bTeoPrologue[0] */ pin_modify[18] = 0x00; /* bTeoPrologue[1] */ pin_modify[19] = 0x00; /* bTeoPrologue[2] */ - pin_modify[20] = 0x04; /* ulDataLength */ + pin_modify[20] = 0x05; /* ulDataLength */ pin_modify[21] = 0x00; /* ulDataLength */ pin_modify[22] = 0x00; /* ulDataLength */ pin_modify[23] = 0x00; /* ulDataLength */ @@ -2207,6 +2188,7 @@ pcsc_keypad_modify (int slot, int class, int ins, int p0, int p1, pin_modify[25] = ins; /* abData[1] */ pin_modify[26] = p0; /* abData[2] */ pin_modify[27] = p1; /* abData[3] */ + pin_modify[28] = 0x00; /* abData[4] */ sw = control_pcsc (slot, reader_table[slot].pcsc.modify_ioctl, pin_modify, len, result, &resultlen); diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index b51eb5b..e3a4484 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -1915,7 +1915,6 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, char *pinvalue = NULL; int reset_mode = !!(flags & APP_CHANGE_FLAG_RESET); int set_resetcode = 0; - int with_resetcode = 0; iso7816_pininfo_t pininfo; int use_keypad = 0; int minlen = 6; @@ -1975,6 +1974,7 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, if (reset_mode) { /* To reset a PIN the Admin PIN is required. */ + use_keypad = 0; app->did_chv3 = 0; rc = verify_chv3 (app, pincb, pincb_arg); if (rc) @@ -1983,37 +1983,40 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, if (chvno == 2) set_resetcode = 1; } - else if (!use_keypad && (chvno == 1 || chvno == 3)) + else if (chvno == 1 || chvno == 3) { - char *promptbuf = NULL; - const char *prompt; - - if (chvno == 3) + if (!use_keypad) { - minlen = 8; - rc = build_enter_admin_pin_prompt (app, &promptbuf); + char *promptbuf = NULL; + const char *prompt; + + if (chvno == 3) + { + minlen = 8; + rc = build_enter_admin_pin_prompt (app, &promptbuf); + if (rc) + goto leave; + prompt = promptbuf; + } + else + prompt = _("||Please enter the PIN"); + rc = pincb (pincb_arg, prompt, &oldpinvalue); + xfree (promptbuf); + promptbuf = NULL; if (rc) - goto leave; - prompt = promptbuf; - } - else - prompt = _("||Please enter the PIN"); - rc = pincb (pincb_arg, prompt, &oldpinvalue); - xfree (promptbuf); - promptbuf = NULL; - if (rc) - { - log_info (_("PIN callback returned error: %s\n"), - gpg_strerror (rc)); - goto leave; - } + { + log_info (_("PIN callback returned error: %s\n"), + gpg_strerror (rc)); + goto leave; + } - if (strlen (oldpinvalue) < minlen) - { - log_info (_("PIN for CHV%d is too short;" - " minimum length is %d\n"), chvno, minlen); - rc = gpg_error (GPG_ERR_BAD_PIN); - goto leave; + if (strlen (oldpinvalue) < minlen) + { + log_info (_("PIN for CHV%d is too short;" + " minimum length is %d\n"), chvno, minlen); + rc = gpg_error (GPG_ERR_BAD_PIN); + goto leave; + } } } else if (chvno == 2) @@ -2025,7 +2028,7 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, size_t valuelen; int remaining; - with_resetcode = 1; + use_keypad = 0; minlen = 8; relptr = get_one_do (app, 0x00C4, &value, &valuelen, NULL); if (!relptr || valuelen < 7) @@ -2044,24 +2047,21 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, goto leave; } - if (!use_keypad) + rc = pincb (pincb_arg, + _("||Please enter the Reset Code for the card"), + &resetcode); + if (rc) { - rc = pincb (pincb_arg, - _("||Please enter the Reset Code for the card"), - &resetcode); - if (rc) - { - log_info (_("PIN callback returned error: %s\n"), - gpg_strerror (rc)); - goto leave; - } - if (strlen (resetcode) < minlen) - { - log_info (_("Reset Code is too short; minimum length is %d\n"), - minlen); - rc = gpg_error (GPG_ERR_BAD_PIN); - goto leave; - } + log_info (_("PIN callback returned error: %s\n"), + gpg_strerror (rc)); + goto leave; + } + if (strlen (resetcode) < minlen) + { + log_info (_("Reset Code is too short; minimum length is %d\n"), + minlen); + rc = gpg_error (GPG_ERR_BAD_PIN); + goto leave; } } else @@ -2093,86 +2093,40 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, } - if (with_resetcode) + if (resetcode) { - if (use_keypad) - { - rc = pincb (pincb_arg, - _("||Please enter the Reset Code for the card and New PIN"), - NULL); - if (rc) - { - log_info (_("PIN callback returned error: %s\n"), - gpg_strerror (rc)); - goto leave; - } - rc = iso7816_reset_retry_counter_with_rc_kp (app->slot, 0x81, - &pininfo); - pincb (pincb_arg, NULL, NULL); /* Dismiss the prompt. */ - } + char *buffer; + + buffer = xtrymalloc (strlen (resetcode) + strlen (pinvalue) + 1); + if (!buffer) + rc = gpg_error_from_syserror (); else { - char *buffer; - - buffer = xtrymalloc (strlen (resetcode) + strlen (pinvalue) + 1); - if (!buffer) - rc = gpg_error_from_syserror (); - else - { - strcpy (stpcpy (buffer, resetcode), pinvalue); - rc = iso7816_reset_retry_counter_with_rc (app->slot, 0x81, - buffer, strlen (buffer)); - wipememory (buffer, strlen (buffer)); - xfree (buffer); - } + strcpy (stpcpy (buffer, resetcode), pinvalue); + rc = iso7816_reset_retry_counter_with_rc (app->slot, 0x81, + buffer, strlen (buffer)); + wipememory (buffer, strlen (buffer)); + xfree (buffer); } } else if (set_resetcode) { - if (use_keypad) + if (strlen (pinvalue) < 8) { - rc = pincb (pincb_arg, _("|RN|New Reset Code"), NULL); - if (rc) - { - log_info (_("PIN callback returned error: %s\n"), - gpg_strerror (rc)); - goto leave; - } - rc = iso7816_put_data_kp (app->slot, 0xD3, &pininfo); - pincb (pincb_arg, NULL, NULL); /* Dismiss the prompt. */ + log_error (_("Reset Code is too short; minimum length is %d\n"), 8); + rc = gpg_error (GPG_ERR_BAD_PIN); } else - if (strlen (pinvalue) < 8) - { - log_error (_("Reset Code is too short; minimum length is %d\n"), 8); - rc = gpg_error (GPG_ERR_BAD_PIN); - } - else - rc = iso7816_put_data (app->slot, 0, 0xD3, - pinvalue, strlen (pinvalue)); + rc = iso7816_put_data (app->slot, 0, 0xD3, + pinvalue, strlen (pinvalue)); } else if (reset_mode) { - if (use_keypad) - { - rc = pincb (pincb_arg, _("|N|New PIN"), NULL); - if (rc) - { - log_info (_("PIN callback returned error: %s\n"), - gpg_strerror (rc)); - goto leave; - } - rc = iso7816_reset_retry_counter_kp (app->slot, 0x81, &pininfo); - pincb (pincb_arg, NULL, NULL); /* Dismiss the prompt. */ - } - else - { - rc = iso7816_reset_retry_counter (app->slot, 0x81, - pinvalue, strlen (pinvalue)); - if (!rc && !app->app_local->extcap.is_v2) - rc = iso7816_reset_retry_counter (app->slot, 0x82, - pinvalue, strlen (pinvalue)); - } + rc = iso7816_reset_retry_counter (app->slot, 0x81, + pinvalue, strlen (pinvalue)); + if (!rc && !app->app_local->extcap.is_v2) + rc = iso7816_reset_retry_counter (app->slot, 0x82, + pinvalue, strlen (pinvalue)); } else if (!app->app_local->extcap.is_v2) { @@ -2208,7 +2162,7 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr, gpg_strerror (rc)); goto leave; } - rc = iso7816_change_reference_data_kp (app->slot, 0x80 + chvno, + rc = iso7816_change_reference_data_kp (app->slot, 0x80 + chvno, 0, &pininfo); pincb (pincb_arg, NULL, NULL); /* Dismiss the prompt. */ } diff --git a/scd/iso7816.c b/scd/iso7816.c index 8876b93..45f5e08 100644 --- a/scd/iso7816.c +++ b/scd/iso7816.c @@ -307,16 +307,18 @@ iso7816_verify (int slot, int chvno, const char *chv, size_t chvlen) /* Perform a CHANGE_REFERENCE_DATA command on SLOT for the card holder verification vector CHVNO. With PININFO non-NULL the keypad of the - reader will be used. */ + reader will be used. If IS_EXCHANGE is 0, a "change reference + data" is done, otherwise an "exchange reference data". */ gpg_error_t -iso7816_change_reference_data_kp (int slot, int chvno, +iso7816_change_reference_data_kp (int slot, int chvno, int is_exchange, iso7816_pininfo_t *pininfo) { int sw; - sw = apdu_keypad_modify (slot, 0x00, CMD_CHANGE_REFERENCE_DATA, 0, chvno, - pininfo->mode, pininfo->minlen, pininfo->maxlen, - pininfo->padlen); + sw = apdu_keypad_modify (slot, 0x00, CMD_CHANGE_REFERENCE_DATA, + is_exchange ? 1 : 0, + chvno, pininfo->mode, pininfo->minlen, + pininfo->maxlen, pininfo->padlen); return map_sw (sw); } @@ -354,19 +356,6 @@ iso7816_change_reference_data (int slot, int chvno, gpg_error_t -iso7816_reset_retry_counter_with_rc_kp (int slot, int chvno, - iso7816_pininfo_t *pininfo) -{ - int sw; - - sw = apdu_keypad_modify (slot, 0x00, CMD_RESET_RETRY_COUNTER, 0, chvno, - pininfo->mode, pininfo->minlen, pininfo->maxlen, - pininfo->padlen); - return map_sw (sw); -} - - -gpg_error_t iso7816_reset_retry_counter_with_rc (int slot, int chvno, const char *data, size_t datalen) { @@ -382,19 +371,6 @@ iso7816_reset_retry_counter_with_rc (int slot, int chvno, gpg_error_t -iso7816_reset_retry_counter_kp (int slot, int chvno, - iso7816_pininfo_t *pininfo) -{ - int sw; - - sw = apdu_keypad_modify (slot, 0x00, CMD_RESET_RETRY_COUNTER, 2, chvno, - pininfo->mode, pininfo->minlen, pininfo->maxlen, - pininfo->padlen); - return map_sw (sw); -} - - -gpg_error_t iso7816_reset_retry_counter (int slot, int chvno, const char *newchv, size_t newchvlen) { @@ -445,19 +421,6 @@ iso7816_get_data (int slot, int extended_mode, int tag, } -gpg_error_t -iso7816_put_data_kp (int slot, int tag, iso7816_pininfo_t *pininfo) -{ - int sw; - - sw = apdu_keypad_modify (slot, 0x00, CMD_PUT_DATA, - ((tag >> 8) & 0xff), (tag & 0xff), - pininfo->mode, pininfo->minlen, pininfo->maxlen, - pininfo->padlen); - return map_sw (sw); -} - - /* Perform a PUT DATA command on card in SLOT. Write DATA of length DATALEN to TAG. EXTENDED_MODE controls whether extended length headers or command chaining is used instead of single length diff --git a/scd/iso7816.h b/scd/iso7816.h index 9ed7b21..336208a 100644 --- a/scd/iso7816.h +++ b/scd/iso7816.h @@ -68,19 +68,15 @@ gpg_error_t iso7816_change_reference_data (int slot, int chvno, const char *oldchv, size_t oldchvlen, const char *newchv, size_t newchvlen); gpg_error_t iso7816_change_reference_data_kp (int slot, int chvno, + int is_exchange, iso7816_pininfo_t *pininfo); gpg_error_t iso7816_reset_retry_counter (int slot, int chvno, const char *newchv, size_t newchvlen); -gpg_error_t iso7816_reset_retry_counter_kp (int slot, int chvno, - iso7816_pininfo_t *pininfo); gpg_error_t iso7816_reset_retry_counter_with_rc (int slot, int chvno, const char *data, size_t datalen); -gpg_error_t iso7816_reset_retry_counter_with_rc_kp (int slot, int chvno, - iso7816_pininfo_t *pininfo); gpg_error_t iso7816_get_data (int slot, int extended_mode, int tag, unsigned char **result, size_t *resultlen); -gpg_error_t iso7816_put_data_kp (int slot, int tag, iso7816_pininfo_t *pininfo); gpg_error_t iso7816_put_data (int slot, int extended_mode, int tag, const void *data, size_t datalen); gpg_error_t iso7816_put_data_odd (int slot, int extended_mode, int tag, ----------------------------------------------------------------------- Summary of changes: scd/apdu.c | 44 ++++--------- scd/app-openpgp.c | 182 ++++++++++++++++++++--------------------------------- scd/iso7816.c | 51 ++------------- scd/iso7816.h | 6 +-- 4 files changed, 89 insertions(+), 194 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Dec 2 12:28:39 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 02 Dec 2011 12:28:39 +0100 Subject: [git] GPGME - branch, master, updated. gpgme-1.3.1-3-ga4c4ee1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via a4c4ee1aaea4359432bdf60dd572f549ef8dee83 (commit) from 3ddf4c3d4000a9b0b52180c3aa3acf1387a193bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a4c4ee1aaea4359432bdf60dd572f549ef8dee83 Author: Werner Koch Date: Fri Dec 2 11:32:31 2011 +0100 Generate the ChangeLog from commit logs. * build-aux/gitlog-to-changelog: New script. Taken from gnulib. * build-aux/git-log-fix: New file. * build-aux/git-log-footer: New file. * build-aux/git-hook/commit-msg: New script. * doc/HACKING: New file. * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. * autogen.sh: Install commit-msg hook for git. Rename all ChangeLog files to ChangeLog-2011. diff --git a/.gitignore b/.gitignore index 0b336ea..983abda 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,8 @@ /config.h.in /configure Makefile.in +/doc/gpgme.info +/doc/gpgme.info-1 +/doc/gpgme.info-2 +/doc/stamp-vti +/doc/version.texi diff --git a/ChangeLog b/ChangeLog index e8cb265..dda15a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,1030 +1,16 @@ -2011-10-25 Marcus Brinkmann +No more ChangeLog files +======================== - * m4/pth.m4: Removed. - * configure.ac: Remove check for pth and automake conditional - HAVE_PTH. +Do not modify any of the ChangeLog files in GPGME. Starting on +December 1st, 2011 we put change information only in the GIT commit +log, and generate a top-level ChangeLog file from logs at "make dist" +time. As such, there are strict requirements on the form of the +commit log messages. See doc/HACKING for details. The old ChangeLog +files have all be renamed to ChangeLog-2011. -2011-06-16 Marcus Brinkmann - Release 1.3.1 - * configure.ac: Set LT version to C19/A8/R0. - -2011-05-06 Marcus Brinkmann - - * Makefile.am (SUBDIRS): Remove complus. - - * configure.ac (AC_CONFIG_FILES): Remove complus/Makefile. - (BUILD_COMPLUS): Remove AM_CONDITIONAL. - * complus/: Remove very old and stale component. - - * acinclude.m4 (GNUPG_FIX_HDR_VERSION): Remove. - -2011-04-14 Werner Koch - - * configure.ac: Require automake 1.11. - -2011-04-06 Werner Koch - - * autogen.sh (--build-w32): Support option --build-w64. - * configure.ac (HAVE_W64_SYSTEM): Define. - (INSERT__TYPEDEFS_FOR_GPGME_H): New. - (GPGME_CONFIG_HOST): New. - -2011-02-02 Marcus Brinkmann - - * configure.ac (NEED_LIBASSUAN_VERSION): Bump to 2.0.2 for system hooks. - -2010-12-30 Werner Koch - - * configure.ac: Support a git revision. - -2010-11-03 Werner Koch - - * configure.ac (AC_CHECK_HEADERS): Check for sys/types.h and - sys.stat.h. - -2010-11-02 Werner Koch - - * configure.ac (AC_CHECK_HEADERS): Check for sys.time.h. - -2010-08-19 Werner Koch - - * configure.ac (AH_BOTTOM): Define GPG_ERR_ENABLE_ERRNO_MACROS. - -2010-05-12 Marcus Brinkmann - - * configure.ac: Check for setlocale. - -2010-05-07 Werner Koch - - * configure.ac: Change checks to always require libassuan. - -2010-05-07 Marcus Brinkmann - - * autogen.sh: Update the thing. - - * configure.ac: Check for locale.h. - -2010-05-06 Marcus Brinkmann - - * configure.ac: Detect Windows CE. - (HAVE_W32CE_SYSTEM): New symbol and automake conditional. - * ltmain.sh, m4/libtool.m4: Patch so that it works for Windows CE. - - * configure.ac: Require libgpg-error 1.8. - -2010-03-15 Werner Koch - - * configure.ac (emacs_local_vars_begin) - (emacs_local_vars_read_only, emacs_local_vars_end): New. - -2010-01-22 Werner Koch - - * autogen.sh (--build-w32): Add --with-libassuan-prefix. - -2010-01-11 Marcus Brinkmann - - Release 1.3.0. - -2009-12-22 Marcus Brinkmann - - * configure.ac: Do not use echo -n. Test for __thread. - -2009-12-17 Marcus Brinkmann - - * configure.ac: Make largefile check more robust. - -2009-12-10 Werner Koch - - * configure.ac: Check for getgid and getegid. - -2009-12-08 Marcus Brinkmann - - Update to libtool 2.2.6a. - * configure.ac: Invoke AC_CONFIG_MACRO_DIR. - (AC_LIBTOOL_WIN32_DLL, AC_LIBTOOL_RC): Replace by ... - (LT_PREREQ, LT_INIT, LT_LANG): ... these. - * config.guess, config.sub, install-sh, ltmain.sh, m4/libtool.m4: - Updated to libtool 2.2.6a. - * m4/ltoptions.m4, m4/ltsugar.m4, m4/ltversion.m4, - m4/lt~obsolete.m4: New files from libtool 2.2.6a. - -2009-11-10 Marcus Brinkmann - - * configure.ac: Activate UIServer if FD passing is enabled and - Assuan is available. - -2009-10-30 Marcus Brinkmann - - * configure.ac: Check for argp.h and error_t. - -2009-10-26 Marcus Brinkmann - - * configure.ac (NEED_GPG_VERSION_DEFAULT): Bump to 1.4.0 as 1.3.0 - was development versions only. - -2009-10-22 Marcus Brinkmann - - * configure.ac: Add support for G13. - -2009-10-20 Marcus Brinkmann - - * configure.ac (AC_CONFIG_FILES): Remove assuan/Makefile. - -2009-10-20 Marcus Brinkmann - - * configure.ac: Replace internal libassuan by external libassuan. - * m4/libassuan.m4: New file. - * Makefile.am (assuan): Remove variable. - (SUBDIRS): Remove ${assuan}. - * assuan/: Removed. - -2009-06-22 Marcus Brinkmann - - * configure.ac: Add AC_TYPE_UINTPTR_T. - - * assuan/assuan.h [_ASSUAN_IN_GPGME_BUILD_ASSUAN]: Declare - _gpgme_io_connect. - -2009-06-18 Marcus Brinkmann - - Released GPGME 1.2.0. - - * configure.ac (my_version): Set to 1.2.0. - (LIBGPGME_LT_CURRENT, LIBGPGME_LT_AGE): Bump. - (LIBGPGME_LT_REVISION): Reset. - -2009-05-05 Marcus Brinkmann - - * configure.ac: Add infrastructure for compile time check of - _FILE_OFFSET_BITS. - -2009-04-19 Moritz - - * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Specify --with-gpg. - -2009-03-06 Marcus Brinkmann - - * assuan/: Update to libassuan SVN 2009-03-06. - -2009-01-26 Werner Koch - - * configure.ac (AC_CONFIG_FILES): Add tests/opassuan/Makefile. - -2008-12-08 Marcus Brinkmann - - Release GPGME 1.1.8. - - * configure.ac: Bump API revision. - -2008-11-03 Marcus Brinkmann - - * configure.ac: Replace gpgme paths with src. - * gpgme: Move to ... - * src: ... this new directory. - -2008-10-20 Werner Koch - - * configure.ac (AC_CONFIG_FILES): Add gpgme.h. - (GNUPG_FIX_HDR_VERSION): Remove. - -2008-10-17 Marcus Brinkmann - - Release GPGME 1.1.7. - - * configure.ac (LIBGPGME_LT_REVISION): Bump for release. - -2008-09-19 Moritz - - * configure.ac: Remove bogus "esac". - -2008-09-16 Marcus Brinkmann - - * configure.ac (_XOPEN_SOURCE) [apple-darwin]: Define it. - -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. - -2008-01-30 Marcus Brinkmann - - * configure.ac: Bump required version of automake up to 1.10. - * autogen.sh: Fix aclocal check. - -2008-01-04 Marcus Brinkmann - - Release GPGME 1.1.6. - - * configure.ac: Support gpgconf. - -2007-09-27 Marcus Brinkmann - - * assuan-pipe-connect.c (pipe_connect_gpgme): Do not close process - handle here. Use this function also on Unix systems. - - * assuan-pipe-connect.c (pipe_connect_gpgme): Fix last change. - - * assuan-pipe-connect.c (pipe_connect_gpgme): New function, use it - if _ASSUAN_IN_GPGME_BUILD_ASSUAN. - -2007-09-17 Werner Koch - - * configure.ac: Use the svn version magic. - -2007-09-07 Marcus Brinkmann - - * configure.ac: Check for C++, Qt and support --enable-w32-qt. - * m4/pkg.m4: New file. - -2007-08-21 Marcus Brinkmann - - * configure.ac (--enable-w32-glib): Use --enableval, not - --withval. - -2007-07-16 Marcus Brinkmann - - * assuan/assuan-socket.c (_assuan_close): Always use close(). - * assuan/assuan.h (_gpgme_io_close): New prototype. - (close): New macro, define as _gpgme_io_close. - -2007-07-13 Marcus Brinkmann - - * assuan/assuan-io.c (_assuan_simple_read, _assuan_simple_write): - Always use read/write (which means _gpgme_io_read and - _gpgme_io_write). - -2007-07-09 Marcus Brinkmann - - Released 1.1.5. - - * configure.ac (LIBGPGME_LT_REVISION): Bump for release. - -2007-07-08 Marcus Brinkmann - - * configure.ac (GPGSM_DEFAULT) [*-mingw32*]: Initialize it. - (HAVE_ASSUAN_H): Set to 1 if we have it. - (funopen): Use AC_REPLACE_FUNCS. - (USE_DESCRIPTOR_PASSING): Define to 1 if we have it. Do not - define it at all if we don't. - (NETLIBS) [have_w32_system]: Add -lws2_32. - (DIRSEP_C, DIRSEP_S, EXPSEP_C, EXPSEP_S, PATHSEP_S) - [HAVE_DOSISH_SYSTEM]: Remove definitions. - - * assuan/assuan.h (_assuan_funopen): Define to _gpgme_funopen. - * assuan/funopen.c: Move to ../gpgme/funopen.c. - * assuan/Makefile.am (libassuan_la_SOURCES): Remove funopen.c. - -2007-07-04 Marcus Brinkmann - - * assuan/Makefile.am (INCLUDES): Include $(top_srcdir)/gpgme. - * assuan/assuan.h: Include instead of trying to duplicate - the definitions. - - * assuan/: Update files to 2007-07-04 version of assuan. - - * autogen.sh: Use = not == in test. - -2007-03-05 Werner Koch - - Released 1.1.4. - - * configure.ac (LIBGPGME_LT_REVISION): Bump for release. - - * autogen.sh: New option --force. - -2007-01-29 Marcus Brinkmann - - Released 1.1.3. - - * configure.ac (LIBGPGME_LT_REVISION): Bump for release. - -2007-01-26 Werner Koch - - * configure.ac: Changed gpg and gpgsm version checks to work with - arbitrary names of the gpg binary. New option --disable-gpg-test - and --disable-gpgsm-test. - -2007-01-09 Werner Koch - - * configure.ac (NEED_GPG_VERSION, NEED_GPGSM_VERSION): Must define - after it may have been changed by an option. - -2007-01-08 Werner Koch - - * configure.ac: Require gpg-error 1.4 due to the use of - gpg_error_from_syserror. - (HAVE_ASSUAN_H): New. - -2007-01-05 Marcus Brinkmann - - * configure.ac: Add options --with-gpg-version and - --with-gpgsm-version to allow overriding the minimum version - requirements. - -2006-12-17 Marcus Brinkmann - - * configure.ac: Fix two typos in last change. - -2006-12-03 Marcus Brinkmann - - * configure.ac: Use descriptor passing only if --enable-fd-passing - is provided. - - * configure.ac: Add check for use of descriptor passing. - -2006-11-29 Marcus Brinkmann - - * configure.ac (NEED_GPG_VERSION): Bump to 1.3.0. - -2006-09-19 Marcus Brinkmann - - * configure.ac: Turn stpcpy into a replacement function. - Check for unistd.h and add setenv as replacement function. - -2006-07-29 Marcus Brinkmann - - * configure.ac: Check for network libraries and set NETLIBS. - -2006-07-06 Marcus Brinkmann - - * lang, lang/cl: New subdirectories. - * lang/Makefile.am, lang/README: New files. - * configure.ac (AC_CONFIG_FILES): Add lang/Makefile, - lang/cl/Makefile and lang/cl/gpgme.asd. - * Makefile.am (SUBDIRS): Add lang. - -2006-03-02 Marcus Brinkmann - - * configure.ac (LIBGPGME_LT_REVISION): Bump for release. - -2006-02-22 Marcus Brinkmann - - Released 1.1.1. - - * configure.ac (LIBGPGME_LT_CURRENT, LIBGPGME_LT_AGE): Bump for - release. - (LIBGPGME_LT_REVISION): Reset to 0 for release. - -2006-01-05 Werner Koch - - * configure.ac: Test for inline feature. - (AH_BOTTOM): New to define the pure attribute. - -2006-01-03 Werner Koch - - * configure.ac: Append SVN revision to the version. - -2005-11-18 Werner Koch - - * configure.ac (BUILD_REVISION): New. - -2005-11-17 Marcus Brinkmann - - * configure.ac: Add support for --enable-w32-glib (disabled by - default). Invoke AM_PATH_GLIB_2_0. - -2005-11-16 Werner Koch - - * configure.ac (CFLAGS) [W32]: Make sure that -mms-bitfields are used. - -2005-11-15 Werner Koch - - * configure.ac: Create BUILD_FILEVERSION from SVN Revision. - - * autogen.sh [W32]: Build shared and static versions of the library. - -2005-10-20 Marcus Brinkmann - - * w32-dll/ChangeLog, w32-dll/build-dll, w32-dll/gpgme.def: Remove - files. - - * configure.ac: Instead checking for windres and dlltool, invoke - AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_RC. - * src/Makefile.am [HAVE_W32_SYSTEM]: Use libtool, which simplifies - the rules. - -2005-10-01 Marcus Brinkmann - - Released 1.1.0. - - * configure.ac (LIBGPGME_LT_CURRENT, LIBGPGME_LT_AGE): Bump for - release. - (LIBGPGME_LT_REVISION): Reset to 0 for release. - -2005-09-12 Marcus Brinkmann - - * configure.ac (HAVE_PTH): Don't add $PTH_CFLAGS to $CFLAGS here. - -2005-08-26 Werner Koch - - * configure.ac (SEPCONSTANTS): New to define DIRSEP_C et al. - -2005-08-19 Werner Koch - - * configure.ac [W32]: Create values for versioninfo.rc and list - substuture versioninfo.rc. - * configure.ac: Define ENABLE_GPGSM. - -2005-08-08 Werner Koch - - * configure.ac (stpcpy): Changed from replace to test. - -2005-03-24 Marcus Brinkmann - - * configure.ac (AH_BOTTOM): Removed. - -2005-03-09 Werner Koch - - * acinclude.m4 (GNUPG_CHECK_VA_COPY): Assume no when cross-compiling. - - * Makefile.am (EXTRA_DIST): Include autogen.sh - - * autogen.sh: Added the usual code to build for W32 (--build-w32). - - * configure.ac: Fixed the mingw32 host string, removed OS/2 stuff. - (HAVE_DRIVE_LETTERS): Removed. - (HAVE_W32_SYSTEM): Added. - (AC_GNU_SOURCE): New to replace the identical AH_VERBATIM. - (AH_BOTTOM): Added. - -2004-12-28 Werner Koch - - Released 1.0.2. - - * Makefile.am (AUTOMAKE_OPTIONS): Build bzip 2 version. - (ACLOCAL_AMFLAGS): Add -I m4. - * configure.ac: Require automake 1.9.3 and autoconf 2.59. - * acinclude.m4: Changed quoting for automake 1.9. - * README: Use SHA1 instead of MD5. - -2004-12-11 Marcus Brinkmann - - * configure.ac: Replace ttyname_r if it doesn't exist (and warn in - that case). - -2004-12-07 Marcus Brinkmann - - * README: Refer to COPYING.LESSER and "each file" instead of - COPYING. - * COPYING.LESSER: New file. - * gpgme.spec.in (%doc): Add COPYING.LESSER. - * acinclude.m4, configure.ac, Makefile.am: Change license to LGPL - 2.1 or later. - * TODO: Add copyright notice. - * README.CVS: Likewise. - - * configure.ac (GPGSM_VERSION): Fix filter to get it. - -2004-10-22 Marcus Brinkmann - - Released 1.0.1. - - * configure.ac (LIBGPGME_LT_REVISION): Bump up to 2. - (AC_INIT): Set version to 1.0.1. - - * configure.ac: Set HAVE_GPGSM to true only if $GPGSM is not "no". - -2004-09-30 Marcus Brinkmann - - Released 1.0.0. - - * configure.ac (LIBGPGME_LT_REVISION): Bump up to 1. - (AC_INIT): Set version to 1.0.0. - - * Makefile.am (EXTRA_DIST): Remove README-alpha. - * README-alpha: Remove file. - -2004-09-17 Marcus Brinkmann - - * configure.ac: Disable AC_CONFIG_MACRO_DIR for now. - -2004-09-14 Marcus Brinkmann - - * configure.ac: Improve diagnostics with version check. - - * configure.ac: Print diagnostics about found thread libraries at - the end. Check for the versions of GPG and GPGSM and print the - found versions at the end. - (HAVE_GPGSM): Do not require GPGSM to exist and be readable. - (AC_CONFIG_MACRO_DIR): Invoke with argument m4. - - * acinclude.m4: Add copyright notice. - (jm_GLIBC21, AM_PATH_GPG_ERROR, _AC_PTH_ERROR, _AC_PTH_VERBOSE, - AC_CHECK_PTH): Removed. - -2004-06-23 Marcus Brinkmann - - * configure.ac: Check for . - -2004-06-08 Marcus Brinkmann - - Released 0.9.0. - - * configure.ac (AC_INIT): Set version number to 0.9.0. - (LIBGPGME_LT_CURRENT, LIBGPGME_LT_AGE): Bump up by one. - (LIBGPGME_LT_REVISION): Reset to zero. - -2004-05-21 Marcus Brinkmann - - * configure.ac (GPGME_CONFIG_API_VERSION): New variable, - substitute it. - -2004-04-29 Marcus Brinkmann - - Released 0.4.7. - - * configure.ac (LIBGPGME_LT_REVISION): Bump it up. - -2004-04-02 Thomas Schwinge - - * autogen.sh: Added ACLOCAL_FLAGS. - -2004-04-06 Werner Koch - - Released 0.4.6. - - * config.guess, config.sub, ltmain.sh: Updated to those from - libtools 1.5.4. - -2004-03-07 Marcus Brinkmann - - Released 0.4.5. - - * configure.ac (NEED_GPGSM_VERSION): Bump up to 1.9.6. - - * Makefile.am (EXTRA_DIST): Remove autogen.sh and README.CVS. - -2004-02-18 Werner Koch - - * configure.ac: Make the check for funopen fail with just a - warning. - -2004-02-11 Werner Koch - - * autogen.sh (check_version): Removed bashism and simplified. - -2004-02-10 Werner Koch - - * configure.ac: Fixed funopen test change. - -2004-02-06 Moritz Schulte - - * configure.ac: Fix funopen replacement mechanism. - -2004-01-31 Marcus Brinkmann - - * configure.ac: Add invocation of AC_SYS_LARGEFILE, AC_TYPE_OFF_T - and AC_FUNC_FSEEKO. - -2004-01-12 Werner Koch - - Released 0.4.4. - - * configure.ac: Bumbed LT_Revision; now at C12/A1/R1. - (NEED_GPGSM_VERSION): Set to 1.9.3. - (min_automake_version): Added. - * README.CVS: New. - * Makefile.am (EXTRA_DIST): Added README.CVS. - * autogen.sh: Updated. - -2003-11-19 Werner Koch - - * acinclude.m4: Add AM_PATH_GPG_ERROR. - * configure.ac: Check for timegm. Made warning messages more - prominent. - -2003-10-06 Marcus Brinkmann - - Released 0.4.3. - - * configure.ac (LIBGPGME_LT_CURRENT, LIBGPGME_LT_AGE): Bump up by 1. - (LIBGPGME_LT_REVISION): Set to 0. - -2003-09-13 Marcus Brinkmann - - * configure.ac: Require libgpg-error 0.5. - - * acinclude.m4: Remove libtool cruft, add jm_GLIBC21. - * configure.ac: Add check for getenv_r, and call jm_GLIBC21. - Define HAVE_THREAD_SAFE_GETENV if appropriate. - -2003-09-03 Marcus Brinkmann - - * configure.ac: Remove GPGME_CONFIG_LIBS and GPGME_CONFIG_CFLAGS. - -2003-09-02 Marcus Brinkmann - - * configure.ac: Move invocation of AC_CANONICAL_HOST up to - suppress warning by autoconf. - -2003-08-30 Robert Schiele - - * gpgme.spec.in: %{_infodir}/dir is not packaged, - remove to prevent checking failure. - -2003-08-18 Marcus Brinkmann - - * configure.ac: If building Assuan, check for funopen and - fopencookie, and make isascii, putc_unlocked and memrchr - replacement functions. - (AM_PATH_GPG_ERROR): Require 0.3. - -2003-07-31 Marcus Brinkmann - - * configure.ac (AC_INIT): Bump version to 0.4.3. - -2003-07-30 Marcus Brinkmann - - * configure.ac (LIBGPGME_LT_REVISION): Bump up to 1. - - Released 0.4.2. - -2003-07-08 Marcus Brinkmann - - * configure.ac: Complain if libgpg-error is not found. - -2003-06-22 Marcus Brinkmann - - * configure.ac (AC_INIT): Bump version to 0.4.2. - -2003-06-06 Marcus Brinkmann - - * configure.ac (LIBGPGME_LT_CURRENT): Bump up to 11. - - * configure.ac: Use AM_PATH_GPG_ERROR. - - * configure.ac: Check for libgpg-error. Define - GPG_ERR_SOURCE_DEFAULT. - -2003-05-26 Marcus Brinkmann - - * configure.ac (NEED_GPG_VERSION): Bump up to 1.2.2. - -2003-05-18 Marcus Brinkmann - - In all files, replace the Gpgme* type names with the new gpgme_* - type names. - -2003-02-01 Marcus Brinkmann - - * assuan/: Update files to 2002-11-10 version of assuan. - -2003-01-29 Marcus Brinkmann - - * bonobo/gpgme.c, bonobo/main.c, bonobo/main.h, bonobo/Makefile, - bonobo/Makefile.am, bonobo/Makefile.in: Dead files removed. - * configure.ac: Remove automake conditional BUILD_BONOBO - (AC_CONFIG_FILES): Remove bonobo/Makefile. - * Makefile.am (bonobo): Remove variable. - (SUBDIRS): Remove ${bonobo}. - - * configure.ac: Remove all uses of GNUPG_CHECK_TYPEDEF, for byte, - ushort, ulong, u16 and u32. - * acinclude.m4 (GNUPG_CHECK_TYPEDEF): Remove macro. - -2002-12-24 Marcus Brinkmann - - * configure.ac: New conditional HAVE_LD_VERSION_SCRIPT. - Call AC_CANONICAL_HOST, use host instead target. - -2002-12-23 Marcus Brinkmann - - * configure.ac: Bump up to 0.4.1. - - Released 0.4.0. - -2002-12-23 Marcus Brinkmann - - * autogen.sh (automake_vers): Require 1.7 (really 1.7.1) for the - conditional source distribution bug fix. - -2002-12-08 Marcus Brinkmann - - * configure.ac (LIBGPGME_LT_CURRENT): Increase by one. - (LIBGPGME_LT_AGE, LIBGPGME_LT_REVISION): Set to 0. - -2002-11-28 Marcus Brinkmann - - * NEWS: Add note about moving "gpgmeplug" to the "cryptplug" - package. - * README: Remove instructions related to "gpgmeplug". - * configure.ac: Remove enable option "gpgmeplug" and automake - conditional BUILD_GPGMEPLUG, as well as the status info about it. - (GPGMEPLUG): Remove variable. - * Makefile.am (gpgmeplug): Remove variable. - (SUBDIRS): Remove ${gpgmeplug}. - * cryptplug.h, gpgme-openpgp.c, gpgmeplug.dox, gpgme-smime.c, - Makefile.am, gpgmeplug.c, ChangeLog: Files removed. - -2002-11-22 Marcus Brinkmann - - * configure.ac: Disable GPGSM for all dosish systems. - -2002-10-12 Marcus Brinkmann - - * configure.ac: Add automake conditional HAVE_GPGSM. - -2002-10-08 Marcus Brinkmann - - * configure.ac (AC_INIT): Bump version up to 0.4.0. - (NEED_GPG_VERSION): Bump up to 1.2.0. - (NEED_GPGSM_VERSION): Bump up to 0.9.0. - * README: Update version numbers. - * NEWS: Start entry for 0.4.0. - -2002-09-20 Werner Koch - - Released 0.3.11. - - * configure.ac: Bump up LIBGPGME_LT_REVISION. - - * configure.ac (AC_CHECK_HEADERS): Check for sys/select.h. - -2002-09-04 Marcus Brinkmann - - * autogen.sh (autoconf_vers): Bump up to 2.53 to get the @&t@ - quadrigraph. Always cutting the edge! - -2002-09-02 Marcus Brinkmann - - * configure.ac: Create and substitute LTLIBOBJS. - -2002-09-02 Marcus Brinkmann - - Released 0.3.10. - - * NEWS: Update for 0.3.9 release. - * configure.ac: Bump up LIBGPGME_LT_REVISION. - -2002-08-29 Marcus Brinkmann - - * gpgme.spec.in: Changed user name in Wojciech Polak's email - address from ghostface to polak per request by himself. - -2002-08-28 Werner Koch - - * acinclude.m4 (GNUPG_CHECK_VA_COPY): New. - * configure.ac: Use it. - -2002-08-23 Werner Koch - - * configure.ac (GPGME_CONFIG_CFLAGS): Renamed from GPGME_CFLAGS - and removed the libpath because it is set by the config script. - -2002-08-21 Marcus Brinkmann - - * configure.ac: Bump version number to 0.3.10. - - * NEWS: Add template for development version. - -2002-08-21 Marcus Brinkmann - - Released 0.3.9. - - * NEWS: Update for 0.3.9 release. - * Makefile.am (EXTRA_DIST): Add gpgme.spec.in. - -2002-08-21 Marcus Brinkmann - - * jnlib/argparse.c, jnlib/argparse.h, jnlib/ChangeLog, - jnlib/dotlock.c, jnlib/dotlock.h, jnlib/libjnlib-config.h, - jnlib/logging.c, jnlib/logging.h,jnlib/Makefile.am, - jnlib/mischelp.h, jnlib/README, jnlib/stringhelp.c, - jnlib/stringhelp.h, jnlib/strlist.c, jnlib/strlist.h, - jnlib/types.h, jnlib/xmalloc.c, jnlib/xmalloc.h: Remove files. - -2002-08-21 Marcus Brinkmann - - * Makefile.am (SUBDIRS): Remove jnlib. - * configure.ac: Don't check for unsigned short or unsigned long. - Don't check for memicmp, strlwr, strtoul, memmove, stricmp. - Make stpcpy a replaced function. - Don't define HAVE_JNLIB_LOGGING. - Don't generate jnlib/Makefile. - -2002-07-02 Werner Koch - - * configure.ac: Bumbed version number to 0.3.9; add a comment on - when to change it. - - * gpgme.spec.in: New. Contributed by Wojciech Polak. - * Makefile.am (dist-hook): New. - - * AUTHORS: Added Wojciech and bug reporting addresses. - -2002-06-25 Werner Koch - - Released 0.3.8. - - * configure.ac: Bumbed LT version to 9/3/0. - (NEED_GPGSM_VERSION): Need 0.3.8 due to fixed export command. - -2002-06-04 Marcus Brinkmann - - Released 0.3.7. - - * configure.ac (AC_INIT): Set version to 0.3.7. - (LIBGPGME_LT_REVISION): Add one. - - * README: Document version requirement correctly. - -2002-06-02 Marcus Brinkmann - - * acinclude.m4: Fix Pth check so that it doesn't error out if pth - is not found. - -2002-06-02 Marcus Brinkmann - - * configure.ac: Add checks for Pth and pthreads. - * acinclude.m4: Add slightly hacked check for pth (seems to be an - autoconf version problem). - -2002-05-21 Werner Koch - - * configure.ac (NEED_GPGSM_VERSION): We need gpgsm 0.3.7. - -2002-05-03 Werner Koch - - Released 0.3.6. - -2002-04-05 Marcus Brinkmann - - * acconfig.h: File removed. - * configure.ac (NEED_GPG_VERSION): Add description. - (NEED_GPGSM_VERSION): Likewise. - (HAVE_DOSISH_SYSTEM): Likewise. - (HAVE_DRIVE_LETTERS): Likewise. - (GPG_PATH): Likewise. - (GPGSM_PATH): Likewise. - * acinclude.m4 (GNUPG_CHECK_TYPEDEF): Likewise. - -2002-04-01 Werner Koch - - Released 0.3.5. - -2002-03-17 Marcus Brinkmann - - * configure.ac: Add automake conditional HAVE_DOSISH_SYSTEM. - -2002-03-04 Werner Koch - - * configure.ac: Bumbed version to 0.3.4-cvs to continue development. - - Released 0.3.4. - - * configure.ac: Bumbed LT version numbers to (7,1,0), requires - gpgsm 0.3.1. - -2002-03-03 Marcus Brinkmann - - * configure.ac (AC_INIT): Change version number to snapshot CVS - version. - -2002-02-13 Werner Koch - - * configure.ac (vasprintf,fopencookie): Add checks. - -2002-02-12 Marcus Brinkmann - - * configure.ac (AC_INIT): Bump version to 0.3.3. - * jnlib/Makefile.am: Rever to older version that includes xmalloc - but not dotlock and some other files. Reported by St?phane - Corth?sy. - -2002-02-10 Marcus Brinkmann - - * Released 0.3.2. - - * configure.ac (AC_INIT): Bump version to 0.3.2. - * jnlib/libjnlibconfig.h: Revert to older version that doesn't - expect libgcrypt. Reported by Jose Carlos Garcia Sogo - . - -2002-02-09 Marcus Brinkmann - - * Released 0.3.1. - - * configure.ac (LIBGPGME_LT_CURRENT): Bump it up to 6! - (NEED_GPGSM_VERSION): Bump it up to 0.3.0! - (AC_INIT): Bump version to 0.3.1 - -2002-01-22 Marcus Brinkmann - - * configure.ac (HAVE_JNLIB_LOGGING): Define always for assuan. - -2001-12-19 Werner Koch - - * configure.ac (VERSION,PACKAGE): Defined and subst. Used for - AM_INIT_AUTOMAKE and moved all version number more to the top. - -2001-12-18 Marcus Brinkmann - - * autogen.sh (libtool_vers): Bump to 1.4. - - * configure.ac (LIBGPGME_LT_CURRENT): Increment. - (LIBGPGME_LT_AGE): Reset. - Improve comment. - Fix wrong comment character. - -2001-12-18 Werner Koch - - * acinclude.m4 (GNUPG_FIX_HDR_VERSION): Fixed for new automake. - -2001-12-14 Marcus Brinkmann - - * configure.ac (GPG): Substitute this variable. - (GPGSM): Likewise. - -2001-11-22 Marcus Brinkmann - - * configure.ac (AC_CONFIG_FILES): Add tests/gpg/Makefile and - tests/gpgsm/Makefile. - -2001-11-21 Marcus Brinkmann - - * Makefile.am (gpgmeplug): New variable, set to gpgmeplug if - [BUILD_GPGMEPLUG]. - * configure.ac (AC_CONFIG_FILES): Add gpgmeplug/Makefile. - Support --enable-gpgmeplug. - -2001-11-21 Marcus Brinkmann - - * autogen.sh: Tighten version dependencies. - -2001-11-20 Marcus Brinkmann - - * Makefile.am (SUBDIRS): Support building the assuan library - (currently if GPGSM_PATH is set).. - * configure.ac: Support building the assuan library. - * assuan: New directory, populated with the Assuan library - (copied from the newpg repository). - -2001-11-20 Marcus Brinkmann - - * configure.ac (NEED_GPGSM_VERSION): New variable. Treat it - similarly to NEED_GPG_VERSION. - * acconfig.h: Likewise. - -2001-11-18 Marcus Brinkmann - - * configure.in: Renamed to ... - * configure.ac: ... this. Update to autoconf 2.52. Lots of small - changes in the transition. Support --with-gpg=PATH and - --with-gpgsm=PATH options. Check if test suites can be run. - * acconfig.h: Add GPGSM_PATH. - * Makefile.am: New variable `tests', set to `tests' if - RUN_GPG_TESTS. - (SUBDIRS): Replace string `tests' with variable `tests'. - -2001-10-22 Marcus Brinkmann - - * autogen.sh: Invoke automake with `-a' (add missing files). - Do not invoke configure. - -2001-09-17 Werner Koch - - Released 0.2.3. - - * configure.in (NEED_GPG_VERSION): Set to 1.0.6. Incremented LT - current and age. - - * Makefile.am (SUBDIRS): Add doc - -2001-06-12 Werner Koch - - Released 0.2.2. - -2001-04-05 Werner Koch - - * configure.in (NEED_GPG_VERSION): Set to 1.0.4g - -2001-04-02 Werner Koch - - Released 0.2.1. - - Changed the copyright notices all over the place. - -2001-02-28 Werner Koch - - Released 0.2.0. - -2001-01-18 Werner Koch - - * autogen.sh: Added option --build-w32. - - - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011 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 - 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. +Local Variables: +buffer-read-only: t +mode: text +End: diff --git a/ChangeLog b/ChangeLog-2011 similarity index 98% copy from ChangeLog copy to ChangeLog-2011 index e8cb265..1273e8a 100644 --- a/ChangeLog +++ b/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-10-25 Marcus Brinkmann * m4/pth.m4: Removed. @@ -1019,7 +1026,8 @@ * autogen.sh: Added option --build-w32. - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, + 2011 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 diff --git a/Makefile.am b/Makefile.am index fb06867..1ab445d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,19 +1,19 @@ # Makefile.am - Top level Makefile for GPGME. # Copyright (C) 2000 Werner Koch (dd9jn) # Copyright (C) 2001, 2002, 2004, 2005, 2008, 2009 g10 Code GmbH -# +# # This file is part of GPGME. -# +# # GPGME is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. -# +# # GPGME is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General # Public License for more details. -# +# # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, see . @@ -24,21 +24,36 @@ AUTOMAKE_OPTIONS = dist-bzip2 DISTCHECK_CONFIGURE_FLAGS = --with-gpg="@GPG@" -EXTRA_DIST = gpgme.spec.in autogen.sh +EXTRA_DIST = gpgme.spec.in autogen.sh \ + ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 if RUN_GPG_TESTS tests = tests else -tests = +tests = endif SUBDIRS = src ${tests} doc lang -# Fix the version of the spec file and create a file named VERSION +# Fix the version of the spec file and create a file named VERSION # to be used for patch's Prereq: feature. -dist-hook: +dist-hook: gen-ChangeLog @set -e; \ sed -e 's/@pkg_version@/$(VERSION)/g' \ $(top_srcdir)/gpgme.spec.in > $(distdir)/gpgme.spec echo "$(VERSION)" > $(distdir)/VERSION + + +gen_start_date = 2011-12-01T00:00:00 +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d $(top_srcdir)/.git; then \ + (cd $(top_srcdir) && \ + ./build-aux/gitlog-to-changelog \ + --amend=build-aux/git-log-fix \ + --since=$(gen_start_date) ) > $(distdir)/cl-t; \ + cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi diff --git a/autogen.sh b/autogen.sh index 2d07948..b988ace 100755 --- a/autogen.sh +++ b/autogen.sh @@ -243,12 +243,37 @@ if test "$DIE" = "yes"; then cat <&2 +*** Activating trailing whitespace git pre-commit hook. *** + For more information see this thread: + http://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084html + To deactivate this pre-commit hook again move .git/hooks/pre-commit + and .git/hooks/pre-commit.sample out of the way. +EOF + cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit + chmod -c +x .git/hooks/pre-commit + fi + if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then + cat <&2 +*** Activating commit log message check hook. *** +EOF + cp -av build-aux/git-hooks/commit-msg .git/hooks/commit-msg + chmod -c +x .git/hooks/commit-msg + fi +fi + + + echo "Running aclocal -I m4 ${ACLOCAL_FLAGS:+$ACLOCAL_FLAGS }..." $ACLOCAL -I m4 $ACLOCAL_FLAGS echo "Running autoheader..." diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg new file mode 100755 index 0000000..5a697c7 --- /dev/null +++ b/build-aux/git-hooks/commit-msg @@ -0,0 +1,127 @@ +eval '(exit $?0)' && eval 'exec perl -w "$0" ${1+"$@"}' + & eval 'exec perl -w "$0" $argv:q' + if 0; + +# An hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, copy it to "~/.git/hooks/commit-msg". +# +# This script is based on the one from GNU coreutils. + +use strict; +use warnings; +(my $ME = $0) =~ s|.*/||; + +my $editor = $ENV{EDITOR} || 'vi'; +$ENV{PATH} = '/bin:/usr/bin'; + +# Rewrite the $LOG_FILE (old contents in @$LINE_REF) with an additional +# commented diagnostic "# $ERR" line at the top. +sub rewrite($$$) +{ + my ($log_file, $err, $line_ref) = @_; + local *LOG; + open LOG, '>', $log_file + or die "$ME: $log_file: failed to open for writing: $!"; + print LOG "# $err"; + print LOG @$line_ref; + close LOG + or die "$ME: $log_file: failed to rewrite: $!\n"; +} + +sub re_edit($) +{ + my ($log_file) = @_; + + warn "Interrupt (Ctrl-C) to abort...\n"; + + system 'sh', '-c', "$editor $log_file"; + ($? & 127) || ($? >> 8) + and die "$ME: $log_file: the editor ($editor) failed, aborting\n"; +} + +# Given a $LOG_FILE name and a \@LINE buffer, +# read the contents of the file into the buffer and analyze it. +# If the log message passes muster, return the empty string. +# If not, return a diagnostic. +sub check_msg($$) +{ + my ($log_file, $line_ref) = @_; + + local *LOG; + open LOG, '<', $log_file + or return "failed to open for reading: $!"; + @$line_ref = ; + close LOG; + + my @line = @$line_ref; + chomp @line; + + # Don't filter out blank or comment lines; git does that already, + # and if we were to ignore them here, it could lead to committing + # with lines that start with "#" in the log. + + # Filter out leading blank and comment lines. + # while (@line && $line[0] =~ /^(?:#.*|[ \t]*)$/) { shift @line; } + + # Filter out blank and comment lines at EOF. + # while (@line && $line[$#line] =~ /^(?:#.*|[ \t]*)$/) { pop @line; } + + @line == 0 + and return 'no log message'; + + # The first line should not be too short + 8 < length $line[0] || return 'summary line too short'; + + # The first line should not start with an asterisk or a hash sign. + # An asterisk might indicate that a change entry was started right + # at the first line. + $line[0] =~ /^[*#]/ && return "summary line starts with an * or #"; + + # Second line should be blank or not present. + 2 <= @line && length $line[1] + and return 'second line must be empty'; + + # Limit line length to allow for the ChangeLog's leading TAB. + foreach my $line (@line) + { + 72 < length $line && $line =~ /^[^#]/ + and return 'line longer than 72 characters'; + } + + return ''; +} + +{ + @ARGV == 1 + or die; + + my $log_file = $ARGV[0]; + + while (1) + { + my @line; + my $err = check_msg $log_file, \@line; + $err eq '' + and last; + $err = "$ME: $err\n"; + warn $err; + exit 1; + + # Insert the diagnostic as a comment on the first line of $log_file. + #rewrite $log_file, $err, \@line; + #re_edit $log_file; + # + ## Stop if our parent is killed. + #getppid() == 1 + # and last; + } +} + +# Local Variables: +# mode: perl +# End: diff --git a/build-aux/git-log-fix b/build-aux/git-log-fix new file mode 100644 index 0000000..af702fe --- /dev/null +++ b/build-aux/git-log-fix @@ -0,0 +1,3 @@ +# This file is expected to be used via gitlog-to-changelog's --amend=FILE +# option. It specifies what changes to make to each given SHA1's commit +# log and metadata, using Perl-eval'able expressions. diff --git a/build-aux/git-log-footer b/build-aux/git-log-footer new file mode 100644 index 0000000..6c814c4 --- /dev/null +++ b/build-aux/git-log-footer @@ -0,0 +1,15 @@ + +2011-12-02 Werner Koch + + NB: Changes done before December 1st, 2011 are described in + per directory files named ChangeLog-2011. See doc/HACKING for + details. + + ----- + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010, 2011 g10 Code GmbH + + Copying and distribution of this file and/or the original GIT + commit log messages, with or without modification, are + permitted provided the copyright notice and this notice are + preserved. diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..40a8035 --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,345 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2011-11-02 07:53'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2011 Free Software Foundation, Inc. + +# 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 3 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, see . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try `$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on +a line) referring to a commit in the current project, and CODE refers to one +or more consecutive lines of Perl code. Pairs must be separated by one or +more blank line. + +Here is sample input for use with --amend=FILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert , + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = )) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + ) or usage 1; + + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = (qw (git log --log-size), + '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = ) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest = $_; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); + + # Format 'Co-authored-by: A U Thor ' lines in + # standard multi-author ChangeLog format. + my @coauthors = grep /^Co-authored-by:.*$/, @line; + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If this header would be the same as the previous date/name/email/ + # coauthors header, then arrange not to print it. + if ($date_line ne $prev_date_line or "@coauthors" ne "@prev_coauthors") + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line = $date_line; + @prev_coauthors = @coauthors; + + # Omit "Co-authored-by..." and "Signed-off-by..." lines. + @line = grep !/^Signed-off-by: .*>$/, @line; + @line = grep !/^Co-authored-by: /, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/contrib/ChangeLog b/contrib/ChangeLog deleted file mode 100644 index e6b96f5..0000000 --- a/contrib/ChangeLog +++ /dev/null @@ -1,33 +0,0 @@ -2010-11-15 Marcus Brinkmann - - * conf-w32ce-msc/fcntl.h: New file. - * conf-w32ce-msc/build.mk (conf_sources): Add fnctl.h. - (sources): Remove memrchr.c. - - * conf-w32ce-msc/io.h: New file. - * conf-w32ce-msc/build.mk (conf_sources): Add io.h. - - * conf-w32ce-msc/stdint.h: New file. - * conf-w32ce-msc/build.mk (conf_sources): Add stdint.h. - * conf-w32ce-msc/build.mk (copy-static-source): Revert last change. - -2010-11-15 Werner Koch - - * conf-w32ce-msc/build.mk (copy-static-source): Create stdint.h. - (all): Add ws2.lib - (clean): New. - -2010-11-04 Werner Koch - - * conf-w32ce-msc/build.mk (copy-built-source): Revert last - change. Does not work with W32CE where MSC defines it in except.h. - -2010-11-03 Werner Koch - - * conf-w32ce-msc/build.mk (copy-built-source): Create dummy sehmap.h. - -2010-11-01 Werner Koch - - * conf-w32ce-msc/config.h: New. - * conf-w32ce-msc/build.mk: New. - diff --git a/contrib/ChangeLog-2011 b/contrib/ChangeLog-2011 new file mode 100644 index 0000000..cfe5876 --- /dev/null +++ b/contrib/ChangeLog-2011 @@ -0,0 +1,49 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + +2010-11-15 Marcus Brinkmann + + * conf-w32ce-msc/fcntl.h: New file. + * conf-w32ce-msc/build.mk (conf_sources): Add fnctl.h. + (sources): Remove memrchr.c. + + * conf-w32ce-msc/io.h: New file. + * conf-w32ce-msc/build.mk (conf_sources): Add io.h. + + * conf-w32ce-msc/stdint.h: New file. + * conf-w32ce-msc/build.mk (conf_sources): Add stdint.h. + * conf-w32ce-msc/build.mk (copy-static-source): Revert last change. + +2010-11-15 Werner Koch + + * conf-w32ce-msc/build.mk (copy-static-source): Create stdint.h. + (all): Add ws2.lib + (clean): New. + +2010-11-04 Werner Koch + + * conf-w32ce-msc/build.mk (copy-built-source): Revert last + change. Does not work with W32CE where MSC defines it in except.h. + +2010-11-03 Werner Koch + + * conf-w32ce-msc/build.mk (copy-built-source): Create dummy sehmap.h. + +2010-11-01 Werner Koch + + * conf-w32ce-msc/config.h: New. + * conf-w32ce-msc/build.mk: New. + + Copyright (C) 2010 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 + 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. diff --git a/doc/ChangeLog b/doc/ChangeLog-2011 similarity index 98% rename from doc/ChangeLog rename to doc/ChangeLog-2011 index 1dce16b..d6ecca7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-05-12 Marcus Brinkmann * gpgme.texi (I/O Callback Example): Fix example code. @@ -605,7 +612,7 @@ (Manipulating Data Buffers): Update interfaces. Add gpgme_data_seek. * gpgme.texi (Engine Version Check): Remove gpgme_check_engine. - + 2002-11-21 Marcus Brinkmann * gpgme.texi (Verify): Document the new interface. @@ -742,7 +749,7 @@ * gpgme.texi (direntry): End index entry with a full stop. Patch submitted by Jose Carlos Garcia Sogo . - + 2002-03-17 Marcus Brinkmann * gpgme.texi (Detailed Results): Fix syntax error in last change. @@ -857,7 +864,7 @@ * gpgme.texi: g10Code -> g10 Code * gpgme.texi (Top): Complete detailmenu. - + * gpgme.texi: Convert embarassing cruft to the real thing. 2002-01-16 Marcus Brinkmann @@ -869,7 +876,8 @@ * Makefile.am (info_TEXINFOS): New variable. (gpgme_TEXINFOS): Likewise. - Copyright 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, + 2011 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 diff --git a/doc/HACKING b/doc/HACKING new file mode 100644 index 0000000..6149d25 --- /dev/null +++ b/doc/HACKING @@ -0,0 +1,28 @@ +# HACKING -*- org -*- +#+TITLE: Hacking notes for GPGME +#+STARTUP: showall + +* No more ChangeLog files + + Do not modify any of the ChangeLog files in GPGME. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist" time. As such, there are strict requirements on the + form of the commit log messages. The old ChangeLog files have all + be renamed to ChangeLog-2011 + + +* Commit log requirements + + Your commit log should always start with a one-line summary, the + second line should be blank, and the remaining lines are usually + ChangeLog-style entries for all affected files. However, it's fine + -- even recommended -- to write a few lines of prose describing the + change, when the summary and ChangeLog entries don't give enough of + the big picture. Omit the leading TABs that you're used to seeing + in a "real" ChangeLog file, but keep the maximum line length at 72 + or smaller, so that the generated ChangeLog lines, each with its + leading TAB, will not exceed 80 columns. + + Note that ./autogen.sh installs a git hook to do some basic syntax + checking on the commit log message. diff --git a/doc/Makefile.am b/doc/Makefile.am index 212216d..93afc06 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,18 +1,18 @@ # doc - Automake template # Copyright (C) 2001, 2004 g10 Code GmbH -# +# # This file is part of GPGME. -# +# # GPGME is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. -# +# # GPGME is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General # Public License for more details. -# +# # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA @@ -21,7 +21,7 @@ DISTCLEANFILES = gpgme.tmp -EXTRA_DIST = module-overview.sk +EXTRA_DIST = module-overview.sk HACKING ChangeLog-2011 info_TEXINFOS = gpgme.texi gpgme_TEXINFOS = uiserver.texi lesser.texi gpl.texi diff --git a/lang/cl/ChangeLog b/lang/cl/ChangeLog deleted file mode 100644 index 5aadfeb..0000000 --- a/lang/cl/ChangeLog +++ /dev/null @@ -1,34 +0,0 @@ -2008-11-08 Moritz - - * gpgme.lisp (size-t): Wrong call to defctype: function accepts - optional, not keyword argument. - (ssize-t): Likewise. - (off-t): Likewise. - (gpgme-data-t, gpgme-ctx-t): Likewise. - (gpgme-error-t): Likewise. - (gpgme-error-no-signal-t): Likewise. - (gpgme-err-code-t): Likewise. - (gpgme-err-source-t): Likewise. - (gpgme-sig-notation-t, gpgme-engine-info-t): Likewise. - (gpgme-subkey-t): Likewise. - (gpgme-key-sig-t): Likewise. - (gpgme-user-id-t): Likewise. - (gpgme-key-t): Likewise. - (gpgme-data-cbs-t): Likewise. - (gpgme-invalid-key-t): Likewise. - (gpgme-op-encrypt-result-t): Likewise. - (gpgme-recipient-t): Likewise. - (gpgme-op-decrypt-result-t): Likewise. - (gpgme-new-signature-t): Likewise. - (gpgme-op-sign-result-t): Likewise. - (gpgme-signature-t): Likewise. - (gpgme-op-verify-result-t): Likewise. - (gpgme-import-status-t): Likewise. - (gpgme-op-import-result-t): Likewise. - (gpgme-op-genkey-result-t): Likewise. - (gpgme-op-keylist-result-t): Likewise. - -2006-07-06 Marcus Brinkmann - - * Initial release. - diff --git a/lang/cl/ChangeLog-2011 b/lang/cl/ChangeLog-2011 new file mode 100644 index 0000000..cbd21be --- /dev/null +++ b/lang/cl/ChangeLog-2011 @@ -0,0 +1,50 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + +2008-11-08 Moritz + + * gpgme.lisp (size-t): Wrong call to defctype: function accepts + optional, not keyword argument. + (ssize-t): Likewise. + (off-t): Likewise. + (gpgme-data-t, gpgme-ctx-t): Likewise. + (gpgme-error-t): Likewise. + (gpgme-error-no-signal-t): Likewise. + (gpgme-err-code-t): Likewise. + (gpgme-err-source-t): Likewise. + (gpgme-sig-notation-t, gpgme-engine-info-t): Likewise. + (gpgme-subkey-t): Likewise. + (gpgme-key-sig-t): Likewise. + (gpgme-user-id-t): Likewise. + (gpgme-key-t): Likewise. + (gpgme-data-cbs-t): Likewise. + (gpgme-invalid-key-t): Likewise. + (gpgme-op-encrypt-result-t): Likewise. + (gpgme-recipient-t): Likewise. + (gpgme-op-decrypt-result-t): Likewise. + (gpgme-new-signature-t): Likewise. + (gpgme-op-sign-result-t): Likewise. + (gpgme-signature-t): Likewise. + (gpgme-op-verify-result-t): Likewise. + (gpgme-import-status-t): Likewise. + (gpgme-op-import-result-t): Likewise. + (gpgme-op-genkey-result-t): Likewise. + (gpgme-op-keylist-result-t): Likewise. + +2006-07-06 Marcus Brinkmann + + * Initial release. + + Copyright (C) 2006, 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 + 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. diff --git a/lang/cl/Makefile.am b/lang/cl/Makefile.am index e0064ba..553926e 100644 --- a/lang/cl/Makefile.am +++ b/lang/cl/Makefile.am @@ -1,18 +1,18 @@ # Makefile.am for GPGME-CL. # Copyright (C) 2003, 2006 g10 Code GmbH -# +# # This file is part of GPGME-CL. -# +# # GPGME-CL 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. -# +# # GPGME-CL 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 General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA @@ -24,6 +24,4 @@ clfiles = gpgme.asd gpgme-package.lisp gpgme.lisp clfilesdir = $(datadir)/common-lisp/source/gpgme dist_clfiles_DATA = $(clfiles) -EXTRA_DIST = README - - +EXTRA_DIST = README ChangeLog-2011 diff --git a/m4/ChangeLog b/m4/ChangeLog-2011 similarity index 79% rename from m4/ChangeLog rename to m4/ChangeLog-2011 index 1a0cd1c..c03de7b 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-04-06 Werner Koch * gpg-error.m4: Update from current libgpg-error repo. @@ -36,7 +43,8 @@ * gpg-error.m4: New file. * pth.m4: New file. - Copyright 2004 g10 Code GmbH + + Copyright (C) 2004, 2005, 2009, 2010, 2011 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 diff --git a/src/ChangeLog b/src/ChangeLog-2011 similarity index 99% rename from src/ChangeLog rename to src/ChangeLog-2011 index e53b226..c1a901a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-10-25 Marcus Brinkmann * Makefile.am: Remove build rules for libgpgme-pth. @@ -23,7 +30,8 @@ * gpgconf.c (gpgme_op_conf_load, gpgme_op_conf_save): Likewise. * import.c (gpgme_op_import_start, gpgme_op_import_keys_start) (gpgme_op_import_keys, gpgme_op_import): Likewise. - * keylist.c (gpgme_op_keylist_start, gpgme_op_keylist_ext_start): Likewise. + * keylist.c (gpgme_op_keylist_start, gpgme_op_keylist_ext_start): + Likewise. * opassuan.c (gpgme_op_assuan_transact_start) (gpgme_op_assuan_transact_ext): Likewise. * passwd.c (gpgme_op_passwd_start, gpgme_op_passwd): Likewise. @@ -6983,7 +6991,7 @@ * context.h: Add invalid and revoke flags to user_id structure. * keylist.c (gpgme_op_keylist_start): Use --fixed-list-mode. (keylist_colon_handler): Adjust for that. - (set_userid_flags): New. + (set_userid_flags): New. (set_mainkey_trust_info): Handle new key invalid flag (set_subkey_trust_info): Ditto. * gpgme.h: Add new attributes for key and user ID flags. @@ -7128,8 +7136,8 @@ * data.c (gpgme_data_rewind): Allow to rewind data_type_none. - Copyright 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010, - 2011 g10 Code GmbH + Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010, + 2011 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 diff --git a/src/Makefile.am b/src/Makefile.am index d4f4ba7..cc0b78d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,8 +19,9 @@ ## Process this file with automake to produce Makefile.in # Note: moc_kdpipeiodevice should actually be a dependcy below. -EXTRA_DIST = gpgme-config.in gpgme.m4 mkstatus libgpgme.vers \ +EXTRA_DIST = gpgme-config.in gpgme.m4 mkstatus libgpgme.vers ChangeLog-2011 \ gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp + BUILT_SOURCES = status-table.h MOSTLYCLEANFILES = status-table.h bin_SCRIPTS = gpgme-config diff --git a/tests/ChangeLog b/tests/ChangeLog-2011 similarity index 98% rename from tests/ChangeLog rename to tests/ChangeLog-2011 index 9c95489..596c2df 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-05-11 Marcus Brinkmann * gpgsm/Makefile.am (DISTCLEANFILES): Move to ... @@ -293,7 +300,7 @@ 2004-08-17 Marcus Brinkmann * gpgsm/t-keylist.c (struct): Add new fields VALIDITY and - KEY_LENGTH. + KEY_LENGTH. (main): Use them. * gpgsm/t-import.c (check_result): New argument total_stat. (main): Pass this argument. Reduce number of total considered @@ -320,11 +327,11 @@ Include config.h at the top of each C source. This is required due to LFS support. - + * gpg/t-keylist-sig.c (main): s/class/sig_class/. * gpg/t-signers.c (check_result): Ditto. * gpg/t-sign.c (check_result): Ditto. - * gpg/t-encrypt-sign.c (check_result): Ditto. + * gpg/t-encrypt-sign.c (check_result): Ditto. * gpgsm/t-sign.c (check_result): Ditto. 2004-01-12 Werner Koch @@ -443,7 +450,7 @@ * gpg/t-export.c (main): Likewise. * gpgsm/t-encrypt.c (main): Likewise. * gpgsm/t-export.c (main): Likewise. - + 2003-05-27 Marcus Brinkmann * gpg/Makefile.am (TESTS): Order t-keylist and t-keylist-sig after @@ -546,7 +553,7 @@ * gpg/t-eventloop.c (main): Likewise. * gpg/t-encrypt-sign.c (main): Likewise. * gpgsm/t-encrypt.c (main): Likewise. - + 2002-12-24 Marcus Brinkmann * gpgsm/t-verify.c (main): Adjust caller of gpgme_op_verify. @@ -602,7 +609,7 @@ * gpg/t-keylist.c (main): Test PATTERN for NULL before printing. Reported by Dr. Stefan Dalibor . - + 2002-08-01 Marcus Brinkmann * gpg/t-edit.c: Also add a test for the expire command (testing @@ -898,11 +905,11 @@ 2001-09-17 Werner Koch - * t-keylist.c (check_two_contexts): New. + * t-keylist.c (check_two_contexts): New. 2001-09-03 Werner Koch - * t-encrypt.c (print_op_info): New and use it after each operation.. + * t-encrypt.c (print_op_info): New and use it after each operation. 2001-08-28 Werner Koch @@ -922,7 +929,8 @@ * tests/t-verify.c (print_sig_stat): Print info about the keys. - Copyright 2001, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2011 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 diff --git a/tests/Makefile.am b/tests/Makefile.am index 2441e6f..0ecdab2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,19 +1,19 @@ # Makefile.am - Makefile for GPGME tests. # Copyright (C) 2000 Werner Koch (dd9jn) # Copyright (C) 2001, 2004 g10 Code GmbH -# +# # This file is part of GPGME. -# +# # GPGME is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. -# +# # GPGME is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General # Public License for more details. -# +# # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, see . @@ -23,7 +23,7 @@ TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) TESTS = t-version t-data t-engine-info -EXTRA_DIST = t-data-1.txt t-data-2.txt +EXTRA_DIST = t-data-1.txt t-data-2.txt ChangeLog-2011 INCLUDES = -I$(top_builddir)/src @@ -39,13 +39,13 @@ noinst_PROGRAMS = $(TESTS) run-keylist run-export run-import run-sign \ if RUN_GPG_TESTS gpgtests = gpg else -gpgtests = +gpgtests = endif if RUN_GPGSM_TESTS gpgsmtests = gpgsm opassuan else -gpgsmtests = +gpgsmtests = endif SUBDIRS = ${gpgtests} ${gpgsmtests} ----------------------------------------------------------------------- Summary of changes: .gitignore | 5 + ChangeLog | 1038 +---------------------------------- ChangeLog => ChangeLog-2011 | 10 +- Makefile.am | 31 +- autogen.sh | 27 +- build-aux/git-hooks/commit-msg | 127 +++++ build-aux/git-log-fix | 3 + build-aux/git-log-footer | 15 + build-aux/gitlog-to-changelog | 345 ++++++++++++ contrib/ChangeLog | 33 -- contrib/ChangeLog-2011 | 49 ++ doc/{ChangeLog => ChangeLog-2011} | 16 +- doc/HACKING | 28 + doc/Makefile.am | 10 +- lang/cl/ChangeLog | 34 -- lang/cl/ChangeLog-2011 | 50 ++ lang/cl/Makefile.am | 12 +- m4/{ChangeLog => ChangeLog-2011} | 10 +- src/{ChangeLog => ChangeLog-2011} | 16 +- src/Makefile.am | 3 +- tests/{ChangeLog => ChangeLog-2011} | 26 +- tests/Makefile.am | 14 +- 22 files changed, 761 insertions(+), 1141 deletions(-) copy ChangeLog => ChangeLog-2011 (98%) create mode 100755 build-aux/git-hooks/commit-msg create mode 100644 build-aux/git-log-fix create mode 100644 build-aux/git-log-footer create mode 100755 build-aux/gitlog-to-changelog delete mode 100644 contrib/ChangeLog create mode 100644 contrib/ChangeLog-2011 rename doc/{ChangeLog => ChangeLog-2011} (98%) create mode 100644 doc/HACKING delete mode 100644 lang/cl/ChangeLog create mode 100644 lang/cl/ChangeLog-2011 rename m4/{ChangeLog => ChangeLog-2011} (79%) rename src/{ChangeLog => ChangeLog-2011} (99%) rename tests/{ChangeLog => ChangeLog-2011} (98%) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Fri Dec 2 19:06:25 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 02 Dec 2011 19:06:25 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-142-g239659d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 239659d3a0b8c0c378734ca3d1e9210a02e24da7 (commit) via 96dc146fa17a7853277dbf3dc771c585a815c247 (commit) from bf37c32367ba149559385ee90b6435cef8bd6412 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 239659d3a0b8c0c378734ca3d1e9210a02e24da7 Author: Werner Koch Date: Fri Dec 2 18:09:58 2011 +0100 Support the Cherry ST-2000 card reader. * scd/ccid-driver.c (SCM_SCR331, SCM_SCR331DI, SCM_SCR335) (SCM_SCR3320, SCM_SPR532, CHERRY_ST2000): New constants. (parse_ccid_descriptor): Use them. (scan_or_find_usb_device, ccid_transceive_secure): Handle Cherry ST-2000. Suggested by Matthias-Christian Ott. diff --git a/THANKS b/THANKS index b5281f5..5bde9f3 100644 --- a/THANKS +++ b/THANKS @@ -166,6 +166,7 @@ Martin Schulte schulte at thp.uni-koeln.de Matt Kraai kraai at alumni.carnegiemellon.edu Matthew Skala mskala at ansuz.sooke.bc.ca Matthew Wilcox matthew at wil.cx +Matthias-Christian Ott ott at mirix.org Matthias Urlichs smurf at noris.de Max Valianskiy maxcom at maxcom.ml.org Michael Engels michael.engels at uni-duesseldorf.de diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index eb19625..7338ccc 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -213,6 +213,15 @@ enum { VENDOR_FSIJ = 0x234B }; +/* Some product ids. */ +#define SCM_SCR331 0xe001 +#define SCM_SCR331DI 0x5111 +#define SCM_SCR335 0x5115 +#define SCM_SCR3320 0x5117 +#define SCM_SPR532 0xe003 +#define CHERRY_ST2000 0x003e + + /* A list and a table with special transport descriptions. */ enum { TRANSPORT_USB = 0, /* Standard USB transport. */ @@ -954,11 +963,11 @@ parse_ccid_descriptor (ccid_driver_t handle, */ if (handle->id_vendor == VENDOR_SCM && handle->max_ifsd > 48 - && ( (handle->id_product == 0xe001 && handle->bcd_device < 0x0516) - ||(handle->id_product == 0x5111 && handle->bcd_device < 0x0620) - ||(handle->id_product == 0x5115 && handle->bcd_device < 0x0514) - ||(handle->id_product == 0xe003 && handle->bcd_device < 0x0504) - ||(handle->id_product == 0x5117 && handle->bcd_device < 0x0522) + && ( (handle->id_product == SCM_SCR331 && handle->bcd_device < 0x0516) + ||(handle->id_product == SCM_SCR331DI && handle->bcd_device < 0x0620) + ||(handle->id_product == SCM_SCR335 && handle->bcd_device < 0x0514) + ||(handle->id_product == SCM_SPR532 && handle->bcd_device < 0x0504) + ||(handle->id_product == SCM_SCR3320 && handle->bcd_device < 0x0522) )) { DEBUGOUT ("enabling workaround for buggy SCM readers\n"); @@ -1138,16 +1147,20 @@ scan_or_find_usb_device (int scan_mode, { ifcdesc = (interface->altsetting + set_no); /* The second condition is for older SCM SPR 532 who did - not know about the assigned CCID class. Instead of - trying to interpret the strings we simply check the - product ID. */ + not know about the assigned CCID class. The third + condition does the same for a Cherry SmartTerminal + ST-2000. Instead of trying to interpret the strings + we simply check the product ID. */ if (ifcdesc && ifcdesc->extra && ((ifcdesc->bInterfaceClass == 11 && ifcdesc->bInterfaceSubClass == 0 && ifcdesc->bInterfaceProtocol == 0) || (ifcdesc->bInterfaceClass == 255 && dev->descriptor.idVendor == VENDOR_SCM - && dev->descriptor.idProduct == 0xe003))) + && dev->descriptor.idProduct == SCM_SPR532) + || (ifcdesc->bInterfaceClass == 255 + && dev->descriptor.idVendor == VENDOR_CHERRY + && dev->descriptor.idProduct == CHERRY_ST2000))) { idev = usb_open (dev); if (!idev) @@ -3083,7 +3096,8 @@ ccid_transceive_secure (ccid_driver_t handle, Lc byte to the APDU. It seems that it will be replaced with the actual length instead of being appended before the APDU is send to the card. */ - cherry_mode = 1; + if (handle->id_product != CHERRY_ST2000) + cherry_mode = 1; break; default: return CCID_DRIVER_ERR_NOT_SUPPORTED; commit 96dc146fa17a7853277dbf3dc771c585a815c247 Author: Werner Koch Date: Fri Dec 2 17:04:58 2011 +0100 Avoid possible double free in export.c. * g10/export.c (transfer_format_to_openpgp): Avoid possible double free of LIST. Reported by NIIBE Yutaka. diff --git a/g10/export.c b/g10/export.c index 7deee6b..9a34852 100644 --- a/g10/export.c +++ b/g10/export.c @@ -507,7 +507,7 @@ transfer_format_to_openpgp (gcry_sexp_t s_pgp, PKT_public_key *pk) } skey[skeyidx++] = NULL; - gcry_sexp_release (list); + gcry_sexp_release (list); list = NULL; /* We have no need for the CSUM valuel thus we don't parse it. */ /* list = gcry_sexp_find_token (top_list, "csum", 0); */ ----------------------------------------------------------------------- Summary of changes: THANKS | 1 + g10/export.c | 2 +- scd/ccid-driver.c | 34 ++++++++++++++++++++++++---------- 3 files changed, 26 insertions(+), 11 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Dec 2 20:21:59 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 02 Dec 2011 20:21:59 +0100 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.18-4-g28c6cef Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-0 has been updated via 28c6cef128219ffdf548d6f5acf819aa2303fe0d (commit) from 0137097fbba540b18111d4c1ae1b73f6f01f07e6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 28c6cef128219ffdf548d6f5acf819aa2303fe0d Author: Werner Koch Date: Fri Dec 2 19:28:02 2011 +0100 Generate the ChangeLog from commit logs. * scripts/gitlog-to-changelog: New script. Taken from gnulib. * scripts/git-log-fix: New file. * scripts/git-log-footer: New file. * scripts/git-hooks/commit-msg: New script. * autogen.sh: Install commit-msg hook for git. * doc/HACKING: Describe the ChangeLog policy. * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. Rename all ChangeLog files to ChangeLog-2011. diff --git a/ChangeLog b/ChangeLog index 28dab02..8bd68a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,1200 +1,16 @@ -2011-08-04 Werner Koch +No more ChangeLog files +======================== - Release 2.0.18. +Do not modify any of the ChangeLog files in GnuPG. Starting on +December 1st, 2011 we put change information only in the GIT commit +log, and generate a top-level ChangeLog file from logs at "make dist" +time. As such, there are strict requirements on the form of the +commit log messages. See doc/HACKING for details. The old ChangeLog +files have all be renamed to ChangeLog-2011. - * configure.ac: Fix usage of AC_LANG_PROGRAM. - (AC_CHECK_HEADERS): Check for utmp.h. -2011-02-04 Werner Koch - * autogen.sh: Ensure that the git pre-commit hoom has been - enabled. Add a cleanpo filter if not yet set. - -2011-01-13 Werner Koch - - Release 2.0.17. - -2011-01-11 Werner Koch - - * configure.ac: Add option --enable-gpgtar. - (AC_CHECK_FUNCS): Add stat. - - * autogen.sh : Remove superfluous --without-included-gettext. - -2011-01-10 Werner Koch - - * configure.ac: Support a git_revision string. - -2010-07-19 Werner Koch - - Release 2.0.16. - - * configure.ac: Require libgpg-error 1.7 and libksba 1.0.7 to - force building with more recent versions. - -2010-05-04 Werner Koch - - * configure.ac: Add option --enable-standard-socket. - -2010-03-09 Werner Koch - - Release 2.0.15. - - * configure.ac: Add option --disable-ccid-driver. - -2010-02-18 Werner Koch - - Release 2.0.15rc1. - - * configure.ac: Remove double check for libassuan. - -2010-02-11 Marcus Brinkmann - - From trunk 2009-10-16: - - * configure.ac: Check for libassuan instead of libassuan-pth. - -2009-10-12 Werner Koch - - From trunk 2009-09-23: - - * configure.ac (NEED_LIBASSUAN_API, NEED_LIBASSUAN_VERSION): - Update to new API (2, 1.1.0). - -2009-12-21 Werner Koch - - Release 2.0.14. - -2009-12-08 Werner Koch - - * configure.ac (USE_DNS_CERT): Support via ADNS. - -2009-12-07 Werner Koch - - * configure.ac: Check for ADNS before checking for the BIND - resolver. - (USE_ADNS): Fallback macro for PKA and CERT lookups. - -2009-09-04 Werner Koch - - Release 2.0.13. - -2009-06-29 Werner Koch - - * configure.ac: Take care of --without-adns. Suggested by - Arfrever Frehtes Taifersar Arahesis. - -2009-06-17 Werner Koch - - Release 2.0.12. - -2009-06-05 David Shaw - - * configure.ac: Remove Camellia restriction. - -2009-04-01 Werner Koch - - * configure.ac: Test for fsync. - -2009-03-18 Werner Koch - - * configure.ac: Test for getrlimit. - -2009-03-03 Werner Koch - - Release 2.0.11. - -2009-01-12 Werner Koch - - Release 2.0.10. - -2008-12-09 Werner Koch - - Release 2.0.10rc1. - -2008-10-17 Werner Koch - - * configure.ac: Use more warning options with modern GCCs. - -2008-09-29 Werner Koch - - * configure.ac: Require libgcrypt 1.4. - -2008-08-27 David Shaw - - * configure.ac: Use printf for the most portable SVN version - detection. - - * configure.ac: Darwin's /bin/sh has a builtin echo that doesn't - understand '-n'. Use tr to trim the carriage return instead. - -2008-04-23 Werner Koch - - * configure.ac: Call gl_HEADER_SYS_SOCKET and gl_TYPE_SOCKLEN_T. - -2008-04-07 Werner Koch - - * configure.ac (ADNSLIBS): Test for adns. - (GPGKEYS_KDNS): New. - -2008-04-01 Werner Koch - - * configure.ac: Require curl 7.10 (Oct 1 2002) or later as we use - curl_version_info(). - (AC_INIT): Fix quoting. - -2008-03-27 Werner Koch - - * Makefile.am (dist_doc_DATA): New. Install README. - -2008-03-26 Werner Koch - - Release 2.0.9. - -2008-02-19 Werner Koch - - * configure.ac: Remove --with-pkits-tests. - -2008-02-15 Werner Koch - - * gl/allocsa.h, gl/m4/allocsa.m4: Replace HAVE_LONG_LONG by - HAVE_LONG_LONG_INT. - -2008-02-15 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17. - -2007-12-20 Werner Koch - - Released 2.0.8. - -2007-12-17 Werner Koch - - * configure.ac: Add treatment for HAVE_LDAP_START_TLS_SA. - -2007-12-14 Werner Koch - - Released 2.0.8rc1. - -2007-12-12 Werner Koch - - * configure.ac (USE_CAMELLIA): Define by new option --enable-camellia. - -2007-12-03 Werner Koch - - * configure.ac: Add test gt_LC_MESSAGES.. - -2007-10-01 Werner Koch - - * configure.ac: Require assuan 1.0.4. - -2007-09-14 Werner Koch - - * configure.ac (GNUPG_LIBASSUAN_VERSION): New. - -2007-09-10 Werner Koch - - Released 2.0.7. - -2007-08-27 Werner Koch - - * configure.ac: Remove remaining support for internal regex. - Define DISABLE_REGEX automake conditional. Add option - --with-regex. - * autogen.sh [--build-w32]: Remove --disable-regex. Use --with-regex. - -2007-08-16 Werner Koch - - Released 2.0.6. - -2007-08-08 Werner Koch - - * configure.ac: Use AC_CANONICAL_HOST and not AC_CANONICAL_TARGET. - -2007-07-09 Werner Koch - - * configure.ac (AM_ICONV): Check for it even when building without - NLS. - -2007-07-05 Werner Koch - - Released 2.0.5. - - * configure.ac: Require libassuan 1.0.2. - -2007-07-05 Marcus Brinkmann - - * configure.ac: Invoke AM_LANGINFO_CODESET. - -2007-07-04 Werner Koch - - * Makefile.am (AUTOMAKE_OPTIONS): Add no-dist-gzip. - - Switched entire package to GPLv3+. - - * configure.ac: Require libksba 1.0.2. - - * COPYING: Updated to GPLv3. - * COPYING.LIB: New as jnlib/ uses this license. - - * gl/: Switched to GPLv3+. - - * intl/ Removed. - * configure.ac (AM_GNU_GETTEXT): Add external flag. - (AM_ICONV): New. - -2007-07-03 Werner Koch - - * configure.ac [W32]: Use ws2_32 instead of wsock32. - -2007-06-25 Werner Koch - - * gl/mkdtemp.c (gen_tempname) [MKDIR_TAKES_ONE_ARG]: Avoid - compiler warning by using the proper config macro. - -2007-06-15 Werner Koch - - * configure.ac: Call AM_PO_SUBDIRS. - (W32SOCKLIBS): New. - - * autogen.sh: Use = and not == in test to be POSIXly correct. - : Disable use of regex. - -2007-06-14 Werner Koch - - * configure.ac [AH_BOTTOM]: Remove the hardwired names of modules. - -2007-06-12 Werner Koch - - * configure.ac [AH_BOTTOM]: Define HTTP_NO_WSASTARTUP. - -2007-06-11 Werner Koch - - * am/cmacros.am (libcommonstd, libcommonpth, libcommonstd_ldadd) - (libcommonpth_ldadd): Add macros. - -2007-06-06 Werner Koch - - * configure.ac: Add a few notices message so make browsing of the - log file easier. - (CC_FOR_BUILD): New. - -2007-05-30 Werner Koch - - * configure.ac [W32]: Do not create a symlink to w32-pth.h. - Require the installation of the w32pth package. - -2007-05-29 Werner Koch - - * gl/: Updated to a newer version. - -2007-05-24 Werner Koch - - * configure.ac: Use -Wpointer-arith is possible. - -2007-05-15 Werner Koch - - * configure.ac: Renamed the estream macros. Remove -Wformat-nonliteral. - - * configure.ac: Call ESTREAM_INIT and define the memory - allocators for estream_asprintf. - (gl_MODULES): Remove vasprintf. - -2007-05-09 Werner Koch - - Released 2.0.4. - -2007-05-07 Werner Koch - - * configure.ac: Require libgcrypt 1.2.2 to avoid compiler warnings. - -2007-05-07 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.16.1. - -2007-05-07 Werner Koch - - * configure.ac: Bail out if no C-89 compiler has been found. - -2007-05-04 Werner Koch - - * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --enable-mailto - - * configure.ac: Require automake 1.10 - (AC_CONFIG_FILES): Rename gpgkeys_ to gpg2keys_. - (AM_PROG_CC_C_O): New. - -2007-03-08 Werner Koch - - Released 2.0.3. - - * autogen.sh: Add option --force. - -2007-01-31 Werner Koch - - Released 2.0.2. - -2006-11-30 Werner Koch - - * configure.ac: Save original LIBS when testing for dlopen. - -2006-11-28 Werner Koch - - Released 2.0.1. - -2006-11-23 Werner Koch - - Released 2.0.1rc1. - -2006-11-21 Werner Koch - - * configure.ac [AH_BOTTOM]: Disable PTH soft mapping. - (AC_CHECK_SIZEOF): Check for time_t. - (BUILD_INCLUDED_LIBINTL): Remove AM_PO_SUBDIRS as it is not - required for C. - -2006-11-15 Werner Koch - - * autogen.sh: Add convenience option --build-amd64. - -2006-11-14 Werner Koch - - * configure.ac (HAVE_ASSUAN_SET_IO_MONITOR): Test for it. - -2006-11-11 Werner Koch - - Released 2.0.0. - -2006-11-06 Werner Koch - - Released 1.9.95. - -2006-11-03 Werner Koch - - * configure.ac: Test for pty.h. From Gentoo. - -2006-10-24 Werner Koch - - Released 1.9.94. - -2006-10-20 Werner Koch - - * Makefile.am (stowinstall): Add convenience target. - -2006-10-18 Werner Koch - - * configure.ac: svn revison magic fixes for old bashs. Suggested - by Alain Guibert. - -2006-10-18 Werner Koch - - Released 1.9.93. - -2006-10-17 Werner Koch - - * autogen.sh <--build-w32>: Test also for a host "mingw32". - - * configure.ac: Removed W32LIBS. Use NETLIBS instead. - -2006-10-11 Werner Koch - - Released 1.9.92. - - * configure.ac: Require libassuan 0.9.3. - -2006-10-09 Werner Koch - - * acinclude.m4: Moved pth check to m4/gnupg-pth.m4. - -2006-10-06 Werner Koch - - * configure.ac: Also check for libassuan's pth version. - -2006-10-04 Werner Koch - - Released 1.9.91. - - * configure.ac: Require libassuan 0.9.1 which fixes a problem with - gpgsm. - -2006-09-27 Werner Koch - - * gl/strsep.h, gl/strsep.c, gl/m4/strsep.m4: Removed. - * gl/strpbrk.h, gl/strpbrk.c, gl/m4/strpbrk.m4: Removed. - * gl/Makefile.am: Removed module strsep and strpbrk. - * configure.ac: Check for strsep in the context of jnlib. Remove - check from gl_MODULES. Moved check for timegm into the jnlib context. - -2006-09-27 Marcus Brinkmann - - * Makefile.am: Fix cut & paste error. - -2006-09-25 Werner Koch - - Released 1.9.90. - -2006-09-22 Werner Koch - - * AUTHORS: Add information about used licenses. - -2006-09-20 Werner Koch - - * Makefile.am (dist-hook): Removed distfiles cruft. - (SUBDIRS): Added include - -2006-09-18 Werner Koch - - Released 1.9.23. - - * configure.ac (--enable-agent-only): Donot build tools and doc - (--disable-tools,--disable-doc): New. - * Makefile.am (SUBDIRS): Allow to conditional build tools and doc. - -2006-09-14 Werner Koch - - Replaced all call gpg_error_from_errno(errno) by - gpg_error_from_syserror(). - - * configure.ac: Build gpg by default. - (GNUPG_SYS_SO_PEERCRED): Removed. - -2006-09-13 Werner Koch - - * autogen.sh: Better detection of the cross compiler kit. - -2006-09-06 Marcus Brinkmann - - * configure.ac: New automake conditional RUN_GPG_TESTS. - -2006-09-06 Werner Koch - - * configure.ac: Define _ASSUAN_ONLY_GPG_ERRORS. Require Assuan - 0.9 and libgpg-error 1.4 - -2006-08-31 Werner Koch - - * configure.ac: Require libksba 1.0 and added API check for it. - (GPG_ERR_LOCKED): Removed DECL check as we require 1.2 anyway. - (have_libusb): New to give a feedback about CCID support - -2006-08-21 Werner Koch - - * configure.ac: Removed docbook tests. - (AC_CONFIG_FILES): Added gpgkeys_test and gpgkeys_mailto. - - * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enable gpg. - -2006-08-17 Werner Koch - - * THANKS: Merged with the 1.4 one. - -2006-08-16 Werner Koch - - * configure.ac: Removed test for capabilities and mlock. - -2006-08-15 Werner Koch - - * Makefile.am (keyserver): Enable building of keyserver helpers. - - * configure.ac: Merged with the current configure from 1.4.5. - Require libgpg-error 1.2 and libksba 0.9.16. - -2006-07-29 Marcus Brinkmann - - * README: Spelling fixes. - -2006-07-27 Werner Koch - - Released 1.9.22. - - * configure.ac: Call AB_INIT. - -2006-07-03 Werner Koch - - * configure.ac: Test for ksba_dn_teststr. - -2006-06-30 Werner Koch - - * keyserver/: New. Taken from 1.4.4 - * Makefile.am (SUBDIRS): Include keyserver/. - * configure.ac: Include keyserver/. - (FAKE_CURL, GPGKEYS_CURL): New. - -2006-06-20 Werner Koch - - Released 1.9.21. - -2006-06-08 Marcus Brinkmann - - * configure.ac (PTH_LIBS): Add --all to pth-config invocation. - -2006-05-24 Werner Koch - - * configure.ac: New option --disable-optimization taked from 1.4.3. - -2006-05-23 Werner Koch - - * configure.ac (ZLIBS): New for zlib link commands. Add bzip2 - support. - -2006-05-22 Werner Koch - - * configure.ac (EXEEXT): New. - -2006-04-18 Werner Koch - - * configure.ac (PK_UID_CACHE_SIZE): New. - -2006-04-07 Werner Koch - - * configure.ac: Use new method to include the SVN revison. Now it - is the actual global revision number. - -2005-12-20 Werner Koch - - Released 1.9.20. - -2005-11-28 Werner Koch - - * configure.ac: Append the revision to the version string. - -2005-11-13 Werner Koch - - * am/cmacros.am (-DGNUPG_SYSCONFDIR): Define it. - -2005-11-11 Werner Koch - - * configure.ac (NEED_KSBA_VERSION: Require 0.9.13. - -2005-09-12 Werner Koch - - Released 1.9.19. - -2005-08-01 Werner Koch - - Released 1.9.18. - - * configure.ac: Require libksba 0.9.12 to match new features in gpgsm. - -2005-06-20 Werner Koch - - Released 1.9.17. - -2005-06-02 Werner Koch - - * configure.ac (HAVE_PTH): Define as alias for USE_GNU_PTH. It is - used by common/estream.c. - -2005-06-01 Werner Koch - - * configure.ac (gl_INIT): Add gnulib stuff. - (fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS - by a simple check. - (putc_unlocked): Removed check. Not used. - (strsep, mkdtemp, asprintf): Replaced checks by gnulib checks. - (xsize): Added will probably come handy soon. - (CFLAGS): Use -Wformat-security instead of - -Wformat-nonliteral. Add --Wno-format-y2k. - * gl/, gl/m4/: New. - -2005-05-15 Werner Koch - - * configure.ac: Remove option --disable-threads; require the use - of GNU Pth. - -2005-04-27 Werner Koch - - * configure.ac: Removed OpenSC detection and options. - * acinclude.m4: Ditto. - -2005-04-21 Werner Koch - - Released 1.9.16. - - * configure.ac: Do not build gpg by default. - -2005-04-20 Werner Koch - - * configure.ac: Test whether GPG_ERR_LOCKED is declared and - provide a replacement if not. - -2005-04-15 Werner Koch - - * configure.ac: Require libksba 0.9.11. - -2005-04-15 Marcus Brinkmann - - * configure.ac: Check for /usr/bin/shred and define SHRED. - - * configure.ac: Add --enable-symcryptrun, disabled by default. - Define automake variable BUILD_SYMCRYPTRUN. - Check for openpty -lutil, define LIBUTIL_LIBS. - -2005-03-03 Werner Koch - - * acinclude.m4 (GNUPG_PTH_VERSION_CHECK): Accidently used - --ldflags instead of --cflags. Reported by Kazu Yamamoto. - -2005-02-03 Werner Koch - - * AUTHORS: Copied from 1.4 and edited to refelct the changes in - 1.9. - -2005-01-17 Werner Koch - - * configure.ac: Make --without-included-regex work as expected. - Fixed FTP location info for some libraries. - -2005-01-13 Werner Koch - - Released 1.9.15. - - * acinclude.m4 (GNUPG_PTH_VERSION_CHECK): Link a simple test - program to see whether the installation is sane. - -2005-01-07 Werner Koch - - * configure.ac: Require gpg-error 1.0. - -2005-01-04 Werner Koch - - * configure.ac: Remove hack not to build gpg2 for W32. - * autogen.sh : Pass option --disable-gpg instead. - -2004-12-22 Werner Koch - - Released 1.9.14. - -2004-12-20 Werner Koch - - * configure.ac: Add PATHSEP_C and PATHSEP_S. For W32 let all - directories default to c:/gnupg. Require libassuan 0.6.9. - -2004-12-18 Werner Koch - - * configure.ac (AH_BOTTOM): Define EXEEXT_S. - - * autogen.sh: Updated --build-w32 feature. - -2004-12-15 Werner Koch - - * Makefile.am (SUBDIRS) [W32]: Do not build in tests/. - - * acinclude.m4: Add proper macro name quoting for use with - automake 1.9. - - * configure.ac: Add replacement check for ttyname. - Removed support for a included zlib. - -2004-12-06 Werner Koch - - * configure.ac (have_w32_system): New. Disable Pth checks for W32. - Link jnlib/w32-pth.h to pth.h. - -2004-12-03 Werner Koch - - Released 1.9.13. - -2004-11-26 Werner Koch - - * configure.ac: Replace strsep. Replaced use of "target" by - "host". - -2004-10-22 Werner Koch - - Released 1.9.12. - - * Makefile.am (AUTOMAKE_OPTIONS): Set option to create bzip2 tarball. - -2004-10-01 Werner Koch - - Released 1.9.11. - -2004-09-30 Werner Koch - - * README: Minor updates. - -2004-09-30 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.14.1. - -2004-08-16 Werner Koch - - * configure.ac: Build Makefile for tests/pkits. New option - --with-pkits-tests. - -2004-08-05 Werner Koch - - * configure.ac: Changed tests for libusb to also suuport the - stable version 0.1.x. - -2004-07-22 Werner Koch - - Released 1.9.10. - - * configure.ac: Define AM conditional HAVE_OPENSC. - -2004-07-21 Werner Koch - - * configure.ac: Don't set DIE to no after it might has been set to - yes. - -2004-07-20 Werner Koch - - * Makefile.am (sm): Build kbx only if gpgsm is to be build. - -2004-07-20 Werner Koch - - * configure.ac: New option --enable-agent-only. - -2004-06-08 Werner Koch - - Released 1.9.9. - -2004-06-06 Werner Koch - - * configure.ac: Require libksba 0.9.7. - -2004-04-29 Werner Koch - - Released 1.9.8. - -2004-04-20 Werner Koch - - * configure.ac: Remove the fopencookie test. We don't need the - dummy function because we conditionally use fopencookie, - fpencookie or a replacement at place. - -2004-04-02 Thomas Schwinge - - * autogen.sh: Added ACLOCAL_FLAGS. - -2004-04-06 Werner Koch - - Released 1.9.7. - - * configure.ac: Require libgcrypt 1.1.94. - Introduce PACKAGE_GT and set it to gnupg2. - -2004-03-23 Werner Koch - - * configure.ac: Define SAFE_VERSION_DASH and SAFE_VERSION_DOT. - -2004-03-09 Werner Koch - - * configure.ac (NEED_GPG_ERROR_VERSION): Set to 0.7. - -2004-03-06 Werner Koch - - Released 1.9.6. - - * configure.ac: Check the Libgcrypt API. - -2004-02-25 Werner Koch - - * configure.ac: New option --disable-threads to inhibit - unintentional builds without Pth. - -2004-02-21 Werner Koch - - Released 1.9.5. - -2004-02-20 Werner Koch - - * configure.ac: Fixed URLs in the notice messages. - -2004-02-18 Werner Koch - - * acinclude.m4: Removed macros to detect gpg-error, libgcrypt, - libassuan and ksba as they are now distributed in m4/. - -2004-02-13 Werner Koch - - * configure.ac: Require libksba 0.9.4 and libgcrypt 1.1.92. - -2004-02-12 Werner Koch - - * autogen.sh: Removed cruft from debugging. - - * am/cmacros.am: New. - -2004-02-11 Werner Koch - - * configure.ac: Removed the need for g10defs.h. Reworked the - --with-foo-pgm stuff. - - * autogen.sh (check_version): Removed bashism and simplified. - * acinclude.m4 (AM_PATH_OPENSC): Kludge to avoid error output for - a bad opensc-config. - -2004-01-30 Werner Koch - - Released 1.9.4. - - * configure.ac: Require libksba 0.9.3 due to another bug fix there. - -2004-01-29 Werner Koch - - * README: Updated. - - * configure.ac: Require libksba 0.9.2 due to bug fixes. - -2004-01-24 Werner Koch - - * configure.ac: Now requires libassuan 0.6.3. - -2003-12-23 Werner Koch - - Released 1.9.3. - - * README-alpha: Removed. - * configure.ac, Makefile.am: Add the tests and tools directories. - -2003-12-19 Werner Koch - - * configure.ac: Now require libgcrypt 1.1.91 to help testing the - latest libgcrypt changes. Requires libksab 0.9.1. - -2003-12-17 Werner Koch - - * configure.ac: Requires now libassuan 0.6.2. - (CFLAGS): Add --Wformat-noliteral in gcc mode. - -2003-12-16 Werner Koch - - * configure.ac: Check for funopen and fopencookie as part of the - jnlib checks. - -2003-12-09 Werner Koch - - * configure.ac: Add a min_automake_version. - * README.CVS: New. - * autogen.sh: Revamped except for the --build-w32 hack. - * Makefile.am: Add README.CVS - -2003-11-17 Werner Koch - - Release 1.9.2. - - * configure.ac: Requires now libassuan 0.6.1. - -2003-10-31 Werner Koch - - * configure.ac (NEED_KSBA_VERSION): Set to 0.9.0 due the changed - time interface. - -2003-10-21 Werner Koch - - * configure.ac (PRINTABLE_OS_NAME): Remove special case for The - Hurd; Robert Millan reported that the uname test is now - sufficient. - -2003-10-01 Werner Koch - - * configure.ac (AH_BOTTOM): Define GNUPG_MAJOR_VERSION. - -2003-09-23 Werner Koch - - Merged most of David Shaw's changes in 1.3 since 2003-06-03. - - * configure.ac: Drop all TIGER/192 support. - (uint64_t): Check for UINT64_C to go along with uint64_t. - (getaddrinfo): Check for it. - (sigset_t): Check for sigset_t and struct sigaction. This is for - Forte c89 on Solaris which seems to define only the function call - half of the two pairs by default. - (W32LIBS): Include wsock32 in W32LIBS. This is different from - NETLIBS so we don't need to force other platforms to pull in the - netlibs when they aren't actually needed. - -2003-09-06 Werner Koch - - Released 1.9.1. - - * configure.ac: Require newer versions of some libraries. - -2003-09-02 Werner Koch - - * configure.ac (HAVE_LIBUSB): Added a simple test for libusb. - -2003-08-19 Marcus Brinkmann - - * configure.ac (AM_PATH_GPG_ERROR): Add missing comma in - invocation. - -2003-08-06 Werner Koch - - * configure.ac: Check for libgpg-error. Print infos about missing - libraries more nicely. - * acinclude.m4 (AM_PATH_GPG_ERROR): Added. - -2003-08-05 Werner Koch - - Released 1.9.0. - - * configure.ac (GNUPG_DEFAULT_HONMEDIR): Changed back to ~/.gnupg. - -2003-07-31 Werner Koch - - * Makefile.am (DISTCLEANFILES): Add g10defs.h - -2003-06-18 Werner Koch - - * configure.ac (GNUPG_DEFAULT_HOMEDIR): Changed temporary to - .gnupg2 to avoid accidential use with production keys. - -2003-06-11 Werner Koch - - * configure.ac: Merged all stuff from current 1.3 version in. - * acinclude.m4: Merged required macros from current 1.2 version in. - -2003-06-04 Werner Koch - - * configure.ac, Makefile.am: Enable building of gpg. - -2003-04-29 Werner Koch - - * configure.ac: Build a limited version of scdaemon if libopensc - is not available. - - * configure.ac (ALL_LINUGAS): Removed. - - * Makefile.am (ACLOCAL_AMFLAGS): New. - * configure.ac (AM_GNU_GETTEXT_VERSION): New. Set to 0.11.5. - -2003-04-29 gettextize - - * Makefile.am (SUBDIRS): Add m4. - (ACLOCAL_AMFLAGS): New variable. - (EXTRA_DIST): Add scripts/config.rpath. - * configure.ac (AC_CONFIG_FILES): Add m4/Makefile. - -2003-04-29 Werner Koch - - * assuan/ : Removed. We now use libassuan. - * Makefile.am (SUBDIRS): Removed assuan - - * configure.ac: Check for libassuan. - -2003-01-09 Werner Koch - - * configure.ac (GNUPG_PROTECT_TOOL): New option --with-protect-tool. - (NEED_KSBA_VERSION): Does now require 0.4.6. - - * README: Noted where to find gpg-protect-tool. - -2002-10-31 Neal H. Walfield - - * configure.ac: Check for flockfile and funlockfile. Check for - isascii and putc_unlocked replacing them if not found. - - * configure.ac (PTH_LIBS): If pth is found, add the output of - `$PTH_CONFIG --ldflags`, not just `$PTH_CONFIG --libs`. - -2002-10-19 Werner Koch - - * configure.ac: Bumped version number to 1.9.0-cvs. - - NewPG (Aegypten project) to GnuPG merge. - -2002-09-20 Werner Koch - - Released 0.9.2. - -2002-09-05 Neal H. Walfield - - * configure.ac: Check for makeinfo. - -2002-09-03 Neal H. Walfield - - * autogen.sh (have_version): New function. Generalize and - simplify logic for finding and determining the versions of GNU - programs. Use it. - -2002-08-23 Werner Koch - - Released 0.9.1. - - * acinclude.m4 (AM_PATH_LIBGCRYPT): Updated from Libgcrypt. - (AM_PATH_OPENSC): Strip non-digits from the micro version. - -2002-08-21 Werner Koch - - Released 0.9.0. - - * configure.ac: Changed the default homedir to .gnupg. - * README-alpha: Removed. - -2002-08-19 Werner Koch - - * acinclude.m4: Removed -lpcsclite from KSBA_LIBS; copy+paste bug. - -2002-08-13 Werner Koch - - * acinclude.m4 (AM_PATH_OPENSC, AM_PATH_KSBA): New. - * configure.ac: Use them. - -2002-08-10 Werner Koch - - Released 0.3.10. - - * configure.ac (NEED_LIBKSBA_VERSION): Require 0.4.4. Add support - for gettext. - -2002-07-22 Werner Koch - - * configure.ac: Check for ftello and provide a replacement. - -2002-07-01 Werner Koch - - Released 0.3.9. - - * README: Short note on how to export in pkcs-12 format. - -2002-06-29 Werner Koch - - * configure.ac: Define --with options to set the default location - of the agent, scdaemon, pinentry and dirmngr. - -2002-06-27 Werner Koch - - * README: Short blurb on how to import a PKCS-12 file. - - * configure.ac (AH_BOTTOM): New to define some constants. - -2002-06-25 Werner Koch - - Released 0.3.8. - - * configure.ac (NEED_LIBGCRYPT_VERSION): Set to 1.1.8. - -2002-06-12 Werner Koch - - * configure.ac (NEED_LIBKSBA_VERSION): We need 0.4.3 now. - -2002-06-04 Werner Koch - - Released 0.3.7. - -2002-05-21 Werner Koch - - * configure.ac: We now require libgcrypt 1.1.7 and libksba 0.4.2. - -2002-05-14 Werner Koch - - * doc/: New - * configure.ac, Makefile.am: Added doc/ - -2002-05-03 Werner Koch - - Released 0.3.6. - -2002-04-25 Werner Koch - - * configure.ac: Check for setlocale. - -2002-04-24 Marcus Brinkmann - - * configure.ac: Check for locale.h. - -2002-04-15 Werner Koch - - Released 0.3.5. - - * NEWS: Started to describe release notes. - - * configure.ac (NEED_LIBKSBA_VERSION, NEED_LIBGCRYPT_VERSION): Defined - -2002-04-01 Werner Koch - - Released 0.3.4. - -2002-03-18 Werner Koch - - Released 0.3.3. - -2002-03-08 Werner Koch - - * README: Add some explanation on how to specify a user ID. - -2002-03-06 Werner Koch - - Released 0.3.2. - -2002-03-04 Werner Koch - - Released 0.3.1. - - * README: Explained some options and files. - -2002-02-14 Werner Koch - - * configure.ac: Fixed status messages related to presence of Pth. - -2002-02-13 Werner Koch - - * acinclude.m4 (GNUPG_SYS_SO_PEERCRED): New. - * configure.ac: use it. - -2002-02-12 Werner Koch - - * configure.ac: Check for PTH. Provide replacement fucntions for - apsrintf and fopencookie. - - * acinclude.m4 (GNUPG_PTH_VERSION_CHECK): New. - -2002-02-07 Werner Koch - - Released 0.3.0. - - * configure.ac: Require libgcrypt 1.1.6. - -2002-02-01 Marcus Brinkmann - - * configure.ac (KSBA_CONFIG): Remove superfluous x in front of - variable. - -2002-01-26 Werner Koch - - * configure.ac: Add options to disable the build of some programs - and print a configure status at the end. - * acinclude.m4 (GNUPG_BUILD_PROGRAM): New. - - * scd/ : New. Added to Makefile and configure. - * configure.ac: Check for libopensc - * Makefile.am: Build scd only when libopensc is available - -2002-01-23 Werner Koch - - * configure.ac (mkdtemp): See whether we have to provide a - replacement. - -2001-12-18 Werner Koch - - Released 0.0.0. - -2001-12-17 Werner Koch - - * acinclude.m4: Add AM_PATH_LIBGCRYPT macro. - * configure.ac: and use it here. Figure out the location of libksba - -2001-12-15 Werner Koch - - * configure.ac (missing_dir): Bail out if asprintf and fopencookie - are not available. - -2001-12-04 Werner Koch - - * configure.ac (HAVE_JNLIB_LOGGING): always define it. - - - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009) - 2010 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. +Local Variables: +buffer-read-only: t +mode: text +End: diff --git a/ChangeLog b/ChangeLog-2011 similarity index 98% copy from ChangeLog copy to ChangeLog-2011 index 28dab02..46320b2 100644 --- a/ChangeLog +++ b/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-04 Werner Koch Release 2.0.18. @@ -452,7 +459,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). * configure.ac: Build gpg by default. @@ -1188,7 +1195,7 @@ * configure.ac (HAVE_JNLIB_LOGGING): always define it. - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009) + Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is free software; as a special exception the author gives diff --git a/Makefile.am b/Makefile.am index 103375a..8a54655 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,18 +1,18 @@ # Makefile.am - main makefile for NewPG/GnuPG # Copyright (C) 2001, 2004 Free Software Foundation, Inc. -# +# # This file is part of GnuPG. -# +# # GnuPG is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . @@ -22,8 +22,10 @@ ACLOCAL_AMFLAGS = -I m4 -I gl/m4 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip DISTCHECK_CONFIGURE_FLAGS = --enable-symcryptrun --enable-mailto --enable-gpgtar -EXTRA_DIST = scripts/config.rpath autogen.sh README.SVN -DISTCLEANFILES = g10defs.h +EXTRA_DIST = scripts/config.rpath autogen.sh README.SVN \ + ChangeLog-2011 po/ChangeLog-2011 scripts/ChangeLog-2011 + +DISTCLEANFILES = g10defs.h if BUILD_GPGSM kbx = kbx @@ -37,7 +39,7 @@ gpg = g10 keyserver = keyserver else gpg = -keyserver = +keyserver = endif if BUILD_GPGSM sm = sm @@ -77,10 +79,25 @@ SUBDIRS = m4 gl include jnlib common ${kbx} \ dist_doc_DATA = README -dist-hook: +dist-hook: gen-ChangeLog echo "$(VERSION)" > $(distdir)/VERSION -stowinstall: + +gen_start_date = 2011-12-01T06:00:00 +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d $(top_srcdir)/.git; then \ + (cd $(top_srcdir) && \ + ./scripts/gitlog-to-changelog \ + --amend=scripts/git-log-fix \ + --since=$(gen_start_date) ) > $(distdir)/cl-t; \ + cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t; \ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi + + +stowinstall: $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg diff --git a/agent/ChangeLog b/agent/ChangeLog-2011 similarity index 99% rename from agent/ChangeLog rename to agent/ChangeLog-2011 index 09e6026..f543f27 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-04 Werner Koch * command.c (cmd_keyinfo, do_one_keyinfo): Support options --data @@ -1038,7 +1045,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). * call-pinentry.c (start_pinentry): Replaced pipe_connect2 by diff --git a/agent/Makefile.am b/agent/Makefile.am index 38200c1..cc8a22a 100644 --- a/agent/Makefile.am +++ b/agent/Makefile.am @@ -6,12 +6,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . @@ -22,6 +22,7 @@ libexec_PROGRAMS = gpg-protect-tool gpg-preset-passphrase noinst_PROGRAMS = $(TESTS) # EXTRA_DIST = gpg-agent.ico gpg-agent-resource.rc +EXTRA_DIST = ChangeLog-2011 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl @@ -72,7 +73,7 @@ gpg_agent_DEPENDENCIES = $(gpg_agent_res_deps) gpg_protect_tool_SOURCES = \ protect-tool.c \ protect.c \ - minip12.c minip12.h + minip12.c minip12.h gpg_protect_tool_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) gpg_protect_tool_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) \ @@ -101,7 +102,7 @@ TESTS = t-protect t_common_ldadd = $(common_libs) \ $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV) -t_protect_SOURCES = t-protect.c protect.c +t_protect_SOURCES = t-protect.c protect.c t_protect_LDADD = $(t_common_ldadd) diff --git a/autogen.sh b/autogen.sh index eadf0c7..289c21e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -199,7 +199,7 @@ EOF fi -# Check the git setup. +# Update the git setup. if [ -d .git ]; then if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then cat <&2 @@ -219,6 +219,13 @@ EOF git config --add filter.cleanpo.clean \ "awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" fi + if [ -f scripts/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then + cat <&2 +*** Activating commit log message check hook. *** +EOF + cp -av scripts/git-hooks/commit-msg .git/hooks/commit-msg + chmod -c +x .git/hooks/commit-msg + fi fi diff --git a/common/ChangeLog b/common/ChangeLog-2011 similarity index 99% rename from common/ChangeLog rename to common/ChangeLog-2011 index 0b4610d..0d0d1cc 100644 --- a/common/ChangeLog +++ b/common/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-04 Werner Koch * ssh-utils.c, ssh-utils.h: New. diff --git a/common/Makefile.am b/common/Makefile.am index 10c5403..a830a47 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -19,7 +19,7 @@ ## Process this file with automake to produce Makefile.in EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \ - audit-events.h status-codes.h + audit-events.h status-codes.h ChangeLog-2011 noinst_LIBRARIES = libcommon.a libcommonpth.a libsimple-pwquery.a libgpgrl.a noinst_PROGRAMS = $(module_tests) $(module_maint_tests) diff --git a/doc/ChangeLog b/doc/ChangeLog-2011 similarity index 98% rename from doc/ChangeLog rename to doc/ChangeLog-2011 index 7dae4ca..680affa 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-01-13 Werner Koch * FAQ: Make it a static file with a pointer to the online location. @@ -139,7 +146,7 @@ * qualified.txt: Add new BnetzA certs 12R and 13R. * com-certs.pem: Ditto. - * examples/trustlist.txt: Ditto. + * examples/trustlist.txt: Ditto. 2008-06-19 Werner Koch @@ -425,7 +432,7 @@ 2007-02-18 Werner Koch - * gpg.texi (GPG Esoteric Options): No card reader options for gpg2. + * gpg.texi (GPG Esoteric Options): No card reader options for gpg2. 2007-02-14 Werner Koch @@ -500,7 +507,7 @@ * instguide.texi (Installation): New. * assuan.texi (Assuan): Removed. Use the libassuan manual instead. - * gnupg.texi: Reflect these changes. + * gnupg.texi: Reflect these changes. * gpg.texi: Make some parts depend on the "gpgone" set command. This allows us to use the same source for gpg1 and gpg2. @@ -655,7 +662,7 @@ * gnupg.texi: Include gpg.texi * tools.texi: Add a few @command markups. - * gpgsm.texi: Ditto + * gpgsm.texi: Ditto. * gpg-agent.texi: Ditto. * scdaemon.texi: Ditto. @@ -673,7 +680,7 @@ expected pinentry filename. Changed license of the manual stuff to GPL. - + * gnupg.texi (Top): New menu item Helper Tools. * tools.texi (Helper Tools): New. @@ -779,7 +786,7 @@ 2002-05-14 Werner Koch * Makefile.am, gpgsm.texi: New. - + Copyright 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is free software; as a special exception the author gives diff --git a/doc/HACKING b/doc/HACKING index 07f09c5..e27bc07 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -3,7 +3,31 @@ (Some notes on GNUPG internals.) - ===> Under construction <======= +* No more ChangeLog files + +Do not modify any of the ChangeLog files in GnuPG. Starting on +December 1st, 2011 we put change information only in the GIT commit +log, and generate a top-level ChangeLog file from logs at "make dist" +time. As such, there are strict requirements on the form of the +commit log messages. The old ChangeLog files have all be renamed to +ChangeLog-2011 + + +* Commit log requirements + +Your commit log should always start with a one-line summary, the second +line should be blank, and the remaining lines are usually ChangeLog-style +entries for all affected files. However, it's fine -- even recommended -- +to write a few lines of prose describing the change, when the summary +and ChangeLog entries don't give enough of the big picture. Omit the +leading TABs that you're used to seeing in a "real" ChangeLog file, but +keep the maximum line length at 72 or smaller, so that the generated +ChangeLog lines, each with its leading TAB, will not exceed 80 columns. + + + +===> What follows is probably out of date <=== + RFCs @@ -63,7 +87,7 @@ g10/keydb.h g10/keyid.c Helper functions to get the keyid, fingerprint etc. -g10/trustdb.c +g10/trustdb.c g10/trustdb.h g10/tdbdump.c Management of the trustdb.gpg @@ -74,7 +98,7 @@ g10/delkey.c Delete a key g10/kbnode.c Helper for the KBNODE linked list g10/main.h Prototypes and some constants g10/mainproc.c Message processing -g10/armor.c Ascii armor filter +g10/armor.c Ascii armor filter g10/mdfilter.c Filter to calculate hashs g10/textfilter.c Filter to handle CR/LF and trailing white space g10/cipher.c En-/Decryption filter @@ -88,7 +112,7 @@ g10/hkp.h Keyserver access g10/hkp.c g10/packet.h Defintion of OpenPGP structures. g10/passphrase.c Passphrase handling code -g10/pubkey-enc.c +g10/pubkey-enc.c g10/seckey-cert.c g10/seskey.c g10/import.c diff --git a/doc/Makefile.am b/doc/Makefile.am index 2be818e..4d8e6b3 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -28,7 +28,7 @@ helpfiles = help.txt help.be.txt help.ca.txt help.cs.txt \ help.pt_BR.txt help.ro.txt help.ru.txt help.sk.txt \ help.sv.txt help.tr.txt help.zh_CN.txt help.zh_TW.txt -EXTRA_DIST = samplekeys.asc \ +EXTRA_DIST = samplekeys.asc ChangeLog-2011 \ gnupg-logo.eps gnupg-logo.pdf gnupg-logo.png \ gnupg-card-architecture.eps gnupg-card-architecture.png \ gnupg-card-architecture.pdf \ diff --git a/g10/ChangeLog b/g10/ChangeLog-2011 similarity index 99% rename from g10/ChangeLog rename to g10/ChangeLog-2011 index a42c490..48a05ad 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-04 Werner Koch * keyedit.c (show_key_with_all_names): Remove set but unused var @@ -1377,7 +1384,7 @@ * status.h (STATUS_ERROR): New status code. * status.c (get_status_string): Ditto. * mainproc.c (proc_plaintext): Emit it if multiple messages are - detected. Error out if more than one plaintext packet is + detected. Error out if more than one plaintext packet is encountered. * mainproc.c (literals_seen): New. @@ -1714,7 +1721,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). 2006-09-13 Werner Koch @@ -3783,7 +3790,7 @@ * tdbio.c (MY_O_BINARY): Need binary mode with Cygwin. From Werner on stable branch. - * g10.c, gpgv.c (main) [__CYGWIN32__]: Don't get the homedir from + * g10.c, gpgv.c (main) [__CYGWIN32__]: Don't get the homedir from the registry. From Werner on stable branch. * keyedit.c (show_key_with_all_names_colon): Make --with-colons @@ -7244,7 +7251,7 @@ (pk_from_block): Removed the namehash arg and changed all callers. (merge_selfsigs): Copy prefs to all keys. * trustdb.c (get_pref_data): Removed. - (is_algo_in_prefs): Removed. + (is_algo_in_prefs): Removed. (make_pref_record): Deleted and removed all class. * pkclist.c (select_algo_from_prefs): Adjusted for the new preference implementation. diff --git a/g10/Makefile.am b/g10/Makefile.am index 3c85bbe..126c55c 100644 --- a/g10/Makefile.am +++ b/g10/Makefile.am @@ -7,27 +7,27 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . ## Process this file with automake to produce Makefile.in -EXTRA_DIST = options.skel +EXTRA_DIST = options.skel ChangeLog-2011 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common \ - -I$(top_srcdir)/include -I$(top_srcdir)/intl + -I$(top_srcdir)/include -I$(top_srcdir)/intl include $(top_srcdir)/am/cmacros.am AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) -needed_libs = $(libcommon) ../jnlib/libjnlib.a ../gl/libgnu.a +needed_libs = $(libcommon) ../jnlib/libjnlib.a ../gl/libgnu.a bin_PROGRAMS = gpg2 gpgv2 noinst_PROGRAMS = $(module_tests) @@ -69,7 +69,7 @@ common_source = \ plaintext.c \ sig-check.c \ keylist.c \ - pkglue.c pkglue.h + pkglue.c pkglue.h gpg2_SOURCES = gpg.c \ server.c \ @@ -107,7 +107,7 @@ gpg2_SOURCES = gpg.c \ gpgv2_SOURCES = gpgv.c \ $(common_source) \ - verify.c + verify.c #gpgd_SOURCES = gpgd.c \ # ks-proto.h \ @@ -124,7 +124,7 @@ gpg2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \ gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \ $(LIBICONV) -t_common_ldadd = +t_common_ldadd = module_tests = t-rmd160 t_rmd160_SOURCES = t-rmd160.c rmd160.c t_rmd160_LDADD = $(t_common_ldadd) @@ -138,4 +138,4 @@ install-data-local: $(DESTDIR)$(pkgdatadir)/gpg-conf.skel uninstall-local: - - at rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel + - at rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel diff --git a/include/ChangeLog b/include/ChangeLog-2011 similarity index 97% rename from include/ChangeLog rename to include/ChangeLog-2011 index 97f491e..7098427 100644 --- a/include/ChangeLog +++ b/include/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-07-01 Werner Koch * cipher.h (PUBKEY_ALGO_ECDH, PUBKEY_ALGO_ECDSA): New. diff --git a/include/Makefile.am b/include/Makefile.am index 25518bf..4d733ba 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1 +1 @@ -EXTRA_DIST = cipher.h types.h host2net.h _regex.h +EXTRA_DIST = cipher.h types.h host2net.h _regex.h ChangeLog-2011 diff --git a/jnlib/ChangeLog b/jnlib/ChangeLog-2011 similarity index 97% rename from jnlib/ChangeLog rename to jnlib/ChangeLog-2011 index 87c5bda..c8306fc 100644 --- a/jnlib/ChangeLog +++ b/jnlib/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2009-08-26 Werner Koch * stringhelp.c (do_make_filename): Factor some code out to .. @@ -52,7 +59,7 @@ 2009-01-22 Werner Koch - * t-support.c (gpg_err_code_from_errno) + * t-support.c (gpg_err_code_from_errno) (gpg_err_code_from_syserror): New. 2008-11-20 Werner Koch @@ -95,7 +102,7 @@ * stringhelp.c (make_basename): Silent gcc warning about unused arg. * argparse.c (store_alias): Ditto. - (find_long_option): + (find_long_option): 2008-10-15 Werner Koch @@ -282,7 +289,7 @@ * stringhelp.c (strsep): New. Copied from gnupg 1.4.5 util/strgutil.c. - * strlist.h (STRLIST): Removed deprecated typedef. + * strlist.h (STRLIST): Removed deprecated typedef. * types.h: Made cpp commands work with old compilers. Also shows up nicer with Emacs' font locking. @@ -292,14 +299,14 @@ Changed license from GPL to LGPL. Note that all code has either been written by me, David, employees of g10 Code or taken from glibc. - + * libjnlib-config.h, stringhelp.c, stringhelp.h: * strlist.c, strlist.h, utf8conv.c, utf8conv.h: * argparse.c, argparse.h, logging.c, logging.h: * dotlock.c, dotlock.h, types.h, mischelp.h: * xmalloc.c, xmalloc.h, w32-pth.c, w32-pth.h: * w32-afunix.c, w32-afunix.h: Tagged them to be long to jnlib - which is a part of GnuPG but also used by other projetcs. + which is a part of GnuPG but also used by other projetcs. 2006-09-22 Werner Koch @@ -427,10 +434,10 @@ (_pth_strerror): New. (do_pth_wait): Before we enter the loop we check if there are too much events in the ring. - + 2004-12-14 Werner Koch - * w32-pth.h (pth_event_occured): Removed macro. + * w32-pth.h (pth_event_occured): Removed macro. * w32-pth.c: Fixed license statement; its under the LGPL. (enter_pth, leave_pth): Use them to bracket almost all public functions. @@ -442,7 +449,7 @@ (pth_kill): Release global mutex section. (helper_thread): New. (pth_spawn): Make sure only one thread is running. - + 2004-12-13 Werner Koch * stringhelp.c (w32_strerror) [W32]: New. @@ -462,7 +469,7 @@ * w32-afunix.c: New. AF_UNIX emulation for W32. * w32-afunix.h: Likewise. - + 2004-11-22 Werner Koch * logging.c (log_test_fd): Add test on LOGSTREAM. Reported by @@ -573,7 +580,7 @@ 2003-06-13 Werner Koch - * mischelp.h (wipememory2,wipememory): New. Taken from GnuPG 1.3.2. + * mischelp.h (wipememory2,wipememory): New. Taken from GnuPG 1.3.2. 2002-06-04 Werner Koch @@ -627,7 +634,7 @@ * logging.c (log_set_prefix): New. (do_logv): Include prefix and pid only if enabled. Print time only when explicitly enabled. - (log_logv): New. + (log_logv): New. * logging.h: Include log_logv() only when requested. 2001-11-06 Werner Koch @@ -688,8 +695,8 @@ Mon Jan 24 13:04:28 CET 2000 Werner Koch *********************************************************** * Please note that JNLIB is maintained as part of GnuPG. * * You may find it source-copied in other packages. * - *********************************************************** - + *********************************************************** + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. diff --git a/jnlib/Makefile.am b/jnlib/Makefile.am index c6d0b3a..b3e7d7d 100644 --- a/jnlib/Makefile.am +++ b/jnlib/Makefile.am @@ -1,26 +1,26 @@ # Makefile for the JNLIB part of GnuPG # Copyright (C) 1999, 2000, 2001, 2004, # 2006 Feee Software Soundation, Inc. -# +# # This file is part of JNLIB. -# +# # JNLIB 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 3 of # the License, or (at your option) any later version. -# +# # JNLIB 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 -EXTRA_DIST = README +EXTRA_DIST = README ChangeLog-2011 noinst_PROGRAMS = $(module_tests) TESTS = $(module_tests) @@ -49,7 +49,7 @@ endif # For GnuPG we don't need the xmalloc stuff. -# xmalloc.c xmalloc.h +# xmalloc.c xmalloc.h # @@ -62,7 +62,7 @@ endif # module_tests = t-stringhelp -t_jnlib_src = t-support.c t-support.h +t_jnlib_src = t-support.c t-support.h t_jnlib_ldadd = libjnlib.a $(LIBINTL) $(LIBICONV) t_stringhelp_SOURCES = t-stringhelp.c $(t_jnlib_src) diff --git a/kbx/ChangeLog b/kbx/ChangeLog-2011 similarity index 96% rename from kbx/ChangeLog rename to kbx/ChangeLog-2011 index 701e411..ed3aa41 100644 --- a/kbx/ChangeLog +++ b/kbx/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-04 Werner Koch * keybox-openpgp.c (parse_key): Remove set but unused vars @@ -117,7 +124,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). 2005-10-08 Marcus Brinkmann diff --git a/kbx/Makefile.am b/kbx/Makefile.am index 14e8fa5..0d6a066 100644 --- a/kbx/Makefile.am +++ b/kbx/Makefile.am @@ -1,4 +1,4 @@ -# Keybox Makefile +# Keybox Makefile # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # # This file is part of GnuPG. @@ -7,12 +7,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . @@ -21,7 +21,7 @@ localedir = $(datadir)/locale INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\" -EXTRA_DIST = mkerrors +EXTRA_DIST = mkerrors ChangeLog-2011 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl \ $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) @@ -37,7 +37,7 @@ common_sources = \ keybox-search.c \ keybox-update.c \ keybox-openpgp.c \ - keybox-dump.c + keybox-dump.c libkeybox_a_SOURCES = $(common_sources) @@ -50,4 +50,4 @@ kbxutil_LDADD = ../common/libcommon.a ../jnlib/libjnlib.a ../gl/libgnu.a \ $(KSBA_LIBS) $(LIBGCRYPT_LIBS) \ $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV) $(W32SOCKLIBS) -$(PROGRAMS) : ../common/libcommon.a ../jnlib/libjnlib.a ../gl/libgnu.a +$(PROGRAMS) : ../common/libcommon.a ../jnlib/libjnlib.a ../gl/libgnu.a diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog-2011 similarity index 99% rename from keyserver/ChangeLog rename to keyserver/ChangeLog-2011 index 14d5f62..b3f96a4 100644 --- a/keyserver/ChangeLog +++ b/keyserver/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2009-08-26 Werner Koch * gpgkeys_hkp.c: Include util.h. @@ -86,7 +93,7 @@ * curl-shim.c (curl_easy_init) [HAVE_W32_SYSTEM]: Call it. * gpgkeys_finger.c: s/_WIN32/HAVE_W32_SYSTEM/. (init_sockets): Remove. - (connect_server) [HAVE_W32_SYSTEM]: Call new function. + (connect_server) [HAVE_W32_SYSTEM]: Call new function. 2008-04-14 David Shaw @@ -99,7 +106,7 @@ 2008-04-07 Werner Koch * gpgkeys_kdns.c: New. - * Makefile.am: Support kdns. + * Makefile.am: Support kdns. * no-libgcrypt.c (gcry_strdup): Fix. It was not used. @@ -111,7 +118,7 @@ 2007-10-25 David Shaw (wk) From 1.4 (July): - + * gpgkeys_ldap.c (main): Fix bug in setting up whether to verify peer SSL cert. This used to work with older OpenLDAP, but is now more strictly handled. @@ -223,7 +230,7 @@ to OpenSSL. This is considered a bug fix and forgives all possible violations, pertaining to this issue, possibly occured in the past. - + * no-libgcrypt.c: Changed license to a simple all permissive one. * Makefile.am (gpg2keys_ldap_LDADD): For license reasons do not @@ -239,7 +246,7 @@ mismatch. 2006-09-19 Werner Koch - + * no-libgcrypt.c: New. Taken from ../tools. * Makefile.am: Add no-libgcrypt to all sources. @@ -708,7 +715,7 @@ 2004-10-28 Werner Koch - * Makefile.am (other_libs): + * Makefile.am (other_libs): 2004-10-18 David Shaw diff --git a/keyserver/Makefile.am b/keyserver/Makefile.am index 96cd8d1..e625127 100644 --- a/keyserver/Makefile.am +++ b/keyserver/Makefile.am @@ -1,5 +1,5 @@ # Makefile.am - Makefile for keyservers -# Copyright (C) 2001, 2002, 2004, 2005, 2006, +# Copyright (C) 2001, 2002, 2004, 2005, 2006, # 2009 Free Software Foundation, Inc. # # This file is part of GnuPG. @@ -8,12 +8,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . ## Process this file with automake to produce Makefile.in @@ -26,7 +26,9 @@ EXTRA_PROGRAMS = gpg2keys_ldap gpg2keys_hkp gpg2keys_finger gpg2keys_curl \ gpg2keys_kdns EXTRA_SCRIPTS = gpg2keys_mailto -AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl +EXTRA_DIST = ChangeLog-2011 + +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) @@ -62,11 +64,11 @@ if FAKE_CURL gpg2keys_curl_SOURCES += curl-shim.c curl-shim.h gpg2keys_curl_CPPFLAGS = $(AM_CPPFLAGS) gpg2keys_curl_LDADD = $(common_libs) $(GPG_ERROR_LIBS) $(NETLIBS) $(DNSLIBS) \ - $(other_libs) + $(other_libs) gpg2keys_hkp_SOURCES += curl-shim.c curl-shim.h gpg2keys_hkp_CPPFLAGS = $(AM_CPPFLAGS) gpg2keys_hkp_LDADD = $(common_libs) $(GPG_ERROR_LIBS) $(NETLIBS) $(DNSLIBS) \ - $(other_libs) + $(other_libs) else # Note that we need to include all other libs here as well because # some compilers don't care about inline functions and insert diff --git a/m4/ChangeLog b/m4/ChangeLog-2011 similarity index 94% rename from m4/ChangeLog rename to m4/ChangeLog-2011 index 5743e60..218bc86 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-09-12 Werner Koch * libcurl.m4: Fix lost hash sign introduced by previous change. @@ -150,4 +157,3 @@ * uintmax_t.m4: New file, from gettext-0.11.5. * ulonglong.m4: New file, from gettext-0.11.5. * Makefile.am: New file. - diff --git a/m4/Makefile.am b/m4/Makefile.am index d0d84e2..c5ac24f 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -12,6 +12,8 @@ EXTRA_DIST += estream.m4 EXTRA_DIST += sys_socket_h.m4 socklen.m4 +EXTRA_DIST += ChangeLog-2011 + diff --git a/po/ChangeLog b/po/ChangeLog-2011 similarity index 96% rename from po/ChangeLog rename to po/ChangeLog-2011 index 8a25805..6c1d897 100644 --- a/po/ChangeLog +++ b/po/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-01-12 Jakub Bogusz (wk) * pl.po: Update. @@ -193,7 +200,7 @@ package name mangling breaks make distcheck as it tries to rebuild the po file with the "correct" name. The upshot is never to use GNU in you po directory. - + * de.po: Fix a few fuzzy entries and translate new strings. 2007-07-04 Werner Koch @@ -317,7 +324,7 @@ * POTFILES.in: New. * de.po: New. - + Copyright 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc. This file is free software; as a special exception the author gives @@ -327,5 +334,3 @@ 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. - - diff --git a/scd/ChangeLog b/scd/ChangeLog-2011 similarity index 99% rename from scd/ChangeLog rename to scd/ChangeLog-2011 index ce442aa..d686058 100644 --- a/scd/ChangeLog +++ b/scd/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-04 Werner Koch * pcsc-wrapper.c (handle_open): Remove unused var LISTLEN. @@ -931,7 +938,7 @@ 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). * command.c (scd_command_handler): Replaced diff --git a/scd/Makefile.am b/scd/Makefile.am index ae623ac..58e2f9b 100644 --- a/scd/Makefile.am +++ b/scd/Makefile.am @@ -6,22 +6,24 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . ## Process this file with automake to produce Makefile.in -bin_PROGRAMS = scdaemon +bin_PROGRAMS = scdaemon if ! HAVE_W32_SYSTEM libexec_PROGRAMS = gnupg-pcsc-wrapper endif +EXTRA_DIST = ChangeLog-2011 + AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common include $(top_srcdir)/am/cmacros.am @@ -66,4 +68,4 @@ scdaemon_LDADD = $(libcommonpth) ../jnlib/libjnlib.a ../gl/libgnu.a \ # gnupg_pcsc_wrapper_SOURCES = pcsc-wrapper.c gnupg_pcsc_wrapper_LDADD = $(DL_LIBS) -gnupg_pcsc_wrapper_CFLAGS = +gnupg_pcsc_wrapper_CFLAGS = diff --git a/scripts/ChangeLog b/scripts/ChangeLog-2011 similarity index 81% rename from scripts/ChangeLog rename to scripts/ChangeLog-2011 index fd30923..a4b30d7 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-07-22 Werner Koch * config.sub, config.guess: Update to version 2011-06-03. @@ -43,5 +50,3 @@ 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. - - diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg new file mode 100755 index 0000000..5a697c7 --- /dev/null +++ b/scripts/git-hooks/commit-msg @@ -0,0 +1,127 @@ +eval '(exit $?0)' && eval 'exec perl -w "$0" ${1+"$@"}' + & eval 'exec perl -w "$0" $argv:q' + if 0; + +# An hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, copy it to "~/.git/hooks/commit-msg". +# +# This script is based on the one from GNU coreutils. + +use strict; +use warnings; +(my $ME = $0) =~ s|.*/||; + +my $editor = $ENV{EDITOR} || 'vi'; +$ENV{PATH} = '/bin:/usr/bin'; + +# Rewrite the $LOG_FILE (old contents in @$LINE_REF) with an additional +# commented diagnostic "# $ERR" line at the top. +sub rewrite($$$) +{ + my ($log_file, $err, $line_ref) = @_; + local *LOG; + open LOG, '>', $log_file + or die "$ME: $log_file: failed to open for writing: $!"; + print LOG "# $err"; + print LOG @$line_ref; + close LOG + or die "$ME: $log_file: failed to rewrite: $!\n"; +} + +sub re_edit($) +{ + my ($log_file) = @_; + + warn "Interrupt (Ctrl-C) to abort...\n"; + + system 'sh', '-c', "$editor $log_file"; + ($? & 127) || ($? >> 8) + and die "$ME: $log_file: the editor ($editor) failed, aborting\n"; +} + +# Given a $LOG_FILE name and a \@LINE buffer, +# read the contents of the file into the buffer and analyze it. +# If the log message passes muster, return the empty string. +# If not, return a diagnostic. +sub check_msg($$) +{ + my ($log_file, $line_ref) = @_; + + local *LOG; + open LOG, '<', $log_file + or return "failed to open for reading: $!"; + @$line_ref = ; + close LOG; + + my @line = @$line_ref; + chomp @line; + + # Don't filter out blank or comment lines; git does that already, + # and if we were to ignore them here, it could lead to committing + # with lines that start with "#" in the log. + + # Filter out leading blank and comment lines. + # while (@line && $line[0] =~ /^(?:#.*|[ \t]*)$/) { shift @line; } + + # Filter out blank and comment lines at EOF. + # while (@line && $line[$#line] =~ /^(?:#.*|[ \t]*)$/) { pop @line; } + + @line == 0 + and return 'no log message'; + + # The first line should not be too short + 8 < length $line[0] || return 'summary line too short'; + + # The first line should not start with an asterisk or a hash sign. + # An asterisk might indicate that a change entry was started right + # at the first line. + $line[0] =~ /^[*#]/ && return "summary line starts with an * or #"; + + # Second line should be blank or not present. + 2 <= @line && length $line[1] + and return 'second line must be empty'; + + # Limit line length to allow for the ChangeLog's leading TAB. + foreach my $line (@line) + { + 72 < length $line && $line =~ /^[^#]/ + and return 'line longer than 72 characters'; + } + + return ''; +} + +{ + @ARGV == 1 + or die; + + my $log_file = $ARGV[0]; + + while (1) + { + my @line; + my $err = check_msg $log_file, \@line; + $err eq '' + and last; + $err = "$ME: $err\n"; + warn $err; + exit 1; + + # Insert the diagnostic as a comment on the first line of $log_file. + #rewrite $log_file, $err, \@line; + #re_edit $log_file; + # + ## Stop if our parent is killed. + #getppid() == 1 + # and last; + } +} + +# Local Variables: +# mode: perl +# End: diff --git a/scripts/git-log-fix b/scripts/git-log-fix new file mode 100644 index 0000000..af702fe --- /dev/null +++ b/scripts/git-log-fix @@ -0,0 +1,3 @@ +# This file is expected to be used via gitlog-to-changelog's --amend=FILE +# option. It specifies what changes to make to each given SHA1's commit +# log and metadata, using Perl-eval'able expressions. diff --git a/scripts/git-log-footer b/scripts/git-log-footer new file mode 100644 index 0000000..4d98e37 --- /dev/null +++ b/scripts/git-log-footer @@ -0,0 +1,15 @@ + +2011-12-01 Werner Koch + + NB: Changes done before December 1st, 2011 are described in + per directory files named ChangeLog-2011. See doc/HACKING for + details. + + ----- + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010, 2011 Free Software Foundation, Inc. + + Copying and distribution of this file and/or the original GIT + commit log messages, with or without modification, are + permitted provided the copyright notice and this notice are + preserved. diff --git a/scripts/gitlog-to-changelog b/scripts/gitlog-to-changelog new file mode 100755 index 0000000..40a8035 --- /dev/null +++ b/scripts/gitlog-to-changelog @@ -0,0 +1,345 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2011-11-02 07:53'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2011 Free Software Foundation, Inc. + +# 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 3 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, see . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try `$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on +a line) referring to a commit in the current project, and CODE refers to one +or more consecutive lines of Perl code. Pairs must be separated by one or +more blank line. + +Here is sample input for use with --amend=FILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert , + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = )) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + ) or usage 1; + + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = (qw (git log --log-size), + '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = ) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest = $_; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); + + # Format 'Co-authored-by: A U Thor ' lines in + # standard multi-author ChangeLog format. + my @coauthors = grep /^Co-authored-by:.*$/, @line; + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If this header would be the same as the previous date/name/email/ + # coauthors header, then arrange not to print it. + if ($date_line ne $prev_date_line or "@coauthors" ne "@prev_coauthors") + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line = $date_line; + @prev_coauthors = @coauthors; + + # Omit "Co-authored-by..." and "Signed-off-by..." lines. + @line = grep !/^Signed-off-by: .*>$/, @line; + @line = grep !/^Co-authored-by: /, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/sm/ChangeLog b/sm/ChangeLog-2011 similarity index 99% rename from sm/ChangeLog rename to sm/ChangeLog-2011 index 7f7118a..4efea96 100644 --- a/sm/ChangeLog +++ b/sm/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-04 Werner Koch * keydb.c (keydb_add_resource): Remove set but unused var @@ -1025,7 +1032,7 @@ h2007-11-22 Werner Koch 2006-09-14 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). 2006-09-13 Werner Koch diff --git a/sm/Makefile.am b/sm/Makefile.am index 100c57b..d945d71 100644 --- a/sm/Makefile.am +++ b/sm/Makefile.am @@ -6,12 +6,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . @@ -20,9 +20,11 @@ bin_PROGRAMS = gpgsm -AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS) +EXTRA_DIST = ChangeLog-2011 + +AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS) -AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl include $(top_srcdir)/am/cmacros.am diff --git a/tests/ChangeLog b/tests/ChangeLog-2011 similarity index 91% rename from tests/ChangeLog rename to tests/ChangeLog-2011 index 33519f7..75bbaac 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2009-10-13 Werner Koch * asschk.c (die): Replace this vararg macro by C-89 compliant @@ -12,7 +19,7 @@ 2008-10-20 Werner Koch * asschk.c (cmd_echo): Mark unused arg. - (cmd_send, cmd_expect_ok, cmd_expect_err, cmd_pipeserver) + (cmd_send, cmd_expect_ok, cmd_expect_err, cmd_pipeserver) (cmd_quit_if, cmd_fail_if): Ditto. 2008-09-29 Werner Koch @@ -108,7 +115,7 @@ * Makefile.am: Fixes for make dist. * samplekets/Makefile.am: New. - + 2002-08-08 Werner Koch * asschk.c: Added some new features. @@ -123,7 +130,7 @@ * Makefile.am, asschk.c: New. - + Copyright 2002 Free Software Foundation, Inc. This file is free software; as a special exception the author gives @@ -133,5 +140,3 @@ 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. - - diff --git a/tests/Makefile.am b/tests/Makefile.am index 512d9d7..46c9af0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,18 +1,18 @@ # Makefile.am -tests makefile for libxtime # Copyright (C) 2002 Free Software Foundation, Inc. -# +# # This file is part of GnuPG. -# +# # GnuPG is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . @@ -37,7 +37,7 @@ TESTS_ENVIRONMENT = GNUPGHOME=`/bin/pwd` GPG_AGENT_INFO= LC_ALL=C \ testscripts = sm-sign+verify sm-verify -EXTRA_DIST = runtest inittests $(testscripts) \ +EXTRA_DIST = runtest inittests $(testscripts) ChangeLog-2011 \ text-1.txt text-2.txt text-3.txt \ text-1.osig.pem text-1.dsig.pem text-1.osig-bad.pem \ text-2.osig.pem text-2.osig-bad.pem \ @@ -52,10 +52,10 @@ EXTRA_DIST = runtest inittests $(testscripts) \ # write new tests based on gpg-connect-agent which has a full fledged # script language and thus makes it far easier to write tests than to # use the low--level asschk stuff. -TESTS = +TESTS = CLEANFILES = inittests.stamp x y y z out err \ - *.lock .\#lk* + *.lock .\#lk* DISTCLEANFILES = pubring.kbx~ random_seed diff --git a/tests/openpgp/ChangeLog b/tests/openpgp/ChangeLog-2011 similarity index 96% rename from tests/openpgp/ChangeLog rename to tests/openpgp/ChangeLog-2011 index beb6197..75246dd 100644 --- a/tests/openpgp/ChangeLog +++ b/tests/openpgp/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2010-05-12 Werner Koch * armor.test: Add test for bug#1179. @@ -64,7 +71,7 @@ we support. This is safer than the previous setup which could hide that some ciphers weren't being tested. Plus, this automatically tests any new ciphers libgcrypt supports. - (all_hash_algos): New. + (all_hash_algos): New. * sigs.test: Use it here, and also test with >=160 bit hashes for DSA2. * conventional.test, encrypt.test, encrypt-dsa.test, @@ -122,7 +129,7 @@ * verify.test: More tests. * multisig.test: Better error printing. (sig_1ls1ls_valid, sig_ls_valid): Moved to the non-valid group. - + 2006-02-14 Werner Koch * verify.test: New. @@ -204,7 +211,7 @@ 2002-05-10 Werner Koch * Makefile.am: Add gpg_dearmor to all targets where it is used. - Noted by Andreas Haumer. + Noted by Andreas Haumer. 2002-04-19 Werner Koch @@ -232,7 +239,7 @@ 2001-09-28 Werner Koch - * defs.inc: Write a log file for each test. + * defs.inc: Write a log file for each test. * run-gpg, run-gpgm, run-gpg.patterns: Removed. Replaced in all tests by a simple macro from defs.inc. * Makefile.am (CLEANFILES): Remove log files. @@ -243,7 +250,7 @@ armencryptp.test, armencrypt.test, encryptp.test, seat.test, encrypt-dsa.test, encrypt.test: Use --always-trust because the test are not designed to check the validity. - + 2001-09-06 Werner Koch * genkey1024.test: Simplified by using a parameter file. @@ -271,7 +278,7 @@ 2001-03-20 Werner Koch - * Makefile.am: Import the pubdemo.asc file + * Makefile.am: Import the pubdemo.asc file * sigs.test (hash_algo_list): s/tiger/tiger192/ @@ -370,5 +377,3 @@ Mon May 18 15:40:02 1998 Werner Koch (wk at isil.d.shuttle.de) 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. - - diff --git a/tests/openpgp/Makefile.am b/tests/openpgp/Makefile.am index 4615942..837298d 100644 --- a/tests/openpgp/Makefile.am +++ b/tests/openpgp/Makefile.am @@ -6,12 +6,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . # Process this file with automake to create Makefile.in @@ -25,7 +25,7 @@ required_pgms = ../../g10/gpg2 ../../agent/gpg-agent \ TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO= LC_ALL=C \ - ../../agent/gpg-agent --quiet --daemon sh + ../../agent/gpg-agent --quiet --daemon sh TESTS = version.test mds.test \ @@ -50,7 +50,7 @@ TEST_FILES = pubring.asc secring.asc plain-1o.asc plain-2o.asc plain-3o.asc \ DATA_FILES = data-500 data-9000 data-32000 data-80000 plain-large -EXTRA_DIST = defs.inc $(TESTS) $(TEST_FILES) \ +EXTRA_DIST = defs.inc $(TESTS) $(TEST_FILES) ChangeLog-2011 \ mkdemodirs signdemokey # Note that removing S.gpg-agent forces a running gpg-agent to @@ -70,7 +70,7 @@ distclean-local: prepared.stamp: ./pubring.gpg ./secring.gpg ./plain-1 ./plain-2 ./plain-3 \ ./pubring.pkr ./secring.skr ./gpg_dearmor $(DATA_FILES) - $(GPG_IMPORT) $(srcdir)/pubdemo.asc + $(GPG_IMPORT) $(srcdir)/pubdemo.asc cat $(srcdir)/gpg-agent.conf.tmpl > gpg-agent.conf echo timestamp >./prepared.stamp diff --git a/tests/pkits/ChangeLog b/tests/pkits/ChangeLog-2011 similarity index 85% rename from tests/pkits/ChangeLog rename to tests/pkits/ChangeLog-2011 index 992d1df..a98689e 100644 --- a/tests/pkits/ChangeLog +++ b/tests/pkits/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2009-03-03 Werner Koch * inittests (clean_files): Use /bin/pwd here as well. @@ -11,11 +18,11 @@ 2008-02-19 Werner Koch - * inittests: Unpack test data onlyu if available. + * inittests: Unpack test data onlyu if available. * common.sh: Skip tests if PKITS test data is not available. * Makefile.am: Do not distribute test data. This allows to include the test suite in the distribution. - + * signature-verification: New. * validity-periods: New. * verifying-name-chaining: New. diff --git a/tests/pkits/Makefile.am b/tests/pkits/Makefile.am index f59e5ec..8098ad2 100644 --- a/tests/pkits/Makefile.am +++ b/tests/pkits/Makefile.am @@ -1,18 +1,18 @@ # Makefile.am - tests using NIST's PKITS # Copyright (C) 2004, 2008 Free Software Foundation, Inc. -# +# # This file is part of GnuPG. -# +# # GnuPG is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . @@ -43,8 +43,8 @@ testscripts = import-all-certs validate-all-certs \ private-certificate-extensions -EXTRA_DIST = inittests runtest common.sh $(testscripts) - import-all-certs.data +EXTRA_DIST = inittests runtest common.sh $(testscripts) ChangeLog-2011 \ + import-all-certs.data TESTS = $(testscripts) diff --git a/tools/ChangeLog b/tools/ChangeLog-2011 similarity index 98% rename from tools/ChangeLog rename to tools/ChangeLog-2011 index 195f0c4..1eca0b5 100644 --- a/tools/ChangeLog +++ b/tools/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-02 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-04 Werner Koch * symcryptrun.c: Include utmp.h for login_tty. @@ -584,7 +591,7 @@ 2006-09-12 Werner Koch - Replaced all call gpg_error_from_errno(errno) by + Replaced all call gpg_error_from_errno(errno) by gpg_error_from_syserror(). * gpg-connect-agent.c (read_and_print_response): With verbosity diff --git a/tools/Makefile.am b/tools/Makefile.am index e07d8e3..32940a3 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,23 +1,23 @@ # Makefile.am - Tools directory # Copyright (C) 2003, 2007 Free Software Foundation, Inc. -# +# # This file is part of GnuPG. -# +# # GnuPG is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # GnuPG is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, see . EXTRA_DIST = \ - Manifest watchgnupg.c \ + Manifest watchgnupg.c ChangeLog-2011 \ addgnupghome applygnupgdefaults gpgsm-gencert.sh \ lspgpot mail-signed-keys convert-from-106 sockprox.c \ ccidmon.c @@ -75,14 +75,14 @@ gpgconf_LDADD = $(common_libs) \ $(LIBINTL) $(GPG_ERROR_LIBS) $(LIBICONV) $(W32SOCKLIBS) gpgparsemail_SOURCES = gpgparsemail.c rfc822parse.c rfc822parse.h -gpgparsemail_LDADD = +gpgparsemail_LDADD = symcryptrun_SOURCES = symcryptrun.c symcryptrun_LDADD = $(LIBUTIL_LIBS) $(common_libs) $(pwquery_libs) \ $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) \ $(LIBICONV) $(W32SOCKLIBS) -watchgnupg_SOURCES = watchgnupg.c +watchgnupg_SOURCES = watchgnupg.c watchgnupg_LDADD = $(NETLIBS) gpg_connect_agent_SOURCES = gpg-connect-agent.c no-libgcrypt.c ----------------------------------------------------------------------- Summary of changes: ChangeLog | 1208 +-------------------------- ChangeLog => ChangeLog-2011 | 11 +- Makefile.am | 35 +- agent/{ChangeLog => ChangeLog-2011} | 9 +- agent/Makefile.am | 9 +- autogen.sh | 9 +- common/{ChangeLog => ChangeLog-2011} | 7 + common/Makefile.am | 2 +- doc/{ChangeLog => ChangeLog-2011} | 19 +- doc/HACKING | 32 +- doc/Makefile.am | 2 +- g10/{ChangeLog => ChangeLog-2011} | 15 +- g10/Makefile.am | 18 +- include/{ChangeLog => ChangeLog-2011} | 7 + include/Makefile.am | 2 +- jnlib/{ChangeLog => ChangeLog-2011} | 33 +- jnlib/Makefile.am | 14 +- kbx/{ChangeLog => ChangeLog-2011} | 9 +- kbx/Makefile.am | 12 +- keyserver/{ChangeLog => ChangeLog-2011} | 19 +- keyserver/Makefile.am | 14 +- m4/{ChangeLog => ChangeLog-2011} | 8 +- m4/Makefile.am | 2 + po/{ChangeLog => ChangeLog-2011} | 13 +- scd/{ChangeLog => ChangeLog-2011} | 9 +- scd/Makefile.am | 10 +- scripts/{ChangeLog => ChangeLog-2011} | 9 +- scripts/git-hooks/commit-msg | 127 +++ scripts/git-log-fix | 3 + scripts/git-log-footer | 15 + scripts/gitlog-to-changelog | 345 ++++++++ sm/{ChangeLog => ChangeLog-2011} | 9 +- sm/Makefile.am | 10 +- tests/{ChangeLog => ChangeLog-2011} | 15 +- tests/Makefile.am | 14 +- tests/openpgp/{ChangeLog => ChangeLog-2011} | 21 +- tests/openpgp/Makefile.am | 10 +- tests/pkits/{ChangeLog => ChangeLog-2011} | 11 +- tests/pkits/Makefile.am | 12 +- tools/{ChangeLog => ChangeLog-2011} | 9 +- tools/Makefile.am | 14 +- 41 files changed, 816 insertions(+), 1336 deletions(-) copy ChangeLog => ChangeLog-2011 (98%) rename agent/{ChangeLog => ChangeLog-2011} (99%) rename common/{ChangeLog => ChangeLog-2011} (99%) rename doc/{ChangeLog => ChangeLog-2011} (98%) rename g10/{ChangeLog => ChangeLog-2011} (99%) rename include/{ChangeLog => ChangeLog-2011} (97%) rename jnlib/{ChangeLog => ChangeLog-2011} (97%) rename kbx/{ChangeLog => ChangeLog-2011} (96%) rename keyserver/{ChangeLog => ChangeLog-2011} (99%) rename m4/{ChangeLog => ChangeLog-2011} (94%) rename po/{ChangeLog => ChangeLog-2011} (96%) rename scd/{ChangeLog => ChangeLog-2011} (99%) rename scripts/{ChangeLog => ChangeLog-2011} (81%) create mode 100755 scripts/git-hooks/commit-msg create mode 100644 scripts/git-log-fix create mode 100644 scripts/git-log-footer create mode 100755 scripts/gitlog-to-changelog rename sm/{ChangeLog => ChangeLog-2011} (99%) rename tests/{ChangeLog => ChangeLog-2011} (91%) rename tests/openpgp/{ChangeLog => ChangeLog-2011} (96%) rename tests/pkits/{ChangeLog => ChangeLog-2011} (85%) rename tools/{ChangeLog => ChangeLog-2011} (98%) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Dec 5 06:54:21 2011 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 05 Dec 2011 06:54:21 +0100 Subject: [git] GnuPG - branch, ccid_driver_improvement, created. post-nuke-of-trailing-ws-144-gfb01522 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, ccid_driver_improvement has been created at fb01522af758be19a16337cd7bf86cef21b7b155 (commit) - Log ----------------------------------------------------------------- commit fb01522af758be19a16337cd7bf86cef21b7b155 Author: NIIBE Yutaka Date: Mon Dec 5 13:57:42 2011 +0900 Support keypad_modify method by ccid-driver. * apdu.c (ccid_keypad_operation): Rename from ccid_keypad_verify. (open_ccid_reader): Use ccid_keypad_operation for verify and modify. * ccid-driver.c (ccid_transceive_secure): Support CHANGE_REFERENCE_DATA: 0x24. diff --git a/scd/apdu.c b/scd/apdu.c index c130d89..aab6be0 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2336,8 +2336,8 @@ check_ccid_keypad (int slot, int command, int pin_mode, static int -ccid_keypad_verify (int slot, int class, int ins, int p0, int p1, - struct pininfo_s *pininfo) +ccid_keypad_operation (int slot, int class, int ins, int p0, int p1, + struct pininfo_s *pininfo) { unsigned char apdu[4]; int err, sw; @@ -2408,8 +2408,8 @@ open_ccid_reader (const char *portstr) reader_table[slot].check_keypad = check_ccid_keypad; reader_table[slot].dump_status_reader = dump_ccid_reader_status; reader_table[slot].set_progress_cb = set_progress_cb_ccid_reader; - reader_table[slot].keypad_verify = ccid_keypad_verify; - reader_table[slot].keypad_modify = NULL; + reader_table[slot].keypad_verify = ccid_keypad_operation; + reader_table[slot].keypad_modify = ccid_keypad_operation; /* Our CCID reader code does not support T=0 at all, thus reset the flag. */ reader_table[slot].is_t0 = 0; diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index 5755b07..2f8be56 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -3102,7 +3102,7 @@ ccid_transceive_secure (ccid_driver_t handle, if (apdu_buflen >= 4 && apdu_buf[1] == 0x20 && (handle->has_pinpad & 1)) ; else if (apdu_buflen >= 4 && apdu_buf[1] == 0x24 && (handle->has_pinpad & 2)) - return CCID_DRIVER_ERR_NOT_SUPPORTED; /* Not yet by our code. */ + ; else return CCID_DRIVER_ERR_NO_KEYPAD; @@ -3165,7 +3165,8 @@ ccid_transceive_secure (ccid_driver_t handle, msg[7] = 0; /* bBWI */ msg[8] = 0; /* RFU */ msg[9] = 0; /* RFU */ - msg[10] = 0; /* Perform PIN verification. */ + msg[10] = apdu_buf[1] == 0x20 ? 0 : 1; + /* Perform PIN verification or PIN modification. */ msg[11] = 0; /* Timeout in seconds. */ msg[12] = 0x82; /* bmFormatString: Byte, pos=0, left, ASCII. */ if (handle->id_vendor == VENDOR_SCM) @@ -3184,28 +3185,61 @@ ccid_transceive_secure (ccid_driver_t handle, Units are bytes, position is 0. */ } - /* The following is a little endian word. */ - msg[15] = pinlen_max; /* wPINMaxExtraDigit-Maximum. */ - msg[16] = pinlen_min; /* wPINMaxExtraDigit-Minimum. */ + msglen = 15; + if (apdu_buf[1] == 0x24) + { + msg[msglen++] = 0; /* bInsertionOffsetOld */ + msg[msglen++] = 0; /* bInsertionOffsetNew */ + } - msg[17] = 0x02; /* bEntryValidationCondition: - Validation key pressed */ + /* The following is a little endian word. */ + msg[msglen++] = pinlen_max; /* wPINMaxExtraDigit-Maximum. */ + msg[msglen++] = pinlen_min; /* wPINMaxExtraDigit-Minimum. */ + + if (apdu_buf[1] == 0x24) + msg[msglen++] = apdu_buf[2] == 0 ? 0x03 : 0x01; + /* bConfirmPIN + * 0x00: new PIN once + * 0x01: new PIN twice (confirmation) + * 0x02: old PIN and new PIN once + * 0x03: old PIN and new PIN twice (confirmation) + */ + + msg[msglen] = 0x02; /* bEntryValidationCondition: + Validation key pressed */ if (pinlen_min && pinlen_max && pinlen_min == pinlen_max) - msg[17] |= 0x01; /* Max size reached. */ - msg[18] = 0xff; /* bNumberMessage: Default. */ - msg[19] = 0x09; /* wLangId-Low: English FIXME: use the first entry. */ - msg[20] = 0x04; /* wLangId-High. */ - msg[21] = 0; /* bMsgIndex. */ + msg[msglen] |= 0x01; /* Max size reached. */ + msglen++; + + if (apdu_buf[1] == 0x20) + msg[msglen++] = 0xff; /* bNumberMessage: Default. */ + else + msg[msglen++] = apdu_buf[2] == 0 ? 0x03 : 0x01; /* bNumberMessage. */ + + msg[msglen++] = 0x09; /* wLangId-Low: English FIXME: use the first entry. */ + msg[msglen++] = 0x04; /* wLangId-High. */ + + if (apdu_buf[1] == 0x20) + msg[msglen++] = 0; /* bMsgIndex. */ + else + { + msg[msglen++] = 1; /* bMsgIndex1. */ + if (apdu_buf[2] == 0) + { + msg[msglen++] = 2; /* bMsgIndex2. */ + msg[msglen++] = 3; /* bMsgIndex3. */ + } + } + /* bTeoProlog follows: */ - msg[22] = handle->nonnull_nad? ((1 << 4) | 0): 0; - msg[23] = ((handle->t1_ns & 1) << 6); /* I-block */ - msg[24] = 0; /* The apdulen will be filled in by the reader. */ + msg[msglen++] = handle->nonnull_nad? ((1 << 4) | 0): 0; + msg[msglen++] = ((handle->t1_ns & 1) << 6); /* I-block */ + msg[msglen++] = 0; /* The apdulen will be filled in by the reader. */ /* APDU follows: */ - msg[25] = apdu_buf[0]; /* CLA */ - msg[26] = apdu_buf[1]; /* INS */ - msg[27] = apdu_buf[2]; /* P1 */ - msg[28] = apdu_buf[3]; /* P2 */ - msglen = 29; + msg[msglen++] = apdu_buf[0]; /* CLA */ + msg[msglen++] = apdu_buf[1]; /* INS */ + msg[msglen++] = apdu_buf[2]; /* P1 */ + msg[msglen++] = apdu_buf[3]; /* P2 */ if (cherry_mode) msg[msglen++] = 0; /* An EDC is not required. */ commit 37fadead90e985b544c9f817cf7c7b0ada797d3c Author: NIIBE Yutaka Date: Mon Dec 5 12:00:14 2011 +0900 Support extended APDU exchange level somehow. * ccid-driver.c (ccid_transceive_apdu_level): Permit sending packet where apdulen <= 289. Support receiving packets in a chain. diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index 7338ccc..5755b07 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -2590,8 +2590,8 @@ ccid_transceive_apdu_level (ccid_driver_t handle, /* The maximum length for a short APDU T=1 block is 261. For an extended APDU T=1 block the maximum length 65544; however - extended APDU exchange level is not yet supported. */ - if (apdulen > 261) + extended APDU exchange level is not fully supported yet. */ + if (apdulen > 289) return CCID_DRIVER_ERR_INV_VALUE; /* Invalid length. */ msg[0] = PC_to_RDR_XfrBlock; @@ -2614,8 +2614,51 @@ ccid_transceive_apdu_level (ccid_driver_t handle, if (rc) return rc; - apdu = msg + 10; - apdulen = msglen - 10; + if (msg[9] == 1) + { + size_t total_msglen = msglen; + + while (1) + { + unsigned char status; + + msg = recv_buffer + total_msglen; + + msg[0] = PC_to_RDR_XfrBlock; + msg[5] = 0; /* slot */ + msg[6] = seqno = handle->seqno++; + msg[7] = bwi; /* bBWI */ + msg[8] = 0x10; /* Request next data block */ + msg[9] = 0; + set_msg_len (msg, 0); + msglen = 10; + + rc = bulk_out (handle, msg, msglen, 0); + if (rc) + return rc; + + rc = bulk_in (handle, msg, sizeof recv_buffer - total_msglen, &msglen, + RDR_to_PC_DataBlock, seqno, 5000, 0); + if (rc) + return rc; + status = msg[9]; + memmove (msg, msg+10, msglen - 10); + total_msglen += msglen - 10; + if (total_msglen >= sizeof recv_buffer) + return CCID_DRIVER_ERR_OUT_OF_CORE; + + if (status == 0x02) + break; + } + + apdu = recv_buffer + 10; + apdulen = total_msglen - 10; + } + else + { + apdu = msg + 10; + apdulen = msglen - 10; + } if (resp) { ----------------------------------------------------------------------- hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Dec 5 15:57:54 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 05 Dec 2011 15:57:54 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-143-g477360e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 477360e8cdc458b0a36e9c7fb52a35f27766255d (commit) from 239659d3a0b8c0c378734ca3d1e9210a02e24da7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 477360e8cdc458b0a36e9c7fb52a35f27766255d Author: Werner Koch Date: Mon Dec 5 10:54:59 2011 +0100 Amend the agent code with more comments. * agent/command.c (server_local_s): Remove unused field MESSAGE_FD. diff --git a/agent/agent.h b/agent/agent.h index b323718..4f4e477 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -73,17 +73,20 @@ struct /* True if we handle sigusr2. */ int sigusr2_enabled; - /* Environment setting gathered at program start or changed using the + /* Environment settings gathered at program start or changed using the Assuan command UPDATESTARTUPTTY. */ session_env_t startup_env; char *startup_lc_ctype; char *startup_lc_messages; - const char *pinentry_program; /* Filename of the program to start as - pinentry. */ - const char *scdaemon_program; /* Filename of the program to handle - smartcard tasks. */ + /* Filename of the program to start as pinentry. */ + const char *pinentry_program; + + /* Filename of the program to handle smartcard tasks. */ + const char *scdaemon_program; + int disable_scdaemon; /* Never use the SCdaemon. */ + int no_grab; /* Don't let the pinentry grab the keyboard */ /* The name of the file pinentry shall tocuh before exiting. If @@ -98,31 +101,51 @@ struct /* Flag disallowing bypassing of the warning. */ int enforce_passphrase_constraints; + /* The require minmum length of a passphrase. */ unsigned int min_passphrase_len; + /* The minimum number of non-alpha characters in a passphrase. */ unsigned int min_passphrase_nonalpha; + /* File name with a patternfile or NULL if not enabled. */ const char *check_passphrase_pattern; + /* If not 0 the user is asked to change his passphrase after these number of days. */ unsigned int max_passphrase_days; + /* If set, a passphrase history will be written and checked at each passphrase change. */ int enable_passhrase_history; int running_detached; /* We are running detached from the tty. */ + /* If this global option is true, the passphrase cache is ignored + for signing operations. */ int ignore_cache_for_signing; + + /* If this global option is true, the user is allowed to + interactively mark certificate in trustlist.txt as trusted. */ int allow_mark_trusted; + + /* If this global option is true, the Assuan command + PRESET_PASSPHRASE is allowed. */ int allow_preset_passphrase; + + /* If this global option is true, the Assuan option + pinentry-mode=loopback is allowed. */ int allow_loopback_pinentry; + int keep_tty; /* Don't switch the TTY (for pinentry) on request */ int keep_display; /* Don't switch the DISPLAY (for pinentry) on request */ - int ssh_support; /* Enable ssh-agent emulation. */ + + /* This global option enables the ssh-agent subsystem. */ + int ssh_support; } opt; +/* Bit values for the --debug option. */ #define DBG_COMMAND_VALUE 1 /* debug commands i/o */ #define DBG_MPI_VALUE 2 /* debug mpi details */ #define DBG_CRYPTO_VALUE 4 /* debug low level crypto */ @@ -130,8 +153,9 @@ struct #define DBG_CACHE_VALUE 64 /* debug the caching */ #define DBG_MEMSTAT_VALUE 128 /* show memory statistics */ #define DBG_HASHING_VALUE 512 /* debug hashing operations */ -#define DBG_ASSUAN_VALUE 1024 +#define DBG_ASSUAN_VALUE 1024 /* Enable Assuan debugging. */ +/* Test macros for the debug option. */ #define DBG_COMMAND (opt.debug & DBG_COMMAND_VALUE) #define DBG_CRYPTO (opt.debug & DBG_CRYPTO_VALUE) #define DBG_MEMORY (opt.debug & DBG_MEMORY_VALUE) @@ -139,14 +163,18 @@ struct #define DBG_HASHING (opt.debug & DBG_HASHING_VALUE) #define DBG_ASSUAN (opt.debug & DBG_ASSUAN_VALUE) +/* Forward reference for local definitions in command.c. */ struct server_local_s; + +/* Forward reference for local definitions in call-scd.c. */ struct scd_local_s; /* Collection of data per session (aka connection). */ struct server_control_s { /* Private data used to fire up the connection thread. We use this - structure do avoid an extra allocation for just a few bytes. */ + structure do avoid an extra allocation for only a few bytes while + spawning a new connection thread. */ struct { gnupg_fd_t fd; } thread_startup; @@ -157,6 +185,7 @@ struct server_control_s /* Private data of the SCdaemon (call-scd.c). */ struct scd_local_s *scd_local; + /* Environment settings for the connection. */ session_env_t session_env; char *lc_ctype; char *lc_messages; @@ -177,37 +206,47 @@ struct server_control_s unsigned char keygrip[20]; int have_keygrip; - int use_auth_call; /* Hack to send the PKAUTH command instead of the - PKSIGN command to the scdaemon. */ - int in_passwd; /* Hack to inhibit enforced passphrase change - during an explicit passwd command. */ + /* A flag to enable a hack to send the PKAUTH command instead of the + PKSIGN command to the scdaemon. */ + int use_auth_call; + + /* A flag to inhibit enforced passphrase change during an explicit + passwd command. */ + int in_passwd; - unsigned long s2k_count; /* Other than the calibrated count. */ + /* The current S2K which might be different from the calibrated + count. */ + unsigned long s2k_count; }; +/* Information pertaining to pinentry requests. */ struct pin_entry_info_s { int min_digits; /* min. number of digits required or 0 for freeform entry */ int max_digits; /* max. number of allowed digits allowed*/ - int max_tries; - int failed_tries; + int max_tries; /* max. number of allowed tries. */ + int failed_tries; /* Number of tries so far failed. */ int with_qualitybar; /* Set if the quality bar should be displayed. */ int (*check_cb)(struct pin_entry_info_s *); /* CB used to check the PIN */ void *check_cb_arg; /* optional argument which might be of use in the CB */ const char *cb_errtext; /* used by the cb to display a specific error */ - size_t max_length; /* allocated length of the buffer */ - char pin[1]; + size_t max_length; /* Allocated length of the buffer PIN. */ + char pin[1]; /* The buffer to hold the PIN or passphrase. + It's actual allocated length is given by + MAX_LENGTH (above). */ }; +/* Types of the private keys. */ enum { - PRIVATE_KEY_UNKNOWN = 0, - PRIVATE_KEY_CLEAR = 1, - PRIVATE_KEY_PROTECTED = 2, - PRIVATE_KEY_SHADOWED = 3, - PROTECTED_SHARED_SECRET = 4 + PRIVATE_KEY_UNKNOWN = 0, /* Type of key is not known. */ + PRIVATE_KEY_CLEAR = 1, /* The key is not protected. */ + PRIVATE_KEY_PROTECTED = 2, /* The key is protected. */ + PRIVATE_KEY_SHADOWED = 3, /* The key is a stub for a smartcard + based key. */ + PROTECTED_SHARED_SECRET = 4 /* RFU. */ }; diff --git a/agent/command.c b/agent/command.c index f310a98..0e7b962 100644 --- a/agent/command.c +++ b/agent/command.c @@ -50,31 +50,57 @@ /* The size of the import/export KEK key (in bytes). */ #define KEYWRAP_KEYSIZE (128/8) +/* A shortcut to call assuan_set_error using an gpg_err_code_t and a + text string. */ #define set_error(e,t) assuan_set_error (ctx, gpg_error (e), (t)) - +/* Check that the maximum digest length we support has at least the + length of the keygrip. */ #if MAX_DIGEST_LEN < 20 #error MAX_DIGEST_LEN shorter than keygrip #endif -/* Data used to associate an Assuan context with local server data */ +/* Data used to associate an Assuan context with local server data. + This is this modules local part of the server_control_s struct. */ struct server_local_s { + /* Our Assuan context. */ assuan_context_t assuan_ctx; - int message_fd; + + /* If this flag is true, the passphrase cache is used for signing + operations. It defaults to true but may be set on a per + connection base. The global option opt.ignore_cache_for_signing + takes precedence over this flag. */ int use_cache_for_signing; - char *keydesc; /* Allocated description for the next key - operation. */ - int pause_io_logging; /* Used to suppress I/O logging during a command */ - int stopme; /* If set to true the agent will be terminated after - the end of this session. */ - int allow_pinentry_notify; /* Set if pinentry notifications should - be done. */ - void *import_key; /* Malloced KEK for the import_key command. */ - void *export_key; /* Malloced KEK for the export_key command. */ - int allow_fully_canceled; /* Client is aware of GPG_ERR_FULLY_CANCELED. */ - char *last_cache_nonce; /* Last CACHE_NOCNE sent as status (malloced). */ - char *last_passwd_nonce; /* Last PASSWD_NOCNE sent as status (malloced). */ + + /* An allocated description for the next key operation. This is + used if a pinnetry needs to be popped up. */ + char *keydesc; + + /* Flags to suppress I/O logging during a command. */ + int pause_io_logging; + + /* If this flags is set to true the agent will be terminated after + the end of the current session. */ + int stopme; + + /* Flag indicating whether pinentry notifications shall be done. */ + int allow_pinentry_notify; + + /* Malloced KEK (Key-Encryption-Key) for the import_key command. */ + void *import_key; + + /* Malloced KEK for the export_key command. */ + void *export_key; + + /* Client is aware of the error code GPG_ERR_FULLY_CANCELED. */ + int allow_fully_canceled; + + /* Last CACHE_NONCE sent as status (malloced). */ + char *last_cache_nonce; + + /* Last PASSWD_NONCE sent as status (malloced). */ + char *last_passwd_nonce; }; @@ -156,6 +182,8 @@ write_and_clear_outbuf (assuan_context_t ctx, membuf_t *mb) } +/* Clear the nonces used to enable the passphrase cache for certain + multi-command command sequences. */ static void clear_nonce_cache (ctrl_t ctrl) { @@ -176,6 +204,9 @@ clear_nonce_cache (ctrl_t ctrl) } +/* This function is called by Libassuan whenever thee client sends a + reset. It has been registered similar to the other Assuan + commands. */ static gpg_error_t reset_notify (assuan_context_t ctx, char *line) { @@ -196,8 +227,13 @@ reset_notify (assuan_context_t ctx, char *line) } -/* Skip over options. - Blanks after the options are also removed. */ +/* Skip over options in LINE. + + Blanks after the options are also removed. Options are indicated + by two leading dashes followed by a string consisting of non-space + characters. The special option "--" indicates an explicit end of + options; all what follows will not be considered an option. The + first no-option string also indicates the end of option parsing. */ static char * skip_options (const char *line) { @@ -213,7 +249,11 @@ skip_options (const char *line) return (char*)line; } -/* Check whether the option NAME appears in LINE */ + +/* Check whether the option NAME appears in LINE. An example for a + line with options is: + --algo=42 --data foo bar + This function would then only return true if NAME is "data". */ static int has_option (const char *line, const char *name) { @@ -226,6 +266,7 @@ has_option (const char *line, const char *name) return (s && (s == line || spacep (s-1)) && (!s[n] || spacep (s+n))); } + /* Same as has_option but does only test for the name of the option and ignores an argument, i.e. with NAME being "--hash" it would return true for "--hash" as well as for "--hash=foo". */ @@ -242,8 +283,9 @@ has_option_name (const char *line, const char *name) && (!s[n] || spacep (s+n) || s[n] == '=')); } + /* Return a pointer to the argument of the option with NAME. If such - an option is not given, it returns NULL. */ + an option is not given, NULL is retruned. */ static char * option_value (const char *line, const char *name) { @@ -265,7 +307,7 @@ option_value (const char *line, const char *name) } -/* Replace all '+' by a blank. */ +/* Replace all '+' by a blank in the string S. */ static void plus_to_blank (char *s) { @@ -296,8 +338,9 @@ parse_hexstring (assuan_context_t ctx, const char *string, size_t *len) return 0; } + /* Parse the keygrip in STRING into the provided buffer BUF. BUF must - provide space for 20 bytes. BUF is not changed if the function + provide space for 20 bytes. BUF is not changed if the function returns an error. */ static int parse_keygrip (assuan_context_t ctx, const char *string, unsigned char *buf) @@ -319,7 +362,11 @@ parse_keygrip (assuan_context_t ctx, const char *string, unsigned char *buf) } -/* Write an assuan status line. */ +/* Write an Assuan status line. KEYWORD is the first item on the + status line. The following arguments are all separated by a space + in the output. The last argument must be a NULL. Linefeeds and + carriage returns characters (which are not allowed in an Assuan + status line) are silently quoted in C-style. */ gpg_error_t agent_write_status (ctrl_t ctrl, const char *keyword, ...) { @@ -463,6 +510,7 @@ bump_key_eventcounter (void) eventcounter.any++; } + /* This function should be called for all card reader status changes. This function is assured not to do any context switches. */ @@ -1069,6 +1117,8 @@ do_one_keyinfo (ctrl_t ctrl, const unsigned char *grip, assuan_context_t ctx, } +/* Entry int for the command KEYINFO. This function handles the + command option processing. For details see hlp_keyinfo above. */ static gpg_error_t cmd_keyinfo (assuan_context_t ctx, char *line) { @@ -1140,6 +1190,7 @@ cmd_keyinfo (assuan_context_t ctx, char *line) +/* Helper for cmd_get_passphrase. */ static int send_back_passphrase (assuan_context_t ctx, int via_data, const char *pw) { @@ -2415,6 +2466,8 @@ cmd_getinfo (assuan_context_t ctx, char *line) +/* This function is called by Libassuan to parse the OPTION command. + It has been registered similar to the other Assuan commands. */ static gpg_error_t option_handler (assuan_context_t ctx, const char *key, const char *value) { @@ -2574,7 +2627,8 @@ command_has_option (const char *cmd, const char *cmdopt) } -/* Tell the assuan library about our commands */ +/* Tell Libassuan about our commands. Also register the other Assuan + handlers. */ static int register_commands (assuan_context_t ctx) { @@ -2733,6 +2787,8 @@ start_command_handler (ctrl_t ctrl, gnupg_fd_t listen_fd, gnupg_fd_t fd) } +/* Helper for the pinentry loopback mode. It merely passes the + parameters on to the client. */ gpg_error_t pinentry_loopback(ctrl_t ctrl, const char *keyword, unsigned char **buffer, size_t *size, diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index 0616875..6dcde26 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -309,6 +309,9 @@ static unsigned long pth_thread_id (void) Functions. */ +/* Allocate a string describing a library version by calling a GETFNC. + This function is expected to be called only once. GETFNC is + expected to have a semantic like gcry_check_version (). */ static char * make_libversion (const char *libname, const char *(*getfnc)(const char*)) { @@ -326,7 +329,9 @@ make_libversion (const char *libname, const char *(*getfnc)(const char*)) return result; } - +/* Return strings describing this program. The case values are + described in common/argparse.c:strusage. The values here override + the default values given by strusage. */ static const char * my_strusage (int level) { @@ -448,6 +453,9 @@ remove_socket (char *name) } } + +/* Cleanup code for this program. This is either called has an atexit + handler or directly. */ static void cleanup (void) { @@ -1268,6 +1276,8 @@ main (int argc, char **argv ) } +/* Exit entry point. This function should be called instead of a + plain exit. */ void agent_exit (int rc) { @@ -1294,6 +1304,11 @@ agent_exit (int rc) } +/* Each thread has its own local variables conveyed by a control + structure usually identified by an argument named CTRL. This + function is called immediately after allocating the control + structure. Its purpose is to setup the default values for that + structure. */ static void agent_init_default_ctrl (ctrl_t ctrl) { @@ -1319,6 +1334,8 @@ agent_init_default_ctrl (ctrl_t ctrl) } +/* Release all resources allocated by default in the control + structure. This is the counterpart to agent_init_default_ctrl. */ static void agent_deinit_default_ctrl (ctrl_t ctrl) { @@ -1720,6 +1737,7 @@ agent_sighup_action (void) } +/* A helper function to handle SIGUSR2. */ static void agent_sigusr2_action (void) { @@ -1730,6 +1748,8 @@ agent_sigusr2_action (void) } +/* The signal handler for this program. It is expected to be run in + its own trhead and not in the context of a signal handler. */ static void handle_signal (int signo) { ----------------------------------------------------------------------- Summary of changes: agent/agent.h | 83 +++++++++++++++++++++++++++++++----------- agent/command.c | 102 +++++++++++++++++++++++++++++++++++++++++------------ agent/gpg-agent.c | 22 +++++++++++- 3 files changed, 161 insertions(+), 46 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Dec 5 16:06:32 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 05 Dec 2011 16:06:32 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-144-g9274d4d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 9274d4d18281b3364fa8abaa821dddf124b105d7 (commit) from 477360e8cdc458b0a36e9c7fb52a35f27766255d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9274d4d18281b3364fa8abaa821dddf124b105d7 Author: Werner Koch Date: Mon Dec 5 15:14:47 2011 +0100 Fix last change. * agent/command.c (start_command_handler): Remove use of removed var. diff --git a/agent/command.c b/agent/command.c index 0e7b962..c33c0d6 100644 --- a/agent/command.c +++ b/agent/command.c @@ -2739,7 +2739,6 @@ start_command_handler (ctrl_t ctrl, gnupg_fd_t listen_fd, gnupg_fd_t fd) assuan_set_pointer (ctx, ctrl); ctrl->server_local = xcalloc (1, sizeof *ctrl->server_local); ctrl->server_local->assuan_ctx = ctx; - ctrl->server_local->message_fd = -1; ctrl->server_local->use_cache_for_signing = 1; ctrl->digest.raw_value = 0; ----------------------------------------------------------------------- Summary of changes: agent/command.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Dec 6 20:50:03 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 06 Dec 2011 20:50:03 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-146-g5cdad8f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 5cdad8ff000152b4bd01953646bb87fe8703c70d (commit) via 3f284e40502d8181b0b3ea66c77cd7c1252ea781 (commit) from 9274d4d18281b3364fa8abaa821dddf124b105d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5cdad8ff000152b4bd01953646bb87fe8703c70d Author: Werner Koch Date: Tue Dec 6 19:57:27 2011 +0100 gpgsm: Allow arbitrary extensions for cert creation. * sm/certreqgen.c (pSUBJKEYID, pEXTENSION): New. (read_parameters): Add new keywords. (proc_parameters): Check values of new keywords. (create_request): Add SubjectKeyId and extensions. (parse_parameter_usage): Support "cert" and the encrypt alias "encr". diff --git a/doc/DETAILS b/doc/DETAILS index 543ae4d..2e6874e 100644 --- a/doc/DETAILS +++ b/doc/DETAILS @@ -1036,6 +1036,7 @@ OIDs below the GnuPG arc: 1.3.6.1.4.1.11591.2.1.1 pkaAddress 1.3.6.1.4.1.11591.2.2 X.509 extensions 1.3.6.1.4.1.11591.2.2.1 standaloneCertificate + 1.3.6.1.4.1.11591.2.2.2 wellKnownPrivateKey 1.3.6.1.4.1.11591.2.12242973 invalid encoded OID diff --git a/doc/gpgsm.texi b/doc/gpgsm.texi index 8920833..8e25baf 100644 --- a/doc/gpgsm.texi +++ b/doc/gpgsm.texi @@ -1042,9 +1042,9 @@ already existing key. Key-Length will be ignored when given. @item Key-Usage: @var{usage-list} Space or comma delimited list of key usage, allowed values are - at samp{encrypt} and @samp{sign}. This is used to generate the keyUsage -extension. Please make sure that the algorithm is capable of this -usage. Default is to allow encrypt and sign. + at samp{encrypt}, @samp{sign} and @samp{cert}. This is used to generate +the keyUsage extension. Please make sure that the algorithm is +capable of this usage. Default is to allow encrypt and sign. @item Name-DN: @var{subject-name} This is the Distinguished Name (DN) of the subject in RFC-2253 format. diff --git a/sm/certreqgen.c b/sm/certreqgen.c index b4857b3..15fc7a2 100644 --- a/sm/certreqgen.c +++ b/sm/certreqgen.c @@ -33,6 +33,22 @@ %commit %echo done EOF + + This parameter file was used to create the STEED CA: + Key-Type: RSA + Key-Length: 1024 + Key-Grip: 68A638998DFABAC510EA645CE34F9686B2EDF7EA + Key-Usage: cert + Serial: 1 + Name-DN: CN=The STEED Self-Signing Nonthority + Not-Before: 2011-11-11 + Not-After: 2106-02-06 + Subject-Key-Id: 68A638998DFABAC510EA645CE34F9686B2EDF7EA + Extension: 2.5.29.19 c 30060101ff020101 + Extension: 1.3.6.1.4.1.11591.2.2.2 n 0101ff + Signing-Key: 68A638998DFABAC510EA645CE34F9686B2EDF7EA + %commit + */ @@ -68,7 +84,9 @@ enum para_name pNOTBEFORE, pNOTAFTER, pSIGNINGKEY, - pHASHALGO + pHASHALGO, + pSUBJKEYID, + pEXTENSION }; struct para_data_s @@ -89,6 +107,7 @@ struct reqgen_ctrl_s }; +static const char oidstr_subjectKeyIdentifier[] = "2.5.29.14"; static const char oidstr_keyUsage[] = "2.5.29.15"; static const char oidstr_basicConstraints[] = "2.5.29.19"; static const char oidstr_standaloneCertificate[] = "1.3.6.1.4.1.11591.2.2.1"; @@ -170,8 +189,11 @@ parse_parameter_usage (struct para_data_s *para, enum para_name key) ; else if ( !ascii_strcasecmp (p, "sign") ) use |= GCRY_PK_USAGE_SIGN; - else if ( !ascii_strcasecmp (p, "encrypt") ) + else if ( !ascii_strcasecmp (p, "encrypt") + || !ascii_strcasecmp (p, "encr") ) use |= GCRY_PK_USAGE_ENCR; + else if ( !ascii_strcasecmp (p, "cert") ) + use |= GCRY_PK_USAGE_CERT; else { log_error ("line %d: invalid usage list\n", r->lnr); @@ -225,6 +247,8 @@ read_parameters (ctrl_t ctrl, estream_t fp, estream_t out_fp) { "Not-After", pNOTAFTER }, { "Signing-Key", pSIGNINGKEY }, { "Hash-Algo", pHASHALGO }, + { "Subject-Key-Id", pSUBJKEYID }, + { "Extension", pEXTENSION, 1 }, { NULL, 0 } }; char line[1024], *p; @@ -594,6 +618,59 @@ proc_parameters (ctrl_t ctrl, struct para_data_s *para, } } + /* Check the optional SubjectKeyId. */ + string = get_parameter_value (para, pSUBJKEYID, 0); + if (string) + { + for (s=string, i=0; hexdigitp (s); s++, i++) + ; + if (*s || (i&1)) + { + r = get_parameter (para, pSUBJKEYID, 0); + log_error (_("line %d: invalid subject-key-id\n"), r->lnr); + xfree (cardkeyid); + return gpg_error (GPG_ERR_INV_PARAMETER); + } + } + + /* Check the optional extensions. */ + for (seq=0; (string=get_parameter_value (para, pEXTENSION, seq)); seq++) + { + int okay = 0; + + s = strpbrk (string, " \t:"); + if (s) + { + s++; + while (spacep (s)) + s++; + if (*s && strchr ("nNcC", *s)) + { + s++; + while (spacep (s)) + s++; + if (*s == ':') + s++; + if (*s) + { + while (spacep (s)) + s++; + for (i=0; hexdigitp (s); s++, i++) + ; + if (!((*s && *s != ':') || !i || (i&1))) + okay = 1; + } + } + } + if (!okay) + { + r = get_parameter (para, pEXTENSION, seq); + log_error (_("line %d: invalid extension syntax\n"), r->lnr); + xfree (cardkeyid); + return gpg_error (GPG_ERR_INV_PARAMETER); + } + } + /* Create or retrieve the public key. */ if (cardkeyid) /* Take the key from the current smart card. */ { @@ -838,6 +915,14 @@ create_request (ctrl_t ctrl, err = ksba_certreq_add_extension (cr, oidstr_keyUsage, 1, "\x03\x02\x04\x30", 4); } + else if (use == GCRY_PK_USAGE_CERT) + { + /* For certify only we encode the bits: + KSBA_KEYUSAGE_KEY_CERT_SIGN + KSBA_KEYUSAGE_CRL_SIGN */ + err = ksba_certreq_add_extension (cr, oidstr_keyUsage, 1, + "\x03\x02\x01\x06", 4); + } else err = 0; /* Both or none given: don't request one. */ if (err) @@ -1009,6 +1094,101 @@ create_request (ctrl_t ctrl, goto leave; } } + + + /* Insert the SubjectKeyId. */ + string = get_parameter_value (para, pSUBJKEYID, 0); + if (string) + { + char *hexbuf; + + /* Allocate a buffer for in-place conversion. We also add 2 + extra bytes space for the tag and length field. */ + hexbuf = xtrymalloc (2 + strlen (string) + 1); + if (!hexbuf) + { + err = gpg_error_from_syserror (); + goto leave; + } + strcpy (hexbuf+2, string); + for (p=hexbuf+2, len=0; p[0] && p[1]; p += 2) + ((unsigned char*)hexbuf)[2+len++] = xtoi_2 (p); + if (len > 127) + { + err = gpg_error (GPG_ERR_TOO_LARGE); + xfree (hexbuf); + goto leave; + } + hexbuf[0] = 0x04; /* Tag for an Octet string. */ + hexbuf[1] = len; + err = ksba_certreq_add_extension (cr, oidstr_subjectKeyIdentifier, 0, + hexbuf, 2+len); + xfree (hexbuf); + if (err) + { + log_error ("error setting the subject-key-id: %s\n", + gpg_strerror (err)); + goto leave; + } + } + + /* Insert additional extensions. */ + for (seq=0; (string = get_parameter_value (para, pEXTENSION, seq)); seq++) + { + char *hexbuf; + char *oidstr; + int crit = 0; + + s = strpbrk (string, " \t:"); + if (!s) + { + err = gpg_error (GPG_ERR_INTERNAL); + goto leave; + } + + oidstr = xtrymalloc (s - string + 1); + if (!oidstr) + { + err = gpg_error_from_syserror (); + goto leave; + } + memcpy (oidstr, string, (s-string)); + oidstr[(s-string)] = 0; + + s++; + while (spacep (s)) + s++; + if (!*s) + { + err = gpg_error (GPG_ERR_INTERNAL); + xfree (oidstr); + goto leave; + } + + if (strchr ("cC", *s)) + crit = 1; + s++; + while (spacep (s)) + s++; + if (*s == ':') + s++; + while (spacep (s)) + s++; + + hexbuf = xtrystrdup (s); + if (!hexbuf) + { + err = gpg_error_from_syserror (); + xfree (oidstr); + goto leave; + } + for (p=hexbuf, len=0; p[0] && p[1]; p += 2) + ((unsigned char*)hexbuf)[len++] = xtoi_2 (p); + err = ksba_certreq_add_extension (cr, oidstr, crit, + hexbuf, len); + xfree (oidstr); + xfree (hexbuf); + } } else sigkey = public; diff --git a/sm/keylist.c b/sm/keylist.c index e67c2d8..a502360 100644 --- a/sm/keylist.c +++ b/sm/keylist.c @@ -187,6 +187,7 @@ static struct /* GnuPG extensions */ { "1.3.6.1.4.1.11591.2.1.1", "pkaAddress" }, { "1.3.6.1.4.1.11591.2.2.1", "standaloneCertificate" }, + { "1.3.6.1.4.1.11591.2.2.2", "wellKnownPrivateKey" }, /* Extensions used by the Bundesnetzagentur. */ { "1.3.6.1.4.1.8301.3.5", "validityModel" }, commit 3f284e40502d8181b0b3ea66c77cd7c1252ea781 Author: Werner Koch Date: Tue Dec 6 16:45:46 2011 +0100 gpgsm: Fix storing of the serial number * sm/certreqgen.c (create_request): Fix hex-bin conversion. diff --git a/sm/certreqgen.c b/sm/certreqgen.c index 41a6d7f..b4857b3 100644 --- a/sm/certreqgen.c +++ b/sm/certreqgen.c @@ -889,7 +889,7 @@ create_request (ctrl_t ctrl, *p++ = '0'; strcpy (p, string); for (p=hexbuf, len=0; p[0] && p[1]; p += 2) - ((unsigned char*)hexbuf)[len++] = xtoi_2 (s); + ((unsigned char*)hexbuf)[len++] = xtoi_2 (p); /* Now build the S-expression. */ snprintf (numbuf, DIM(numbuf), "%u:", (unsigned int)len); buf = p = xtrymalloc (1 + strlen (numbuf) + len + 1 + 1); ----------------------------------------------------------------------- Summary of changes: doc/DETAILS | 1 + doc/gpgsm.texi | 6 +- sm/certreqgen.c | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- sm/keylist.c | 1 + 4 files changed, 188 insertions(+), 6 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Dec 6 22:25:35 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 06 Dec 2011 22:25:35 +0100 Subject: [git] KSBA - branch, master, updated. libksba-1.2.0-4-gaa6cbc8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via aa6cbc8332e59ad94b104b51ea59784f17e522f6 (commit) from 3f957f48388756732b5795b77b65d5ab7c0c8298 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit aa6cbc8332e59ad94b104b51ea59784f17e522f6 Author: Werner Koch Date: Tue Dec 6 21:33:43 2011 +0100 Allow to set subject and issuer. * src/certreq.c (ksba_certreq_set_issuer): Do not check the subject. diff --git a/.gitignore b/.gitignore index 6a26f3b..a345612 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /doc/Makefile.in /doc/ksba.info /tests/Makefile.in +/src/asn1-parse.c diff --git a/src/certreq.c b/src/certreq.c index d9737bf..33a5df3 100644 --- a/src/certreq.c +++ b/src/certreq.c @@ -161,7 +161,7 @@ ksba_certreq_set_issuer (ksba_certreq_t cr, const char *name) { if (!cr || !name) return gpg_error (GPG_ERR_INV_VALUE); - if (cr->subject.der) + if (cr->x509.issuer.der) return gpg_error (GPG_ERR_CONFLICT); /* Already set */ return _ksba_dn_from_str (name, &cr->x509.issuer.der, &cr->x509.issuer.derlen); ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + src/certreq.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Dec 7 11:59:22 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 07 Dec 2011 11:59:22 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-149-g14e4fdc Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 14e4fdc9f97d6f12bf563adfff1e3157305d7795 (commit) via cd3732841de32ce5c7841e6e158df3a5f1102f86 (commit) via 596b84a4de58def2155d3fe56462f6607f135b69 (commit) from 5cdad8ff000152b4bd01953646bb87fe8703c70d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 14e4fdc9f97d6f12bf563adfff1e3157305d7795 Author: Werner Koch Date: Wed Dec 7 11:07:21 2011 +0100 Correct punctuation in the ChangeLog summary line. * Makefile.am (gen-ChangeLog): Supply --append-dot. diff --git a/Makefile.am b/Makefile.am index 292748a..5f9bf2e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -116,6 +116,7 @@ gen-ChangeLog: if test -d $(top_srcdir)/.git; then \ (cd $(top_srcdir) && \ ./scripts/gitlog-to-changelog \ + --append-dot \ --amend=scripts/git-log-fix \ --since=$(gen_start_date) ) > $(distdir)/cl-t; \ cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t; \ commit cd3732841de32ce5c7841e6e158df3a5f1102f86 Author: Werner Koch Date: Wed Dec 7 11:01:39 2011 +0100 Allow comments which will not show up in the ChangeLog * scripts/gitlog-to-changelog: Ignore lines after a "--" line. -- The first line with two dashes at the start of a line (optionally followed by white space) stops copying the commit log lines to the ChangeLog entry in "make dist". This is useful to allow adding comments to the log which are not useful in a ChangeLog. diff --git a/scripts/gitlog-to-changelog b/scripts/gitlog-to-changelog index 40a8035..a7ea194 100755 --- a/scripts/gitlog-to-changelog +++ b/scripts/gitlog-to-changelog @@ -281,6 +281,15 @@ sub parse_amend_file($) @line = grep !/^Signed-off-by: .*>$/, @line; @line = grep !/^Co-authored-by: /, @line; + # Remove everything after a line with 2 dashes at the beginning. + my @tmpline; + foreach (@line) + { + last if /^--\s*$/; + push @tmpline,$_; + } + @line = @tmpline; + # Remove leading and trailing blank lines. if (@line) { commit 596b84a4de58def2155d3fe56462f6607f135b69 Author: Werner Koch Date: Tue Dec 6 21:43:18 2011 +0100 gpgsm: Allow specification of an AuthorityKeyIdentifier. * sm/certreqgen.c (pAUTHKEYID): New. (read_parameters): Add keyword Authority-Key-Id. (proc_parameters): Check its value. (create_request): Insert an Authority-Key-Id. diff --git a/sm/certreqgen.c b/sm/certreqgen.c index 15fc7a2..de7c39c 100644 --- a/sm/certreqgen.c +++ b/sm/certreqgen.c @@ -85,6 +85,7 @@ enum para_name pNOTAFTER, pSIGNINGKEY, pHASHALGO, + pAUTHKEYID, pSUBJKEYID, pEXTENSION }; @@ -107,6 +108,7 @@ struct reqgen_ctrl_s }; +static const char oidstr_authorityKeyIdentifier[] = "2.5.29.35"; static const char oidstr_subjectKeyIdentifier[] = "2.5.29.14"; static const char oidstr_keyUsage[] = "2.5.29.15"; static const char oidstr_basicConstraints[] = "2.5.29.19"; @@ -247,6 +249,7 @@ read_parameters (ctrl_t ctrl, estream_t fp, estream_t out_fp) { "Not-After", pNOTAFTER }, { "Signing-Key", pSIGNINGKEY }, { "Hash-Algo", pHASHALGO }, + { "Authority-Key-Id", pAUTHKEYID }, { "Subject-Key-Id", pSUBJKEYID }, { "Extension", pEXTENSION, 1 }, { NULL, 0 } @@ -618,6 +621,21 @@ proc_parameters (ctrl_t ctrl, struct para_data_s *para, } } + /* Check the optional AuthorityKeyId. */ + string = get_parameter_value (para, pAUTHKEYID, 0); + if (string) + { + for (s=string, i=0; hexdigitp (s); s++, i++) + ; + if (*s || (i&1)) + { + r = get_parameter (para, pAUTHKEYID, 0); + log_error (_("line %d: invalid authority-key-id\n"), r->lnr); + xfree (cardkeyid); + return gpg_error (GPG_ERR_INV_PARAMETER); + } + } + /* Check the optional SubjectKeyId. */ string = get_parameter_value (para, pSUBJKEYID, 0); if (string) @@ -1095,6 +1113,44 @@ create_request (ctrl_t ctrl, } } + /* Insert the AuthorityKeyId. */ + string = get_parameter_value (para, pAUTHKEYID, 0); + if (string) + { + char *hexbuf; + + /* Allocate a buffer for in-place conversion. We also add 4 + extra bytes space for the tags and lengths fields. */ + hexbuf = xtrymalloc (4 + strlen (string) + 1); + if (!hexbuf) + { + err = gpg_error_from_syserror (); + goto leave; + } + strcpy (hexbuf+4, string); + for (p=hexbuf+4, len=0; p[0] && p[1]; p += 2) + ((unsigned char*)hexbuf)[4+len++] = xtoi_2 (p); + if (len > 125) + { + err = gpg_error (GPG_ERR_TOO_LARGE); + xfree (hexbuf); + goto leave; + } + hexbuf[0] = 0x30; /* Tag for a Sequence. */ + hexbuf[1] = len+2; + hexbuf[2] = 0x80; /* Context tag for an implicit Octet string. */ + hexbuf[3] = len; + err = ksba_certreq_add_extension (cr, oidstr_authorityKeyIdentifier, + 0, + hexbuf, 4+len); + xfree (hexbuf); + if (err) + { + log_error ("error setting the authority-key-id: %s\n", + gpg_strerror (err)); + goto leave; + } + } /* Insert the SubjectKeyId. */ string = get_parameter_value (para, pSUBJKEYID, 0); ----------------------------------------------------------------------- Summary of changes: Makefile.am | 1 + scripts/gitlog-to-changelog | 9 +++++++ sm/certreqgen.c | 56 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 0 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Dec 7 17:07:41 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 07 Dec 2011 17:07:41 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-150-g8a12a20 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 8a12a2000d82acfa881e8c18d028290100bf5e43 (commit) from 14e4fdc9f97d6f12bf563adfff1e3157305d7795 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8a12a2000d82acfa881e8c18d028290100bf5e43 Author: Werner Koch Date: Wed Dec 7 16:15:15 2011 +0100 gpgsm: Add new validation model "steed". * sm/gpgsm.h (VALIDATE_FLAG_STEED): New. * sm/gpgsm.c (gpgsm_parse_validation_model): Add model "steed". * sm/server.c (option_handler): Allow validation model "steed". * sm/certlist.c (gpgsm_cert_has_well_known_private_key): New. * sm/certchain.c (do_validate_chain): Handle the well-known-private-key attribute. Support the "steed" model. (gpgsm_validate_chain): Ditto. * sm/verify.c (gpgsm_verify): Return "steed" in the trust status line. * sm/keylist.c (list_cert_colon): Print the new 'w' flag. -- This is the first part of changes to implement the STEED proposal as described at http://g10code.com/steed.html . The idea for X.509 is not to use plain self-signed certificates but certificates signed by a dummy CA (i.e. one for which the private key is known). Having a single CA as an indication for the use of STEED might help other X.509 implementations to implement STEED. diff --git a/doc/DETAILS b/doc/DETAILS index 2e6874e..ddf7438 100644 --- a/doc/DETAILS +++ b/doc/DETAILS @@ -58,6 +58,10 @@ record; gpg2 does this by default and the option is a dummy. u = The key is ultimately valid. This often means that the secret key is available, but any key may be marked as ultimately valid. + w = The key has a well known private part. + s = The key has special validity. This means that it + might be self-signed and expected to be used in + the STEED sytem. If the validity information is given for a UID or UAT record, it describes the validity calculated based on this @@ -347,6 +351,7 @@ more arguments in future versions. "pgp" for the standard PGP WoT. "shell" for the standard X.509 model. "chain" for the chain model. + "steed" for the STEED model. Note that we use the term "TRUST_" in the status names for historic reasons; we now speak of validity. diff --git a/doc/gpgsm.texi b/doc/gpgsm.texi index 8e25baf..bdb0378 100644 --- a/doc/gpgsm.texi +++ b/doc/gpgsm.texi @@ -451,10 +451,11 @@ address and the time when you verified the signature. @item --validation-model @var{name} @opindex validation-model This option changes the default validation model. The only possible -values are "shell" (which is the default) and "chain" which forces the -use of the chain model. The chain model is also used if an option in -the @file{trustlist.txt} or an attribute of the certificate requests it. -However the standard model (shell) is in that case always tried first. +values are "shell" (which is the default), "chain" which forces the +use of the chain model and "steed" for a new simplified model. The +chain model is also used if an option in the @file{trustlist.txt} or +an attribute of the certificate requests it. However the standard +model (shell) is in that case always tried first. @item --ignore-cert-extension @var{oid} @opindex ignore-cert-extension diff --git a/sm/certchain.c b/sm/certchain.c index 1a26325..54c7a57 100644 --- a/sm/certchain.c +++ b/sm/certchain.c @@ -1,6 +1,6 @@ /* certchain.c - certificate chain validation * Copyright (C) 2001, 2002, 2003, 2004, 2005, - * 2006, 2007, 2008 Free Software Foundation, Inc. + * 2006, 2007, 2008, 2011 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -1193,6 +1193,7 @@ ask_marktrusted (ctrl_t ctrl, ksba_cert_t cert, int listmode) VALIDATE_FLAG_NO_DIRMNGR - Do not do any dirmngr isvalid checks. VALIDATE_FLAG_CHAIN_MODEL - Check according to chain model. + VALIDATE_FLAG_STEED - Check according to the STEED model. */ static int do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, @@ -1305,13 +1306,21 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, We used to do this only later but changed it to call the check right here so that we can access special flags associated with that specific root certificate. */ - istrusted_rc = gpgsm_agent_istrusted (ctrl, subject_cert, NULL, - rootca_flags); + if (gpgsm_cert_has_well_known_private_key (subject_cert)) + { + memset (rootca_flags, 0, sizeof *rootca_flags); + istrusted_rc = ((flags & VALIDATE_FLAG_STEED) + ? 0 : gpg_error (GPG_ERR_NOT_TRUSTED)); + } + else + istrusted_rc = gpgsm_agent_istrusted (ctrl, subject_cert, NULL, + rootca_flags); audit_log_cert (ctrl->audit, AUDIT_ROOT_TRUSTED, subject_cert, istrusted_rc); /* If the chain model extended attribute is used, make sure that our chain model flag is set. */ - if (has_validation_model_chain (subject_cert, listmode, listfp)) + if (!(flags & VALIDATE_FLAG_STEED) + && has_validation_model_chain (subject_cert, listmode, listfp)) rootca_flags->chain_model = 1; } @@ -1383,7 +1392,7 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, /* Set the flag for qualified signatures. This flag is deduced from a list of root certificates allowed for qualified signatures. */ - if (is_qualified == -1) + if (is_qualified == -1 && !(flags & VALIDATE_FLAG_STEED)) { gpg_error_t err; size_t buflen; @@ -1437,8 +1446,11 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, expired it does not make much sense to ask the user whether we wants to trust the root certificate. We should do this only if the certificate under question - will then be usable. */ + will then be usable. If the certificate has a well + known private key asking the user does not make any + sense. */ if ( !any_expired + && !gpgsm_cert_has_well_known_private_key (subject_cert) && (!listmode || !already_asked_marktrusted (subject_cert)) && ask_marktrusted (ctrl, subject_cert, listmode) ) rc = 0; @@ -1455,6 +1467,8 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, /* Check for revocations etc. */ if ((flags & VALIDATE_FLAG_NO_DIRMNGR)) ; + else if ((flags & VALIDATE_FLAG_STEED)) + ; /* Fixme: check revocations via DNS. */ else if (opt.no_trusted_cert_crl_check || rootca_flags->relax) ; else @@ -1586,8 +1600,16 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, performance reasons. */ if (is_root) { - istrusted_rc = gpgsm_agent_istrusted (ctrl, issuer_cert, NULL, - rootca_flags); + if (gpgsm_cert_has_well_known_private_key (issuer_cert)) + { + memset (rootca_flags, 0, sizeof *rootca_flags); + istrusted_rc = ((flags & VALIDATE_FLAG_STEED) + ? 0 : gpg_error (GPG_ERR_NOT_TRUSTED)); + } + else + istrusted_rc = gpgsm_agent_istrusted + (ctrl, issuer_cert, NULL, rootca_flags); + if (!istrusted_rc && rootca_flags->relax) { /* Ignore the error due to the relax flag. */ @@ -1627,6 +1649,8 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, be fixed. */ if ((flags & VALIDATE_FLAG_NO_DIRMNGR)) rc = 0; + else if ((flags & VALIDATE_FLAG_STEED)) + rc = 0; /* Fixme: XXX */ else if (is_root && (opt.no_trusted_cert_crl_check || (!istrusted_rc && rootca_flags->relax))) rc = 0; @@ -1722,7 +1746,7 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, capability of the certificate under question, store the result as user data in all certificates of the chain. We do this even if the validation itself failed. */ - if (is_qualified != -1) + if (is_qualified != -1 && !(flags & VALIDATE_FLAG_STEED)) { gpg_error_t err; chain_item_t ci; @@ -1780,8 +1804,8 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, do_validate_chain. This function is a wrapper to handle a root certificate with the chain_model flag set. If RETFLAGS is not NULL, flags indicating now the verification was done are stored - there. The only defined flag for RETFLAGS is - VALIDATE_FLAG_CHAIN_MODEL. + there. The only defined vits for RETFLAGS are + VALIDATE_FLAG_CHAIN_MODEL and VALIDATE_FLAG_STEED. If you are verifying a signature you should set CHECKTIME to the creation time of the signature. If your are verifying a @@ -1801,16 +1825,27 @@ gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime, if (!retflags) retflags = &dummy_retflags; + /* If the session requested a certain validation mode make sure the + corresponding flags are set. */ if (ctrl->validation_model == 1) flags |= VALIDATE_FLAG_CHAIN_MODEL; + else if (ctrl->validation_model == 2) + flags |= VALIDATE_FLAG_STEED; + /* If the chain model was forced, set this immediately into + RETFLAGS. */ *retflags = (flags & VALIDATE_FLAG_CHAIN_MODEL); + memset (&rootca_flags, 0, sizeof rootca_flags); rc = do_validate_chain (ctrl, cert, checktime, r_exptime, listmode, listfp, flags, &rootca_flags); - if (gpg_err_code (rc) == GPG_ERR_CERT_EXPIRED + if (!rc && (flags & VALIDATE_FLAG_STEED)) + { + *retflags |= VALIDATE_FLAG_STEED; + } + else if (gpg_err_code (rc) == GPG_ERR_CERT_EXPIRED && !(flags & VALIDATE_FLAG_CHAIN_MODEL) && (rootca_flags.valid && rootca_flags.chain_model)) { @@ -1824,6 +1859,8 @@ gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime, if (opt.verbose) do_list (0, listmode, listfp, _("validation model used: %s"), + (*retflags & VALIDATE_FLAG_STEED)? + "steed" : (*retflags & VALIDATE_FLAG_CHAIN_MODEL)? _("chain"):_("shell")); diff --git a/sm/certlist.c b/sm/certlist.c index 0e90319..241364a 100644 --- a/sm/certlist.c +++ b/sm/certlist.c @@ -1,6 +1,6 @@ /* certlist.c - build list of certificates * Copyright (C) 2001, 2003, 2004, 2005, 2007, - * 2008 Free Software Foundation, Inc. + * 2008, 2011 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -210,6 +210,21 @@ gpgsm_cert_use_ocsp_p (ksba_cert_t cert) } +/* Return true if CERT has the well known private key extension. */ +int +gpgsm_cert_has_well_known_private_key (ksba_cert_t cert) +{ + int idx; + const char *oid; + + for (idx=0; !ksba_cert_get_extension (cert, idx, + &oid, NULL, NULL, NULL);idx++) + if (!strcmp (oid, "1.3.6.1.4.1.11591.2.2.2") ) + return 1; /* Yes. */ + return 0; /* No. */ +} + + static int same_subject_issuer (const char *subject, const char *issuer, ksba_cert_t cert) { diff --git a/sm/gpgsm.c b/sm/gpgsm.c index dc9f2e0..7164f42 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -2004,6 +2004,8 @@ gpgsm_parse_validation_model (const char *model) return 0; else if ( !ascii_strcasecmp (model, "chain") ) return 1; + else if ( !ascii_strcasecmp (model, "steed") ) + return 2; else return -1; } diff --git a/sm/gpgsm.h b/sm/gpgsm.h index 31cd951..6c68af7 100644 --- a/sm/gpgsm.h +++ b/sm/gpgsm.h @@ -195,7 +195,9 @@ struct server_control_s certificates up the chain (0 = none, 1 = only signer) */ int use_ocsp; /* Set to true if OCSP should be used. */ - int validation_model; /* Set to 1 for the chain model. */ + int validation_model; /* 0 := standard model (shell), + 1 := chain model, + 2 := STEED model. */ }; @@ -307,7 +309,7 @@ int gpgsm_create_cms_signature (ctrl_t ctrl, /* Flags used with gpgsm_validate_chain. */ #define VALIDATE_FLAG_NO_DIRMNGR 1 #define VALIDATE_FLAG_CHAIN_MODEL 2 - +#define VALIDATE_FLAG_STEED 4 int gpgsm_walk_cert_chain (ctrl_t ctrl, ksba_cert_t start, ksba_cert_t *r_next); @@ -326,6 +328,7 @@ int gpgsm_cert_use_verify_p (ksba_cert_t cert); int gpgsm_cert_use_decrypt_p (ksba_cert_t cert); int gpgsm_cert_use_cert_p (ksba_cert_t cert); int gpgsm_cert_use_ocsp_p (ksba_cert_t cert); +int gpgsm_cert_has_well_known_private_key (ksba_cert_t cert); int gpgsm_certs_identical_p (ksba_cert_t cert_a, ksba_cert_t cert_b); int gpgsm_add_cert_to_certlist (ctrl_t ctrl, ksba_cert_t cert, certlist_t *listaddr, int is_encrypt_to); diff --git a/sm/keylist.c b/sm/keylist.c index a502360..42c533a 100644 --- a/sm/keylist.c +++ b/sm/keylist.c @@ -1,6 +1,6 @@ /* keylist.c - Print certificates in various formats. - * Copyright (C) 1998, 1999, 2000, 2001, 2003, - * 2004, 2005, 2008, 2009 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2008, 2009, + * 2010, 2011 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -421,7 +421,12 @@ list_cert_colon (ctrl_t ctrl, ksba_cert_t cert, unsigned int validity, && *not_after && strcmp (current_time, not_after) > 0 ) *truststring = 'e'; else if (valerr) - *truststring = 'i'; + { + if (gpgsm_cert_has_well_known_private_key (cert)) + *truststring = 'w'; /* Well, this is dummy CA. */ + else + *truststring = 'i'; + } else if (ctrl->with_validation && !is_root) *truststring = 'f'; } @@ -433,12 +438,17 @@ list_cert_colon (ctrl_t ctrl, ksba_cert_t cert, unsigned int validity, { struct rootca_flags_s dummy_flags; - rc = gpgsm_agent_istrusted (ctrl, cert, NULL, &dummy_flags); - if (!rc) - *truststring = 'u'; /* Yes, we trust this one (ultimately). */ - else if (gpg_err_code (rc) == GPG_ERR_NOT_TRUSTED) - *truststring = 'n'; /* No, we do not trust this one. */ - /* (in case of an error we can't tell anything.) */ + if (gpgsm_cert_has_well_known_private_key (cert)) + *truststring = 'w'; /* Well, this is dummy CA. */ + else + { + rc = gpgsm_agent_istrusted (ctrl, cert, NULL, &dummy_flags); + if (!rc) + *truststring = 'u'; /* Yes, we trust this one (ultimately). */ + else if (gpg_err_code (rc) == GPG_ERR_NOT_TRUSTED) + *truststring = 'n'; /* No, we do not trust this one. */ + /* (in case of an error we can't tell anything.) */ + } } if (*truststring) diff --git a/sm/server.c b/sm/server.c index 19c4a16..385eb53 100644 --- a/sm/server.c +++ b/sm/server.c @@ -277,7 +277,7 @@ option_handler (assuan_context_t ctx, const char *key, const char *value) else if (!strcmp (key, "validation-model")) { int i = gpgsm_parse_validation_model (value); - if ( i >= 0 && i <= 1 ) + if ( i >= 0 && i <= 2 ) ctrl->validation_model = i; else err = gpg_error (GPG_ERR_ASS_PARAMETER); diff --git a/sm/verify.c b/sm/verify.c index c77eb57..1173f66 100644 --- a/sm/verify.c +++ b/sm/verify.c @@ -624,6 +624,8 @@ gpgsm_verify (ctrl_t ctrl, int in_fd, int data_fd, estream_t out_fp) } gpgsm_status (ctrl, STATUS_TRUST_FULLY, + (verifyflags & VALIDATE_FLAG_STEED)? + "0 steed": (verifyflags & VALIDATE_FLAG_CHAIN_MODEL)? "0 chain": "0 shell"); ----------------------------------------------------------------------- Summary of changes: doc/DETAILS | 5 ++++ doc/gpgsm.texi | 9 ++++--- sm/certchain.c | 61 +++++++++++++++++++++++++++++++++++++++++++++----------- sm/certlist.c | 17 ++++++++++++++- sm/gpgsm.c | 2 + sm/gpgsm.h | 7 ++++- sm/keylist.c | 28 +++++++++++++++++-------- sm/server.c | 2 +- sm/verify.c | 2 + 9 files changed, 104 insertions(+), 29 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Dec 7 17:44:09 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 07 Dec 2011 17:44:09 +0100 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-20-g16f5654 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 16f5654643d584e3bc739b636752d779176b2191 (commit) from ea1fb538d99f1ec093f2fef86f4f29176ec27826 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 16f5654643d584e3bc739b636752d779176b2191 Author: Werner Koch Date: Wed Dec 7 16:52:03 2011 +0100 tests/prime: Add option to create a well known private key. * tests/prime.c (print_mpi, create_42prime): New. (main): Add option --42. diff --git a/tests/prime.c b/tests/prime.c index b365a14..5d928bd 100644 --- a/tests/prime.c +++ b/tests/prime.c @@ -98,15 +98,143 @@ check_primes (void) } } + +/* Print an MPI S-expression. */ +static void +print_mpi (const char *name, gcry_mpi_t a) +{ + gcry_error_t err; + unsigned char *buf; + int writerr = 0; + + err = gcry_mpi_aprint (GCRYMPI_FMT_HEX, &buf, NULL, a); + if (err) + die ("gcry_mpi_aprint failed: %s\n", gcry_strerror (err)); + + printf (" (%s #%s#)\n", name, buf); + if (ferror (stdout)) + writerr++; + if (!writerr && fflush (stdout) == EOF) + writerr++; + if (writerr) + die ("writing output failed\n"); + gcry_free (buf); +} + + +/* Create the key for our public standard dummy CA. */ +static void +create_42prime (void) +{ + gcry_error_t err; + char string[128*2+1]; + int i; + gcry_mpi_t start = NULL; + gcry_mpi_t p, q, n, t1, t2, phi, f, g, e, d, u; + + + /* Our start value is a string of 0x42 values, with the exception + that the two high order bits are set. This is to resemble the + way Lingcrypt generates RSA primes. */ + for (i=0; i < 128;) + { + string[i++] = '4'; + string[i++] = '2'; + } + string[i] = 0; + string[0] = 'C'; + + err = gcry_mpi_scan (&start, GCRYMPI_FMT_HEX, string, 0, NULL); + if (err) + die ("gcry_mpi_scan failed: %s\n", gcry_strerror (err)); + fputs ("start:", stderr); gcry_mpi_dump (start); putc ('\n', stderr); + + /* Generate two primes with p < q. We take the first primes below + and above a start value. */ + p = gcry_mpi_copy (start); + gcry_mpi_sub_ui (p, p, 1); + while (gcry_prime_check (p, 0)) + gcry_mpi_sub_ui (p, p, 2); + fputs (" p:", stderr); gcry_mpi_dump (p); putc ('\n', stderr); + q = gcry_mpi_copy (start); + gcry_mpi_add_ui (q, q, 1); + while (gcry_prime_check (q, 0)) + gcry_mpi_add_ui (q, q, 2); + fputs (" q:", stderr); gcry_mpi_dump (q); putc ('\n', stderr); + + /* Compute the modulus. */ + n = gcry_mpi_new (1024); + gcry_mpi_mul (n, p, q); + fputs (" n:", stderr); gcry_mpi_dump (n); putc ('\n', stderr); + if (gcry_mpi_get_nbits (n) != 1024) + die ("Oops: the size of N is not 1024 but %u\n", gcry_mpi_get_nbits (n)); + + /* Calculate Euler totient: phi = (p-1)(q-1) */ + t1 = gcry_mpi_new (0); + t2 = gcry_mpi_new (0); + phi = gcry_mpi_new (0); + g = gcry_mpi_new (0); + f = gcry_mpi_new (0); + gcry_mpi_sub_ui (t1, p, 1); + gcry_mpi_sub_ui (t2, q, 1); + gcry_mpi_mul (phi, t1, t2); + gcry_mpi_gcd (g, t1, t2); + gcry_mpi_div (f, NULL, phi, g, -1); + + /* Check the public exponent. */ + e = gcry_mpi_set_ui (NULL, 65537); + if (!gcry_mpi_gcd (t1, e, phi)) + die ("Oops: E is not a generator\n"); + fputs (" e:", stderr); gcry_mpi_dump (e); putc ('\n', stderr); + + /* Compute the secret key: d = e^-1 mod phi */ + d = gcry_mpi_new (0); + gcry_mpi_invm (d, e, f ); + fputs (" d:", stderr); gcry_mpi_dump (d); putc ('\n', stderr); + + /* Compute the inverse of p and q. */ + u = gcry_mpi_new (0); + gcry_mpi_invm (u, p, q); + fputs (" u:", stderr); gcry_mpi_dump (u); putc ('\n', stderr); + + /* Print the S-expression. */ + fputs ("(private-key\n (rsa\n", stdout); + print_mpi ("n", n); + print_mpi ("e", e); + print_mpi ("d", d); + print_mpi ("p", p); + print_mpi ("q", q); + print_mpi ("u", u); + fputs ("))\n", stdout); + + gcry_mpi_release (p); + gcry_mpi_release (q); + gcry_mpi_release (n); + gcry_mpi_release (t1); + gcry_mpi_release (t2); + gcry_mpi_release (phi); + gcry_mpi_release (f); + gcry_mpi_release (g); + gcry_mpi_release (e); + gcry_mpi_release (d); + gcry_mpi_release (u); +} + + + + int main (int argc, char **argv) { int debug = 0; + int mode42 = 0; if ((argc > 1) && (! strcmp (argv[1], "--verbose"))) verbose = 1; else if ((argc > 1) && (! strcmp (argv[1], "--debug"))) verbose = debug = 1; + else if ((argc > 1) && (! strcmp (argv[1], "--42"))) + verbose = debug = mode42 = 1; gcry_control (GCRYCTL_DISABLE_SECMEM, 0); if (! gcry_check_version (GCRYPT_VERSION)) @@ -116,7 +244,10 @@ main (int argc, char **argv) if (debug) gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - check_primes (); + if (mode42) + create_42prime (); + else + check_primes (); return 0; } ----------------------------------------------------------------------- Summary of changes: tests/prime.c | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 132 insertions(+), 1 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Mon Dec 12 10:59:04 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 12 Dec 2011 10:59:04 +0100 Subject: [git] GPA - branch, master, updated. gpa-0.9.0-17-g9003154 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 900315491024da55f3dd8ad4ca8b61a2b87efcdd (commit) from 61e00549baf8992983b1fc9bff9f492429ec64c8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 900315491024da55f3dd8ad4ca8b61a2b87efcdd Author: Werner Koch Date: Mon Dec 12 10:06:30 2011 +0100 Generate the ChangeLog from commit logs. * build-aux/gitlog-to-changelog: New script. Taken from gnulib. * build-aux/git-log-fix: New file. * build-aux/git-log-footer: New file. * doc/HACKING: New file. * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. * autogen.sh: Install commit-msg hook for git. Rename all ChangeLog files to ChangeLog-2011. diff --git a/ChangeLog b/ChangeLog index 412ba50..4bb353d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,618 +1,16 @@ -2011-08-26 Werner Koch +No more ChangeLog files +======================== - Migrated the repository to git. +Do not modify any of the ChangeLog files in GPA. Starting on +December 12st, 2011 we put change information only in the GIT commit +log, and generate a top-level ChangeLog file from logs at "make dist" +time. As such, there are strict requirements on the form of the +commit log messages. See doc/HACKING for details. The old ChangeLog +files have all be renamed to ChangeLog-2011. - * configure.ac: Adjust for the new git repo. -2009-12-08 Werner Koch - * doc/gpa.1: New. - * doc/Makefile.am: New. - -2009-11-10 Marcus Brinkmann - - * configure.ac: Set NEED_LIBASSUAN_VERSION and NEED_LIBASSUAN_API - to 1.1.0 and 2 resp. - -2009-07-20 Niklas 'Nille' ?kerstr?m (wk) - - * gpa.desktop: Add GenericName and sv translations. - -2009-06-20 Werner Koch - - Release 0.9.0. - -2009-06-17 Werner Koch - - * config.sub, config.guess: Update to 2007-11-19 from GnuPG. - - * README: Remove outdated installation info. - - * configure.ac: Require at least GPGME 1.2. - (HAVE_GPGME_IO_WRITE): Remove test for this. - (HAVE_GPGME_OP_ASSUAN_TRANSACT): Ditto. - (HAVE_STRUCT__GPGME_SUBKEY_CARD_NUMBER): Ditto. - (BUILD_CARD_MANAGER): Remove this conditional. - -2009-06-09 Werner Koch - - * configure.ac: Test for gpgme_io_write. - -2009-03-30 Moritz - - * configure.ac: Typo fix: change _save_CFLAGS to _save_cflags. - -2009-03-29 Moritz - - * Makefile.am: Added rules for generating gpadefs.h from - gpadefs.h.in at make-time. - (EXTRA_DIST): Added gpadefs.h.in. - * configure.ac: Trigger AC_MSG_ERROR in case directory for - keyserver helpers could not figured out. - Call AC_DEFINE_UNQUOTED to define KEYSERVER_HELPERS_DIR in - config.h. - Remove generation of gpadefs.h through AC_CONFIG_COMMANDS. - -2009-03-10 Werner Koch - - * configure.ac (AC_CONFIG_COMMANDS): Remove GPA_LOCALEDIR. - -2009-02-12 Werner Koch - - * configure.ac (BUILD_CARD_MANAGER): Define as AC_DEFINE and - AM_CONDITIONAL. - -2009-02-07 Moritz - - * TODO: New item. - -2009-02-04 Werner Koch - - * configure.ac: Check for card_number member of gpgme_subkey_t. - -2009-01-26 Werner Koch - - * configure.ac: Check for gpgme_op_assuan_transact. - -2009-01-17 Moritz - - * configure.ac: Use AC_CHECK_HEADERS to check for locale.h. - -2008-12-16 Werner Koch - - * configure.ac: Remove unused test for getopt_long. - (AC_CHECK_FUNCS): Check for inotify_init. - -2008-12-10 Marcus Brinkmann - - * configure.ac: Require gtk 2.10.0. - -2008-12-04 Marcus Brinkmann - - * configure.ac: Require gtk 2.8.0. - - * configure.ac (GPA_LOCALEDIR): Fix definition. - (gpadefs.h): Remove DATADIRNAME, add localedir. - Submitted by gozer at progrock.com. - -2008-10-31 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17. - * config.rpath, ABOUT-NLS: Update. - -2008-09-04 Marcus Brinkmann - - Released 0.8.0. - -2008-05-08 Werner Koch - - * configure.ac: Require external gettext. - * Makefile.am (SUBDIRS): Remove intl. - -2008-04-01 Werner Koch - - * configure.ac (AC_INIT): Fix quoting. - -2008-03-12 Werner Koch - - * COPYING: Replace by GPLv3 version. - -2008-03-06 Werner Koch - - Note that the code is now under the GPLv3+ due to a couple of new - stuff. - - * AUTHORS: Add bug reporting address. Add license info. - -2008-02-28 Marcus Brinkmann - - * configure.ac: Invoke AC_SYS_LARGEFILE. - -2008-02-16 Marcus Brinkmann - - * configure.ac: Update macro svn_revision. - -2008-02-05 Marcus Brinkmann - - * configure.ac: Fix download URLs. Reported by Alberto - Escudero-Pascual. - -2008-01-17 Marcus Brinkmann - - * configure.ac (NEED_GPGME_VERSION): Bump to 1.1.6. - -2007-09-27 Werner Koch - - * configure.ac (NETLIBS) [W32]: New. - -2007-09-26 Werner Koch - - * configure.ac: Add test for libassuan and gpg-error. - -2007-06-04 Marcus Brinkmann - - * configure.ac (BUILD_REVISION): Invoke AC_GNU_SOURCE properly. - * autogen.sh: Require bash. - * depcomp, install-sh, missing: New files from automake. - * intl/Makefile.in, config.rpath: New files from gettext. - -2007-05-24 Werner Koch - - Released 0.7.6. - -2007-04-25 Werner Koch - - * configure.ac (AM_GNU_GETTEXT): Require ngettext. - -2007-02-26 Werner Koch - - Released 0.7.5. - -2007-01-10 Werner Koch - - * configure.ac (GPGME_CFLAGS, GPGME_LIBS): Use them and do not - append them to CFLAGS etc. - (AM_PATH_GTK_2_0): Likewise. - -2006-07-25 Werner Koch - - Released 0.7.4. - - * configure.ac: Extract revison from SVN. - -2006-07-15 Marcus Brinkmann - - * configure.ac: Check for windres. - -2006-03-21 Werner Koch - - Released 0.7.3. - -2006-03-09 Werner Koch - - * config.guess, config.sub: Updated. - -2006-03-03 Marcus Brinkmann - - Released 0.7.2. - -2006-01-09 Werner Koch - - Released 0.7.1. - - * configure.ac: Check for gpgme-glib only under W32. - -2006-01-03 Werner Koch - - * configure.ac: Require just gpgme 1.1.1 as 1.2.0 was unintentional. - -2005-11-29 Werner Koch - - * configure.ac: Add m4 hackery to append the revision number to - the version. - -2005-11-18 Werner Koch - - * configure.ac (AM_PATH_GPGME_GLIB): New; replaces AM_PATH_GPGME. - -2005-11-15 Werner Koch - - * autogen.sh : Updated to support Debian's mingw kit. - - * configure.ac (PACKAGE_BUGREPORT): Create extended version - information. - (HAVE_W32_SYSTEM): Define it. - (CFLAGS) [W32]: Make sure that -mmsbitfields is used. Strange - that the GTK macros don't define it. - -2005-11-10 Marcus Brinkmann - - * configure.ac (IS_DEVELOPMENT_VERSION): Remove unused ming32 - cruft. - -2005-11-07 Marcus Brinkmann - - * configure.ac: Require GPGME 0.4.5. - -2005-10-26 Werner Koch - - * Makefile.am: Use dist-bzip2 option. - -2005-10-21 Werner Koch - - * acinclude.m4: Fixed quoting. - -2005-10-07 Marcus Brinkmann - - * acinclude.m4 (AM_PATH_GPGME): Removed. - -2005-10-06 Marcus Brinkmann - - * configure.ac: Invoke CHECK_ZLIB instead of generic AC_CHECK_LIB - macro (which doesn't support a --with-foo-prefix argument). Check - for stpcpy. - -2004-08-21 Miguel Coca - - * gpa.spec: Fix version number. Reported by jan.grobecker at gmx.net. - -2003-11-25 Miguel Coca - - * Makefile.am (pkgdata_DATA): Save the icon to the DATADIR too. - -2003-11-25 Miguel Coca - - * gpa.png: New icon by Josu? Burgos. - -2003-11-21 Miguel Coca - - * Makefile.am (EXTRA_DIST): Updated to include the desktop file and - the renamed icon. - (desktop_DATA, icon_DATA): Install the .desktop and the icon to - their respective directories. - - * gpa.spec, gpa.desktop: Updated by Ling Li . - - * gpa-logo-48x48.png: Renamed to the, more standard, gpa.png. - -2003-10-27 Miguel Coca - - * NEWS: Note changes in signature verification. - - * configure.ac: Check for GTK+ 2.2, as this is what we really need - now. - -2003-10-22 Miguel Coca - - * configure.ac, NEWS: Bump version number after release. - -2003-10-22 Miguel Coca - - * configure.ac: Release 0.7.0. - -2003-10-13 gettextize - - * Makefile.am (SUBDIRS): Add m4. - (ACLOCAL_AMFLAGS): New variable. - (EXTRA_DIST): Add config.rpath. - * configure.ac (AC_CONFIG_FILES): Add m4/Makefile. - -2003-10-12 Miguel Coca - - * configure.ac: Update version number to 0.7.0-cvs. Update gpgme - version check to 0.4.3. - - * TODO: Remove obsolete items - - * NEWS: Clean up items, add missing. - -2003-06-21 Miguel Coca - - * configure.ac: Disable deprecated GTK widgets. - -2003-03-25 Miguel Coca - - * AUTHORS, NEWS: Updated. - -2003-02-07 Miguel Coca - - * Makefile.am (EXTRA_DIST): Add logo. - -2003-01-30 Miguel Coca - - * configure.ac: Require gpgme 0.4.1. Remove compatibility hack. - - * configure.ac, NEWS: Bump version number. - -2003-01-29 Miguel Coca - - * configure.ac: Release 0.6.1. - - * configure.ac (ALL_LINGUAS): Fix Swedish. It's sv, not se. - -2003-01-28 Miguel Coca - - * configure.ac: Fix getopt_long check. - -2003-01-24 Miguel Coca - - * configure.ac (ALL_LINGUAS): Add Swedish. - - * configure.ac: Add checks for getopt_long. - -2003-01-23 Miguel Coca - - * configure.ac: Add check for strsep - - * configure.ac: Add a hack to detect gpgme 0.4.0. To be removed after - the release. - -2003-01-19 Miguel Coca - - * configure.ac: Add check for development version, adapted - from GnuPG with some changes. - -2003-01-08 Miguel Coca - - * configure.ac: Remove some flags from the maintainer's CFLAGS to avoid - a ton of warnings due to bugs in gcc and GTK+ (see bug report at - http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=529&database=gcc). - - * configure.ac: Go back to GPGME 0.4.0 for the moment. - -2002-12-29 Miguel Coca - - * configure.ac: Require GPGME 0.4.1. - -2002-12-24 Miguel Coca - - * configure.ac, NEWS: Bump version number. - -2002-12-23 Miguel Coca - - * configure.ac: Release 0.6.0. - - * NEWS, THANKS: Update. - -2002-12-17 Miguel Coca - - * configure.ac (ALL_LINGUAS): Add Spanish. - -2002-12-15 Miguel Coca - - * NEWS: Add some entries for 0.6.0. - -2002-12-12 Miguel Coca - - * config.sub, config.guess: Updated. - - * Makefile.am (SUBDIRS): Add pixmaps. - * configure.ac: Likewise. - -2002-12-07 Miguel Coca - - * configure.ac (ALL_LINGUAS): Added nl. - -2002-11-29 Miguel Coca - - * configure.ac: Remove jnlib/ and assorted tests. - * Makefile.am (SUBDIRS): Likewise. - -2002-11-27 Miguel Coca - - * THANKS, AUTHORS: Updated. - -2002-11-20 Miguel Coca - - * TODO: Updated. - - * configure.ac: Update to gpgme 0.4 - -2002-10-25 Miguel Coca - - * configure.ac: Add /usr/libexec/gnupg/ to the list of possible - locations of gpgkeys_ldap. - - * gtkrc-1.2.gpa, gtkrc-1.3.12+.gpa: Removed unused files. - - * configure.ac: Check for the keyserver plugins directories, instead - of using always the same directory. This allows some flexibility in - case of compiling GPA against a GnuPG installed via a package manager. - -2002-09-24 Miguel Coca - - * configure.ac: Add constant to gpadefs.h for the directory where the - keyserver helpers are installed. - -2002-08-29 Werner Koch - - * AUTHORS (Maintainer): Now it is Miguel. - - * configure.ac (ALL_LINGUAS): Added ja. - -2002-08-27 Miguel Coca - - * autogen.sh: Changes to support gettext 0.11. - -2002-08-20 Werner Koch - - * acinclude.m4 (GNUPG_CHECK_TYPEDEF): Updated for newer autoconfs. - (AM_PATH_GPGME): New. - * configure.ac (AH_BOTTOM): New. - * acconfig.h: Removed. - -2002-08-16 Miguel Coca - - * configure.ac: Bumbed version number to 0.6.0-cvs to distinguish - from the 0.5.1 tag. - -2002-08-09 Miguel Coca - - * configure.ac, Makefile.am (SUBDIRS): Don't compile gpapa. - -2002-08-04 Miguel Coca - - * configure.ac: Added check for GPGME. - -2002-07-29 Werner Koch - - * configure.ac: Check for gtk-2 suing Miguel's patch from early - June. - - * configure.ac: Bumbed version number to 0.5.1 now that Miguel - solved the 0.4.3-0.5.0 schism. - -2002-06-15 Werner Koch - - * configure.ac: Bumbed version number to 0.4.4-cvs. - -2002-04-17 Jan-Oliver Wagner - - * gpa.desktop (new): gnome desktop entry for gpa - * gpa-logo-48x48.png (new): small gpa logo for gnome desktop - * gpa.spec: added gnome menu entry - -2002-03-15 Werner Koch - - * configure.ac (ALL_LINGUAS): Add pt_BR. - -Mon 25 Feb 2002 25:15 Peter Gerwinski - - Released 0.5.0. - - See `NEWS' for an overview of the changes since 0.4.3. - -2002-02-20 Peter Gerwinski - - * gtkrc.gpa: Splitted into two new files: gtkrc-1.2.gpa and - gtkrc-1.3.12+.gpa. - -2002-02-19 Peter Gerwinski - - * to-utf8: Changed to use short options to iconv. - -2002-02-10 Peter Gerwinski - - * gtkrc.gpa: Changed default font. - -2002-02-05 Peter Gerwinski - - * THANKS: Updated. - - * gtkrc.gpa: Added file. - -2002-01-14 Werner Koch - - Released 0.4.3. - - * configure.in: Replaced by - * configure.ac: autoconf 2.5 suggested file. Adjusted for it. - * VERSION: Removed - * Makefile.am: Create the VERSION file in the dist tarball. - * autogen.sh: Fixed required versions - -2001-08-03 Werner Koch - - * gpa.spec: New. Contributed by Peter Hanecak. - -2001-06-07 Werner Koch - - * configure.in (ALL_LINGUAS): Add Chinese translation. - -2001-06-05 Werner Koch - - Released 0.4.2 - - * configure.in (BUILD_INCLUDED_LIBINTL): Set to no for W32. - * Makefile.am: Include autogen.sh - -2001-04-05 Werner Koch - - * VERSION: Release 0.4.1 - -2001-02-27 Werner Koch - - * to-utf8: New. - * README.W32: Describe how to use this script. - -2001-02-27 Jan-Oliver Wagner - - * VERSION: new revision 0.4.0 - * TODO: added hint - * configure.in: added french as available language - * README.W32: more hints on building under w32 - -2001-01-25 Jan-Oliver Wagner - - * README.W32: New - -2001-01-23 Jan-Oliver Wagner - - * acconfig.h: added USE_ONLY_8DOT3 and USE_SIMPLE_GETTEXT - * configure.in: added USE_SIMPLE_GETTEXT for Windows - -2001-01-23 Werner Koch - - * configure.in (GPG): Fixed initialization for W32. Changed test - for gpg. - * acconfig.h (GPG_PATH): New. - -2001-01-18 Werner Koch - - * autogen.sh: Add --build-w32 option - * configure.in: Modifications for the new MingW32/CPD version. - -2000-07-25 13:15:56 Werner Koch (wk at habibti.openit.de) - - Changed the copyright notices from FSF to G-N-U because we have not - yet assigned the copyright and the G-N-U is the main authors. - -2000-07-25 09:08:59 Werner Koch (wk at habibti.openit.de) - - * configure.in (GPA_DATADIR): Create this macro. - -2000-06-28 20:09:49 Werner Koch (wk at habibti.openit.de) - - * VERSION: New because it is easier for the mkdiff script to move - this file to the beginning, so that in trun patch can find the prereq - * Makefile.am, configure.in: Adjusted for that. - - Version 0.3.1 has been released (without this entry :-() - -2000-05-25 17:55:29 Werner Koch (wk at habibti.openit.de) - - * configure.in: Check for gpg. - -2000-05-24 09:04:44 Werner Koch (wk at habibti.openit.de) - - * configure.in: Removed -Wshadow because this hits on glib's usage of - "index". - -2000-05-17 10:25:54 Werner Koch (wk at habibti.openit.de) - - * TODO: Updated by Markus - * AUTHORS, THANKS: Updated. - -2000-05-16 20:08:47 Werner Koch (wk at habibti.openit.de) - - Set version to 0.3 to indicate that we have a German - translation and GNU formatted source (I don't like the last - one but it is something which we can easily agree on). - -2000-05-15 16:49:59 Werner Koch (wk at habibti.openit.de) - - Added PO support. - -2000-05-11 16:59:24 Werner Koch (wk at habibti.openit.de) - - * configure.in: Add a few function checks. Fixed some hardcoded - paths for the W32 version of Gtk+ - needs a better solution. - - GPA shows up on a Windows NT box and didn't crash. This is a good - reason to increase the version number. - - Version 0.2.0 - -2000-05-03 20:09:17 Werner Koch (wk at habibti.openit.de) - - Version 0.1.0 +Local Variables: +buffer-read-only: t +mode: text +End: diff --git a/ChangeLog b/ChangeLog-2011 similarity index 98% copy from ChangeLog copy to ChangeLog-2011 index 412ba50..b58092b 100644 --- a/ChangeLog +++ b/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-08-26 Werner Koch Migrated the repository to git. diff --git a/Makefile.am b/Makefile.am index 872a235..345b64e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,20 +1,20 @@ # Makefile.am - Top makefile for GPA. # Copyright (C) 2000, 2001 Werner Koch # Copyright (C) 2002, 2003, 2004 Miguel Coca -# Copyright (C) 2005, 2006, 2007, 2008, 2009 g10 Code GmbH -# +# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011 g10 Code GmbH +# # This file is part of GPA. -# +# # GPA 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 3 of the License, or (at your # option) any later version. -# +# # GPA 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, see . @@ -22,9 +22,14 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = dist-bzip2 SUBDIRS = m4 src po pixmaps doc -EXTRA_DIST = config.rpath TODO README-alpha to-utf8 autogen.sh gpa.spec \ - gpa.desktop gpa.png gpadefs.h.in -DISTCLEANFILES = gpadefs.h + +EXTRA_DIST = \ + config.rpath TODO README-alpha to-utf8 autogen.sh gpa.spec \ + gpa.desktop gpa.png gpadefs.h.in \ + po/ChangeLog-2011 pixmaps/ChangeLog-2011 ChangeLog-2011 \ + m4/ChangeLog-2011 src/ChangeLog-2011 st-fonts/ChangeLog-2011 + +DISTCLEANFILES = gpadefs.h desktopdir = $(datadir)/applications/ desktop_DATA = gpa.desktop @@ -49,6 +54,19 @@ gpadefs.h: $(srcdir)/gpadefs.h.in all: gpadefs.h # Create a VERSION file which we need for the Prereq: patch file trick. -dist-hook: +dist-hook: gen-ChangeLog @set -e; echo "$(VERSION)" > $(distdir)/VERSION +gen_start_date = 2011-12-12T00:00:00 +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d $(top_srcdir)/.git; then \ + (cd $(top_srcdir) && \ + ./build-aux/gitlog-to-changelog \ + --append-dot --tear-off \ + --amend=build-aux/git-log-fix \ + --since=$(gen_start_date) ) > $(distdir)/cl-t; \ + cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi diff --git a/autogen.sh b/autogen.sh index 576c6c3..ee27cc7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -160,6 +160,13 @@ EOF git config --add filter.cleanpo.clean \ "awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" fi + if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then + cat <&2 +*** Activating commit log message check hook. *** +EOF + cp -av build-aux/git-hooks/commit-msg .git/hooks/commit-msg + chmod -c +x .git/hooks/commit-msg + fi fi echo "Running aclocal -I m4 ${ACLOCAL_FLAGS:+$ACLOCAL_FLAGS }..." diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg new file mode 100755 index 0000000..5a697c7 --- /dev/null +++ b/build-aux/git-hooks/commit-msg @@ -0,0 +1,127 @@ +eval '(exit $?0)' && eval 'exec perl -w "$0" ${1+"$@"}' + & eval 'exec perl -w "$0" $argv:q' + if 0; + +# An hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, copy it to "~/.git/hooks/commit-msg". +# +# This script is based on the one from GNU coreutils. + +use strict; +use warnings; +(my $ME = $0) =~ s|.*/||; + +my $editor = $ENV{EDITOR} || 'vi'; +$ENV{PATH} = '/bin:/usr/bin'; + +# Rewrite the $LOG_FILE (old contents in @$LINE_REF) with an additional +# commented diagnostic "# $ERR" line at the top. +sub rewrite($$$) +{ + my ($log_file, $err, $line_ref) = @_; + local *LOG; + open LOG, '>', $log_file + or die "$ME: $log_file: failed to open for writing: $!"; + print LOG "# $err"; + print LOG @$line_ref; + close LOG + or die "$ME: $log_file: failed to rewrite: $!\n"; +} + +sub re_edit($) +{ + my ($log_file) = @_; + + warn "Interrupt (Ctrl-C) to abort...\n"; + + system 'sh', '-c', "$editor $log_file"; + ($? & 127) || ($? >> 8) + and die "$ME: $log_file: the editor ($editor) failed, aborting\n"; +} + +# Given a $LOG_FILE name and a \@LINE buffer, +# read the contents of the file into the buffer and analyze it. +# If the log message passes muster, return the empty string. +# If not, return a diagnostic. +sub check_msg($$) +{ + my ($log_file, $line_ref) = @_; + + local *LOG; + open LOG, '<', $log_file + or return "failed to open for reading: $!"; + @$line_ref = ; + close LOG; + + my @line = @$line_ref; + chomp @line; + + # Don't filter out blank or comment lines; git does that already, + # and if we were to ignore them here, it could lead to committing + # with lines that start with "#" in the log. + + # Filter out leading blank and comment lines. + # while (@line && $line[0] =~ /^(?:#.*|[ \t]*)$/) { shift @line; } + + # Filter out blank and comment lines at EOF. + # while (@line && $line[$#line] =~ /^(?:#.*|[ \t]*)$/) { pop @line; } + + @line == 0 + and return 'no log message'; + + # The first line should not be too short + 8 < length $line[0] || return 'summary line too short'; + + # The first line should not start with an asterisk or a hash sign. + # An asterisk might indicate that a change entry was started right + # at the first line. + $line[0] =~ /^[*#]/ && return "summary line starts with an * or #"; + + # Second line should be blank or not present. + 2 <= @line && length $line[1] + and return 'second line must be empty'; + + # Limit line length to allow for the ChangeLog's leading TAB. + foreach my $line (@line) + { + 72 < length $line && $line =~ /^[^#]/ + and return 'line longer than 72 characters'; + } + + return ''; +} + +{ + @ARGV == 1 + or die; + + my $log_file = $ARGV[0]; + + while (1) + { + my @line; + my $err = check_msg $log_file, \@line; + $err eq '' + and last; + $err = "$ME: $err\n"; + warn $err; + exit 1; + + # Insert the diagnostic as a comment on the first line of $log_file. + #rewrite $log_file, $err, \@line; + #re_edit $log_file; + # + ## Stop if our parent is killed. + #getppid() == 1 + # and last; + } +} + +# Local Variables: +# mode: perl +# End: diff --git a/build-aux/git-log-fix b/build-aux/git-log-fix new file mode 100644 index 0000000..af702fe --- /dev/null +++ b/build-aux/git-log-fix @@ -0,0 +1,3 @@ +# This file is expected to be used via gitlog-to-changelog's --amend=FILE +# option. It specifies what changes to make to each given SHA1's commit +# log and metadata, using Perl-eval'able expressions. diff --git a/build-aux/git-log-footer b/build-aux/git-log-footer new file mode 100644 index 0000000..0457ca4 --- /dev/null +++ b/build-aux/git-log-footer @@ -0,0 +1,14 @@ + +2011-12-01 Werner Koch + + NB: Changes done before December 12st, 2011 are described in + per directory files named ChangeLog-2011. See doc/HACKING for + details. + + ----- + Copyright (C) 2011 g10 Code GmbH + + Copying and distribution of this file and/or the original GIT + commit log messages, with or without modification, are + permitted provided the copyright notice and this notice are + preserved. diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..d9f594f --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,360 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2011-11-02 07:53'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2011 Free Software Foundation, Inc. + +# 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 3 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, see . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try `$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on +a line) referring to a commit in the current project, and CODE refers to one +or more consecutive lines of Perl code. Pairs must be separated by one or +more blank line. + +Here is sample input for use with --amend=FILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert , + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = )) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + my $tear_off = 0; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + 'tear-off' => \$tear_off, + ) or usage 1; + + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = (qw (git log --log-size), + '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = ) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest = $_; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); + + # Format 'Co-authored-by: A U Thor ' lines in + # standard multi-author ChangeLog format. + my @coauthors = grep /^Co-authored-by:.*$/, @line; + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If this header would be the same as the previous date/name/email/ + # coauthors header, then arrange not to print it. + if ($date_line ne $prev_date_line or "@coauthors" ne "@prev_coauthors") + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line = $date_line; + @prev_coauthors = @coauthors; + + # Omit "Co-authored-by..." and "Signed-off-by..." lines. + @line = grep !/^Signed-off-by: .*>$/, @line; + @line = grep !/^Co-authored-by: /, @line; + + # Remove everything after a line with 2 dashes at the beginning. + if ($tear_off) + { + my @tmpline; + foreach (@line) + { + last if /^--\s*$/; + push @tmpline,$_; + } + @line = @tmpline; + } + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/doc/HACKING b/doc/HACKING new file mode 100644 index 0000000..a6912af --- /dev/null +++ b/doc/HACKING @@ -0,0 +1,29 @@ +# HACKING -*- org -*- +#+TITLE: Hacking notes for GPA +#+STARTUP: showall + +* No more ChangeLog files + + Do not modify any of the ChangeLog files in Libassuan. Starting + on December 12st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist" time. As such, there are strict requirements on the + form of the commit log messages. The old ChangeLog files have all + be renamed to ChangeLog-2011 + + +* Commit log requirements + + Your commit log should always start with a one-line summary, the + second line should be blank, and the remaining lines are usually + ChangeLog-style entries for all affected files. However, it's fine + -- even recommended -- to write a few lines of prose describing the + change, when the summary and ChangeLog entries don't give enough of + the big picture. Omit the leading TABs that you're used to seeing + in a "real" ChangeLog file, but keep the maximum line length at 72 + or smaller, so that the generated ChangeLog lines, each with its + leading TAB, will not exceed 80 columns. + + If you want to add extra text to the commit log which shall not be + copied to the ChangeLog, use a separator consisting of two dashes at + the start of a line (optionally followed by white space). diff --git a/doc/Makefile.am b/doc/Makefile.am index 9fd40eb..f8519c0 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,5 @@ -EXTRA_DIST = gpa.1 +EXTRA_DIST = gpa.1 HACKING man_MANS = gpa.1 diff --git a/m4/ChangeLog b/m4/ChangeLog-2011 similarity index 86% rename from m4/ChangeLog rename to m4/ChangeLog-2011 index 8bb1db8..b03661d 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 12st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2008-12-15 gettextize * gettext.m4: Upgrade to gettext-0.17. @@ -52,4 +59,3 @@ * uintmax_t.m4: New file, from gettext-0.12.1. * ulonglong.m4: New file, from gettext-0.12.1. * Makefile.am: New file. - diff --git a/pixmaps/ChangeLog b/pixmaps/ChangeLog deleted file mode 100644 index b177f0a..0000000 --- a/pixmaps/ChangeLog +++ /dev/null @@ -1,21 +0,0 @@ -2009-02-03 Werner Koch - - * blue_yellow_cardkey.xpm: New. - -2008-12-17 Marcus Brinkmann - - * smartcard.xpm: Darken border. - -2008-12-16 Werner Koch - - * smartcard.xpm: New. Create simple smartcard icon. - -2008-01-24 Marcus Brinkmann - - * Makefile.am (noinst_HEADERS): Add keyringeditor.xpm. - -2002-12-12 Miguel Coca - - * New directory with the old icons, in some cases resized to fit the - standard toolbar size. - diff --git a/pixmaps/ChangeLog-2011 b/pixmaps/ChangeLog-2011 new file mode 100644 index 0000000..7746a27 --- /dev/null +++ b/pixmaps/ChangeLog-2011 @@ -0,0 +1,27 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + +2009-02-03 Werner Koch + + * blue_yellow_cardkey.xpm: New. + +2008-12-17 Marcus Brinkmann + + * smartcard.xpm: Darken border. + +2008-12-16 Werner Koch + + * smartcard.xpm: New. Create simple smartcard icon. + +2008-01-24 Marcus Brinkmann + + * Makefile.am (noinst_HEADERS): Add keyringeditor.xpm. + +2002-12-12 Miguel Coca + + * New directory with the old icons, in some cases resized to fit the + standard toolbar size. diff --git a/po/ChangeLog b/po/ChangeLog-2011 similarity index 97% rename from po/ChangeLog rename to po/ChangeLog-2011 index c6cd820..baaacbe 100644 --- a/po/ChangeLog +++ b/po/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 12st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2010-05-06 Werner Koch * POTFILES.in: Add gpadatebutton.c @@ -324,7 +331,7 @@ * de.po: Updated. * POTFILES.in: Added all new files, as well as all of gpapa. - + 2002-02-22 Peter Gerwinski * de.po: Updated. @@ -336,33 +343,33 @@ 2002-02-19 Peter Gerwinski * de.po: Updated. - + 2002-02-15 Peter Gerwinski * de.po: Updated. - + 2002-02-14 Peter Gerwinski * de.po: Updated. - + 2002-02-13 Peter Gerwinski * de.po: Updated. - + 2002-02-11 Peter Gerwinski * de.po: Updated again. - + 2002-02-10 Peter Gerwinski * de.po: Updated. - + 2002-02-05 Peter Gerwinski * POTFILES.in: Added src/gpafilesel.c to the list. * de.po: Updated and transcoded to UTF-8. * de.po.lat1: German translation in Latin-1 encoding. - + 2002-01-29 Werner Koch * de.po: Fixed the fuzzy marked translations @@ -456,5 +463,3 @@ 2000-05-16 20:07:52 Werner Koch (wk at habibti.openit.de) * de.po: Added - - diff --git a/src/ChangeLog b/src/ChangeLog-2011 similarity index 99% rename from src/ChangeLog rename to src/ChangeLog-2011 index d5da193..093b546 100644 --- a/src/ChangeLog +++ b/src/ChangeLog-2011 @@ -1,3 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + 2011-09-20 Werner Koch * keytable.c (first_half_done_cb): Detect missing GPGSM. @@ -5363,7 +5370,7 @@ * gtktools.c (gpa_window_error): (gpa_window_message): Translate window titles. * keygenwizard.c (gpa_keygen_wizard_run): Use "Finish" button - instead of "Next" on wait_page and final_page. + instead of "Next" on wait_page and final_page. * gpawizard.c (gpa_wizard_new): Add accelerator to "Next" and "Prev" 2001-02-13 Bernhard Herzog @@ -6607,5 +6614,3 @@ * gpa.c, keymenu.c, filemenu.c: Removed libiberty header. * gpa.h: Included xmalloc header. - - diff --git a/st-fonts/ChangeLog b/st-fonts/ChangeLog deleted file mode 100644 index 06da308..0000000 --- a/st-fonts/ChangeLog +++ /dev/null @@ -1,5 +0,0 @@ -2000-07-27 15:33:48 Werner Koch (wk at habibti.openit.de) - - Converted the original GIF fonts to PNG. - - diff --git a/st-fonts/ChangeLog-2011 b/st-fonts/ChangeLog-2011 new file mode 100644 index 0000000..208b83d --- /dev/null +++ b/st-fonts/ChangeLog-2011 @@ -0,0 +1,10 @@ +2011-12-01 Werner Koch + + NB: ChangeLog files are no longer manually maintained. Starting + on December 1st, 2011 we put change information only in the GIT + commit log, and generate a top-level ChangeLog file from logs at + "make dist". See doc/HACKING for details. + +2000-07-27 15:33:48 Werner Koch (wk at habibti.openit.de) + + Converted the original GIF fonts to PNG. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 626 +------------------------------------ ChangeLog => ChangeLog-2011 | 7 + Makefile.am | 36 ++- autogen.sh | 7 + build-aux/git-hooks/commit-msg | 127 ++++++++ build-aux/git-log-fix | 3 + build-aux/git-log-footer | 14 + build-aux/gitlog-to-changelog | 360 +++++++++++++++++++++ doc/HACKING | 29 ++ doc/Makefile.am | 2 +- m4/{ChangeLog => ChangeLog-2011} | 8 +- pixmaps/ChangeLog | 21 -- pixmaps/ChangeLog-2011 | 27 ++ po/{ChangeLog => ChangeLog-2011} | 25 +- src/{ChangeLog => ChangeLog-2011} | 11 +- st-fonts/ChangeLog | 5 - st-fonts/ChangeLog-2011 | 10 + 17 files changed, 654 insertions(+), 664 deletions(-) copy ChangeLog => ChangeLog-2011 (98%) create mode 100755 build-aux/git-hooks/commit-msg create mode 100644 build-aux/git-log-fix create mode 100644 build-aux/git-log-footer create mode 100755 build-aux/gitlog-to-changelog create mode 100644 doc/HACKING rename m4/{ChangeLog => ChangeLog-2011} (86%) delete mode 100644 pixmaps/ChangeLog create mode 100644 pixmaps/ChangeLog-2011 rename po/{ChangeLog => ChangeLog-2011} (97%) rename src/{ChangeLog => ChangeLog-2011} (99%) delete mode 100644 st-fonts/ChangeLog create mode 100644 st-fonts/ChangeLog-2011 hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Mon Dec 12 12:11:04 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 12 Dec 2011 12:11:04 +0100 Subject: [git] GPA - branch, master, updated. gpa-0.9.0-19-g30752eb Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 30752eb091f9005c36f90780e50336cddd8a4e93 (commit) via 1ce38d7852212236f7e50a33dd00678bcc735e70 (commit) from 900315491024da55f3dd8ad4ca8b61a2b87efcdd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 30752eb091f9005c36f90780e50336cddd8a4e93 Author: Werner Koch Date: Mon Dec 12 11:11:06 2011 +0100 Fix wrong setting of the expire date. * src/gpadatebutton.c (update_widgets): Fix month base. (day_selected_cb): Ditto. Fixes Debian#625513. -- g_date and gtk_calendar use different bases for the month. g_date uses 1..12 whereas gtk_calendar uses the Unix standard of 0..11. diff --git a/src/gpadatebutton.c b/src/gpadatebutton.c index 264f12b..6ea1a09 100644 --- a/src/gpadatebutton.c +++ b/src/gpadatebutton.c @@ -14,7 +14,7 @@ * License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, see . + * along with this program; if not, see . */ #ifdef HAVE_CONFIG_H @@ -28,12 +28,12 @@ #include #include "gpadatebutton.h" -#include "i18n.h" +#include "i18n.h" /* Object's class definition. */ -struct _GpaDateButtonClass +struct _GpaDateButtonClass { GtkButtonClass parent_class; @@ -53,7 +53,7 @@ struct _GpaDateButton GtkWidget *label; guint current_year; - guint current_month; + guint current_month; /* 1..12 ! */ guint current_day; int ignore_next_selection; @@ -69,7 +69,7 @@ static void gpa_date_button_finalize (GObject *object); -/************************************************************ +/************************************************************ ******************* Implementation ********************* ************************************************************/ @@ -81,14 +81,14 @@ update_widgets (GpaDateButton *self) if (!self->current_day && !self->current_month && !self->current_year) *buf = 0; else - snprintf (buf, sizeof buf, "%04d-%02d-%02d", - self->current_year, self->current_month+1, self->current_day); - + snprintf (buf, sizeof buf, "%04d-%02d-%02d", + self->current_year, self->current_month, self->current_day); + gtk_label_set_text (GTK_LABEL (self->label), *buf? buf : _("(not set)")); if (self->calendar && *buf) { gtk_calendar_select_month (GTK_CALENDAR (self->calendar), - self->current_month, self->current_year); + self->current_month-1, self->current_year); gtk_calendar_select_day (GTK_CALENDAR (self->calendar), self->current_day); } @@ -103,7 +103,7 @@ destroy_cb (GtkWidget *widget, gpointer user_data) GpaDateButton *self = GPA_DATE_BUTTON (user_data); self->dialog = NULL; -} +} static void @@ -121,6 +121,7 @@ day_selected_cb (GtkWidget *widget, gpointer user_data) &self->current_year, &self->current_month, &self->current_day); + self->current_month++; update_widgets (self); g_signal_emit_by_name (self, "date-set"); @@ -147,11 +148,11 @@ create_widgets (GpaDateButton *self) update_widgets (self); gtk_widget_show (self->label); gtk_container_add (GTK_CONTAINER (self), self->label); -} +} -/************************************************************ +/************************************************************ ****************** Object Management ******************** ************************************************************/ @@ -161,12 +162,12 @@ gpa_date_button_clicked (GtkButton *button) { GpaDateButton *self = GPA_DATE_BUTTON (button); - if (!self->dialog) + if (!self->dialog) { self->dialog = gtk_dialog_new (); gtk_window_set_decorated (GTK_WINDOW (self->dialog), FALSE); gtk_window_set_modal (GTK_WINDOW (self->dialog), TRUE); - + g_signal_connect (self->dialog, "destroy", G_CALLBACK (destroy_cb), self); g_signal_connect_swapped (self->dialog, "response", @@ -184,7 +185,7 @@ gpa_date_button_clicked (GtkButton *button) gtk_widget_show_all (self->dialog); } - + update_widgets (self); gtk_window_present (GTK_WINDOW (self->dialog)); } @@ -194,11 +195,11 @@ static void gpa_date_button_class_init (void *class_ptr, void *class_data) { GpaDateButtonClass *klass = class_ptr; - + (void)class_data; parent_class = g_type_class_peek_parent (klass); - + G_OBJECT_CLASS (klass)->finalize = gpa_date_button_finalize; GTK_BUTTON_CLASS (klass)->clicked = gpa_date_button_clicked; @@ -225,7 +226,7 @@ gpa_date_button_init (GTypeInstance *instance, void *class_ptr) static void gpa_date_button_finalize (GObject *object) -{ +{ GpaDateButton *self = GPA_DATE_BUTTON (object); (void)self; @@ -238,7 +239,7 @@ GType gpa_date_button_get_type (void) { static GType this_type = 0; - + if (!this_type) { static const GTypeInfo this_info = @@ -253,17 +254,17 @@ gpa_date_button_get_type (void) 0, /* n_preallocs */ gpa_date_button_init }; - + this_type = g_type_register_static (GTK_TYPE_BUTTON, "GpaDateButton", &this_info, 0); } - + return this_type; } -/************************************************************ +/************************************************************ ********************** Public API ************************ ************************************************************/ GtkWidget * diff --git a/src/gpgmetools.c b/src/gpgmetools.c index 8c2b3c0..dd3e8d6 100644 --- a/src/gpgmetools.c +++ b/src/gpgmetools.c @@ -98,7 +98,7 @@ gpa_gpgme_warning_ext (gpg_error_t err, const char *desc) else arg = gpgme_strerror (err); - message = g_strdup_printf + message = g_strdup_printf (_("The GPGME library returned an unexpected\n" "error. The error was:\n\n" "\t%s\n\n" @@ -130,7 +130,7 @@ gpa_gpgme_new (void) if (! cms_hack) gpgme_set_passphrase_cb (ctx, gpa_passphrase_cb, NULL); - + return ctx; } @@ -168,9 +168,9 @@ check_overwriting (const char *filename, GtkWidget *parent) /* If the file exists, ask before overwriting. */ if (g_file_test (filename, G_FILE_TEST_EXISTS)) { - GtkWidget *msgbox = gtk_message_dialog_new + GtkWidget *msgbox = gtk_message_dialog_new (GTK_WINDOW(parent), GTK_DIALOG_MODAL, - GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, + GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, _("The file %s already exists.\n" "Do you want to overwrite it?"), filename); gtk_dialog_add_buttons (GTK_DIALOG (msgbox), @@ -195,7 +195,7 @@ FILE * gpa_fopen (const char *filename, GtkWidget *parent) { FILE *target; - + if (!check_overwriting (filename, parent)) return NULL; target = g_fopen (filename, "w"); @@ -303,7 +303,7 @@ dos_to_unix (gchar *str, gsize *len) inserted). */ gchar *src; gchar *dst; - + src = str; dst = str; while (*src) @@ -412,7 +412,7 @@ build_genkey_parms (gpa_keygen_para_t *params) /* Build the expiration date string if needed */ if (g_date_valid (¶ms->expire)) - expire = g_strdup_printf ("Expire-Date: %04d-%02d-%02d\n", + expire = g_strdup_printf ("Expire-Date: %04d-%02d-%02d\n", g_date_get_year (¶ms->expire), g_date_get_month (¶ms->expire), g_date_get_day (¶ms->expire)); @@ -430,7 +430,7 @@ build_genkey_parms (gpa_keygen_para_t *params) "%%ask-passphrase\n" "\n", key_algo, - params->keysize, + params->keysize, subkeys? subkeys : "", name? name:"", email? email : "", @@ -469,7 +469,7 @@ static const gchar * get_gpg_path (void) { gpgme_engine_info_t engine; - + gpgme_get_engine_info (&engine); while (engine) { @@ -486,7 +486,7 @@ static const gchar * get_gpgsm_path (void) { gpgme_engine_info_t engine; - + gpgme_get_engine_info (&engine); while (engine) { @@ -503,7 +503,7 @@ static const gchar * get_gpgconf_path (void) { gpgme_engine_info_t engine; - + gpgme_get_engine_info (&engine); while (engine) { @@ -532,10 +532,10 @@ get_gpg_connect_agent_path (void) #else # define NEWNAME "gpg-connect-agent" #endif - + fname = g_malloc (strlen (gpgconf) + strlen (NEWNAME) + 1); strcpy (fname, gpgconf); -#ifdef G_OS_WIN32 +#ifdef G_OS_WIN32 for (p=fname; *p; p++) if (*p == '\\') *p = '/'; @@ -562,17 +562,17 @@ gpa_backup_key (const gchar *fpr, const char *filename) gchar *err; FILE *file; gint ret_code; - gchar *header_argv[] = + gchar *header_argv[] = { NULL, "--batch", "--no-tty", "--fingerprint", (gchar*) fpr, NULL }; - gchar *pub_argv[] = + gchar *pub_argv[] = { NULL, "--batch", "--no-tty", "--armor", "--export", (gchar*) fpr, NULL }; - gchar *sec_argv[] = + gchar *sec_argv[] = { - NULL, "--batch", "--no-tty", "--armor", "--export-secret-key", + NULL, "--batch", "--no-tty", "--armor", "--export-secret-key", (gchar*) fpr, NULL }; const gchar *path; @@ -670,7 +670,7 @@ gpa_key_ownertrust_string (gpgme_key_t key) if (key->protocol == GPGME_PROTOCOL_CMS) return ""; - switch (key->owner_trust) + switch (key->owner_trust) { case GPGME_VALIDITY_UNKNOWN: case GPGME_VALIDITY_UNDEFINED: @@ -699,7 +699,7 @@ gpa_key_validity_string (gpgme_key_t key) { if (!key->uids) return _("Unknown"); - switch (key->uids->validity) + switch (key->uids->validity) { case GPGME_VALIDITY_UNKNOWN: case GPGME_VALIDITY_UNDEFINED: @@ -726,7 +726,7 @@ gpa_key_validity_string (gpgme_key_t key) static GtkWidget * passphrase_question_label (const char *uid_hint, - const char *passphrase_info, + const char *passphrase_info, int prev_was_bad) { GtkWidget *label; @@ -775,7 +775,7 @@ passphrase_question_label (const char *uid_hint, /* This is the function called by GPGME when it wants a passphrase. */ gpg_error_t gpa_passphrase_cb (void *hook, const char *uid_hint, - const char *passphrase_info, + const char *passphrase_info, int prev_was_bad, int fd) { GtkWidget * dialog; @@ -785,7 +785,7 @@ gpa_passphrase_cb (void *hook, const char *uid_hint, GtkWidget * pixmap; GtkResponseType response; gchar *passphrase; - + dialog = gtk_dialog_new_with_buttons (_("Enter Passphrase"), NULL, GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -797,7 +797,7 @@ gpa_passphrase_cb (void *hook, const char *uid_hint, -1); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, FALSE, 10); pixmap = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); @@ -819,7 +819,7 @@ gpa_passphrase_cb (void *hook, const char *uid_hint, /* Run the dialog */ gtk_widget_show_all (dialog); response = gtk_dialog_run (GTK_DIALOG (dialog)); - passphrase = g_strdup_printf ("%s\n", + passphrase = g_strdup_printf ("%s\n", gtk_entry_get_text (GTK_ENTRY (entry))); gtk_widget_destroy (dialog); if (response == GTK_RESPONSE_OK) @@ -831,7 +831,7 @@ gpa_passphrase_cb (void *hook, const char *uid_hint, if (WriteFile ((HANDLE) _get_osfhandle (fd), passphrase, passphrase_len, &res, NULL) == 0 || res < passphrase_len) - { + { g_free (passphrase); return gpg_error (gpg_err_code_from_errno (EIO)); } @@ -866,10 +866,10 @@ static gchar * string_to_utf8 (const gchar *string) { const char *s; - + if (!string) return NULL; - + /* Due to a bug in old and not so old PGP versions user IDs have been copied verbatim into the key. Thus many users with Umlauts et al. in their name will see their names garbled. Although this @@ -885,7 +885,7 @@ string_to_utf8 (const gchar *string) || ((*s & 0xf8) == 0xf0) || ((*s & 0xfc) == 0xf8) || ((*s & 0xfe) == 0xfc)) ) - { + { /* Possible utf-8 character followed by continuation byte. Although this might still be Latin-1 we better assume that it is valid utf-8. */ @@ -1133,7 +1133,7 @@ gpa_gpgme_copy_keyarray (gpgme_key_t *keys) for (idx=0; keys[idx]; idx++) ; idx++; - newarray = g_new (gpgme_key_t, idx); + newarray = g_new (gpgme_key_t, idx); for (idx=0; keys[idx]; idx++) { gpgme_key_ref (keys[idx]); @@ -1152,7 +1152,7 @@ gpa_gpgme_release_keyarray (gpgme_key_t *keys) if (keys) { int idx; - + for (idx=0; keys[idx]; idx++) gpgme_key_unref (keys[idx]); g_free (keys); @@ -1240,7 +1240,7 @@ compare_version_strings (const char *my_version, if (my_major > rq_major || (my_major == rq_major && my_minor > rq_minor) - || (my_major == rq_major && my_minor == rq_minor + || (my_major == rq_major && my_minor == rq_minor && my_micro > rq_micro) || (my_major == rq_major && my_minor == rq_minor && my_micro == rq_micro && strcmp (my_plvl, rq_plvl) >= 0)) @@ -1265,14 +1265,14 @@ gpa_switch_to_gpg2 (void) newname = xmalloc (strlen (oldname) + 1 + 1); strcpy (newname, oldname); #ifdef G_OS_WIN32 -# define OLD_NAME "gpg.exe" -# define NEW_NAME "gpg2.exe" +# define OLD_NAME "gpg.exe" +# define NEW_NAME "gpg2.exe" for (p=newname; *p; p++) if (*p == '\\') *p = '/'; #else -# define OLD_NAME "gpg" -# define NEW_NAME "gpg2" +# define OLD_NAME "gpg" +# define NEW_NAME "gpg2" #endif /*G_OS_WIN32*/ p = strrchr (newname, '/'); if (p) @@ -1298,7 +1298,7 @@ int is_gpg_version_at_least (const char *need_version) { gpgme_engine_info_t engine; - + gpgme_get_engine_info (&engine); while (engine) { @@ -1311,7 +1311,7 @@ is_gpg_version_at_least (const char *need_version) /* Structure used to communicate with gpg_simple_stderr_cb. */ -struct gpg_simple_stderr_parm_s +struct gpg_simple_stderr_parm_s { gboolean (*cb)(void *opaque, char *line); void *cb_arg; @@ -1319,8 +1319,8 @@ struct gpg_simple_stderr_parm_s }; /* Helper for gpa_start_simple_gpg_command. */ -static gboolean -gpg_simple_stderr_cb (GIOChannel *channel, GIOCondition condition, +static gboolean +gpg_simple_stderr_cb (GIOChannel *channel, GIOCondition condition, void *user_data) { struct gpg_simple_stderr_parm_s *parm = user_data; @@ -1337,7 +1337,7 @@ gpg_simple_stderr_cb (GIOChannel *channel, GIOCondition condition, line = parm->string->str; /* We care only about status lines. */ - if (!strncmp (line, "[GNUPG:] ", 9)) + if (!strncmp (line, "[GNUPG:] ", 9)) { line += 9; @@ -1351,7 +1351,7 @@ gpg_simple_stderr_cb (GIOChannel *channel, GIOCondition condition, *p = 0; } - /* Call user callback. */ + /* Call user callback. */ if (parm->cb && !parm->cb (parm->cb_arg, line)) { /* User requested EOF. */ @@ -1447,7 +1447,7 @@ gpa_start_simple_gpg_command (gboolean (*cb)(void *opaque, char *line), parm->cb_arg = cb_arg; parm->string = g_string_sized_new (200); - if (!g_spawn_async_with_pipes (NULL, argv, NULL, + if (!g_spawn_async_with_pipes (NULL, argv, NULL, (G_SPAWN_STDOUT_TO_DEV_NULL), NULL, NULL, NULL, NULL, NULL, &fd_stderr, NULL)) @@ -1462,14 +1462,14 @@ gpa_start_simple_gpg_command (gboolean (*cb)(void *opaque, char *line), channel = g_io_channel_win32_new_fd (fd_stderr); #else channel = g_io_channel_unix_new (fd_stderr); -#endif +#endif g_io_channel_set_encoding (channel, NULL, NULL); /* Note that we need a buffered channel, so that we can use the read line function. */ g_io_channel_set_close_on_unref (channel, TRUE); /* Create a watch for the channel. */ - if (!g_io_add_watch (channel, (G_IO_IN|G_IO_HUP), + if (!g_io_add_watch (channel, (G_IO_IN|G_IO_HUP), gpg_simple_stderr_cb, parm)) { g_debug ("error creating watch for gpg command"); @@ -1485,7 +1485,7 @@ gpa_start_simple_gpg_command (gboolean (*cb)(void *opaque, char *line), /* Try to start the gpg-agent if it has not yet been started. Starting the agent works in the background. Thus if the function returns, it is not sure that the agent is now running. */ -void +void gpa_start_agent (void) { gpa_start_simple_gpg_command (NULL, NULL, GPGME_PROTOCOL_ASSUAN, @@ -1509,7 +1509,7 @@ gpa_validate_gpg_name (const char *name) result = _("Name may not start with a digit."); else if (g_utf8_strlen (name, -1) < 5) result = _("Name is too short."); - + return result; } @@ -1529,7 +1529,7 @@ has_invalid_email_chars (const char *s) const char *valid_chars= "01234567890_-.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - for ( ; *s; s++ ) + for ( ; *s; s++ ) { if ((*s & 0x80)) continue; /* We only care about ASCII. */ commit 1ce38d7852212236f7e50a33dd00678bcc735e70 Author: Werner Koch Date: Mon Dec 12 10:25:34 2011 +0100 Bug#1131: Grammar and typo fixes. * src/gpafileencryptop.c (revoked_key): Grammar fix. * src/keygenwizard.c (keygen_wizard_email_page): Typo fix. diff --git a/po/ar.po b/po/ar.po index a00c8dd..864f216 100644 --- a/po/ar.po +++ b/po/ar.po @@ -436,7 +436,7 @@ msgstr "?????????? ??????????" msgid "_Close" msgstr "??_??????" -msgid "The following key has been revoked by it's owner:" +msgid "The following key has been revoked by its owner:" msgstr "???????? ?????? ?????????????? ???? ?????????? ??????????:" msgid "And can not be used for encryption." @@ -1067,13 +1067,12 @@ msgstr "" msgid "Your Name:" msgstr "????????:" -#, fuzzy msgid "" "Please insert your email address.\n" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "???????? ?????????? ?????????? ????????????????????.\n" "\n" diff --git a/po/cs.po b/po/cs.po index 85be887..28767d5 100644 --- a/po/cs.po +++ b/po/cs.po @@ -461,7 +461,8 @@ msgstr "Zneplatn??n?? kl????" msgid "_Close" msgstr "_Zav????t" -msgid "The following key has been revoked by it's owner:" +#, fuzzy +msgid "The following key has been revoked by its owner:" msgstr "N??sleduj??c?? kl???? byl zneplatn??n vlastn??kem:" msgid "And can not be used for encryption." diff --git a/po/de.po b/po/de.po index dd80536..5498861 100644 --- a/po/de.po +++ b/po/de.po @@ -412,7 +412,7 @@ msgstr "Zur??ckgezogener Schl??ssel" msgid "_Close" msgstr "_Fenster schlie??en" -msgid "The following key has been revoked by it's owner:" +msgid "The following key has been revoked by its owner:" msgstr "Der folgende Schl??ssel wurde vom Besitzer zur??ckgezogen:" msgid "And can not be used for encryption." @@ -1043,7 +1043,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "Bitte geben Sie Ihre E-Mail-Adresse an.\n" "\n" diff --git a/po/fr.po b/po/fr.po index f60565c..a080387 100644 --- a/po/fr.po +++ b/po/fr.po @@ -421,7 +421,7 @@ msgstr "Clef r??voqu??e" msgid "_Close" msgstr "_Fermer" -msgid "The following key has been revoked by it's owner:" +msgid "The following key has been revoked by its owner:" msgstr "La clef suivante a ??t?? r??voqu??e par son propri??taire :" msgid "And can not be used for encryption." @@ -1061,7 +1061,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "Veuillez indiquer votre adresse de courriel.\n" "\n" diff --git a/po/ru.po b/po/ru.po index b92c3f3..e76c4bd 100644 --- a/po/ru.po +++ b/po/ru.po @@ -437,7 +437,7 @@ msgstr "?????????? ??????????" msgid "_Close" msgstr "_??????????????" -msgid "The following key has been revoked by it's owner:" +msgid "The following key has been revoked by its owner:" msgstr "???????? ?????????????? ????????????????????:" msgid "And can not be used for encryption." diff --git a/po/sv.po b/po/sv.po index c820a48..84a62f9 100644 --- a/po/sv.po +++ b/po/sv.po @@ -417,7 +417,7 @@ msgstr "Sp??rrad nyckel" msgid "_Close" msgstr "_St??ng" -msgid "The following key has been revoked by it's owner:" +msgid "The following key has been revoked by its owner:" msgstr "F??ljande nyckel har sp??rrats av sin ??gare:" msgid "And can not be used for encryption." @@ -1046,7 +1046,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "Ange din e-postadress.\n" "\n" diff --git a/po/tr.po b/po/tr.po index 70ab413..6549dbb 100644 --- a/po/tr.po +++ b/po/tr.po @@ -451,7 +451,7 @@ msgstr "Feshedilmi msgid "_Close" msgstr "_Kapat" -msgid "The following key has been revoked by it's owner:" +msgid "The following key has been revoked by its owner:" msgstr "?u anahtar sahibi taraf?ndan feshedilmi?tir:" msgid "And can not be used for encryption." diff --git a/src/gpafileencryptop.c b/src/gpafileencryptop.c index f06170c..dc146aa 100644 --- a/src/gpafileencryptop.c +++ b/src/gpafileencryptop.c @@ -41,10 +41,10 @@ #include "gpawidgets.h" /* Internal functions */ -static void gpa_file_encrypt_operation_done_error_cb (GpaContext *context, +static void gpa_file_encrypt_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaFileEncryptOperation *op); -static void gpa_file_encrypt_operation_done_cb (GpaContext *context, +static void gpa_file_encrypt_operation_done_cb (GpaContext *context, gpg_error_t err, GpaFileEncryptOperation *op); static void gpa_file_encrypt_operation_response_cb (GtkDialog *dialog, @@ -68,7 +68,7 @@ gpa_file_encrypt_operation_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GpaFileEncryptOperation *op = GPA_FILE_ENCRYPT_OPERATION (object); - + switch (prop_id) { case PROP_FORCE_ARMOR: @@ -100,7 +100,7 @@ gpa_file_encrypt_operation_set_property (GObject *object, guint prop_id, static void gpa_file_encrypt_operation_finalize (GObject *object) -{ +{ GpaFileEncryptOperation *op = GPA_FILE_ENCRYPT_OPERATION (object); /* FIXME: The use of RSET is messed up. There is no clear concept @@ -126,7 +126,7 @@ gpa_file_encrypt_operation_init (GpaFileEncryptOperation *op) } static GObject* -gpa_file_encrypt_operation_constructor +gpa_file_encrypt_operation_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) @@ -163,7 +163,7 @@ static void gpa_file_encrypt_operation_class_init (GpaFileEncryptOperationClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + parent_class = g_type_class_peek_parent (klass); object_class->constructor = gpa_file_encrypt_operation_constructor; @@ -184,7 +184,7 @@ GType gpa_file_encrypt_operation_get_type (void) { static GType file_encrypt_operation_type = 0; - + if (!file_encrypt_operation_type) { static const GTypeInfo file_encrypt_operation_info = @@ -199,12 +199,12 @@ gpa_file_encrypt_operation_get_type (void) 0, /* n_preallocs */ (GInstanceInitFunc) gpa_file_encrypt_operation_init, }; - - file_encrypt_operation_type = g_type_register_static + + file_encrypt_operation_type = g_type_register_static (GPA_FILE_OPERATION_TYPE, "GpaFileEncryptOperation", &file_encrypt_operation_info, 0); } - + return file_encrypt_operation_type; } @@ -215,7 +215,7 @@ gpa_file_encrypt_operation_new (GtkWidget *window, GList *files, gboolean force_armor) { GpaFileEncryptOperation *op; - + op = g_object_new (GPA_FILE_ENCRYPT_OPERATION_TYPE, "window", window, "input_files", files, @@ -231,7 +231,7 @@ gpa_file_encrypt_sign_operation_new (GtkWidget *window, GList *files, gboolean force_armor) { GpaFileEncryptOperation *op; - + op = g_object_new (GPA_FILE_ENCRYPT_OPERATION_TYPE, "window", window, "input_files", files, @@ -249,7 +249,7 @@ GpaFileEncryptOperation* gpa_file_encrypt_operation_new_for_server (GList *files, void *server_ctx) { GpaFileEncryptOperation *op; - + op = g_object_new (GPA_FILE_ENCRYPT_OPERATION_TYPE, "input_files", files, "server-ctx", server_ctx, @@ -299,7 +299,7 @@ gpa_file_encrypt_operation_start (GpaFileEncryptOperation *op, gpa_gpgme_warning (err); return err; } - + err = gpgme_data_new (&op->cipher); if (err) { @@ -312,11 +312,11 @@ gpa_file_encrypt_operation_start (GpaFileEncryptOperation *op, else { gchar *plain_filename = file_item->filename_in; - - file_item->filename_out = destination_filename + + file_item->filename_out = destination_filename (plain_filename, gpgme_get_armor (GPA_OPERATION (op)->context->ctx)); /* Open the files */ - op->plain_fd = gpa_open_input (plain_filename, &op->plain, + op->plain_fd = gpa_open_input (plain_filename, &op->plain, GPA_OPERATION (op)->window); if (op->plain_fd == -1) /* FIXME: Error value. */ @@ -337,7 +337,7 @@ gpa_file_encrypt_operation_start (GpaFileEncryptOperation *op, /* Start the operation. */ /* Always trust keys, because any untrusted keys were already confirmed by the user. */ - if (gpa_file_encrypt_dialog_get_sign + if (gpa_file_encrypt_dialog_get_sign (GPA_FILE_ENCRYPT_DIALOG (op->encrypt_dialog))) err = gpgme_op_encrypt_sign_start (GPA_OPERATION (op)->context->ctx, op->rset, GPGME_ENCRYPT_ALWAYS_TRUST, @@ -365,7 +365,7 @@ gpa_file_encrypt_operation_start (GpaFileEncryptOperation *op, /* Show and update the progress dialog. */ gtk_widget_show_all (GPA_FILE_OPERATION (op)->progress_dialog); - gpa_progress_dialog_set_label (GPA_PROGRESS_DIALOG + gpa_progress_dialog_set_label (GPA_PROGRESS_DIALOG (GPA_FILE_OPERATION (op)->progress_dialog), file_item->direct_name ? file_item->direct_name @@ -392,7 +392,7 @@ gpa_file_encrypt_operation_next (GpaFileEncryptOperation *op) static void -gpa_file_encrypt_operation_done_cb (GpaContext *context, +gpa_file_encrypt_operation_done_cb (GpaContext *context, gpg_error_t err, GpaFileEncryptOperation *op) { @@ -434,7 +434,7 @@ gpa_file_encrypt_operation_done_cb (GpaContext *context, op->cipher_fd = -1; gtk_widget_hide (GPA_FILE_OPERATION (op)->progress_dialog); - if (err) + if (err) { if (! file_item->direct_in) { @@ -452,7 +452,7 @@ gpa_file_encrypt_operation_done_cb (GpaContext *context, g_signal_emit_by_name (GPA_OPERATION (op), "created_file", file_item); /* Go to the next file in the list and encrypt it */ - GPA_FILE_OPERATION (op)->current = g_list_next + GPA_FILE_OPERATION (op)->current = g_list_next (GPA_FILE_OPERATION (op)->current); gpa_file_encrypt_operation_next (op); } @@ -474,7 +474,7 @@ ignore_key_trust (gpgme_key_t key, GtkWidget *parent) GtkResponseType response; dialog = gtk_dialog_new_with_buttons (_("Unknown Key"), GTK_WINDOW(parent), - GTK_DIALOG_MODAL, + GTK_DIALOG_MODAL, _("_Yes"), GTK_RESPONSE_YES, _("_No"), GTK_RESPONSE_NO, NULL); @@ -500,7 +500,7 @@ ignore_key_trust (gpgme_key_t key, GtkWidget *parent) gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 5); label = gtk_label_new (NULL); - gtk_label_set_markup (GTK_LABEL (label), + gtk_label_set_markup (GTK_LABEL (label), _("Do you really want to use this key?")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 5); @@ -523,7 +523,7 @@ revoked_key (gpgme_key_t key, GtkWidget *parent) GtkWidget *image; dialog = gtk_dialog_new_with_buttons (_("Revoked Key"), GTK_WINDOW(parent), - GTK_DIALOG_MODAL, + GTK_DIALOG_MODAL, _("_Close"), GTK_RESPONSE_CLOSE, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); @@ -537,7 +537,7 @@ revoked_key (gpgme_key_t key, GtkWidget *parent) gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox); - label = gtk_label_new (_("The following key has been revoked by it's owner:")); + label = gtk_label_new (_("The following key has been revoked by its owner:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 5); key_info = gpa_key_info_new (key); @@ -563,7 +563,7 @@ expired_key (gpgme_key_t key, GtkWidget *parent) gchar *message; dialog = gtk_dialog_new_with_buttons (_("Revoked Key"), GTK_WINDOW(parent), - GTK_DIALOG_MODAL, + GTK_DIALOG_MODAL, _("_Close"), GTK_RESPONSE_CLOSE, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); @@ -578,7 +578,7 @@ expired_key (gpgme_key_t key, GtkWidget *parent) gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox); message = g_strdup_printf (_("The following key expired on %s:"), - gpa_expiry_date_string + gpa_expiry_date_string (key->subkeys->expires)); label = gtk_label_new (message); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); @@ -615,11 +615,11 @@ set_recipients (GpaFileEncryptOperation *op, GList *recipients) { /* Should not happen either because the selection dialog should have not allowed to select differet keys. */ - gpa_window_error + gpa_window_error (_("The selected certificates are not all of the same type." " That is, you mixed OpenPGP and X.509 certificates." " Please make sure to select only certificates of the" - " same type."), + " same type."), GPA_OPERATION (op)->window); return FALSE; } @@ -648,7 +648,7 @@ set_recipients (GpaFileEncryptOperation *op, GList *recipients) valid becuase the backend will chekc this. FIXME: It would be better to ask the backend to check the validity of the key instead of letting it fail later. */ - else if (valid == GPGME_VALIDITY_FULL + else if (valid == GPGME_VALIDITY_FULL || valid == GPGME_VALIDITY_ULTIMATE || key->protocol == GPGME_PROTOCOL_CMS) { @@ -715,17 +715,17 @@ static void gpa_file_encrypt_operation_response_cb (GtkDialog *dialog, GpaFileEncryptOperation *op = user_data; gtk_widget_hide (GTK_WIDGET (dialog)); - + if (response == GTK_RESPONSE_OK) { gboolean success = TRUE; - gboolean armor = gpa_file_encrypt_dialog_get_armor + gboolean armor = gpa_file_encrypt_dialog_get_armor (GPA_FILE_ENCRYPT_DIALOG (op->encrypt_dialog)); - GList *signers = gpa_file_encrypt_dialog_signers + GList *signers = gpa_file_encrypt_dialog_signers (GPA_FILE_ENCRYPT_DIALOG (op->encrypt_dialog)); GList *recipients = gpa_file_encrypt_dialog_recipients (GPA_FILE_ENCRYPT_DIALOG (op->encrypt_dialog)); - + /* Set the armor value */ gpgme_set_armor (GPA_OPERATION (op)->context->ctx, armor); /* Set the signers for the context. */ diff --git a/src/keygenwizard.c b/src/keygenwizard.c index ea55fdb..06ac12a 100644 --- a/src/keygenwizard.c +++ b/src/keygenwizard.c @@ -40,7 +40,7 @@ /* The key generation wizard. - + New users should not be overwhelmed by too many options most of which are not easily explained and will only confuse them. To solve that problem we use default values for the algorithm and size of the keys @@ -48,7 +48,7 @@ name and email address in a step by step manner. */ /* Helper functions. */ - + /* Return a copy of string with leading and trailing whitespace stripped. */ static char * @@ -70,7 +70,7 @@ typedef struct GtkWidget *final_page; GtkWidget *backup_page; GtkWidget *backup_dir_page; - + GpaKeyGenWizardGenerateCb generate; gpointer generate_data; } GPAKeyGenWizard; @@ -157,7 +157,7 @@ name_validate_cb (GtkWidget *widget, gpointer data) while (*name && g_unichar_isspace (g_utf8_get_char (name))) name = g_utf8_next_char (name); gtk_assistant_set_page_complete (GTK_ASSISTANT (wizard->window), - wizard->name_page, + wizard->name_page, !gpa_validate_gpg_name (name)); return FALSE; @@ -212,7 +212,7 @@ keygen_wizard_email_page (GPAKeyGenWizard *wizard) _("Please insert your email address.\n\n" "Your email address will be part of the new key to make it easier" " for others to identify keys. If you have several email addresses," - " you can add further email adresses later."), + " you can add further email addresses later."), _("Your Email Address:")); entry = g_object_get_data (G_OBJECT (widget), "gpa_keygen_entry"); @@ -228,7 +228,7 @@ gpa_keygen_wizard_backup_page (GPAKeyGenWizard *wizard) GtkWidget *vbox; GtkWidget *description; GtkWidget *radio; - + vbox = gtk_vbox_new (FALSE, 0); description = gtk_label_new @@ -243,7 +243,7 @@ gpa_keygen_wizard_backup_page (GPAKeyGenWizard *wizard) radio = gtk_radio_button_new_with_mnemonic (NULL, _("Create _backup copy")); gtk_box_pack_start (GTK_BOX (vbox), radio, FALSE, TRUE, 5); g_object_set_data (G_OBJECT (vbox), "gpa_keygen_backup", radio); - + radio = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (radio), _("Do it _later")); gtk_box_pack_start (GTK_BOX (vbox), radio, FALSE, TRUE, 5); @@ -285,10 +285,10 @@ gpa_keygen_wizard_final_page (GPAKeyGenWizard * keygen_wizard) GtkWidget *widget; char *desc; - desc = g_strdup_printf + desc = g_strdup_printf (_("Congratulations!\n\n" "You have successfully generated a key." - " The key is indefinitely valid and has a length of %d bits."), + " The key is indefinitely valid and has a length of %d bits."), STANDARD_KEY_LENGTH); widget = gpa_keygen_wizard_message_page (desc); g_free (desc); @@ -364,7 +364,7 @@ keygen_wizard_prepare_cb (GtkAssistant *assistant, GtkWidget *page, GtkWidget * -gpa_keygen_wizard_new (GtkWidget *parent, +gpa_keygen_wizard_new (GtkWidget *parent, GpaKeyGenWizardGenerateCb generate_action, gpointer data) { @@ -372,7 +372,7 @@ gpa_keygen_wizard_new (GtkWidget *parent, GtkWidget *window; GdkPixbuf *genkey_pixbuf; GdkPixbuf *backup_pixbuf; - + wizard = g_malloc (sizeof (*wizard)); genkey_pixbuf = gpa_create_icon_pixbuf ("wizard_genkey"); ----------------------------------------------------------------------- Summary of changes: po/ar.po | 5 +-- po/cs.po | 3 +- po/de.po | 4 +- po/fr.po | 4 +- po/ru.po | 2 +- po/sv.po | 4 +- po/tr.po | 2 +- src/gpadatebutton.c | 45 ++++++++++++----------- src/gpafileencryptop.c | 70 ++++++++++++++++++------------------ src/gpgmetools.c | 94 ++++++++++++++++++++++++------------------------ src/keygenwizard.c | 22 ++++++------ 11 files changed, 128 insertions(+), 127 deletions(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Mon Dec 12 21:55:34 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 12 Dec 2011 21:55:34 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-153-g1116466 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 11164662788036c4b15d30555ea33ec0b6f5a670 (commit) via cd29dc0f1cf7f3bd7938ffa65bf13f9a75d8c156 (commit) via ea0a21410b8fa460882c0f8de90b9291345fd4fc (commit) from 8a12a2000d82acfa881e8c18d028290100bf5e43 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 11164662788036c4b15d30555ea33ec0b6f5a670 Author: Werner Koch Date: Mon Dec 12 21:02:54 2011 +0100 scd: Retry command SERIALNO for an inactive card. * scd/command.c (cmd_serialno): Retry once for an inactive card. diff --git a/scd/command.c b/scd/command.c index 655032f..b2a504c 100644 --- a/scd/command.c +++ b/scd/command.c @@ -518,8 +518,10 @@ cmd_serialno (assuan_context_t ctx, char *line) char *serial_and_stamp; char *serial; time_t stamp; + int retries = 0; /* Clear the remove flag so that the open_card is able to reread it. */ + retry: if (!reader_disabled && ctrl->server_local->card_removed) { if ( IS_LOCKED (ctrl) ) @@ -528,7 +530,12 @@ cmd_serialno (assuan_context_t ctx, char *line) } if ((rc = open_card (ctrl, *line? line:NULL))) - return rc; + { + /* In case of an inactive card, retry once. */ + if (gpg_err_code (rc) == GPG_ERR_CARD_RESET && retries++ < 1) + goto retry; + return rc; + } rc = app_get_serial_and_stamp (ctrl->app_ctx, &serial, &stamp); if (rc) commit cd29dc0f1cf7f3bd7938ffa65bf13f9a75d8c156 Author: Werner Koch Date: Mon Dec 12 20:34:12 2011 +0100 Fix detection of card removal and insertion. * scd/apdu.c (apdu_connect): Return status codes for no card available and inactive card. * scd/command.c (TEST_CARD_REMOVAL): Also test for GPG_ERR_CARD_RESET. (open_card): Map apdu_connect status to GPG_ERR_CARD_RESET. diff --git a/scd/apdu.c b/scd/apdu.c index c130d89..ae91082 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -3051,11 +3051,14 @@ apdu_enum_reader (int slot, int *used) /* Connect a card. This is used to power up the card and make sure - that an ATR is available. */ + that an ATR is available. Depending on the reader backend it may + return an error for an inactive card or if no card is + available. */ int apdu_connect (int slot) { int sw; + unsigned int status; if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) return SW_HOST_NO_DRIVER; @@ -3080,7 +3083,15 @@ apdu_connect (int slot) scdaemon is fired up and apdu_get_status has not yet been called. Without that we would force a reset of the card with the next call to apdu_get_status. */ - apdu_get_status_internal (slot, 1, 1, NULL, NULL); + apdu_get_status_internal (slot, 1, 1, &status, NULL); + if (sw) + ; + else if (!(status & APDU_CARD_PRESENT)) + sw = SW_HOST_NO_CARD; + else if (((status & APDU_CARD_PRESENT) && !(status & APDU_CARD_ACTIVE)) + || !reader_table[slot].atrlen) + sw = SW_HOST_CARD_INACTIVE; + return sw; } diff --git a/scd/command.c b/scd/command.c index 9bb5005..655032f 100644 --- a/scd/command.c +++ b/scd/command.c @@ -60,6 +60,7 @@ int _r = (r); \ if (gpg_err_code (_r) == GPG_ERR_CARD_NOT_PRESENT \ || gpg_err_code (_r) == GPG_ERR_CARD_REMOVED \ + || gpg_err_code (_r) == GPG_ERR_CARD_RESET \ || gpg_err_code (_r) == GPG_ERR_ENODEV ) \ update_card_removed ((c)->reader_slot, 1); \ } while (0) @@ -420,9 +421,8 @@ get_reader_slot (void) return 0; } -/* If the card has not yet been opened, do it. Note that this - function returns an Assuan error, so don't map the error a second - time. */ + +/* If the card has not yet been opened, do it. */ static gpg_error_t open_card (ctrl_t ctrl, const char *apptype) { @@ -477,6 +477,8 @@ open_card (ctrl_t ctrl, const char *apptype) { if (sw == SW_HOST_NO_CARD) err = gpg_error (GPG_ERR_CARD_NOT_PRESENT); + else if (sw == SW_HOST_CARD_INACTIVE) + err = gpg_error (GPG_ERR_CARD_RESET); else err = gpg_error (GPG_ERR_CARD); } commit ea0a21410b8fa460882c0f8de90b9291345fd4fc Author: Werner Koch Date: Mon Dec 12 20:28:58 2011 +0100 gitlog-to-changelog: New option --tear-off. * scripts/gitlog-to-changelog: Add option --tear-off. * Makefile.am (gen-ChangeLog): Use that option. diff --git a/Makefile.am b/Makefile.am index 5f9bf2e..49ec3fc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -116,7 +116,7 @@ gen-ChangeLog: if test -d $(top_srcdir)/.git; then \ (cd $(top_srcdir) && \ ./scripts/gitlog-to-changelog \ - --append-dot \ + --append-dot --tear-off \ --amend=scripts/git-log-fix \ --since=$(gen_start_date) ) > $(distdir)/cl-t; \ cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t; \ diff --git a/scripts/gitlog-to-changelog b/scripts/gitlog-to-changelog index a7ea194..d9f594f 100755 --- a/scripts/gitlog-to-changelog +++ b/scripts/gitlog-to-changelog @@ -64,6 +64,7 @@ OPTIONS: makes a change to SHA1's commit log text or metadata. --append-dot append a dot to the first line of each commit message if there is no other punctuation or blank at the end. + --tear-off tear off all commit log lines after a '--' line. --since=DATE convert only the logs since DATE; the default is to convert all log entries. --format=FMT set format string for commit subject and body; @@ -175,6 +176,7 @@ sub parse_amend_file($) my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; + my $tear_off = 0; GetOptions ( help => sub { usage 0 }, @@ -183,6 +185,7 @@ sub parse_amend_file($) 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, + 'tear-off' => \$tear_off, ) or usage 1; @@ -282,13 +285,16 @@ sub parse_amend_file($) @line = grep !/^Co-authored-by: /, @line; # Remove everything after a line with 2 dashes at the beginning. - my @tmpline; - foreach (@line) - { - last if /^--\s*$/; - push @tmpline,$_; + if ($tear_off) + { + my @tmpline; + foreach (@line) + { + last if /^--\s*$/; + push @tmpline,$_; + } + @line = @tmpline; } - @line = @tmpline; # Remove leading and trailing blank lines. if (@line) ----------------------------------------------------------------------- Summary of changes: Makefile.am | 2 +- scd/apdu.c | 15 +++++++++++++-- scd/command.c | 17 +++++++++++++---- scripts/gitlog-to-changelog | 18 ++++++++++++------ 4 files changed, 39 insertions(+), 13 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Dec 13 19:19:51 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 13 Dec 2011 19:19:51 +0100 Subject: [git] Assuan - branch, master, updated. libassuan-2.0.2-7-gedbe8fd Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via edbe8fdcea1a2c05999861f58d5f67d2e76610e0 (commit) via ff9a8c2e64ea2345f2ebe85a527b7c43033ba53e (commit) from 165a57d29d2ac84159aa48b171b6098c629bc798 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit edbe8fdcea1a2c05999861f58d5f67d2e76610e0 Author: Werner Koch Date: Tue Dec 13 18:27:06 2011 +0100 Fix assuan_get_pid for pipe servers. At some point in the past we introduced a regression in that the client of a pipe server received its own pid and not the pid of the server. * src/assuan-pipe-connect.c (struct at_pipe_fork) (struct at_socketpair_fork): Add PARENT_PID. (at_pipe_fork_cb, at_socketpair_fork): Use PARENT_PID instead of getpid. (pipe_connect, socketpair_connect): Set PARENT_PID. diff --git a/NEWS b/NEWS index 6514943..9775be2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ Noteworthy changes in version 2.0.3 (unreleased) ------------------------------------------------ + * Make assuan_get_pid work correctly for pipe server. + * Interface changes relative to the 2.0.2 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ASSUAN_FORCE_CLOSE NEW. diff --git a/src/assuan-pipe-connect.c b/src/assuan-pipe-connect.c index d8c71e6..edc8dbb 100644 --- a/src/assuan-pipe-connect.c +++ b/src/assuan-pipe-connect.c @@ -1,5 +1,6 @@ -/* assuan-pipe-connect.c - Establish a pipe connection (client) - Copyright (C) 2001-2003, 2005-2007, 2009 Free Software Foundation, Inc. +/* assuan-pipe-connect.c - Establish a pipe connection (client) + Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2010, + 2011 Free Software Foundation, Inc. This file is part of Assuan. @@ -26,7 +27,7 @@ #include /* On Windows systems signal.h is not needed and even not supported on WindowsCE. */ -#ifndef HAVE_DOSISH_SYSTEM +#ifndef HAVE_DOSISH_SYSTEM # include #endif #ifdef HAVE_UNISTD_H @@ -44,7 +45,7 @@ #else # ifdef HAVE_WINSOCK2_H # include -# endif +# endif # include #endif @@ -79,9 +80,9 @@ fix_signals (void) static int fixed_signals; if (!fixed_signals) - { + { struct sigaction act; - + sigaction (SIGPIPE, NULL, &act); if (act.sa_handler == SIG_DFL) { @@ -104,7 +105,7 @@ initial_handshake (assuan_context_t ctx) assuan_response_t response; int off; gpg_error_t err; - + err = _assuan_read_from_server (ctx, &response, &off, 0); if (err) TRACE1 (ctx, ASSUAN_LOG_SYSIO, "initial_handshake", ctx, @@ -124,6 +125,7 @@ struct at_pipe_fork { void (*user_atfork) (void *opaque, int reserved); void *user_atforkvalue; + pid_t parent_pid; }; @@ -131,19 +133,19 @@ static void at_pipe_fork_cb (void *opaque, int reserved) { struct at_pipe_fork *atp = opaque; - + if (atp->user_atfork) atp->user_atfork (atp->user_atforkvalue, reserved); #ifndef HAVE_W32_SYSTEM { char mypidstr[50]; - + /* We store our parents pid in the environment so that the execed assuan server is able to read the actual pid of the client. The server can't use getppid because it might have been double forked before the assuan server has been initialized. */ - sprintf (mypidstr, "%lu", (unsigned long) getpid ()); + sprintf (mypidstr, "%lu", (unsigned long) atp->parent_pid); setenv ("_assuan_pipe_connect_pid", mypidstr, 1); /* Make sure that we never pass a connection fd variable when @@ -171,6 +173,7 @@ pipe_connect (assuan_context_t ctx, atp.user_atfork = atfork; atp.user_atforkvalue = atforkvalue; + atp.parent_pid = getpid (); if (!ctx || !name || !argv || !argv[0]) return _assuan_error (ctx, GPG_ERR_ASS_INV_VALUE); @@ -180,14 +183,14 @@ pipe_connect (assuan_context_t ctx, if (_assuan_pipe (ctx, rp, 1) < 0) return _assuan_error (ctx, gpg_err_code_from_syserror ()); - + if (_assuan_pipe (ctx, wp, 0) < 0) { _assuan_close (ctx, rp[0]); _assuan_close_inheritable (ctx, rp[1]); return _assuan_error (ctx, gpg_err_code_from_syserror ()); } - + spawn_flags = 0; if (flags & ASSUAN_PIPE_CONNECT_DETACHED) spawn_flags |= ASSUAN_SPAWN_DETACHED; @@ -238,6 +241,7 @@ struct at_socketpair_fork assuan_fd_t peer_fd; void (*user_atfork) (void *opaque, int reserved); void *user_atforkvalue; + pid_t parent_pid; }; @@ -245,19 +249,19 @@ static void at_socketpair_fork_cb (void *opaque, int reserved) { struct at_socketpair_fork *atp = opaque; - + if (atp->user_atfork) atp->user_atfork (atp->user_atforkvalue, reserved); #ifndef HAVE_W32_SYSTEM { char mypidstr[50]; - + /* We store our parents pid in the environment so that the execed assuan server is able to read the actual pid of the client. The server can't use getppid because it might have been double forked before the assuan server has been initialized. */ - sprintf (mypidstr, "%lu", (unsigned long) getpid ()); + sprintf (mypidstr, "%lu", (unsigned long) atp->parent_pid); setenv ("_assuan_pipe_connect_pid", mypidstr, 1); /* Now set the environment variable used to convey the @@ -295,6 +299,7 @@ socketpair_connect (assuan_context_t ctx, atp.user_atfork = atfork; atp.user_atforkvalue = atforkvalue; + atp.parent_pid = getpid (); if (!ctx || (name && (!argv || !argv[0])) @@ -315,7 +320,7 @@ socketpair_connect (assuan_context_t ctx, child_fds[1] = ASSUAN_INVALID_FD; if (fd_child_list) memcpy (&child_fds[1], fd_child_list, (child_fds_cnt + 1) * sizeof (int)); - + if (_assuan_socketpair (ctx, AF_LOCAL, SOCK_STREAM, 0, fds)) { TRACE_LOG1 ("socketpair failed: %s", strerror (errno)); @@ -362,10 +367,10 @@ socketpair_connect (assuan_context_t ctx, ctx->engine.release = _assuan_client_release; ctx->finish_handler = _assuan_client_finish; ctx->max_accepts = 1; - ctx->inbound.fd = fds[0]; - ctx->outbound.fd = fds[0]; + ctx->inbound.fd = fds[0]; + ctx->outbound.fd = fds[0]; _assuan_init_uds_io (ctx); - + err = initial_handshake (ctx); if (err) _assuan_reset (ctx); commit ff9a8c2e64ea2345f2ebe85a527b7c43033ba53e Author: Werner Koch Date: Tue Dec 13 18:22:22 2011 +0100 vasprintf.c: Improve test code. * src/vasprintf.c (checkit): Set flag for a test failure. (main): Return error on any failure. diff --git a/src/vasprintf.c b/src/vasprintf.c index e55408a..bacb71c 100644 --- a/src/vasprintf.c +++ b/src/vasprintf.c @@ -33,10 +33,10 @@ Boston, MA 02111-1307, USA. */ #define va_copy(d, s) (*(d) = *(s)) #elif defined (MUST_COPY_VA_BYVAL) #define va_copy(d, s) ((d) = (s)) -#else +#else #define va_copy(d, s) memcpy ((d), (s), sizeof (va_list)) -#endif -#endif +#endif +#endif #ifdef TEST @@ -175,6 +175,7 @@ _assuan_asprintf (char **buf, const char *fmt, ...) #define asprintf _assuan_asprintf #define vasprintf _assuan_vasprintf +static int any_failed; void checkit (const char* format, ...) @@ -187,7 +188,10 @@ checkit (const char* format, ...) if (strlen (result) < global_total_width) printf ("PASS: "); else - printf ("FAIL: "); + { + any_failed = 1; + printf ("FAIL: "); + } printf ("%d %s\n", global_total_width, result); } @@ -201,5 +205,7 @@ main (void) checkit ("%s", "jjjjjjjjjiiiiiiiiiiiiiiioooooooooooooooooppppppppppppaa\n\ 777777777777777777333333333333366666666666622222222222777777777777733333"); checkit ("%f%s%d%s", 1.0, "foo", 77, "asdjffffffffffffffiiiiiiiiiiixxxxx"); + checkit ("%2$f%4$s%3$d%1$s", "asdjffffffffffffffiiiiiiiiiiixxxxx", 1.0, 77, "foo"); + return any_failed; } #endif /* TEST */ ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ src/assuan-pipe-connect.c | 43 ++++++++++++++++++++++++------------------- src/vasprintf.c | 14 ++++++++++---- 3 files changed, 36 insertions(+), 23 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Wed Dec 14 11:25:20 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 14 Dec 2011 11:25:20 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-157-g2d91feb Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 2d91febbd8d30beb7eb33f7aa80ffd5691d1d3cc (commit) via 07ea8c56b507b06d4bd70e94fa51914659afac4b (commit) via 00c760f628f4cf0fc11e79d305c172f98123f815 (commit) via 24e121ef261731069868ca403b818f1168237f53 (commit) from 11164662788036c4b15d30555ea33ec0b6f5a670 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2d91febbd8d30beb7eb33f7aa80ffd5691d1d3cc Author: Werner Koch Date: Wed Dec 14 10:30:01 2011 +0100 scd: Fix resetting and closing of the reader. * scd/command.c (update_card_removed): Do no act on an invalid VRDR. (do_reset): Ignore apdu_reset error codes for no and inactive card. Close the reader before setting the slot to -1. (update_reader_status_file): Notify the application before closing the reader. -- With this change the scd now works as it did in the past. In particular there is no more endless loop trying to open the reader by the update_reader_status_file ticker function. That bug basically blocked all card operations until the scdaemon was killed. diff --git a/scd/command.c b/scd/command.c index 2ade38a..0f57448 100644 --- a/scd/command.c +++ b/scd/command.c @@ -180,6 +180,19 @@ initialize_module_command (void) } +/* Helper to return the slot number for a given virtual reader index + VRDR. In case on an error -1 is returned. */ +static int +vreader_slot (int vrdr) +{ + if (vrdr == -1 || !(vrdr >= 0 && vrdr < DIM(vreader_table))) + return -1; + if (!vreader_table [vrdr].valid) + return -1; + return vreader_table[vrdr].slot; +} + + /* Update the CARD_REMOVED element of all sessions using the virtual reader given by VRDR to VALUE. */ static void @@ -187,6 +200,9 @@ update_card_removed (int vrdr, int value) { struct server_local_s *sl; + if (vrdr == -1) + return; + for (sl=session_list; sl; sl = sl->next_session) if (sl->ctrl_backlink && sl->ctrl_backlink->server_local->vreader_idx == vrdr) @@ -195,20 +211,7 @@ update_card_removed (int vrdr, int value) } /* Let the card application layer know about the removal. */ if (value) - application_notify_card_reset (vrdr); -} - - -/* Helper to return the slot number for a given virtual reader index - VRDR. In case on an error -1 is returned. */ -static int -vreader_slot (int vrdr) -{ - if (vrdr == -1 || !(vrdr >= 0 && vrdr < DIM(vreader_table))) - return -1; - if (!vreader_table [vrdr].valid) - return -1; - return vreader_table[vrdr].slot; + application_notify_card_reset (vreader_slot (vrdr)); } @@ -298,6 +301,7 @@ static void do_reset (ctrl_t ctrl, int send_reset) { int vrdr = ctrl->server_local->vreader_idx; + int slot; if (!(vrdr == -1 || (vrdr >= 0 && vrdr < DIM(vreader_table)))) BUG (); @@ -324,13 +328,22 @@ do_reset (ctrl_t ctrl, int send_reset) /* If we want a real reset for the card, send the reset APDU and tell the application layer about it. */ - if (vrdr != -1 && send_reset && !IS_LOCKED (ctrl) ) + slot = vreader_slot (vrdr); + if (slot != -1 && send_reset && !IS_LOCKED (ctrl) ) { - if (apdu_reset (vreader_table[vrdr].slot)) + application_notify_card_reset (slot); + switch (apdu_reset (slot)) { - vreader_table[vrdr].valid = 0; + case 0: + break; + case SW_HOST_NO_CARD: + case SW_HOST_CARD_INACTIVE: + break; + default: + apdu_close_reader (slot); + vreader_table[vrdr].slot = slot = -1; + break; } - application_notify_card_reset (vrdr); } /* If we hold a lock, unlock now. */ @@ -1696,11 +1709,7 @@ cmd_getinfo (assuan_context_t ctx, char *line) BUG (); vr = &vreader_table[vrdr]; - - if (!vr->valid) - BUG (); - - if (vr->any && (vr->status & 1)) + if (vr->valid && vr->any && (vr->status & 1)) flag = 'u'; } rc = assuan_send_data (ctx, &flag, 1); @@ -2248,9 +2257,9 @@ update_reader_status_file (int set_card_removed_flag) if (sw_apdu == SW_HOST_NO_READER) { /* Most likely the _reader_ has been unplugged. */ + application_notify_card_reset (vr->slot); apdu_close_reader (vr->slot); vr->slot = -1; - vr->valid = 0; status = 0; changed = vr->changed; } commit 07ea8c56b507b06d4bd70e94fa51914659afac4b Author: Werner Koch Date: Wed Dec 14 10:21:15 2011 +0100 scd: Add debug option for reader function calls. * scd/scdaemon.h (DBG_READER_VALUE, DBG_READER): New. * scd/apdu.c (apdu_open_reader, apdu_close_reader) (apdu_shutdown_reader, apdu_connect, apdu_disconnect) (apdu_reset, apdu_get_atr, apdu_get_status): Add debug code. (apdu_activate): Remove this unused function. diff --git a/scd/apdu.c b/scd/apdu.c index ae91082..c37e8c4 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2772,6 +2772,9 @@ apdu_open_reader (const char *portstr, int *r_no_service) static int pcsc_api_loaded, ct_api_loaded; int slot; + if (DBG_READER) + log_debug ("enter: apdu_open_reader: portstr=%s\n", portstr); + if (r_no_service) *r_no_service = 0; @@ -2786,6 +2789,8 @@ apdu_open_reader (const char *portstr, int *r_no_service) if (slot != -1) { once_available = 1; + if (DBG_READER) + log_debug ("leave: apdu_open_reader => slot=%d [ccid]\n", slot); return slot; /* got one */ } @@ -2796,14 +2801,22 @@ apdu_open_reader (const char *portstr, int *r_no_service) and over again. To reset this flag "gpgconf --kill scdaemon" can be used. */ if (once_available) - return -1; + { + if (DBG_READER) + log_debug ("leave: apdu_open_reader => slot=-1 (once_avail)\n"); + return -1; + } /* If a CCID reader specification has been given, the user does not want a fallback to other drivers. */ if (portstr) for (s=portstr, i=0; *s; s++) if (*s == ':' && (++i == 3)) - return -1; + { + if (DBG_READER) + log_debug ("leave: apdu_open_reader => slot=-1 (no ccid)\n"); + return -1; + } } #endif /* HAVE_LIBUSB */ @@ -2928,6 +2941,8 @@ apdu_open_reader (const char *portstr, int *r_no_service) if (slot == -1 && r_no_service && pcsc_no_service) *r_no_service = 1; + if (DBG_READER) + log_debug ("leave: apdu_open_reader => slot=%d [pc/sc]\n", slot); return slot; } @@ -2982,13 +2997,31 @@ apdu_close_reader (int slot) { int sw; + if (DBG_READER) + log_debug ("enter: apdu_close_reader: slot=%d\n", slot); + if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) - return SW_HOST_NO_DRIVER; + { + if (DBG_READER) + log_debug ("leave: apdu_close_reader => SW_HOST_NO_DRIVER\n"); + return SW_HOST_NO_DRIVER; + } sw = apdu_disconnect (slot); if (sw) - return sw; + { + if (DBG_READER) + log_debug ("leave: apdu_close_reader => 0x%x (apdu_disconnect)\n", sw); + return sw; + } if (reader_table[slot].close_reader) - return reader_table[slot].close_reader (slot); + { + sw = reader_table[slot].close_reader (slot); + if (DBG_READER) + log_debug ("leave: apdu_close_reader => 0x%x (close_reader)\n", sw); + return sw; + } + if (DBG_READER) + log_debug ("leave: apdu_close_reader => SW_HOST_NOT_SUPPORTED\n"); return SW_HOST_NOT_SUPPORTED; } @@ -3027,13 +3060,32 @@ apdu_shutdown_reader (int slot) { int sw; + if (DBG_READER) + log_debug ("enter: apdu_shutdown_reader: slot=%d\n", slot); + if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) - return SW_HOST_NO_DRIVER; + { + if (DBG_READER) + log_debug ("leave: apdu_shutdown_reader => SW_HOST_NO_DRIVER\n"); + return SW_HOST_NO_DRIVER; + } sw = apdu_disconnect (slot); if (sw) - return sw; + { + if (DBG_READER) + log_debug ("leave: apdu_shutdown_reader => 0x%x (apdu_disconnect)\n", + sw); + return sw; + } if (reader_table[slot].shutdown_reader) - return reader_table[slot].shutdown_reader (slot); + { + sw = reader_table[slot].shutdown_reader (slot); + if (DBG_READER) + log_debug ("leave: apdu_shutdown_reader => 0x%x (close_reader)\n", sw); + return sw; + } + if (DBG_READER) + log_debug ("leave: apdu_shutdown_reader => SW_HOST_NOT_SUPPORTED\n"); return SW_HOST_NOT_SUPPORTED; } @@ -3060,8 +3112,15 @@ apdu_connect (int slot) int sw; unsigned int status; + if (DBG_READER) + log_debug ("enter: apdu_connect: slot=%d\n", slot); + if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) - return SW_HOST_NO_DRIVER; + { + if (DBG_READER) + log_debug ("leave: apdu_connect => SW_HOST_NO_DRIVER\n"); + return SW_HOST_NO_DRIVER; + } /* Only if the access method provides a connect function we use it. If not, we expect that the card has been implicitly connected by @@ -3092,6 +3151,8 @@ apdu_connect (int slot) || !reader_table[slot].atrlen) sw = SW_HOST_CARD_INACTIVE; + if (DBG_READER) + log_debug ("leave: apdu_connect => sw=0x%x\n", sw); return sw; } @@ -3102,8 +3163,15 @@ apdu_disconnect (int slot) { int sw; + if (DBG_READER) + log_debug ("enter: apdu_disconnect: slot=%d\n", slot); + if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) - return SW_HOST_NO_DRIVER; + { + if (DBG_READER) + log_debug ("leave: apdu_disconnect => SW_HOST_NO_DRIVER\n"); + return SW_HOST_NO_DRIVER; + } if (reader_table[slot].disconnect_card) { @@ -3116,6 +3184,9 @@ apdu_disconnect (int slot) } else sw = 0; + + if (DBG_READER) + log_debug ("leave: apdu_disconnect => sw=0x%x\n", sw); return sw; } @@ -3151,11 +3222,22 @@ apdu_reset (int slot) { int sw; + if (DBG_READER) + log_debug ("enter: apdu_reset: slot=%d\n", slot); + if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) - return SW_HOST_NO_DRIVER; + { + if (DBG_READER) + log_debug ("leave: apdu_reset => SW_HOST_NO_DRIVER\n"); + return SW_HOST_NO_DRIVER; + } if ((sw = lock_slot (slot))) - return sw; + { + if (DBG_READER) + log_debug ("leave: apdu_reset => sw=0x%x (lock_slot)\n", sw); + return sw; + } reader_table[slot].last_status = 0; if (reader_table[slot].reset_reader) @@ -3171,73 +3253,47 @@ apdu_reset (int slot) } unlock_slot (slot); + if (DBG_READER) + log_debug ("leave: apdu_reset => sw=0x%x\n", sw); return sw; } -/* Activate a card if it has not yet been done. This is a kind of - reset-if-required. It is useful to test for presence of a card - before issuing a bunch of apdu commands. It does not wait on a - locked card. */ -int -apdu_activate (int slot) -{ - int sw; - unsigned int s; - - if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) - return SW_HOST_NO_DRIVER; - - if ((sw = trylock_slot (slot))) - return sw; - - if (reader_table[slot].get_status_reader) - sw = reader_table[slot].get_status_reader (slot, &s); - - if (!sw) - { - if (!(s & 2)) /* Card not present. */ - sw = SW_HOST_NO_CARD; - else if ( ((s & 2) && !(s & 4)) - || !reader_table[slot].atrlen ) - { - /* We don't have an ATR or a card is present though inactive: - do a reset now. */ - if (reader_table[slot].reset_reader) - { - reader_table[slot].last_status = 0; - sw = reader_table[slot].reset_reader (slot); - if (!sw) - { - /* If we got to here we know that a card is present - and usable. Thus remember this. */ - reader_table[slot].last_status = (APDU_CARD_USABLE - | APDU_CARD_PRESENT - | APDU_CARD_ACTIVE); - } - } - } - } - - unlock_slot (slot); - return sw; -} - - +/* Return the ATR or NULL if none is available. On success the length + of the ATR is stored at ATRLEN. The caller must free the returned + value. */ unsigned char * apdu_get_atr (int slot, size_t *atrlen) { unsigned char *buf; + if (DBG_READER) + log_debug ("enter: apdu_get_atr: slot=%d\n", slot); + if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) - return NULL; + { + if (DBG_READER) + log_debug ("leave: apdu_get_atr => NULL (bad slot)\n"); + return NULL; + } if (!reader_table[slot].atrlen) - return NULL; + { + if (DBG_READER) + log_debug ("leave: apdu_get_atr => NULL (no ATR)\n"); + return NULL; + } + buf = xtrymalloc (reader_table[slot].atrlen); if (!buf) - return NULL; + { + if (DBG_READER) + log_debug ("leave: apdu_get_atr => NULL (out of core)\n"); + return NULL; + } memcpy (buf, reader_table[slot].atr, reader_table[slot].atrlen); *atrlen = reader_table[slot].atrlen; + if (DBG_READER) + log_debug ("leave: apdu_get_atr => atrlen=%zu\n", *atrlen); return buf; } @@ -3308,7 +3364,26 @@ int apdu_get_status (int slot, int hang, unsigned int *status, unsigned int *changed) { - return apdu_get_status_internal (slot, hang, 0, status, changed); + int sw; + + if (DBG_READER) + log_debug ("enter: apdu_get_status: slot=%d hang=%d\n", slot, hang); + sw = apdu_get_status_internal (slot, hang, 0, status, changed); + if (DBG_READER) + { + if (status && changed) + log_debug ("leave: apdu_get_status => sw=0x%x status=%u changecnt=%u\n", + sw, *status, *changed); + else if (status) + log_debug ("leave: apdu_get_status => sw=0x%x status=%u\n", + sw, *status); + else if (changed) + log_debug ("leave: apdu_get_status => sw=0x%x changed=%u\n", + sw, *changed); + else + log_debug ("leave: apdu_get_status => sw=0x%x\n", sw); + } + return sw; } diff --git a/scd/apdu.h b/scd/apdu.h index ac1eeeb..f704256 100644 --- a/scd/apdu.h +++ b/scd/apdu.h @@ -108,7 +108,6 @@ int apdu_disconnect (int slot); int apdu_set_progress_cb (int slot, gcry_handler_progress_t cb, void *cb_arg); -int apdu_activate (int slot); int apdu_reset (int slot); int apdu_get_status (int slot, int hang, unsigned int *status, unsigned int *changed); diff --git a/scd/scdaemon.h b/scd/scdaemon.h index 4c0a663..74e8b7d 100644 --- a/scd/scdaemon.h +++ b/scd/scdaemon.h @@ -72,8 +72,9 @@ struct #define DBG_CACHE_VALUE 64 /* debug the caching */ #define DBG_MEMSTAT_VALUE 128 /* show memory statistics */ #define DBG_HASHING_VALUE 512 /* debug hashing operations */ -#define DBG_ASSUAN_VALUE 1024 +#define DBG_ASSUAN_VALUE 1024 #define DBG_CARD_IO_VALUE 2048 +#define DBG_READER_VALUE 4096 /* Trace reader related functions. */ #define DBG_COMMAND (opt.debug & DBG_COMMAND_VALUE) #define DBG_CRYPTO (opt.debug & DBG_CRYPTO_VALUE) @@ -82,6 +83,7 @@ struct #define DBG_HASHING (opt.debug & DBG_HASHING_VALUE) #define DBG_ASSUAN (opt.debug & DBG_ASSUAN_VALUE) #define DBG_CARD_IO (opt.debug & DBG_CARD_IO_VALUE) +#define DBG_READER (opt.debug & DBG_READER_VALUE) struct server_local_s; struct app_ctx_s; commit 00c760f628f4cf0fc11e79d305c172f98123f815 Author: Werner Koch Date: Tue Dec 13 17:59:00 2011 +0100 scd: New option --debug-assuan-log-cats. * scd/scdaemon.c (oDebugAssuanLogCats): New. (opts): Add option --debug-assuan-log-cats. (main): Implement option. * common/asshelp.c (set_libassuan_log_cats): New. -- The old way of setting the logging categories with an environment variable is awkward if sdaemon is spawned from a running gpg-agent. diff --git a/common/asshelp.c b/common/asshelp.c index c5d8bdf..7ac6ff0 100644 --- a/common/asshelp.c +++ b/common/asshelp.c @@ -97,6 +97,19 @@ setup_libassuan_logging (unsigned int *debug_var_address) assuan_set_log_cb (my_libassuan_log_handler, debug_var_address); } +/* Change the Libassuan log categories to those given by NEWCATS. + NEWCATS is 0 the default category of ASSUAN_LOG_CONTROL is + selected. Note, that setup_libassuan_logging overrides the values + given here. */ +void +set_libassuan_log_cats (unsigned int newcats) +{ + if (newcats) + log_cats = newcats; + else /* Default to log the control channel. */ + log_cats = (1 << (ASSUAN_LOG_CONTROL - 1)); +} + static gpg_error_t diff --git a/common/asshelp.h b/common/asshelp.h index 0eb6553..728c039 100644 --- a/common/asshelp.h +++ b/common/asshelp.h @@ -26,6 +26,7 @@ #include "session-env.h" void setup_libassuan_logging (unsigned int *debug_var_address); +void set_libassuan_log_cats (unsigned int newcats); gpg_error_t diff --git a/doc/scdaemon.texi b/doc/scdaemon.texi index 3c84279..9184ce2 100644 --- a/doc/scdaemon.texi +++ b/doc/scdaemon.texi @@ -21,16 +21,16 @@ .IR dir ] .RB [ \-\-options .IR file ] -.RI [ options ] -.B \-\-server +.RI [ options ] +.B \-\-server .br .B scdaemon .RB [ \-\-homedir .IR dir ] .RB [ \-\-options .IR file ] -.RI [ options ] -.B \-\-daemon +.RI [ options ] +.B \-\-daemon .RI [ command_line ] @end ifset @@ -130,7 +130,7 @@ a numeric value or a keyword: @item none No debugging at all. A value of less than 1 may be used instead of the keyword. - at item basic + at item basic Some basic debug messages. A value between 1 and 2 may be used instead of the keyword. @item advanced @@ -165,8 +165,8 @@ usual C-Syntax. The currently defined bits are: @table @code @item 0 (1) command I/O - at item 1 (2) -values of big number integers + at item 1 (2) +values of big number integers @item 2 (4) low level crypto operations @item 5 (32) @@ -178,7 +178,7 @@ show memory statistics. @item 9 (512) write hashed data to files named @code{dbgmd-000*} @item 10 (1024) -trace Assuan protocol +trace Assuan protocol. See also option @option{--debug-assuan-log-cats}. @item 11 (2048) trace APDU I/O to the card. This may reveal sensitive data. @end table @@ -215,6 +215,15 @@ dump. This options enables it and also changes the working directory to @opindex debug-log-tid This option appends a thread ID to the PID in the log output. + at item --debug-assuan-log-cats @var{cats} + at opindex debug-assuan-log-cats +Changes the active Libassuan logging categories to @var{cats}. The +value for @var{cats} is an unsigned integer given in usual C-Syntax. +A value of of 0 switches to a default category. If this option is not +used the categories are taken from the environment variable + at samp{ASSUAN_DEBUG}. Note that this option has only an effect if the +Assuan debug flag has also been with the option @option{--debug}. For +a list of categories see the Libassuan manual. @item --no-detach @opindex no-detach @@ -240,7 +249,7 @@ Use @var{library} to access the smartcard reader. The current default is @file{libtowitoko.so}. Note that the use of this interface is deprecated; it may be removed in future releases. - at item --disable-ccid + at item --disable-ccid @opindex disable-ccid Disable the integrated support for CCID compliant readers. This allows to fall back to one of the other drivers even if the internal @@ -325,7 +334,7 @@ stripping off the two leading dashes. This application is currently only used by @command{gpg} but may in future also be useful with @command{gpgsm}. Version 1 and version 2 of -the card is supported. +the card is supported. The specifications for these cards are available at @uref{http://g10code.com/docs/openpgp-card-1.0.pdf} and @@ -395,7 +404,7 @@ about reader status changes. Its use is now deprecated in favor of @end table - at c + at c @c Examples @c @mansect examples @@ -410,7 +419,7 @@ $ scdaemon --server -v @c man end - at c + at c @c Assuan Protocol @c @manpause @@ -447,7 +456,7 @@ synchronizing access to a token between sessions. * Scdaemon APDU:: Send a verbatim APDU to the card @end menu - at node Scdaemon SERIALNO + at node Scdaemon SERIALNO @subsection Return the serial number This command should be used to check for the presence of a card. It is @@ -470,7 +479,7 @@ Return the serial number of the card using a status response like: @end example The trailing 0 should be ignored for now, it is reserved for a future -extension. The serial number is the hex encoded value identified by +extension. The serial number is the hex encoded value identified by the @code{0x5A} tag in the GDO file (FIX=0x2F02). @@ -522,7 +531,7 @@ READKEY @var{hexified_certid} @end example Return the public key for the given cert or key ID as an standard -S-Expression. +S-Expression. @@ -619,7 +628,7 @@ TO BE WRITTEN. @example PASSWD [--reset] [--nullpin] @var{chvno} @end example - + Change the PIN or reset the retry counter of the card holder verification vector number @var{chvno}. The option @option{--nullpin} is used to initialize the PIN of TCOS cards (6 byte NullPIN only). @@ -663,11 +672,11 @@ and only if the retry counter is still at 3. Restart the current connection; this is a kind of warm reset. It deletes the context used by this connection but does not actually -reset the card. +reset the card. This is used by gpg-agent to reuse a primary pipe connection and may be used by clients to backup from a conflict in the serial -command; i.e. to select another application. +command; i.e. to select another application. @@ -704,7 +713,7 @@ length up to N bytes. If N is not given a default value is used @mansect see also @ifset isman @command{gpg-agent}(1), - at command{gpgsm}(1), + at command{gpgsm}(1), @command{gpg2}(1) @end ifset @include see-also-note.texi diff --git a/scd/scdaemon.c b/scd/scdaemon.c index b4eee39..c8905d4 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -72,6 +72,7 @@ enum cmd_and_opt_values oDebugAllowCoreDump, oDebugCCIDDriver, oDebugLogTid, + oDebugAssuanLogCats, oNoGreeting, oNoOptions, oHomedir, @@ -121,6 +122,7 @@ static ARGPARSE_OPTS opts[] = { ARGPARSE_s_n (oDebugCCIDDriver, "debug-ccid-driver", "@"), ARGPARSE_s_n (oDebugDisableTicker, "debug-disable-ticker", "@"), ARGPARSE_s_n (oDebugLogTid, "debug-log-tid", "@"), + ARGPARSE_p_u (oDebugAssuanLogCats, "debug-assuan-log-cats", "@"), ARGPARSE_s_n (oNoDetach, "no-detach", N_("do not detach from the console")), ARGPARSE_s_s (oLogFile, "log-file", N_("|FILE|write a log to FILE")), ARGPARSE_s_s (oReaderPort, "reader-port", @@ -553,6 +555,9 @@ main (int argc, char **argv ) case oDebugLogTid: log_set_pid_suffix_cb (tid_log_callback); break; + case oDebugAssuanLogCats: + set_libassuan_log_cats (pargs.r.ret_ulong); + break; case oOptions: /* config files may not be nested (silently ignore them) */ commit 24e121ef261731069868ca403b818f1168237f53 Author: Werner Koch Date: Tue Dec 13 16:55:42 2011 +0100 scd: Introduce a virtual reader table. The vreader table makes the code more clear by explicitly talking about APDU slots and reader indices. It also accommodates for future extensions. * scd/scdaemon.h (server_control_s): Remove READER_SLOT. * scd/scdaemon.c (scd_init_default_ctrl): Do not init READER_SLOT. * scd/app.c (check_application_conflict): Add arg SLOT. * scd/command.c (slot_status_s): Rename to vreader_s. (server_local_s): Add field VREADER_IDX as replacement for the READER_SLOT in server_control_s. Change all users. (slot_table): Rename to vreader_table. Change all users. (vreader_slot): New. (do_reset, cmd_apdu): Map vreader to apdu slot. (get_reader_slot): Rename to get_current_reader. Return -1 on error. (open_card): Map vreader toapdu slot. Pass slot to check_application_conflict. (scd_command_handler): Init VREADER_IDX. (update_reader_status_file): Reset SLOT field on error. diff --git a/scd/app-common.h b/scd/app-common.h index 6a1e2a7..e3d23c2 100644 --- a/scd/app-common.h +++ b/scd/app-common.h @@ -143,7 +143,8 @@ size_t app_help_read_length_of_cert (int slot, int fid, size_t *r_certoff); /*-- app.c --*/ void app_dump_state (void); void application_notify_card_reset (int slot); -gpg_error_t check_application_conflict (ctrl_t ctrl, const char *name); +gpg_error_t check_application_conflict (ctrl_t ctrl, int slot, + const char *name); gpg_error_t select_application (ctrl_t ctrl, int slot, const char *name, app_t *r_app); char *get_supported_applications (void); diff --git a/scd/app.c b/scd/app.c index 6d65236..6f0d756 100644 --- a/scd/app.c +++ b/scd/app.c @@ -213,18 +213,19 @@ application_notify_card_reset (int slot) used to request a specific application and the connection has already done a select_application. */ gpg_error_t -check_application_conflict (ctrl_t ctrl, const char *name) +check_application_conflict (ctrl_t ctrl, int slot, const char *name) { - int slot = ctrl->reader_slot; app_t app; + (void)ctrl; + if (slot < 0 || slot >= DIM (lock_table)) return gpg_error (GPG_ERR_INV_VALUE); app = lock_table[slot].initialized ? lock_table[slot].app : NULL; if (app && app->apptype && name) if ( ascii_strcasecmp (app->apptype, name)) - return gpg_error (GPG_ERR_CONFLICT); + return gpg_error (GPG_ERR_CONFLICT); return 0; } diff --git a/scd/command.c b/scd/command.c index b2a504c..2ade38a 100644 --- a/scd/command.c +++ b/scd/command.c @@ -1,6 +1,6 @@ /* command.c - SCdaemon command handler * Copyright (C) 2001, 2002, 2003, 2004, 2005, - * 2007, 2008, 2009 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2011 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -62,32 +62,37 @@ || gpg_err_code (_r) == GPG_ERR_CARD_REMOVED \ || gpg_err_code (_r) == GPG_ERR_CARD_RESET \ || gpg_err_code (_r) == GPG_ERR_ENODEV ) \ - update_card_removed ((c)->reader_slot, 1); \ + update_card_removed ((c)->server_local->vreader_idx, 1); \ } while (0) -#define IS_LOCKED(c) \ - (locked_session && locked_session != (c)->server_local \ - && (c)->reader_slot != -1 && locked_session->ctrl_backlink \ - && (c)->reader_slot == locked_session->ctrl_backlink->reader_slot) +#define IS_LOCKED(c) \ + (locked_session \ + && locked_session != (c)->server_local \ + && (c)->server_local->vreader_idx != -1 \ + && locked_session->ctrl_backlink \ + && ((c)->server_local->vreader_idx \ + == locked_session->ctrl_backlink->server_local->vreader_idx)) /* Flag indicating that the reader has been disabled. */ static int reader_disabled; -/* This structure is used to keep track of open readers (slots). */ -struct slot_status_s +/* This structure is used to keep track of user readers. To + eventually accommodate this structure for RFID cards, where more + than one card is used per reader, we name it virtual reader. */ +struct vreader_s { int valid; /* True if the other objects are valid. */ - int slot; /* Slot number of the reader or -1 if not open. */ + int slot; /* APDU slot number of the reader or -1 if not open. */ int reset_failed; /* A reset failed. */ int any; /* Flag indicating whether any status check has been done. This is set once to indicate that the status tracking for the slot has been initialized. */ - unsigned int status; /* Last status of the slot. */ - unsigned int changed; /* Last change counter of the slot. */ + unsigned int status; /* Last status of the reader. */ + unsigned int changed; /* Last change counter of the reader. */ }; @@ -114,6 +119,9 @@ struct server_local_s int event_signal; /* Or 0 if not used. */ #endif + /* Index into the vreader table (command.c) or -1 if not open. */ + int vreader_idx; + /* True if the card has been removed and a reset is required to continue operation. */ int card_removed; @@ -132,10 +140,8 @@ struct server_local_s }; -/* The table with information on all used slots. FIXME: This is a - different slot number than the one used by the APDU layer, and - should be renamed. */ -static struct slot_status_s slot_table[10]; +/* The table with information on all used virtual readers. */ +static struct vreader_s vreader_table[10]; /* To keep track of all running sessions, we link all active server @@ -174,25 +180,37 @@ initialize_module_command (void) } -/* Update the CARD_REMOVED element of all sessions using the reader - given by SLOT to VALUE. */ +/* Update the CARD_REMOVED element of all sessions using the virtual + reader given by VRDR to VALUE. */ static void -update_card_removed (int slot, int value) +update_card_removed (int vrdr, int value) { struct server_local_s *sl; for (sl=session_list; sl; sl = sl->next_session) if (sl->ctrl_backlink - && sl->ctrl_backlink->reader_slot == slot) + && sl->ctrl_backlink->server_local->vreader_idx == vrdr) { sl->card_removed = value; } /* Let the card application layer know about the removal. */ if (value) - application_notify_card_reset (slot); + application_notify_card_reset (vrdr); } +/* Helper to return the slot number for a given virtual reader index + VRDR. In case on an error -1 is returned. */ +static int +vreader_slot (int vrdr) +{ + if (vrdr == -1 || !(vrdr >= 0 && vrdr < DIM(vreader_table))) + return -1; + if (!vreader_table [vrdr].valid) + return -1; + return vreader_table[vrdr].slot; +} + /* Check whether the option NAME appears in LINE. Returns 1 or 0. */ static int @@ -279,9 +297,9 @@ hex_to_buffer (const char *string, size_t *r_length) static void do_reset (ctrl_t ctrl, int send_reset) { - int slot = ctrl->reader_slot; + int vrdr = ctrl->server_local->vreader_idx; - if (!(slot == -1 || (slot >= 0 && slot < DIM(slot_table)))) + if (!(vrdr == -1 || (vrdr >= 0 && vrdr < DIM(vreader_table)))) BUG (); /* If there is an active application, release it. Tell all other @@ -297,7 +315,7 @@ do_reset (ctrl_t ctrl, int send_reset) for (sl=session_list; sl; sl = sl->next_session) if (sl->ctrl_backlink - && sl->ctrl_backlink->reader_slot == slot) + && sl->ctrl_backlink->server_local->vreader_idx == vrdr) { sl->app_ctx_marked_for_release = 1; } @@ -306,13 +324,13 @@ do_reset (ctrl_t ctrl, int send_reset) /* If we want a real reset for the card, send the reset APDU and tell the application layer about it. */ - if (slot != -1 && send_reset && !IS_LOCKED (ctrl) ) + if (vrdr != -1 && send_reset && !IS_LOCKED (ctrl) ) { - if (apdu_reset (slot)) + if (apdu_reset (vreader_table[vrdr].slot)) { - slot_table[slot].valid = 0; + vreader_table[vrdr].valid = 0; } - application_notify_card_reset (slot); + application_notify_card_reset (vrdr); } /* If we hold a lock, unlock now. */ @@ -325,21 +343,21 @@ do_reset (ctrl_t ctrl, int send_reset) /* Reset the card removed flag for the current reader. We need to take the lock here so that the ticker thread won't concurrently try to update the file. Calling update_reader_status_file is - required to get hold of the new status of the card in the slot + required to get hold of the new status of the card in the vreader table. */ if (!pth_mutex_acquire (&status_file_update_lock, 0, NULL)) { - log_error ("failed to acquire status_fle_update lock\n"); - ctrl->reader_slot = -1; + log_error ("failed to acquire status_file_update lock\n"); + ctrl->server_local->vreader_idx = -1; return; } update_reader_status_file (0); /* Update slot status table. */ - update_card_removed (slot, 0); /* Clear card_removed flag. */ + update_card_removed (vrdr, 0); /* Clear card_removed flag. */ if (!pth_mutex_release (&status_file_update_lock)) log_error ("failed to release status_file_update lock\n"); /* Do this last, so that the update_card_removed above does its job. */ - ctrl->reader_slot = -1; + ctrl->server_local->vreader_idx = -1; } @@ -379,35 +397,38 @@ option_handler (assuan_context_t ctx, const char *key, const char *value) } -/* Return the slot of the current reader or open the reader if no - other sessions are using a reader. Note, that we currently support +/* Return the index of the current reader or open the reader if no + other sessions are using that reader. If it is not possible to + open the reader -1 is returned. Note, that we currently support only one reader but most of the code (except for this function) should be able to cope with several readers. */ static int -get_reader_slot (void) +get_current_reader (void) { - struct slot_status_s *ss; + struct vreader_s *vr; - ss = &slot_table[0]; /* One reader for now. */ + /* We only support one reader for now. */ + vr = &vreader_table[0]; - /* Initialize the item if needed. */ - if (!ss->valid) + /* Initialize the vreader item if not yet done. */ + if (!vr->valid) { - ss->slot = -1; - ss->valid = 1; + vr->slot = -1; + vr->valid = 1; } /* Try to open the reader. */ - if (ss->slot == -1) + if (vr->slot == -1) { int no_service_flag; - ss->slot = apdu_open_reader (opt.reader_port, &no_service_flag); + + vr->slot = apdu_open_reader (opt.reader_port, &no_service_flag); /* If we still don't have a slot, we have no readers. Invalidate for now until a reader is attached. */ - if(ss->slot == -1) + if (vr->slot == -1) { - ss->valid = 0; + vr->valid = 0; } if (no_service_flag) @@ -417,8 +438,8 @@ get_reader_slot (void) } } - /* Return the slot_table index. */ - return 0; + /* Return the vreader index or -1. */ + return vr->valid ? 0 : -1; } @@ -427,7 +448,7 @@ static gpg_error_t open_card (ctrl_t ctrl, const char *apptype) { gpg_error_t err; - int slot; + int vrdr; if (reader_disabled) return gpg_error (GPG_ERR_NOT_OPERATIONAL); @@ -455,21 +476,25 @@ open_card (ctrl_t ctrl, const char *apptype) need to check that the client didn't requested a specific application different from the one in use before we continue. */ if (ctrl->app_ctx) - return check_application_conflict (ctrl, apptype); + { + return check_application_conflict + (ctrl, vreader_slot (ctrl->server_local->vreader_idx), apptype); + } - /* Setup the slot and select the application. */ - if (ctrl->reader_slot != -1) - slot = ctrl->reader_slot; + /* Setup the vreader and select the application. */ + if (ctrl->server_local->vreader_idx != -1) + vrdr = ctrl->server_local->vreader_idx; else - slot = get_reader_slot (); - ctrl->reader_slot = slot; - if (slot == -1) + vrdr = get_current_reader (); + ctrl->server_local->vreader_idx = vrdr; + if (vrdr == -1) err = gpg_error (reader_disabled? GPG_ERR_NOT_OPERATIONAL: GPG_ERR_CARD); else { /* Fixme: We should move the apdu_connect call to select_application. */ int sw; + int slot = vreader_slot (vrdr); ctrl->server_local->disconnect_allowed = 0; sw = apdu_connect (slot); @@ -1615,8 +1640,8 @@ static const char hlp_getinfo[] = "\n" "socket_name - Return the name of the socket.\n" "\n" - "status - Return the status of the current slot (in the future, may\n" - "also return the status of all slots). The status is a list of\n" + "status - Return the status of the current reader (in the future, may\n" + "also return the status of all readers). The status is a list of\n" "one-character flags. The following flags are currently defined:\n" " 'u' Usable card present. This is the normal state during operation.\n" " 'r' Card removed. A reset is necessary.\n" @@ -1660,22 +1685,22 @@ cmd_getinfo (assuan_context_t ctx, char *line) else if (!strcmp (line, "status")) { ctrl_t ctrl = assuan_get_pointer (ctx); - int slot = ctrl->reader_slot; + int vrdr = ctrl->server_local->vreader_idx; char flag = 'r'; - if (!ctrl->server_local->card_removed && slot != -1) + if (!ctrl->server_local->card_removed && vrdr != -1) { - struct slot_status_s *ss; + struct vreader_s *vr; - if (!(slot >= 0 && slot < DIM(slot_table))) + if (!(vrdr >= 0 && vrdr < DIM(vreader_table))) BUG (); - ss = &slot_table[slot]; + vr = &vreader_table[vrdr]; - if (!ss->valid) + if (!vr->valid) BUG (); - if (ss->any && (ss->status & 1)) + if (vr->any && (vr->status & 1)) flag = 'u'; } rc = assuan_send_data (ctx, &flag, 1); @@ -1790,6 +1815,7 @@ cmd_apdu (assuan_context_t ctx, char *line) int handle_more; const char *s; size_t exlen; + int slot; with_atr = has_option (line, "--atr"); handle_more = has_option (line, "--more"); @@ -1812,13 +1838,15 @@ cmd_apdu (assuan_context_t ctx, char *line) if ((rc = open_card (ctrl, NULL))) return rc; + slot = vreader_slot (ctrl->server_local->vreader_idx); + if (with_atr) { unsigned char *atr; size_t atrlen; char hexbuf[400]; - atr = apdu_get_atr (ctrl->reader_slot, &atrlen); + atr = apdu_get_atr (slot, &atrlen); if (!atr || atrlen > sizeof hexbuf - 2 ) { rc = gpg_error (GPG_ERR_INV_CARD); @@ -1840,7 +1868,7 @@ cmd_apdu (assuan_context_t ctx, char *line) unsigned char *result = NULL; size_t resultlen; - rc = apdu_send_direct (ctrl->reader_slot, exlen, + rc = apdu_send_direct (slot, exlen, apdu, apdulen, handle_more, &result, &resultlen); if (rc) @@ -1990,12 +2018,13 @@ scd_command_handler (ctrl_t ctrl, int fd) session_list = ctrl->server_local; ctrl->server_local->ctrl_backlink = ctrl; ctrl->server_local->assuan_ctx = ctx; + ctrl->server_local->vreader_idx = -1; /* We open the reader right at startup so that the ticker is able to update the status file. */ - if (ctrl->reader_slot == -1) + if (ctrl->server_local->vreader_idx == -1) { - ctrl->reader_slot = get_reader_slot (); + ctrl->server_local->vreader_idx = get_current_reader (); } /* Command processing loop. */ @@ -2197,32 +2226,33 @@ update_reader_status_file (int set_card_removed_flag) int idx; unsigned int status, changed; - /* Make sure that the reader has been opened. Like get_reader_slot, + /* Make sure that a reader has been opened. Like get_current_reader, this part of the code assumes that there is only one reader. */ - if (!slot_table[0].valid) - (void)get_reader_slot (); + if (!vreader_table[0].valid) + (void)get_current_reader (); /* Note, that we only try to get the status, because it does not make sense to wait here for a operation to complete. If we are busy working with a card, delays in the status file update should be acceptable. */ - for (idx=0; idx < DIM(slot_table); idx++) + for (idx=0; idx < DIM(vreader_table); idx++) { - struct slot_status_s *ss = slot_table + idx; + struct vreader_s *vr = vreader_table + idx; struct server_local_s *sl; int sw_apdu; - if (!ss->valid || ss->slot == -1) + if (!vr->valid || vr->slot == -1) continue; /* Not valid or reader not yet open. */ - sw_apdu = apdu_get_status (ss->slot, 0, &status, &changed); + sw_apdu = apdu_get_status (vr->slot, 0, &status, &changed); if (sw_apdu == SW_HOST_NO_READER) { /* Most likely the _reader_ has been unplugged. */ - apdu_close_reader(ss->slot); - ss->valid = 0; + apdu_close_reader (vr->slot); + vr->slot = -1; + vr->valid = 0; status = 0; - changed = ss->changed; + changed = vr->changed; } else if (sw_apdu) { @@ -2230,21 +2260,21 @@ update_reader_status_file (int set_card_removed_flag) continue; } - if (!ss->any || ss->status != status || ss->changed != changed ) + if (!vr->any || vr->status != status || vr->changed != changed ) { char *fname; char templ[50]; FILE *fp; - log_info ("updating slot %d status: 0x%04X->0x%04X (%u->%u)\n", - ss->slot, ss->status, status, ss->changed, changed); - ss->status = status; - ss->changed = changed; + log_info ("updating reader %d (%d) status: 0x%04X->0x%04X (%u->%u)\n", + idx, vr->slot, vr->status, status, vr->changed, changed); + vr->status = status; + vr->changed = changed; - /* FIXME: Should this be IDX instead of ss->slot? This + /* FIXME: Should this be IDX instead of vr->slot? This depends on how client sessions will associate the reader status with their session. */ - snprintf (templ, sizeof templ, "reader_%d.status", ss->slot); + snprintf (templ, sizeof templ, "reader_%d.status", vr->slot); fname = make_filename (opt.homedir, templ, NULL ); fp = fopen (fname, "w"); if (fp) @@ -2272,8 +2302,8 @@ update_reader_status_file (int set_card_removed_flag) envs[0] = envstr; envs[1] = NULL; - sprintf (numbuf1, "%d", ss->slot); - sprintf (numbuf2, "0x%04X", ss->status); + sprintf (numbuf1, "%d", vr->slot); + sprintf (numbuf2, "0x%04X", vr->status); sprintf (numbuf3, "0x%04X", status); args[0] = "--reader-port"; args[1] = numbuf1; @@ -2301,10 +2331,10 @@ update_reader_status_file (int set_card_removed_flag) /* Set the card removed flag for all current sessions. We will set this on any card change because a reset or SERIALNO request must be done in any case. */ - if (ss->any && set_card_removed_flag) + if (vr->any && set_card_removed_flag) update_card_removed (idx, 1); - ss->any = 1; + vr->any = 1; /* Send a signal to all clients who applied for it. */ send_client_notifications (); @@ -2320,8 +2350,9 @@ update_reader_status_file (int set_card_removed_flag) { /* FIXME: Use a real timeout. */ /* At least one connection and all allow a disconnect. */ - log_info ("disconnecting card in slot %d\n", ss->slot); - apdu_disconnect (ss->slot); + log_info ("disconnecting card in reader %d (%d)\n", + idx, vr->slot); + apdu_disconnect (vr->slot); } } diff --git a/scd/scdaemon.c b/scd/scdaemon.c index 0999847..b4eee39 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -913,7 +913,7 @@ scd_exit (int rc) static void scd_init_default_ctrl (ctrl_t ctrl) { - ctrl->reader_slot = -1; + (void)ctrl; } static void diff --git a/scd/scdaemon.h b/scd/scdaemon.h index 0cf2f24..4c0a663 100644 --- a/scd/scdaemon.h +++ b/scd/scdaemon.h @@ -97,9 +97,6 @@ struct server_control_s /* Local data of the server; used only in command.c. */ struct server_local_s *server_local; - /* Slot of the open reader or -1 if not open. */ - int reader_slot; - /* The application context used with this connection or NULL if none associated. Note that this is shared with the other connections: All connections accessing the same reader are using the same ----------------------------------------------------------------------- Summary of changes: common/asshelp.c | 13 +++ common/asshelp.h | 1 + doc/scdaemon.texi | 47 +++++++----- scd/apdu.c | 205 ++++++++++++++++++++++++++++++++--------------- scd/apdu.h | 1 - scd/app-common.h | 3 +- scd/app.c | 7 +- scd/command.c | 228 +++++++++++++++++++++++++++++++---------------------- scd/scdaemon.c | 7 ++- scd/scdaemon.h | 7 +- 10 files changed, 331 insertions(+), 188 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Dec 14 16:38:23 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 14 Dec 2011 16:38:23 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-158-g45cf9de Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 45cf9de341405a228e331bd3893cbcd6b72306be (commit) from 2d91febbd8d30beb7eb33f7aa80ffd5691d1d3cc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 45cf9de341405a228e331bd3893cbcd6b72306be Author: Werner Koch Date: Wed Dec 14 15:42:28 2011 +0100 agent: Pass comment lines from scd verbatim thru gpg-agent. * agent/call-scd.c (pass_status_thru): Pass comment lines verbatim. * tools/gpg-connect-agent.c (help_cmd_p): New. (main): Treat an "SCD HELP" the same as "HELP". diff --git a/NEWS b/NEWS index 08d6bfe..4364405 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,19 @@ Noteworthy changes in version 2.1.0beta3 * The Assuan commands KILLAGENT and KILLSCD are working again. + * SCdaemon does not anymore block after changing a card (regression + fix). + + * gpg-connect-agent does now proberly display the help output for + "SCD HELP" commands. + + * New GPGSM validation model "steed". + + * Improved certificate creation in GPGSM. + + * New option for GPG_AGENT to select a passphrase mode. The loopback + mode may be used to bypass Pinentry. + Noteworthy changes in version 2.1.0beta2 (2011-03-08) ----------------------------------------------------- diff --git a/agent/call-scd.c b/agent/call-scd.c index 74f94c0..3f535db 100644 --- a/agent/call-scd.c +++ b/agent/call-scd.c @@ -1,5 +1,6 @@ /* call-scd.c - fork of the scdaemon to do SC operations - * Copyright (C) 2001, 2002, 2005, 2007, 2010 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2005, 2007, 2010, + * 2011 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -1129,16 +1130,28 @@ pass_status_thru (void *opaque, const char *line) char keyword[200]; int i; - for (i=0; *line && !spacep (line) && i < DIM(keyword)-1; line++, i++) - keyword[i] = *line; - keyword[i] = 0; - /* truncate any remaining keyword stuff. */ - for (; *line && !spacep (line); line++) - ; - while (spacep (line)) - line++; + if (line[0] == '#' && (!line[1] || spacep (line+1))) + { + /* We are called in convey comments mode. Now, if we see a + comment marker as keyword we forward the line verbatim to the + the caller. This way the comment lines from scdaemon won't + appear as status lines with keyword '#'. */ + assuan_write_line (ctx, line); + } + else + { + for (i=0; *line && !spacep (line) && i < DIM(keyword)-1; line++, i++) + keyword[i] = *line; + keyword[i] = 0; - assuan_write_status (ctx, keyword, line); + /* Truncate any remaining keyword stuff. */ + for (; *line && !spacep (line); line++) + ; + while (spacep (line)) + line++; + + assuan_write_status (ctx, keyword, line); + } return 0; } diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c index 8de67bb..117f338 100644 --- a/tools/gpg-connect-agent.c +++ b/tools/gpg-connect-agent.c @@ -67,25 +67,25 @@ enum cmd_and_opt_values /* The list of commands and options. */ static ARGPARSE_OPTS opts[] = { ARGPARSE_group (301, N_("@\nOptions:\n ")), - + ARGPARSE_s_n (oVerbose, "verbose", N_("verbose")), ARGPARSE_s_n (oQuiet, "quiet", N_("quiet")), ARGPARSE_s_n (oHex, "hex", N_("print data out hex encoded")), ARGPARSE_s_n (oDecode,"decode", N_("decode received data lines")), - ARGPARSE_s_s (oRawSocket, "raw-socket", + ARGPARSE_s_s (oRawSocket, "raw-socket", N_("|NAME|connect to Assuan socket NAME")), - ARGPARSE_s_s (oTcpSocket, "tcp-socket", + ARGPARSE_s_s (oTcpSocket, "tcp-socket", N_("|ADDR|connect to Assuan server at ADDR")), - ARGPARSE_s_n (oExec, "exec", + ARGPARSE_s_n (oExec, "exec", N_("run the Assuan server given on the command line")), ARGPARSE_s_n (oNoExtConnect, "no-ext-connect", N_("do not use extended connect mode")), - ARGPARSE_s_s (oRun, "run", + ARGPARSE_s_s (oRun, "run", N_("|FILE|run commands from FILE on startup")), - ARGPARSE_s_n (oSubst, "subst", N_("run /subst on startup")), + ARGPARSE_s_n (oSubst, "subst", N_("run /subst on startup")), ARGPARSE_s_n (oNoVerbose, "no-verbose", "@"), - ARGPARSE_s_s (oHomedir, "homedir", "@" ), + ARGPARSE_s_s (oHomedir, "homedir", "@" ), ARGPARSE_s_s (oAgentProgram, "agent-program", "@"), ARGPARSE_end () @@ -216,7 +216,7 @@ gnu_getcwd (void) #ifdef HAVE_W32CE_SYSTEM strcpy (buffer, "/"); return buffer; -#else +#else if (getcwd (buffer, size) == buffer) return buffer; xfree (buffer); @@ -246,22 +246,22 @@ unescape_string (const char *string) { switch (*s) { - case 'b': - case 't': - case 'v': - case 'n': - case 'f': - case 'r': - case '"': - case '\'': + case 'b': + case 't': + case 'v': + case 'n': + case 'f': + case 'r': + case '"': + case '\'': case '\\': n++; break; - case 'x': + case 'x': if (s[1] && s[2] && hexdigitp (s+1) && hexdigitp (s+2)) n++; break; default: - if (s[1] && s[2] + if (s[1] && s[2] && octdigitp (s) && octdigitp (s+1) && octdigitp (s+2)) n++; break; @@ -272,7 +272,7 @@ unescape_string (const char *string) esc = 1; else n++; - } + } buffer = xmalloc (n+1); d = (unsigned char*)buffer; @@ -291,7 +291,7 @@ unescape_string (const char *string) case '"': *d++ = '\"'; break; case '\'': *d++ = '\''; break; case '\\': *d++ = '\\'; break; - case 'x': + case 'x': if (s[1] && s[2] && hexdigitp (s+1) && hexdigitp (s+2)) { s++; @@ -301,7 +301,7 @@ unescape_string (const char *string) break; default: - if (s[1] && s[2] + if (s[1] && s[2] && octdigitp (s) && octdigitp (s+1) && octdigitp (s+2)) { *d++ = (atoi_1 (s)*64) + (atoi_1 (s+1)*8) + atoi_1 (s+2); @@ -315,7 +315,7 @@ unescape_string (const char *string) esc = 1; else *d++ = *s; - } + } *d = 0; return buffer; } @@ -334,7 +334,7 @@ unpercent_string (const char *string, int with_plus) for (s=(const unsigned char *)string; *s; s++) { if (*s == '%' && s[1] && s[2]) - { + { s++; n++; s++; @@ -350,7 +350,7 @@ unpercent_string (const char *string, int with_plus) for (s=(const unsigned char *)string; *s; s++) { if (*s == '%' && s[1] && s[2]) - { + { s++; *p++ = xtoi_2 (s); s++; @@ -387,7 +387,7 @@ set_var (const char *name, const char *value) xfree (var->value); var->value = value? xstrdup (value) : NULL; return var->value; -} +} static void @@ -455,12 +455,12 @@ arithmetic_op (int operator, const char *operands) case '+': result += value; break; case '-': result -= value; break; case '*': result *= value; break; - case '/': + case '/': if (!value) return NULL; result /= value; break; - case '%': + case '%': if (!value) return NULL; result %= value; @@ -480,10 +480,10 @@ arithmetic_op (int operator, const char *operands) /* Extended version of get_var. This returns a malloced string and - understand the function syntax: "func args". + understand the function syntax: "func args". Defined functions are - + get - Return a value described by the next argument: cwd - The current working directory. homedir - The gnupg homedir. @@ -525,7 +525,7 @@ arithmetic_op (int operator, const char *operands) Example: get_var_ext ("get sysconfdir") -> "/etc/gnupg" - + */ static char * get_var_ext (const char *name) @@ -630,7 +630,7 @@ get_var_ext (const char *name) { s++; intvalue = (int)strtol (s, NULL, 0); - result = xasprintf ("%s <%s>", + result = xasprintf ("%s <%s>", gpg_strerror (intvalue), gpg_strsource (intvalue)); } else if ( (s - name) == 1 && strchr ("+-*/%!|&", *name)) @@ -642,7 +642,7 @@ get_var_ext (const char *name) log_error ("unknown variable function `%.*s'\n", (int)(s-name), name); result = NULL; } - + xfree (free_me); recursion_count--; return result; @@ -667,7 +667,7 @@ substitute_line (char *buffer) p = strchr (line, '$'); if (!p) return result; /* No more variables. */ - + if (p[1] == '$') /* Escaped dollar sign. */ { memmove (p, p+1, strlen (p+1)+1); @@ -751,7 +751,7 @@ static char * substitute_line_copy (const char *buffer) { char *result, *p; - + p = xstrdup (buffer?buffer:""); result = substitute_line (p); if (!result) @@ -777,7 +777,7 @@ assign_variable (char *line, int syslet) p++; if (!*p) - set_var (name, NULL); /* Remove variable. */ + set_var (name, NULL); /* Remove variable. */ else if (syslet) { free_me = opt.enable_varsubst? substitute_line_copy (p) : NULL; @@ -791,7 +791,7 @@ assign_variable (char *line, int syslet) xfree (tmp); xfree (free_me); } - else + else { tmp = opt.enable_varsubst? substitute_line_copy (p) : NULL; if (tmp) @@ -857,11 +857,11 @@ show_definq (void) for (d=definq_list; d; d = d->next) if (d->name) - printf ("%-20s %c %s\n", + printf ("%-20s %c %s\n", d->name, d->is_var? 'v' : d->is_prog? 'p':'f', d->file); for (d=definq_list; d; d = d->next) if (!d->name) - printf ("%-20s %c %s\n", "*", + printf ("%-20s %c %s\n", "*", d->is_var? 'v': d->is_prog? 'p':'f', d->file); } @@ -871,14 +871,14 @@ static void clear_definq (void) { while (definq_list) - { + { definq_t tmp = definq_list->next; xfree (definq_list->name); xfree (definq_list); definq_list = tmp; } definq_list_tail = &definq_list; -} +} static void @@ -1005,7 +1005,7 @@ do_open (char *line) HANDLE prochandle, handle, newhandle; handle = (void*)_get_osfhandle (fd); - + prochandle = OpenProcess (PROCESS_DUP_HANDLE, FALSE, server_pid); if (!prochandle) { @@ -1030,7 +1030,7 @@ do_open (char *line) log_info ("file `%s' opened in \"%s\" mode, fd=%d (libc=%d)\n", name, mode, (int)open_fd_table[fd].handle, fd); set_int_var (varname, (int)open_fd_table[fd].handle); -#else +#else if (opt.verbose) log_info ("file `%s' opened in \"%s\" mode, fd=%d\n", name, mode, fd); @@ -1117,14 +1117,14 @@ do_serverpid (assuan_context_t ctx) int rc; membuf_t mb; char *buffer; - + init_membuf (&mb, 100); rc = assuan_transact (ctx, "GETINFO pid", getinfo_pid_cb, &mb, NULL, NULL, NULL, NULL); put_membuf (&mb, "", 1); buffer = get_membuf (&mb, NULL); if (rc || !buffer) - log_error ("command \"%s\" failed: %s\n", + log_error ("command \"%s\" failed: %s\n", "GETINFO pid", gpg_strerror (rc)); else { @@ -1136,6 +1136,22 @@ do_serverpid (assuan_context_t ctx) } +/* Return true if the command is either "HELP" or "SCD HELP". */ +static int +help_cmd_p (const char *line) +{ + if (!ascii_strncasecmp (line, "SCD", 3) + && (spacep (line+3) || !line[3])) + { + for (line += 3; spacep (line); line++) + ; + } + + return (!ascii_strncasecmp (line, "HELP", 4) + && (spacep (line+4) || !line[4])); +} + + /* gpg-connect-agent's entry point. */ int main (int argc, char **argv) @@ -1156,7 +1172,7 @@ main (int argc, char **argv) loopline_t head; loopline_t *tail; loopline_t current; - unsigned int nestlevel; + unsigned int nestlevel; int oneshot; char *condition; } loopstack[20]; @@ -1197,7 +1213,7 @@ main (int argc, char **argv) case oExec: opt.exec = 1; break; case oNoExtConnect: opt.connect_flags &= ~(1); break; case oRun: opt_run = pargs.r.ret_str; break; - case oSubst: + case oSubst: opt.enable_varsubst = 1; opt.trim_leading_spaces = 1; break; @@ -1339,7 +1355,7 @@ main (int argc, char **argv) log_info (_("receiving line failed: %s\n"), gpg_strerror (rc) ); } - + for (loopidx=0; loopidx < DIM (loopstack); loopidx++) loopstack[loopidx].collecting = 0; loopidx = -1; @@ -1396,7 +1412,7 @@ main (int argc, char **argv) linesize = 0; keep_line = 1; } - n = read_line (script_fp? script_fp:stdin, + n = read_line (script_fp? script_fp:stdin, &line, &linesize, &maxlength); } if (n < 0) @@ -1422,7 +1438,7 @@ main (int argc, char **argv) log_info ("end of script\n"); continue; } - break; + break; } if (!maxlength) { @@ -1433,11 +1449,11 @@ main (int argc, char **argv) log_info (_("line shortened due to embedded Nul character\n")); if (line[n-1] == '\n') line[n-1] = 0; - + if (opt.trim_leading_spaces) { const char *s = line; - + while (spacep (s)) s++; if (s != line) @@ -1463,7 +1479,7 @@ main (int argc, char **argv) loopstack[loopidx+1].nestlevel--; else if (!strncmp (line, "/while", 6) && (!line[6]||spacep(line+6))) loopstack[loopidx+1].nestlevel++; - + if (loopstack[loopidx+1].nestlevel) continue; /* We reached the corresponding /end. */ @@ -1546,7 +1562,7 @@ main (int argc, char **argv) { current_datasink = fopen (fname, "wb"); if (!current_datasink) - log_error ("can't open `%s': %s\n", + log_error ("can't open `%s': %s\n", fname, strerror (errno)); } xfree (tmpline); @@ -1783,7 +1799,7 @@ main (int argc, char **argv) "/cleardef Delete all definitions.\n" "/sendfd FILE MODE Open FILE and pass descriptor to server.\n" "/recvfd Receive FD from server and print.\n" -"/open VAR FILE MODE Open FILE and assign the file descriptor to VAR.\n" +"/open VAR FILE MODE Open FILE and assign the file descriptor to VAR.\n" "/close FD Close file with descriptor FD.\n" "/showopen Show descriptors of all open files.\n" "/serverpid Retrieve the pid of the server.\n" @@ -1799,7 +1815,7 @@ main (int argc, char **argv) } else log_error (_("unknown command `%s'\n"), cmd ); - + continue; } @@ -1822,9 +1838,7 @@ main (int argc, char **argv) if (*line == '#' || !*line) continue; /* Don't expect a response for a comment line. */ - rc = read_and_print_response (ctx, (!ascii_strncasecmp (line, "HELP", 4) - && (spacep (line+4) || !line[4])), - &cmderr); + rc = read_and_print_response (ctx, help_cmd_p (line), &cmderr); if (rc) log_info (_("receiving line failed: %s\n"), gpg_strerror (rc) ); if ((rc || cmderr) && script_fp) @@ -1833,7 +1847,7 @@ main (int argc, char **argv) fclose (script_fp); script_fp = NULL; } - + /* FIXME: If the last command was BYE or the server died for some other reason, we won't notice until we get the next @@ -1844,8 +1858,8 @@ main (int argc, char **argv) if (opt.verbose) log_info ("closing connection to agent\n"); - - return 0; + + return 0; } @@ -1911,7 +1925,7 @@ handle_inquire (assuan_context_t ctx, char *line) log_error ("error executing `%s': %s\n", d->file, strerror (errno)); else if (opt.verbose) - log_error ("handling inquiry `%s' by running `%s'\n", + log_error ("handling inquiry `%s' by running `%s'\n", name, d->file); } else @@ -1974,7 +1988,7 @@ read_and_print_response (assuan_context_t ctx, int withhash, int *r_goterr) *r_goterr = 0; for (;;) { - do + do { rc = assuan_read_line (ctx, &line, &linelen); if (rc) @@ -1985,7 +1999,7 @@ read_and_print_response (assuan_context_t ctx, int withhash, int *r_goterr) fwrite (line, linelen, 1, stdout); putchar ('\n'); } - } + } while (*line == '#' || !linelen); if (linelen >= 1 @@ -1999,7 +2013,7 @@ read_and_print_response (assuan_context_t ctx, int withhash, int *r_goterr) for (j=2, s=(unsigned char*)line+2; j < linelen; j++, s++ ) { if (*s == '%' && j+2 < linelen) - { + { s++; j++; c = xtoi_2 ( s ); s++; j++; @@ -2054,7 +2068,7 @@ read_and_print_response (assuan_context_t ctx, int withhash, int *r_goterr) need_d = 0; } if (*s == '%' && j+2 < linelen) - { + { s++; j++; c = xtoi_2 ( s ); s++; j++; @@ -2073,7 +2087,7 @@ read_and_print_response (assuan_context_t ctx, int withhash, int *r_goterr) putchar ('\n'); } } - else + else { if (need_lf) { @@ -2083,7 +2097,7 @@ read_and_print_response (assuan_context_t ctx, int withhash, int *r_goterr) } if (linelen >= 1 - && line[0] == 'S' + && line[0] == 'S' && (line[1] == '\0' || line[1] == ' ')) { if (!current_datasink || current_datasink != stdout) @@ -2091,7 +2105,7 @@ read_and_print_response (assuan_context_t ctx, int withhash, int *r_goterr) fwrite (line, linelen, 1, stdout); putchar ('\n'); } - } + } else if (linelen >= 2 && line[0] == 'O' && line[1] == 'K' && (line[2] == '\0' || line[2] == ' ')) @@ -2121,11 +2135,11 @@ read_and_print_response (assuan_context_t ctx, int withhash, int *r_goterr) } *r_goterr = 1; return 0; - } + } else if (linelen >= 7 && line[0] == 'I' && line[1] == 'N' && line[2] == 'Q' && line[3] == 'U' && line[4] == 'I' && line[5] == 'R' - && line[6] == 'E' + && line[6] == 'E' && (line[7] == '\0' || line[7] == ' ')) { if (!current_datasink || current_datasink != stdout) ----------------------------------------------------------------------- Summary of changes: NEWS | 13 ++++ agent/call-scd.c | 33 +++++++--- tools/gpg-connect-agent.c | 156 ++++++++++++++++++++++++-------------------- 3 files changed, 121 insertions(+), 81 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Dec 15 16:14:21 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 15 Dec 2011 16:14:21 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-163-gb22d62b Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via b22d62bd1481dfe13d60a6d16b09b9297944f063 (commit) via 7737a2c269657189a583cde7f214f20871d264f8 (commit) via 792e137ec7997a0ff5c54ff970611238d28d4ba8 (commit) via 0bac31ee9f74a25d76b08c3e0355a338908f083a (commit) via dcd64131c60efd0189aa05d5dbce6b93547b04e3 (commit) from 45cf9de341405a228e331bd3893cbcd6b72306be (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b22d62bd1481dfe13d60a6d16b09b9297944f063 Author: Werner Koch Date: Thu Dec 15 14:47:04 2011 +0100 scd: Add option --dump-atr to command APDU. * scd/atr.c: Rewrite. * scd/Makefile.am (scdaemon_SOURCES): Add atr.c and atr.h. * scd/command.c (cmd_apdu): Add option --dump-atr. diff --git a/scd/Makefile.am b/scd/Makefile.am index bdd457a..b42e53d 100644 --- a/scd/Makefile.am +++ b/scd/Makefile.am @@ -37,6 +37,7 @@ card_apps = app-openpgp.c app-nks.c app-dinsig.c app-p15.c app-geldkarte.c scdaemon_SOURCES = \ scdaemon.c scdaemon.h \ command.c \ + atr.c atr.h \ apdu.c apdu.h \ ccid-driver.c ccid-driver.h \ iso7816.c iso7816.h \ diff --git a/scd/atr.c b/scd/atr.c index 16f26fb..b8668a4 100644 --- a/scd/atr.c +++ b/scd/atr.c @@ -1,5 +1,5 @@ /* atr.c - ISO 7816 ATR fucntions - * Copyright (C) 2003 Free Software Foundation, Inc. + * Copyright (C) 2003, 2011 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -24,10 +24,9 @@ #include #include -#include "scdaemon.h" -#include "apdu.h" +#include "../common/estream.h" +#include "../common/logging.h" #include "atr.h" -#include "dynload.h" static int const fi_table[16] = { 0, 372, 558, 744, 1116,1488, 1860, -1, -1, 512, 768, 1024, 1536, 2048, -1, -1 }; @@ -35,37 +34,42 @@ static int const di_table[16] = { -1, 1, 2, 4, 8, 16, -1, -1, 0, -1, -2, -4, -8, -16, -32, -64}; -/* Dump the ATR of the card at SLOT in a human readable format to - stream FP. */ -int -atr_dump (int slot, FILE *fp) +/* Dump the ATR in (BUFFER,BUFLEN) to a human readable format and + return that as a malloced buffer. The caller must release this + buffer using es_free! On error this function returns NULL and sets + ERRNO. */ +char * +atr_dump (const void *buffer, size_t buflen) { - unsigned char *atrbuffer, *atr; - size_t atrlen; + const unsigned char *atr = buffer; + size_t atrlen = buflen; + estream_t fp; int have_ta, have_tb, have_tc, have_td; int n_historical; int idx, val; unsigned char chksum; + char *result; - atr = atrbuffer = apdu_get_atr (slot, &atrlen); - if (!atr) - return gpg_error (GPG_ERR_GENERAL); + fp = es_fopenmem (0, "rwb"); + if (!fp) + return NULL; - fprintf (fp, "Info on ATR of length %u at slot %d\n", - (unsigned int)atrlen, slot); if (!atrlen) { - fprintf (fp, "error: empty ATR\n"); + es_fprintf (fp, "error: empty ATR\n"); goto bailout; } + for (idx=0; idx < atrlen ; idx++) + es_fprintf (fp, "%s%02X", idx?" ":"", atr[idx]); + es_putc ('\n', fp); if (*atr == 0x3b) - fputs ("direct convention\n", fp); + es_fputs ("Direct convention\n", fp); else if (*atr == 0x3f) - fputs ("inverse convention\n", fp); + es_fputs ("Inverse convention\n", fp); else - fprintf (fp,"error: invalid TS character 0x%02x\n", *atr); + es_fprintf (fp,"error: invalid TS character 0x%02x\n", *atr); if (!--atrlen) goto bailout; atr++; @@ -79,34 +83,34 @@ atr_dump (int slot, FILE *fp) have_tc = !!(*atr & 0x40); have_td = !!(*atr & 0x80); n_historical = (*atr & 0x0f); - fprintf (fp, "%d historical characters indicated\n", n_historical); + es_fprintf (fp, "%d historical characters indicated\n", n_historical); if (have_ta + have_tb + have_tc + have_td + n_historical > atrlen) - fputs ("error: ATR shorter than indicated by format character\n", fp); + es_fputs ("error: ATR shorter than indicated by format character\n", fp); if (!--atrlen) goto bailout; atr++; if (have_ta) { - fputs ("TA1: F=", fp); + es_fputs ("TA1: F=", fp); val = fi_table[(*atr >> 4) & 0x0f]; if (!val) - fputs ("internal clock", fp); + es_fputs ("internal clock", fp); else if (val == -1) - fputs ("RFU", fp); + es_fputs ("RFU", fp); else - fprintf (fp, "%d", val); - fputs (" D=", fp); + es_fprintf (fp, "%d", val); + es_fputs (" D=", fp); val = di_table[*atr & 0x0f]; if (!val) - fputs ("[impossible value]\n", fp); + es_fputs ("[impossible value]\n", fp); else if (val == -1) - fputs ("RFU\n", fp); + es_fputs ("RFU\n", fp); else if (val < 0 ) - fprintf (fp, "1/%d\n", val); + es_fprintf (fp, "1/%d\n", val); else - fprintf (fp, "%d\n", val); + es_fprintf (fp, "%d\n", val); if (!--atrlen) goto bailout; @@ -115,8 +119,9 @@ atr_dump (int slot, FILE *fp) if (have_tb) { - fprintf (fp, "TB1: II=%d PI1=%d%s\n", (*atr >> 5) & 3, *atr & 0x1f, - (*atr & 0x80)? " [high bit not cleared]":""); + es_fprintf (fp, "TB1: II=%d PI1=%d%s\n", + ((*atr >> 5) & 3), (*atr & 0x1f), + (*atr & 0x80)? " [high bit not cleared]":""); if (!--atrlen) goto bailout; atr++; @@ -125,9 +130,9 @@ atr_dump (int slot, FILE *fp) if (have_tc) { if (*atr == 255) - fputs ("TC1: guard time shortened to 1 etu\n", fp); + es_fputs ("TC1: guard time shortened to 1 etu\n", fp); else - fprintf (fp, "TC1: (extra guard time) N=%d\n", *atr); + es_fprintf (fp, "TC1: (extra guard time) N=%d\n", *atr); if (!--atrlen) goto bailout; @@ -140,10 +145,11 @@ atr_dump (int slot, FILE *fp) have_tb = !!(*atr & 0x20); have_tc = !!(*atr & 0x40); have_td = !!(*atr & 0x80); - fprintf (fp, "TD1: protocol T%d supported\n", *atr & 0x0f); + es_fprintf (fp, "TD1: protocol T%d supported\n", (*atr & 0x0f)); if (have_ta + have_tb + have_tc + have_td + n_historical > atrlen) - fputs ("error: ATR shorter than indicated by format character\n", fp); + es_fputs ("error: ATR shorter than indicated by format character\n", + fp); if (!--atrlen) goto bailout; @@ -154,12 +160,12 @@ atr_dump (int slot, FILE *fp) if (have_ta) { - fprintf (fp, "TA2: (PTS) %stoggle, %splicit, T=%02X\n", - (*atr & 0x80)? "no-":"", - (*atr & 0x10)? "im": "ex", - (*atr & 0x0f)); + es_fprintf (fp, "TA2: (PTS) %stoggle, %splicit, T=%02X\n", + (*atr & 0x80)? "no-":"", + (*atr & 0x10)? "im": "ex", + (*atr & 0x0f)); if ((*atr & 0x60)) - fprintf (fp, "note: reserved bits are set (TA2=0x%02X)\n", *atr); + es_fprintf (fp, "note: reserved bits are set (TA2=0x%02X)\n", *atr); if (!--atrlen) goto bailout; atr++; @@ -167,7 +173,7 @@ atr_dump (int slot, FILE *fp) if (have_tb) { - fprintf (fp, "TB2: PI2=%d\n", *atr); + es_fprintf (fp, "TB2: PI2=%d\n", *atr); if (!--atrlen) goto bailout; atr++; @@ -175,7 +181,7 @@ atr_dump (int slot, FILE *fp) if (have_tc) { - fprintf (fp, "TC2: PWI=%d\n", *atr); + es_fprintf (fp, "TC2: PWI=%d\n", *atr); if (!--atrlen) goto bailout; atr++; @@ -187,10 +193,11 @@ atr_dump (int slot, FILE *fp) have_tb = !!(*atr & 0x20); have_tc = !!(*atr & 0x40); have_td = !!(*atr & 0x80); - fprintf (fp, "TD2: protocol T%d supported\n", *atr & 0x0f); + es_fprintf (fp, "TD2: protocol T%d supported\n", *atr & 0x0f); if (have_ta + have_tb + have_tc + have_td + n_historical > atrlen) - fputs ("error: ATR shorter than indicated by format character\n", fp); + es_fputs ("error: ATR shorter than indicated by format character\n", + fp); if (!--atrlen) goto bailout; @@ -203,7 +210,7 @@ atr_dump (int slot, FILE *fp) { if (have_ta) { - fprintf (fp, "TA%d: IFSC=%d\n", idx, *atr); + es_fprintf (fp, "TA%d: IFSC=%d\n", idx, *atr); if (!--atrlen) goto bailout; atr++; @@ -211,7 +218,7 @@ atr_dump (int slot, FILE *fp) if (have_tb) { - fprintf (fp, "TB%d: BWI=%d CWI=%d\n", + es_fprintf (fp, "TB%d: BWI=%d CWI=%d\n", idx, (*atr >> 4) & 0x0f, *atr & 0x0f); if (!--atrlen) goto bailout; @@ -220,7 +227,7 @@ atr_dump (int slot, FILE *fp) if (have_tc) { - fprintf (fp, "TC%d: 0x%02X\n", idx, *atr); + es_fprintf (fp, "TC%d: 0x%02X\n", idx, *atr); if (!--atrlen) goto bailout; atr++; @@ -232,11 +239,12 @@ atr_dump (int slot, FILE *fp) have_tb = !!(*atr & 0x20); have_tc = !!(*atr & 0x40); have_td = !!(*atr & 0x80); - fprintf (fp, "TD%d: protocol T%d supported\n", idx, *atr & 0x0f); + es_fprintf (fp, "TD%d: protocol T%d supported\n", idx, *atr & 0x0f); if (have_ta + have_tb + have_tc + have_td + n_historical > atrlen) - fputs ("error: ATR shorter than indicated by format character\n", - fp); + es_fputs ("error: " + "ATR shorter than indicated by format character\n", + fp); if (!--atrlen) goto bailout; @@ -247,150 +255,36 @@ atr_dump (int slot, FILE *fp) } if (n_historical + 1 > atrlen) - fputs ("error: ATR shorter than required for historical bytes " - "and checksum\n", fp); + es_fputs ("error: ATR shorter than required for historical bytes " + "and checksum\n", fp); if (n_historical) { - fputs ("Historical:", fp); + es_fputs ("HCH:", fp); for (; n_historical && atrlen ; n_historical--, atrlen--, atr++) - fprintf (fp, " %02X", *atr); - putchar ('\n'); + es_fprintf (fp, " %02X", *atr); + es_putc ('\n', fp); } if (!atrlen) - fputs ("error: checksum missing\n", fp); + es_fputs ("error: checksum missing\n", fp); else if (*atr == chksum) - fprintf (fp, "TCK: %02X (good)\n", *atr); + es_fprintf (fp, "TCK: %02X (good)\n", *atr); else - fprintf (fp, "TCK: %02X (bad; calculated %02X)\n", *atr, chksum); + es_fprintf (fp, "TCK: %02X (bad; computed %02X)\n", *atr, chksum); atrlen--; if (atrlen) - fprintf (fp, "error: %u bytes garbage at end of ATR\n", - (unsigned int)atrlen ); + es_fprintf (fp, "error: %u bytes garbage at end of ATR\n", + (unsigned int)atrlen ); bailout: - xfree (atrbuffer); - - return 0; -} - - -/* Note: This code has not yet been tested! It shall return -1 on - error or the number of historical bytes and store them at - HISTORICAL. */ -int -atr_get_historical (int slot, unsigned char historical[]) -{ - int result = -1; - unsigned char *atrbuffer = NULL; - unsigned char *atr; - size_t atrlen; - int have_ta, have_tb, have_tc, have_td; - int n_historical; - int idx; - unsigned char chksum; - - atr = atrbuffer = apdu_get_atr (slot, &atrlen); - if (!atr || atrlen < 2) - goto leave; - atrlen--; - atr++; - - chksum = *atr; - for (idx=1; idx < atrlen-1; idx++) - chksum ^= atr[idx]; - - have_ta = !!(*atr & 0x10); - have_tb = !!(*atr & 0x20); - have_tc = !!(*atr & 0x40); - have_td = !!(*atr & 0x80); - n_historical = (*atr & 0x0f); - - if (have_ta + have_tb + have_tc + have_td + n_historical >= atrlen) - goto leave; /* ATR shorter than indicated by format character. */ - atrlen--; - atr++; - - if (have_ta + have_tb + have_tc >= atrlen) - goto leave; - atrlen -= have_ta + have_tb + have_tc; - atr += have_ta + have_tb + have_tc; - - if (have_td) - { - have_ta = !!(*atr & 0x10); - have_tb = !!(*atr & 0x20); - have_tc = !!(*atr & 0x40); - have_td = !!(*atr & 0x80); - if (have_ta + have_tb + have_tc + have_td + n_historical >= atrlen) - goto leave; /* ATR shorter than indicated by format character. */ - atrlen--; - atr++; - } - else - have_ta = have_tb = have_tc = have_td = 0; - - if (have_ta + have_tb + have_tc >= atrlen) - goto leave; - atrlen -= have_ta + have_tb + have_tc; - atr += have_ta + have_tb + have_tc; - - if (have_td) + es_putc ('\0', fp); /* We want a string. */ + if (es_fclose_snatch (fp, (void**)&result, NULL)) { - have_ta = !!(*atr & 0x10); - have_tb = !!(*atr & 0x20); - have_tc = !!(*atr & 0x40); - have_td = !!(*atr & 0x80); - if (have_ta + have_tb + have_tc + have_td + n_historical >= atrlen) - goto leave; /* ATR shorter than indicated by format character. */ - atrlen--; - atr++; + log_error ("oops: es_fclose_snatch failed: %s\n", strerror (errno)); + return NULL; } - else - have_ta = have_tb = have_tc = have_td = 0; - - for (idx = 3; have_ta || have_tb || have_tc || have_td; idx++) - { - if (have_ta + have_tb + have_tc >= atrlen) - goto leave; - atrlen -= have_ta + have_tb + have_tc; - atr += have_ta + have_tb + have_tc; - - if (have_td) - { - have_ta = !!(*atr & 0x10); - have_tb = !!(*atr & 0x20); - have_tc = !!(*atr & 0x40); - have_td = !!(*atr & 0x80); - if (have_ta + have_tb + have_tc + have_td + n_historical >= atrlen) - goto leave; /* ATR shorter than indicated by format character. */ - atrlen--; - atr++; - } - else - have_ta = have_tb = have_tc = have_td = 0; - } - - if (n_historical >= atrlen) - goto leave; /* ATR shorter than required for historical bytes. */ - - if (n_historical) - { - for (idx=0; n_historical && atrlen; n_historical--, atrlen--, atr++) - historical[idx] = *atr; - } - - if (!atrlen || *atr != chksum) - goto leave; - - /* Don't care about garbage at the end of the ATR. */ - - result = n_historical; - - leave: - xfree (atrbuffer); return result; } diff --git a/scd/atr.h b/scd/atr.h index 5f07522..b06a83a 100644 --- a/scd/atr.h +++ b/scd/atr.h @@ -20,7 +20,7 @@ #ifndef ATR_H #define ATR_H -int atr_dump (int slot, FILE *fp); +char *atr_dump (const void *buffer, size_t buflen); diff --git a/scd/command.c b/scd/command.c index 0f57448..afd5ef2 100644 --- a/scd/command.c +++ b/scd/command.c @@ -35,11 +35,13 @@ #include #include "app-common.h" #include "apdu.h" /* Required for apdu_*_reader (). */ +#include "atr.h" #include "exechelp.h" #ifdef HAVE_LIBUSB #include "ccid-driver.h" #endif + /* Maximum length allowed as a PIN; used for INQUIRE NEEDPIN */ #define MAXLEN_PIN 100 @@ -1795,7 +1797,7 @@ cmd_disconnect (assuan_context_t ctx, char *line) static const char hlp_apdu[] = - "APDU [--atr] [--more] [--exlen[=N]] [hexstring]\n" + "APDU [--[dump-]atr] [--more] [--exlen[=N]] [hexstring]\n" "\n" "Send an APDU to the current reader. This command bypasses the high\n" "level functions and sends the data directly to the card. HEXSTRING\n" @@ -1826,7 +1828,10 @@ cmd_apdu (assuan_context_t ctx, char *line) size_t exlen; int slot; - with_atr = has_option (line, "--atr"); + if (has_option (line, "--dump-atr")) + with_atr = 2; + else + with_atr = has_option (line, "--atr"); handle_more = has_option (line, "--more"); if ((s=has_option_name (line, "--exlen"))) @@ -1861,9 +1866,32 @@ cmd_apdu (assuan_context_t ctx, char *line) rc = gpg_error (GPG_ERR_INV_CARD); goto leave; } - bin2hex (atr, atrlen, hexbuf); + if (with_atr == 2) + { + char *string, *p, *pend; + + string = atr_dump (atr, atrlen); + if (string) + { + for (rc=0, p=string; !rc && (pend = strchr (p, '\n')); p = pend+1) + { + rc = assuan_send_data (ctx, p, pend - p + 1); + if (!rc) + rc = assuan_send_data (ctx, NULL, 0); + } + if (!rc && *p) + rc = assuan_send_data (ctx, p, strlen (p)); + es_free (string); + if (rc) + goto leave; + } + } + else + { + bin2hex (atr, atrlen, hexbuf); + send_status_info (ctrl, "CARD-ATR", hexbuf, strlen (hexbuf), NULL, 0); + } xfree (atr); - send_status_info (ctrl, "CARD-ATR", hexbuf, strlen (hexbuf), NULL, 0); } apdu = hex_to_buffer (line, &apdulen); commit 7737a2c269657189a583cde7f214f20871d264f8 Author: Werner Koch Date: Thu Dec 15 14:45:08 2011 +0100 estream: New function es_fclose_snatch. * common/estream.c (cookie_ioctl_function_t): New type. (es_fclose_snatch): New function. (COOKIE_IOCTL_SNATCH_BUFFER): New constant. (struct estream_internal): Add field FUNC_IOCTL. (es_initialize): Clear FUNC_IOCTL. (es_func_mem_ioctl): New function. (es_fopenmem, es_fopenmem_init): Init FUNC_IOCTL. diff --git a/common/estream.c b/common/estream.c index c55c7f2..6b7bd8b 100644 --- a/common/estream.c +++ b/common/estream.c @@ -217,6 +217,17 @@ struct notify_list_s }; typedef struct notify_list_s *notify_list_t; + +/* A private cookie function to implement an internal IOCTL + service. */ +typedef int (*cookie_ioctl_function_t) (void *cookie, int cmd, + void *ptr, size_t *len); +/* IOCTL commands for the private cookie function. */ +#define COOKIE_IOCTL_SNATCH_BUFFER 1 + + + + /* An internal stream object. */ struct estream_internal { @@ -231,6 +242,7 @@ struct estream_internal es_cookie_read_function_t func_read; es_cookie_write_function_t func_write; es_cookie_seek_function_t func_seek; + cookie_ioctl_function_t func_ioctl; es_cookie_close_function_t func_close; int strategy; es_syshd_t syshd; /* A copy of the sytem handle. */ @@ -771,6 +783,33 @@ es_func_mem_seek (void *cookie, off_t *offset, int whence) return 0; } +/* An IOCTL function for memory objects. */ +static int +es_func_mem_ioctl (void *cookie, int cmd, void *ptr, size_t *len) +{ + estream_cookie_mem_t mem_cookie = cookie; + int ret; + + if (cmd == COOKIE_IOCTL_SNATCH_BUFFER) + { + /* Return the internal buffer of the stream to the caller and + invalidate it for the stream. */ + *(void**)ptr = mem_cookie->memory; + *len = mem_cookie->offset; + mem_cookie->memory = NULL; + mem_cookie->memory_size = 0; + mem_cookie->offset = 0; + ret = 0; + } + else + { + _set_errno (EINVAL); + ret = -1; + } + + return ret; +} + /* Destroy function for memory objects. */ static int @@ -1608,6 +1647,7 @@ es_initialize (estream_t stream, stream->intern->func_read = functions.func_read; stream->intern->func_write = functions.func_write; stream->intern->func_seek = functions.func_seek; + stream->intern->func_ioctl = NULL; stream->intern->func_close = functions.func_close; stream->intern->strategy = _IOFBF; stream->intern->syshd = *syshd; @@ -2667,6 +2707,9 @@ es_fopenmem (size_t memlimit, const char *ES__RESTRICT mode) if (es_create (&stream, cookie, &syshd, estream_functions_mem, modeflags, 0)) (*estream_functions_mem.func_close) (cookie); + if (stream) + stream->intern->func_ioctl = es_func_mem_ioctl; + return stream; } @@ -2701,6 +2744,10 @@ es_fopenmem_init (size_t memlimit, const char *ES__RESTRICT mode, es_set_indicators (stream, 0, 0); } } + + if (stream) + stream->intern->func_ioctl = es_func_mem_ioctl; + return stream; } @@ -3082,6 +3129,65 @@ es_fclose (estream_t stream) } +/* This is a special version of es_fclose which can be used with + es_fopenmem to return the memory buffer. This is feature is useful + to write to a memory buffer using estream. Note that the function + does not close the stream if the stream does not support snatching + the buffer. On error NULL is stored at R_BUFFER. Note that if no + write operation has happened, NULL may also be stored at BUFFER on + success. The caller needs to release the returned memory using + es_free. */ +int +es_fclose_snatch (estream_t stream, void **r_buffer, size_t *r_buflen) +{ + int err; + + /* Note: There is no need to lock the stream in a close call. The + object will be destroyed after the close and thus any other + contender for the lock would work on a closed stream. */ + + if (r_buffer) + { + cookie_ioctl_function_t func_ioctl = stream->intern->func_ioctl; + size_t buflen; + + *r_buffer = NULL; + + if (!func_ioctl) + { + _set_errno (EOPNOTSUPP); + err = -1; + goto leave; + } + + if (stream->flags.writing) + { + err = es_flush (stream); + if (err) + goto leave; + stream->flags.writing = 0; + } + + err = func_ioctl (stream->intern->cookie, COOKIE_IOCTL_SNATCH_BUFFER, + r_buffer, &buflen); + if (err) + goto leave; + if (r_buflen) + *r_buflen = buflen; + } + + err = do_close (stream, 0); + + leave: + if (err && r_buffer) + { + mem_free (*r_buffer); + *r_buffer = NULL; + } + return err; +} + + /* Register or unregister a close notification function for STREAM. FNC is the function to call and FNC_VALUE the value passed as second argument. To register the notification the value for MODE diff --git a/common/estream.h b/common/estream.h index 4966276..bbe5b62 100644 --- a/common/estream.h +++ b/common/estream.h @@ -1,5 +1,5 @@ /* estream.h - Extended stream I/O Library - * Copyright (C) 2004, 2005, 2006, 2007, 2010 g10 Code GmbH + * Copyright (C) 2004, 2005, 2006, 2007, 2010, 2011 g10 Code GmbH * * This file is part of Libestream. * @@ -88,6 +88,7 @@ #define es_freopen _ESTREAM_PREFIX(es_freopen) #define es_fopencookie _ESTREAM_PREFIX(es_fopencookie) #define es_fclose _ESTREAM_PREFIX(es_fclose) +#define es_fclose_snatch _ESTREAM_PREFIX(es_fclose_snatch) #define es_onclose _ESTREAM_PREFIX(es_onclose) #define es_fileno _ESTREAM_PREFIX(es_fileno) #define es_fileno_unlocked _ESTREAM_PREFIX(es_fileno_unlocked) @@ -285,6 +286,7 @@ estream_t es_fopencookie (void *ES__RESTRICT cookie, const char *ES__RESTRICT mode, es_cookie_io_functions_t functions); int es_fclose (estream_t stream); +int es_fclose_snatch (estream_t stream, void **r_buffer, size_t *r_buflen); int es_onclose (estream_t stream, int mode, void (*fnc) (estream_t, void*), void *fnc_value); int es_fileno (estream_t stream); commit 792e137ec7997a0ff5c54ff970611238d28d4ba8 Author: Werner Koch Date: Wed Dec 14 18:56:10 2011 +0100 scd: Skip S/N reading for the "undefined" application. * scd/app.c (select_application): Skip serial number reading. diff --git a/scd/app.c b/scd/app.c index 63ef4fa..31e56fb 100644 --- a/scd/app.c +++ b/scd/app.c @@ -242,11 +242,14 @@ select_application (ctrl_t ctrl, int slot, const char *name, app_t *r_app) app_t app = NULL; unsigned char *result = NULL; size_t resultlen; + int want_undefined; (void)ctrl; *r_app = NULL; + want_undefined = (name && !strcmp (name, "undefined")); + err = lock_reader (slot, ctrl); if (err) return err; @@ -326,45 +329,49 @@ select_application (ctrl_t ctrl, int slot, const char *name, app_t *r_app) /* Fixme: We should now first check whether a card is at all present. */ - /* Try to read the GDO file first to get a default serial number. */ - err = iso7816_select_file (slot, 0x3F00, 1, NULL, NULL); - if (!err) - err = iso7816_select_file (slot, 0x2F02, 0, NULL, NULL); - if (!err) - err = iso7816_read_binary (slot, 0, 0, &result, &resultlen); - if (!err) + /* Try to read the GDO file first to get a default serial number. + We skip this if the undefined application has been requested. */ + if (!want_undefined) { - size_t n; - const unsigned char *p; - - p = find_tlv_unchecked (result, resultlen, 0x5A, &n); - if (p) - resultlen -= (p-result); - if (p && n > resultlen && n == 0x0d && resultlen+1 == n) - { - /* The object it does not fit into the buffer. This is an - invalid encoding (or the buffer is too short. However, I - have some test cards with such an invalid encoding and - therefore I use this ugly workaround to return something - I can further experiment with. */ - log_info ("enabling BMI testcard workaround\n"); - n--; - } - - if (p && n <= resultlen) + err = iso7816_select_file (slot, 0x3F00, 1, NULL, NULL); + if (!err) + err = iso7816_select_file (slot, 0x2F02, 0, NULL, NULL); + if (!err) + err = iso7816_read_binary (slot, 0, 0, &result, &resultlen); + if (!err) { - /* The GDO file is pretty short, thus we simply reuse it for - storing the serial number. */ - memmove (result, p, n); - app->serialno = result; - app->serialnolen = n; - err = app_munge_serialno (app); - if (err) - goto leave; + size_t n; + const unsigned char *p; + + p = find_tlv_unchecked (result, resultlen, 0x5A, &n); + if (p) + resultlen -= (p-result); + if (p && n > resultlen && n == 0x0d && resultlen+1 == n) + { + /* The object it does not fit into the buffer. This is an + invalid encoding (or the buffer is too short. However, I + have some test cards with such an invalid encoding and + therefore I use this ugly workaround to return something + I can further experiment with. */ + log_info ("enabling BMI testcard workaround\n"); + n--; + } + + if (p && n <= resultlen) + { + /* The GDO file is pretty short, thus we simply reuse it for + storing the serial number. */ + memmove (result, p, n); + app->serialno = result; + app->serialnolen = n; + err = app_munge_serialno (app); + if (err) + goto leave; + } + else + xfree (result); + result = NULL; } - else - xfree (result); - result = NULL; } /* For certain error codes, there is no need to try more. */ @@ -373,7 +380,15 @@ select_application (ctrl_t ctrl, int slot, const char *name, app_t *r_app) goto leave; /* Figure out the application to use. */ - err = gpg_error (GPG_ERR_NOT_FOUND); + if (want_undefined) + { + /* We switch to the "undefined" application only if explicitly + requested. */ + app->apptype = "UNDEFINED"; + err = 0; + } + else + err = gpg_error (GPG_ERR_NOT_FOUND); if (err && is_app_allowed ("openpgp") && (!name || !strcmp (name, "openpgp"))) @@ -387,14 +402,6 @@ select_application (ctrl_t ctrl, int slot, const char *name, app_t *r_app) if (err && is_app_allowed ("geldkarte") && (!name || !strcmp (name, "geldkarte"))) err = app_select_geldkarte (app); - if (err && is_app_allowed ("undefined") - && (name && !strcmp (name, "undefined"))) - { - /* We switch to the "undefined" application only if explicitly - requested. */ - app->apptype = "UNDEFINED"; - err = 0; - } if (err && name) err = gpg_error (GPG_ERR_NOT_SUPPORTED); commit 0bac31ee9f74a25d76b08c3e0355a338908f083a Author: Werner Koch Date: Wed Dec 14 18:48:47 2011 +0100 scd: Add more status word values for documentation. diff --git a/scd/apdu.c b/scd/apdu.c index c37e8c4..5a51846 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -463,8 +463,11 @@ apdu_strerror (int rc) case SW_FILE_NOT_FOUND : return "file not found"; case SW_RECORD_NOT_FOUND:return "record not found"; case SW_REF_NOT_FOUND : return "reference not found"; - case SW_BAD_LC : return "bad Lc"; - case SW_BAD_P0_P1 : return "bad P0 or P1"; + case SW_NOT_ENOUGH_MEMORY: return "not enough memory space in the file"; + case SW_INCONSISTENT_LC: return "Lc inconsistent with TLV structure."; + case SW_INCORRECT_P0_P1: return "incorrect parameters P0,P1"; + case SW_BAD_LC : return "Lc inconsistent with P0,P1"; + case SW_BAD_P0_P1 : return "bad P0,P1"; case SW_INS_NOT_SUP : return "instruction not supported"; case SW_CLA_NOT_SUP : return "class not supported"; case SW_SUCCESS : return "success"; diff --git a/scd/apdu.h b/scd/apdu.h index f704256..7502546 100644 --- a/scd/apdu.h +++ b/scd/apdu.h @@ -41,6 +41,9 @@ enum { SW_NOT_SUPPORTED = 0x6a81, SW_FILE_NOT_FOUND = 0x6a82, SW_RECORD_NOT_FOUND = 0x6a83, + SW_NOT_ENOUGH_MEMORY= 0x6a84, /* Not enough memory space in the file. */ + SW_INCONSISTENT_LC = 0x6a85, /* Lc inconsistent with TLV structure. */ + SW_INCORRECT_P0_P1 = 0x6a86, SW_BAD_LC = 0x6a87, /* Lc does not match command or p1/p2. */ SW_REF_NOT_FOUND = 0x6a88, SW_BAD_P0_P1 = 0x6b00, commit dcd64131c60efd0189aa05d5dbce6b93547b04e3 Author: Werner Koch Date: Wed Dec 14 17:00:50 2011 +0100 scd: Add the "undefined" stub application. * scd/app.c (select_application): Implement the "undefined" application. diff --git a/doc/scdaemon.texi b/doc/scdaemon.texi index 9184ce2..200fed8 100644 --- a/doc/scdaemon.texi +++ b/doc/scdaemon.texi @@ -181,6 +181,8 @@ write hashed data to files named @code{dbgmd-000*} trace Assuan protocol. See also option @option{--debug-assuan-log-cats}. @item 11 (2048) trace APDU I/O to the card. This may reveal sensitive data. + at item 12 (4096) +trace some card reader related function calls. @end table @item --debug-all @@ -327,6 +329,7 @@ stripping off the two leading dashes. * DINSIG Card:: The DINSIG card application * PKCS#15 Card:: The PKCS#15 card application * Geldkarte Card:: The Geldkarte application +* Undefined Card:: The Undefined stub application @end menu @node OpenPGP Card @@ -367,6 +370,14 @@ This is a simple application to display information of a German Geldkarte. The Geldkarte is a small amount debit card application which comes with almost all German banking cards. + at node Undefined Card + at subsection The Undefined card application ``undefined'' + +This is a stub application to allow the use of the APDU command even +if no supported application is found on the card. This application is +not used automatically but must be explicitly requested using the +SERIALNO command. + @c ******************************************* @c *************** **************** diff --git a/scd/app.c b/scd/app.c index 6f0d756..63ef4fa 100644 --- a/scd/app.c +++ b/scd/app.c @@ -387,6 +387,14 @@ select_application (ctrl_t ctrl, int slot, const char *name, app_t *r_app) if (err && is_app_allowed ("geldkarte") && (!name || !strcmp (name, "geldkarte"))) err = app_select_geldkarte (app); + if (err && is_app_allowed ("undefined") + && (name && !strcmp (name, "undefined"))) + { + /* We switch to the "undefined" application only if explicitly + requested. */ + app->apptype = "UNDEFINED"; + err = 0; + } if (err && name) err = gpg_error (GPG_ERR_NOT_SUPPORTED); @@ -422,6 +430,8 @@ get_supported_applications (void) "p15", "dinsig", "geldkarte", + /* Note: "undefined" is not listed here because it needs special + treatment by the client. */ NULL }; int idx; ----------------------------------------------------------------------- Summary of changes: common/estream.c | 106 ++++++++++++++++++++++ common/estream.h | 4 +- doc/scdaemon.texi | 11 +++ scd/Makefile.am | 1 + scd/apdu.c | 7 +- scd/apdu.h | 3 + scd/app.c | 91 +++++++++++-------- scd/atr.c | 252 +++++++++++++++------------------------------------- scd/atr.h | 2 +- scd/command.c | 36 +++++++- 10 files changed, 289 insertions(+), 224 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Dec 15 22:33:13 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 15 Dec 2011 22:33:13 +0100 Subject: [git] GPA - branch, master, updated. gpa-0.9.0-22-g02fd01c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 02fd01cf81e39394d9529096e4882deb69db8f83 (commit) via 4e7f73636b63f50d02d682e5e059e95924cb7871 (commit) via 7ad794d2f37897156da6f69f37e3f8c6c90316f2 (commit) from 30752eb091f9005c36f90780e50336cddd8a4e93 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 02fd01cf81e39394d9529096e4882deb69db8f83 Author: Werner Koch Date: Thu Dec 15 21:40:13 2011 +0100 Show the ATR for an unknown card. * src/cm-unknown.c, src/cm-unknown.h: New files. * src/Makefile.am: Add them. * NEWS: Update. diff --git a/NEWS b/NEWS index 38471be..e38baae 100644 --- a/NEWS +++ b/NEWS @@ -3,14 +3,18 @@ Noteworthy changes in version 0.9.1 (not released) * The key selection dialogs for encryption and signing do not anymore list expired, revoked or otherwise invalid keys. - + * If no recipients are given to the server, a generic key selection dialog is now used. + * Now works with Libassuan 2.x. + + * The card manager now displays the ATR for an unknown card. + Noteworthy changes in version 0.9.0 (2009-06-20) ------------------------------------------------ - + * Added a smartcard manager. * GPA now requires GnuPG-2. @@ -140,7 +144,7 @@ Noteworthy changes in version 0.7.0 (2003-10-22) * Cosmetical and minor fixes to the file manager window. * GPA now remembers the brief/detailed setting view and restores it - when GPA is started. + when GPA is started. * Removed all deprecated widgets. GPA is now pure GTK+ 2.2. @@ -258,7 +262,7 @@ Noteworthy changes in version 0.5.0 (2002-02-25) * There now is an icon in the tool bar to switch from the keyring manager to the file manager. - + * GPA can now be compiled using a standard GNU toolchain. In particular it can be cross-compiled from GNU/Linux to mingw32/MS-Windows (which is what we did for the GnuPP CD), diff --git a/src/Makefile.am b/src/Makefile.am index f0d1e0d..a695e07 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,19 +2,19 @@ # Copyright (C) 2000, 2001 Werner Koch # Copyright (C) 2002, 2003, 2004 Miguel Coca # Copyright (C) 2005, 2006, 2007, 2008, 2009 g10 Code GmbH -# +# # This file is part of GPA. -# +# # GPA 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 3 of the License, or (at your # option) any later version. -# +# # GPA 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, see . @@ -22,7 +22,7 @@ localedir = $(datadir)/locale -logo = gpa-logo.ppm +logo = gpa-logo.ppm pkgdata_DATA = $(logo) @@ -59,8 +59,8 @@ endif bin_PROGRAMS = gpa noinst_PROGRAMS = dndtest -AM_CPPFLAGS = -I$(top_srcdir)/intl -I$(top_srcdir)/pixmaps -AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\" +AM_CPPFLAGS = -I$(top_srcdir)/intl -I$(top_srcdir)/pixmaps +AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\" AM_CFLAGS = $(GPGME_CFLAGS) $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) \ $(GTK_CFLAGS) @@ -76,7 +76,8 @@ gpa_cardman_sources = \ cm-openpgp.c cm-openpgp.h \ cm-geldkarte.c cm-geldkarte.h \ cm-netkey.c cm-netkey.h \ - cm-dinsig.c cm-dinsig.h + cm-dinsig.c cm-dinsig.h \ + cm-unknown.c cm-unknown.h gpa_SOURCES = get-path.h get-path.c \ diff --git a/src/cardman.c b/src/cardman.c index 65788fe..c3779e4 100644 --- a/src/cardman.c +++ b/src/cardman.c @@ -29,7 +29,7 @@ #include #include -#include "gpa.h" +#include "gpa.h" #include "gtktools.h" #include "gpawidgets.h" @@ -47,11 +47,12 @@ #include "cm-geldkarte.h" #include "cm-netkey.h" #include "cm-dinsig.h" +#include "cm-unknown.h" /* Object's class definition. */ -struct _GpaCardManagerClass +struct _GpaCardManagerClass { GtkWindowClass parent_class; }; @@ -66,7 +67,7 @@ struct _GpaCardManager GtkWidget *app_selector; /* Combo Box to select the application. */ - + GtkWidget *card_container; /* The container holding the card widget. */ GtkWidget *card_widget; /* The widget to display a card applciation. */ @@ -90,7 +91,7 @@ struct _GpaCardManager struct { int card_any; /* Any card event counter seen. */ - unsigned int card; /* Last seen card event counter. */ + unsigned int card; /* Last seen card event counter. */ } eventcounter; }; @@ -108,7 +109,7 @@ static void gpa_card_manager_finalize (GObject *object); -/************************************************************ +/************************************************************ ******************* Implementation ********************* ************************************************************/ @@ -122,7 +123,7 @@ statusbar_new (GpaCardManager *cardman) GtkWidget *label; hbox = gtk_hbox_new (FALSE, 0); - + label = gtk_label_new (NULL); cardman->status_label = label; gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); @@ -130,7 +131,7 @@ statusbar_new (GpaCardManager *cardman) label = gtk_label_new (""); cardman->status_text = label; gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); - + align = gtk_alignment_new (0, 1, 1, 0); gtk_container_add (GTK_CONTAINER (align), hbox); @@ -170,7 +171,7 @@ update_title (GpaCardManager *cardman) else { char *tmp; - + tmp = g_strdup_printf ("%s (%s)", title, cardman->cardtypename); gtk_window_set_title (GTK_WINDOW (cardman), tmp); xfree (tmp); @@ -202,7 +203,7 @@ scd_data_cb (void *opaque, const void *data, size_t datalen) { /* g_debug ("DATA_CB: datalen=%d", (int)datalen); */ return 0; -} +} static gpg_error_t @@ -212,7 +213,7 @@ scd_inq_cb (void *opaque, const char *name, const char *args, /* g_debug ("INQ_CB: name=`%s' args=`%s'", name, args); */ return 0; -} +} static gpg_error_t @@ -247,6 +248,11 @@ scd_status_cb (void *opaque, const char *status, const char *args) cardman->cardtype = GPA_CM_GELDKARTE_TYPE; cardman->cardtypename = "Geldkarte"; } + else if (!strcmp (args, "UNDEFINED")) + { + cardman->cardtype = GPA_CM_UNKNOWN_TYPE; + cardman->cardtypename = "UNKNOWN"; + } else cardman->cardtypename = "Unknown"; @@ -263,7 +269,7 @@ scd_status_cb (void *opaque, const char *status, const char *args) } return 0; -} +} /* Idle queue callback to mark a relaod operation finished. */ @@ -271,7 +277,7 @@ static gboolean card_reload_finish_idle_cb (void *user_data) { GpaCardManager *cardman = user_data; - + cardman->in_card_reload--; g_object_unref (cardman); @@ -288,6 +294,7 @@ card_reload (GpaCardManager *cardman) char *command_buf = NULL; const char *command; const char *err_desc = NULL; + char *err_desc_buffer = NULL; int auto_app; if (!cardman->gpgagent) @@ -298,7 +305,7 @@ card_reload (GpaCardManager *cardman) if (!cardman->in_card_reload) { cardman->in_card_reload++; - + update_info_visibility (cardman); cardman->cardtype = G_TYPE_NONE; @@ -308,8 +315,8 @@ card_reload (GpaCardManager *cardman) command; this makes sure that scdaemon initalizes the card if that has not yet been done. */ command = "SCD SERIALNO"; - if (cardman->app_selector - && (gtk_combo_box_get_active + if (cardman->app_selector + && (gtk_combo_box_get_active (GTK_COMBO_BOX (cardman->app_selector)) > 0) && (application = gtk_combo_box_get_active_text (GTK_COMBO_BOX (cardman->app_selector)))) @@ -374,19 +381,26 @@ card_reload (GpaCardManager *cardman) && gpg_err_source (err) == GPG_ERR_SOURCE_SCD && gpg_err_code (err) == GPG_ERR_NOT_SUPPORTED) { - err_desc = + err_desc = _("The selected card application is not available."); } else if (err) { - g_debug ("assuan command `%s' failed: %s <%s>\n", + g_debug ("assuan command `%s' failed: %s <%s>\n", command, gpg_strerror (err), gpg_strsource (err)); - err_desc = _("Error accessing the card."); - statusbar_update (cardman, _("Error accessing card")); + if (!gpgme_op_assuan_transact (cardman->gpgagent, + "SCD SERIALNO undefined", + NULL, NULL, NULL, NULL, NULL, NULL)) + err = 0; + else + { + err_desc = _("Error accessing the card."); + statusbar_update (cardman, _("Error accessing card")); + } } g_free (command_buf); - + if (!err) { /* Get the event counter to avoid a duplicate reload due to @@ -407,22 +421,25 @@ card_reload (GpaCardManager *cardman) scd_status_cb, cardman); if (!err) err = gpgme_op_assuan_result (cardman->gpgagent)->err; - + if (gpg_err_code (err) == GPG_ERR_CARD_NOT_PRESENT || gpg_err_code (err) == GPG_ERR_CARD_REMOVED) statusbar_update (cardman, _("No card")); else if (err) { - g_debug ("assuan command `%s' failed: %s <%s>\n", + g_debug ("assuan command `%s' failed: %s <%s>\n", command, gpg_strerror (err), gpg_strsource (err)); statusbar_update (cardman, _("Error accessing card")); } } - + update_card_widget (cardman, err_desc); + g_free (err_desc_buffer); + err_desc_buffer = NULL; + err_desc = NULL; update_title (cardman); - + update_info_visibility (cardman); /* We decrement our lock using a idle handler with lo priority. This gives us a better chance not to do a reload a second @@ -449,7 +466,7 @@ static gboolean card_reload_idle_cb (void *user_data) { GpaCardManager *cardman = user_data; - + card_reload (cardman); g_object_unref (cardman); @@ -501,7 +518,7 @@ ticker_cb (gpointer user_data) if (!cardman || !cardman->ticker_timeout_id || !cardman->gpgagent || cardman->in_card_reload) return TRUE; /* Keep on ticking. */ - + /* Note that we are single threaded and thus there is no need to lock the assuan context. */ @@ -526,9 +543,9 @@ start_ticker (GpaCardManager *cardman) { #if GTK_CHECK_VERSION (2, 14, 0) cardman->ticker_timeout_id = g_timeout_add_seconds (1, - ticker_cb, cardman); + ticker_cb, cardman); #else - cardman->ticker_timeout_id = g_timeout_add (1000, ticker_cb, cardman); + cardman->ticker_timeout_id = g_timeout_add (1000, ticker_cb, cardman); #endif } } @@ -569,7 +586,7 @@ card_genkey (GpaCardManager *cardman) if (!err) { gpa_window_error ("Admin commands are disabled in scdamon.\n" - "Key generation is not possible.", NULL); + "Key generation is not possible.", NULL); return; } @@ -750,6 +767,10 @@ update_card_widget (GpaCardManager *cardman, const char *error_description) { cardman->card_widget = gpa_cm_dinsig_new (); } + else if (cardman->cardtype == GPA_CM_UNKNOWN_TYPE) + { + cardman->card_widget = gpa_cm_unknown_new (); + } else { if (!error_description) @@ -757,7 +778,7 @@ update_card_widget (GpaCardManager *cardman, const char *error_description) cardman->card_widget = gtk_label_new (error_description); } - gtk_scrolled_window_add_with_viewport + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (cardman->card_container), cardman->card_widget); gtk_widget_show_all (cardman->card_widget); @@ -779,6 +800,7 @@ update_card_widget (GpaCardManager *cardman, const char *error_description) gpa_cm_geldkarte_reload (cardman->card_widget, cardman->gpgagent); gpa_cm_netkey_reload (cardman->card_widget, cardman->gpgagent); gpa_cm_dinsig_reload (cardman->card_widget, cardman->gpgagent); + gpa_cm_unknown_reload (cardman->card_widget, cardman->gpgagent); } } @@ -843,7 +865,7 @@ setup_app_selector (GpaCardManager *cardman) p1 = strchr (p0, ':'); if (p1) *p1 = 0; - gtk_combo_box_append_text + gtk_combo_box_append_text (GTK_COMBO_BOX (cardman->app_selector), p0); if (p[1]) p0 = p+1; @@ -882,7 +904,7 @@ construct_widgets (GpaCardManager *cardman) /* Add a fancy label that tells us: This is the card manager. */ hbox1 = gtk_hbox_new (FALSE, 0); - + icon = gtk_image_new_from_stock (GPA_STOCK_CARDMAN, GTK_ICON_SIZE_DND); gtk_box_pack_start (GTK_BOX (hbox1), icon, FALSE, TRUE, 0); @@ -916,7 +938,7 @@ construct_widgets (GpaCardManager *cardman) card widget. This container is required so that we can easily change to a differet card widget. */ cardman->card_container = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (cardman->card_container), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX (vbox), cardman->card_container, TRUE, TRUE, 0); @@ -932,7 +954,7 @@ construct_widgets (GpaCardManager *cardman) } -/************************************************************ +/************************************************************ ****************** Object Management ******************** ************************************************************/ @@ -996,7 +1018,7 @@ gpa_card_manager_init (GTypeInstance *instance, void *class_ptr) static void gpa_card_manager_finalize (GObject *object) -{ +{ GpaCardManager *cardman = GPA_CARD_MANAGER (object); if (cardman->gpgagent) @@ -1004,7 +1026,7 @@ gpa_card_manager_finalize (GObject *object) gpgme_release (cardman->gpgagent); cardman->gpgagent = NULL; } - + if (cardman->ticker_timeout_id) { g_source_remove (cardman->ticker_timeout_id); @@ -1013,7 +1035,7 @@ gpa_card_manager_finalize (GObject *object) /* FIXME: Remove the watch object and all other resources. */ - G_OBJECT_CLASS (g_type_class_peek_parent + G_OBJECT_CLASS (g_type_class_peek_parent (GPA_CM_OPENPGP_GET_CLASS (cardman)))->finalize (object); } @@ -1022,7 +1044,7 @@ GType gpa_card_manager_get_type (void) { static GType this_type = 0; - + if (!this_type) { static const GTypeInfo this_info = @@ -1037,17 +1059,17 @@ gpa_card_manager_get_type (void) 0, /* n_preallocs */ gpa_card_manager_init, }; - + this_type = g_type_register_static (GTK_TYPE_WINDOW, "GpaCardManager", &this_info, 0); } - + return this_type; } -/************************************************************ +/************************************************************ ********************** Public API ************************ ************************************************************/ GtkWidget * @@ -1055,14 +1077,14 @@ gpa_card_manager_get_instance (void) { if (!this_instance) { - this_instance = g_object_new (GPA_CARD_MANAGER_TYPE, NULL); + this_instance = g_object_new (GPA_CARD_MANAGER_TYPE, NULL); card_reload (this_instance); } return GTK_WIDGET (this_instance); } -gboolean +gboolean gpa_card_manager_is_open (void) { return !!this_instance; diff --git a/src/cm-unknown.c b/src/cm-unknown.c new file mode 100644 index 0000000..70ac99e --- /dev/null +++ b/src/cm-unknown.c @@ -0,0 +1,253 @@ +/* cm-unknown.c - Widget to show information about an unknown card + * Copyright (C) 2009, 2011 g10 Code GmbH + * + * This file is part of GPA. + * + * GPA 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 3 of the License, or + * (at your option) any later version. + * + * GPA 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, see . + */ + +/* UNKNOWN is a dummy application used for, weel, unknown cards. It + does only print the the ATR of the card. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#include "gpa.h" +#include "gtktools.h" +#include "convert.h" +#include "membuf.h" + +#include "cm-object.h" +#include "cm-unknown.h" + + + + + +/* Object's class definition. */ +struct _GpaCMUnknownClass +{ + GpaCMObjectClass parent_class; +}; + + +/* Object definition. */ +struct _GpaCMUnknown +{ + GpaCMObject parent_instance; + + GtkWidget *label; + + int reloading; /* Sentinel to avoid recursive reloads. */ +}; + +/* The parent class. */ +static GObjectClass *parent_class; + + + +/* Local prototypes */ +static void gpa_cm_unknown_finalize (GObject *object); + + + +/************************************************************ + ******************* Implementation ********************* + ************************************************************/ + +static gpg_error_t +scd_atr_data_cb (void *opaque, const void *data, size_t datalen) +{ + membuf_t *mb = opaque; + + put_membuf (mb, data, datalen); + return 0; +} + + +/* Use the assuan machinery to read the ATR. */ +static void +reload_data (GpaCMUnknown *card) +{ + gpg_error_t err; + char command[100]; + gpgme_ctx_t gpgagent; + membuf_t mb; + char *buf; + + gpgagent = GPA_CM_OBJECT (card)->agent_ctx; + g_return_if_fail (gpgagent); + + card->reloading++; + + init_membuf (&mb, 512); + + err = gpgme_op_assuan_transact (gpgagent, + "SCD APDU --dump-atr", + scd_atr_data_cb, &mb, + NULL, NULL, NULL, NULL); + if (!err) + err = gpgme_op_assuan_result (gpgagent)->err; + + if (!err) + { + put_membuf (&mb, "", 1); + buf = get_membuf (&mb, NULL); + if (buf) + { + buf = g_strdup_printf ("\n%s\n%s", + _("The ATR of the card is:"), + buf); + gtk_label_set_text (GTK_LABEL (card->label), buf); + g_free (buf); + } + else + gtk_label_set_text (GTK_LABEL (card->label), ""); + } + else + { + g_free (get_membuf (&mb, NULL)); + + if (gpg_err_code (err) == GPG_ERR_CARD_NOT_PRESENT) + ; /* Lost the card. */ + else + g_debug ("assuan command `%s' failed: %s <%s>\n", + command, gpg_strerror (err), gpg_strsource (err)); + gtk_label_set_text (GTK_LABEL (card->label), ""); + } + card->reloading--; +} + + + + +/* This function constructs the container holding all widgets making + up this data widget. It is called during instance creation. */ +static void +construct_data_widget (GpaCMUnknown *card) +{ + GtkWidget *frame; + GtkWidget *vbox; + GtkWidget *label; + + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); + label = gtk_label_new (_("Unknown Card")); + gtk_label_set_use_markup (GTK_LABEL (label), TRUE); + gtk_frame_set_label_widget (GTK_FRAME (frame), label); + gtk_box_pack_start (GTK_BOX (card), frame, FALSE, TRUE, 0); + + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); + vbox = gtk_vbox_new (FALSE, 5); + card->label = gtk_label_new (NULL); + gtk_box_pack_start (GTK_BOX (vbox), card->label, TRUE, TRUE, 0); + gtk_container_add (GTK_CONTAINER (frame), vbox); + gtk_box_pack_start (GTK_BOX (card), frame, FALSE, TRUE, 0); +} + + + +/************************************************************ + ****************** Object Management ******************** + ************************************************************/ + +static void +gpa_cm_unknown_class_init (void *class_ptr, void *class_data) +{ + GpaCMUnknownClass *klass = class_ptr; + + parent_class = g_type_class_peek_parent (klass); + + G_OBJECT_CLASS (klass)->finalize = gpa_cm_unknown_finalize; +} + + +static void +gpa_cm_unknown_init (GTypeInstance *instance, void *class_ptr) +{ + GpaCMUnknown *card = GPA_CM_UNKNOWN (instance); + + construct_data_widget (card); + +} + + +static void +gpa_cm_unknown_finalize (GObject *object) +{ +/* GpaCMUnknown *card = GPA_CM_UNKNOWN (object); */ + + parent_class->finalize (object); +} + + +/* Construct the class. */ +GType +gpa_cm_unknown_get_type (void) +{ + static GType this_type = 0; + + if (!this_type) + { + static const GTypeInfo this_info = + { + sizeof (GpaCMUnknownClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + gpa_cm_unknown_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GpaCMUnknown), + 0, /* n_preallocs */ + gpa_cm_unknown_init + }; + + this_type = g_type_register_static (GPA_CM_OBJECT_TYPE, + "GpaCMUnknown", + &this_info, 0); + } + + return this_type; +} + + +/************************************************************ + ********************** Public API ************************ + ************************************************************/ +GtkWidget * +gpa_cm_unknown_new () +{ + return GTK_WIDGET (g_object_new (GPA_CM_UNKNOWN_TYPE, NULL)); +} + + +/* If WIDGET is of Type GpaCMUnknown do a data reload through the + assuan connection. */ +void +gpa_cm_unknown_reload (GtkWidget *widget, gpgme_ctx_t gpgagent) +{ + if (GPA_IS_CM_UNKNOWN (widget)) + { + GPA_CM_OBJECT (widget)->agent_ctx = gpgagent; + if (gpgagent) + reload_data (GPA_CM_UNKNOWN (widget)); + } +} diff --git a/src/cm-unknown.h b/src/cm-unknown.h new file mode 100644 index 0000000..41f44ff --- /dev/null +++ b/src/cm-unknown.h @@ -0,0 +1,57 @@ +/* cm-unknown.h - Widget to show information about an unknown card. + * Copyright (C) 2009, 2011 g10 Code GmbH + * + * This file is part of GPA. + * + * GPA 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 3 of the License, or + * (at your option) any later version. + * + * GPA 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, see . + */ + +#ifndef CM_UNKNOWN_H +#define CM_UNKNOWN_H + +#include + +/* Declare the Object. */ +typedef struct _GpaCMUnknown GpaCMUnknown; +typedef struct _GpaCMUnknownClass GpaCMUnknownClass; + +GType gpa_cm_unknown_get_type (void) G_GNUC_CONST; + +#define GPA_CM_UNKNOWN_TYPE (gpa_cm_unknown_get_type ()) + +#define GPA_CM_UNKNOWN(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPA_CM_UNKNOWN_TYPE, GpaCMUnknown)) + +#define GPA_CM_UNKNOWN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), \ + GPA_CM_UNKNOWN_TYPE, GpaCMUnknownClass)) + +#define GPA_IS_CM_UNKNOWN(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPA_CM_UNKNOWN_TYPE)) + +#define GPA_IS_CM_UNKNOWN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GPA_CM_UNKNOWN_TYPE)) + +#define GPA_CM_UNKNOWN_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + GPA_CM_UNKNOWN_TYPE, GpaCMUnknownClass)) + + +/* The class specific API. */ +GtkWidget *gpa_cm_unknown_new (void); +void gpa_cm_unknown_reload (GtkWidget *widget, gpgme_ctx_t gpgagent); + + + +#endif /*CM_UNKNOWN_H*/ commit 4e7f73636b63f50d02d682e5e059e95924cb7871 Author: Werner Koch Date: Mon Dec 12 11:47:12 2011 +0100 po: auto update of po files. diff --git a/po/ar.po b/po/ar.po index 864f216..6823814 100644 --- a/po/ar.po +++ b/po/ar.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: GPA\n" "Report-Msgid-Bugs-To: gpa-dev at gnupg.org\n" -"PO-Revision-Date: 2008-03-17 13:05+0100\n" +"PO-Revision-Date: 2011-12-12 10:14+0100\n" "Last-Translator: \n" "Language-Team: Arabic \n" "MIME-Version: 1.0\n" @@ -299,6 +299,9 @@ msgstr "???????? ???????? ??????????????????" msgid "Enable the UI server" msgstr "???????? ?????? ?????????? ?????????? ???????????????? (?????????? ???--cms??? ????????)" +msgid "Disable support for X.509" +msgstr "" + msgid "Read options from file" msgstr "???????? ???????????????? ???? ????????" @@ -1402,6 +1405,15 @@ msgid "Sign only _locally" msgstr "???????? _???????????? ??????" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/cs.po b/po/cs.po index 28767d5..c131808 100644 --- a/po/cs.po +++ b/po/cs.po @@ -316,6 +316,9 @@ msgstr "Otev????t dialog Nastaven??" msgid "Enable the UI server" msgstr "" +msgid "Disable support for X.509" +msgstr "" + #, fuzzy msgid "Read options from file" msgstr "????st mo??nosti ze souboru" @@ -1107,7 +1110,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "Vlo??te pros??m svoji e-mailovou adresu.\n" "\n" @@ -1436,6 +1439,15 @@ msgid "Sign only _locally" msgstr "Podepsat pouze _lok??ln??" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/de.po b/po/de.po index 5498861..dc5534b 100644 --- a/po/de.po +++ b/po/de.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gpa\n" "Report-Msgid-Bugs-To: gpa-dev at gnupg.org\n" -"PO-Revision-Date: 2010-05-06 13:13+0200\n" +"PO-Revision-Date: 2011-12-12 10:11+0100\n" "Last-Translator: Werner Koch \n" "Language-Team: German \n" "MIME-Version: 1.0\n" @@ -277,6 +277,9 @@ msgstr "??ffne den Dialog f??r die Einstellungen" msgid "Enable the UI server" msgstr "Den UI Server aktivieren" +msgid "Disable support for X.509" +msgstr "" + msgid "Read options from file" msgstr "Optionen aus einer Datei lesen" @@ -1361,6 +1364,15 @@ msgid "Sign only _locally" msgstr "Nur _lokal signieren" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/es.po b/po/es.po index 0e0e6d8..9100165 100644 --- a/po/es.po +++ b/po/es.po @@ -302,6 +302,9 @@ msgstr "Abrir la ventana de preferencias" msgid "Enable the UI server" msgstr "Iniciar solo el servicio de interface de usuario (implica --cms)" +msgid "Disable support for X.509" +msgstr "" + msgid "Read options from file" msgstr "Leer opciones desde un archivo" @@ -440,7 +443,8 @@ msgstr "Clave Revocada" msgid "_Close" msgstr "_Cerrar" -msgid "The following key has been revoked by it's owner:" +#, fuzzy +msgid "The following key has been revoked by its owner:" msgstr "Esta clave ha sido revocada por su propietario:" msgid "And can not be used for encryption." @@ -1084,7 +1088,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "Por favor, introduzca su direcci??n de correo electr??nico.\n" "\n" @@ -1425,6 +1429,15 @@ msgid "Sign only _locally" msgstr "Firmar solo _localmente" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/fr.po b/po/fr.po index a080387..5520a94 100644 --- a/po/fr.po +++ b/po/fr.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: GPA 0.8.0\n" "Report-Msgid-Bugs-To: gpa-dev at gnupg.org\n" -"PO-Revision-Date: 2008-11-25 13:40+0100\n" +"PO-Revision-Date: 2011-12-12 10:12+0100\n" "Last-Translator: Eric Lassauge \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -286,6 +286,9 @@ msgid "Enable the UI server" msgstr "" "D??marrer seulement le serveur d'interface graphique (implique ?? --cms ??)" +msgid "Disable support for X.509" +msgstr "" + msgid "Read options from file" msgstr "Lire les options depuis le fichier" @@ -1387,6 +1390,15 @@ msgid "Sign only _locally" msgstr "Signer seulement en _local" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/ja.po b/po/ja.po index 34129a6..62eb49b 100644 --- a/po/ja.po +++ b/po/ja.po @@ -313,6 +313,9 @@ msgstr " msgid "Enable the UI server" msgstr "" +msgid "Disable support for X.509" +msgstr "" + #, fuzzy msgid "Read options from file" msgstr "??????????????????????????" @@ -458,7 +461,8 @@ msgstr " msgid "_Close" msgstr "?????? (_C)" -msgid "The following key has been revoked by it's owner:" +#, fuzzy +msgid "The following key has been revoked by its owner:" msgstr "????????????????????????????????????????:" msgid "And can not be used for encryption." @@ -1091,7 +1095,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "E ??????????????????????????????????????\n" "\n" @@ -1417,6 +1421,15 @@ msgid "Sign only _locally" msgstr "?????????????????? (_L)" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/nl.po b/po/nl.po index 59c72be..252f273 100644 --- a/po/nl.po +++ b/po/nl.po @@ -310,6 +310,9 @@ msgstr "Open de voorkeuren dialoog" msgid "Enable the UI server" msgstr "" +msgid "Disable support for X.509" +msgstr "" + #, fuzzy msgid "Read options from file" msgstr "lees opties van bestand" @@ -455,7 +458,8 @@ msgstr "Teruggetrokken sleutel" msgid "_Close" msgstr "_Sluiten" -msgid "The following key has been revoked by it's owner:" +#, fuzzy +msgid "The following key has been revoked by its owner:" msgstr "De volgende sleutel is gerevoceerd door de eigenaar:" msgid "And can not be used for encryption." @@ -1096,7 +1100,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "Geef aub uw E-mail adress in.\n" "\n" @@ -1426,6 +1430,15 @@ msgid "Sign only _locally" msgstr "Onderteken alleen _lokaal" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/pl.po b/po/pl.po index ed860eb..1c86852 100644 --- a/po/pl.po +++ b/po/pl.po @@ -306,6 +306,9 @@ msgstr "Otwiera okno dialogowe z ustawieniami" msgid "Enable the UI server" msgstr "" +msgid "Disable support for X.509" +msgstr "" + #, fuzzy msgid "Read options from file" msgstr "odczytuje opcje z podanego pliku" @@ -452,7 +455,8 @@ msgstr "Uniewa??niony klucz" msgid "_Close" msgstr "Z_amknij" -msgid "The following key has been revoked by it's owner:" +#, fuzzy +msgid "The following key has been revoked by its owner:" msgstr "Ten klucz zosta?? uniewa??niony przez swojego w??a??ciciela:" msgid "And can not be used for encryption." @@ -1097,7 +1101,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "Prosz?? wprowadzi?? sw??j adres email.\n" "\n" @@ -1429,6 +1433,15 @@ msgid "Sign only _locally" msgstr "Podpisz tylko _lokalnie" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index f41716d..7bc095a 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -309,6 +309,9 @@ msgstr "Abrir caixa de di msgid "Enable the UI server" msgstr "" +msgid "Disable support for X.509" +msgstr "" + #, fuzzy msgid "Read options from file" msgstr "ler as prefer?ncias do arquivo" @@ -455,7 +458,8 @@ msgstr "Chave revogada" msgid "_Close" msgstr "_Fechar" -msgid "The following key has been revoked by it's owner:" +#, fuzzy +msgid "The following key has been revoked by its owner:" msgstr "A seguinte chave foi revogada pelo seu propriet?rio:" msgid "And can not be used for encryption." @@ -1093,7 +1097,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "Por favor indique o seu e-mail.\n" "\n" @@ -1427,6 +1431,15 @@ msgid "Sign only _locally" msgstr "Assinar apenas _localmente" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/ru.po b/po/ru.po index e76c4bd..2352273 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: GPA 0.8\n" "Report-Msgid-Bugs-To: gpa-dev at gnupg.org\n" -"PO-Revision-Date: 2008-03-18 20:12+0300\n" +"PO-Revision-Date: 2011-12-12 10:17+0100\n" "Last-Translator: Sergei Smirnov \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" @@ -300,6 +300,9 @@ msgstr "?????????????? ???????? ????????????????" msgid "Enable the UI server" msgstr "???????????????????? ???????????? ???????????? UI" +msgid "Disable support for X.509" +msgstr "" + msgid "Read options from file" msgstr "???????????????? ?????????????????? ???? ??????????" @@ -1082,7 +1085,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "?????????????? ???????? ?????????? email.\n" "\n" @@ -1417,6 +1420,15 @@ msgid "Sign only _locally" msgstr "?????????????????? ???????????? ????????????????" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/sv.po b/po/sv.po index 84a62f9..e45a02b 100644 --- a/po/sv.po +++ b/po/sv.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gpa\n" "Report-Msgid-Bugs-To: gpa-dev at gnupg.org\n" -"PO-Revision-Date: 2008-09-12 18:01+0100\n" +"PO-Revision-Date: 2011-12-12 10:13+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" @@ -283,6 +283,9 @@ msgstr "??ppna inst??llningsdialogen" msgid "Enable the UI server" msgstr "Aktivera anv??ndargr??nssnittsservern (inneb??r --cms)" +msgid "Disable support for X.509" +msgstr "" + msgid "Read options from file" msgstr "L??s flaggor fr??n fil" @@ -1365,6 +1368,15 @@ msgid "Sign only _locally" msgstr "Signera endast _lokalt" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/tr.po b/po/tr.po index 6549dbb..e17c285 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gpa 0.7.0\n" "Report-Msgid-Bugs-To: gpa-dev at gnupg.org\n" -"PO-Revision-Date: 2004-06-20 14:42+0300\n" +"PO-Revision-Date: 2011-12-12 10:14+0100\n" "Last-Translator: Mert ?etin \n" "Language-Team: xTc & D?j? Vu\n" "MIME-Version: 1.0\n" @@ -306,6 +306,9 @@ msgstr "Tercihler penceresini a msgid "Enable the UI server" msgstr "" +msgid "Disable support for X.509" +msgstr "" + #, fuzzy msgid "Read options from file" msgstr "se?enekleri dosyadan oku" @@ -1084,13 +1087,12 @@ msgstr "" msgid "Your Name:" msgstr "?sminiz:" -#, fuzzy msgid "" "Please insert your email address.\n" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "L?tfen email adresinizi girin.\n" "\n" @@ -1421,6 +1423,15 @@ msgid "Sign only _locally" msgstr "Sadece _yerel olarak imzala" msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + +msgid "" "The private key you selected as default is no longer available.\n" "GPA will try to choose a new default key automatically." msgstr "" diff --git a/po/zh_TW.Big5.po b/po/zh_TW.Big5.po index d587978..9ed7ca6 100644 --- a/po/zh_TW.Big5.po +++ b/po/zh_TW.Big5.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gpa-0.7.0\n" "Report-Msgid-Bugs-To: gpa-dev at gnupg.org\n" -"POT-Creation-Date: 2011-08-26 10:32+0200\n" +"POT-Creation-Date: 2011-12-12 10:10+0100\n" "PO-Revision-Date: 2003-10-20 11:55+0200\n" "Last-Translator: Shell Hung \n" "Language-Team: Hong Kong Linux User Group \n" @@ -362,56 +362,60 @@ msgstr " msgid "_Detached signature" msgstr "?????r???p (&C)" -#: src/gpa.c:96 +#: src/gpa.c:97 #, fuzzy msgid "Output version information and exit" msgstr "?????????????????}" -#: src/gpa.c:98 +#: src/gpa.c:99 #, fuzzy msgid "Open key manager (default)" msgstr "?}???_???s???? (?w?])" -#: src/gpa.c:100 +#: src/gpa.c:101 #, fuzzy msgid "Open file manager" msgstr "?}?????????z??" -#: src/gpa.c:102 src/gpa.h:80 +#: src/gpa.c:103 src/gpa.h:80 #, fuzzy msgid "Open the card manager" msgstr "?}?????????z??" -#: src/gpa.c:104 +#: src/gpa.c:105 msgid "Open clipboard" msgstr "" -#: src/gpa.c:106 +#: src/gpa.c:107 #, fuzzy msgid "Open the settings dialog" msgstr "?}???]?w????" -#: src/gpa.c:108 +#: src/gpa.c:109 msgid "Enable the UI server" msgstr "" -#: src/gpa.c:110 +#: src/gpa.c:111 +msgid "Disable support for X.509" +msgstr "" + +#: src/gpa.c:113 #, fuzzy msgid "Read options from file" msgstr "????????????????" -#: src/gpa.c:314 +#: src/gpa.c:317 msgid "[FILE...]" msgstr "" -#: src/gpa.c:316 +#: src/gpa.c:319 #, fuzzy msgid "Graphical frontend to GnuPG" msgstr "" "?y?k: gpa [????]\n" "GnuPG??????????\n" -#: src/gpa.c:317 +#: src/gpa.c:320 msgid "Please report bugs to <" msgstr "?^???????? <" @@ -584,7 +588,8 @@ msgid "_Close" msgstr "???? (&C)" #: src/gpafileencryptop.c:540 -msgid "The following key has been revoked by it's owner:" +#, fuzzy +msgid "The following key has been revoked by its owner:" msgstr "?o???_?w?Q?????????F:" #: src/gpafileencryptop.c:545 src/gpafileencryptop.c:588 @@ -1380,7 +1385,7 @@ msgid "" "\n" "Your email address will be part of the new key to make it easier for others " "to identify keys. If you have several email addresses, you can add further " -"email adresses later." +"email addresses later." msgstr "" "?????J?z???q?l.\n" "\n" @@ -1783,6 +1788,16 @@ msgstr " msgid "Sign only _locally" msgstr "?u?O???a?W?????p (&l)" +#: src/keytable.c:217 +msgid "" +"It seems that GPGSM is not installed.\n" +"\n" +"Temporary disabling support for X.509.\n" +"\n" +"Please install GPGSM or invoke this program\n" +"with the option --disable-x509 ." +msgstr "" + #: src/options.c:329 msgid "" "The private key you selected as default is no longer available.\n" commit 7ad794d2f37897156da6f69f37e3f8c6c90316f2 Author: Werner Koch Date: Mon Dec 12 11:43:17 2011 +0100 Fix indentation. * src/keytable.c: Fix function name indentation. diff --git a/src/keytable.c b/src/keytable.c index 438f0f3..a8198df 100644 --- a/src/keytable.c +++ b/src/keytable.c @@ -313,10 +313,11 @@ GpaKeyTable *gpa_keytable_get_secret_instance () * This function MAY not do anything until the application goes back into * the GLib main loop. */ -void gpa_keytable_list_keys (GpaKeyTable *keytable, - GpaKeyTableNextFunc next, - GpaKeyTableEndFunc end, - gpointer data) +void +gpa_keytable_list_keys (GpaKeyTable *keytable, + GpaKeyTableNextFunc next, + GpaKeyTableEndFunc end, + gpointer data) { g_return_if_fail (keytable != NULL); g_return_if_fail (GPA_IS_KEYTABLE (keytable)); @@ -339,10 +340,11 @@ void gpa_keytable_list_keys (GpaKeyTable *keytable, /* Same as list_keys, but forces the internal cache to be rebuilt. */ -void gpa_keytable_force_reload (GpaKeyTable *keytable, - GpaKeyTableNextFunc next, - GpaKeyTableEndFunc end, - gpointer data) +void +gpa_keytable_force_reload (GpaKeyTable *keytable, + GpaKeyTableNextFunc next, + GpaKeyTableEndFunc end, + gpointer data) { g_return_if_fail (keytable != NULL); g_return_if_fail (GPA_IS_KEYTABLE (keytable)); @@ -358,11 +360,12 @@ void gpa_keytable_force_reload (GpaKeyTable *keytable, /* Load the key with the given fingerprint from GnuPG, replacing it in the * keytable if needed. */ -void gpa_keytable_load_new (GpaKeyTable *keytable, - const char *fpr, - GpaKeyTableNextFunc next, - GpaKeyTableEndFunc end, - gpointer data) +void +gpa_keytable_load_new (GpaKeyTable *keytable, + const char *fpr, + GpaKeyTableNextFunc next, + GpaKeyTableEndFunc end, + gpointer data) { g_return_if_fail (keytable != NULL); g_return_if_fail (GPA_IS_KEYTABLE (keytable)); ----------------------------------------------------------------------- Summary of changes: NEWS | 12 ++- po/ar.po | 14 +++- po/cs.po | 14 +++- po/de.po | 14 +++- po/es.po | 17 +++- po/fr.po | 14 +++- po/ja.po | 17 +++- po/nl.po | 17 +++- po/pl.po | 17 +++- po/pt_BR.po | 17 +++- po/ru.po | 16 +++- po/sv.po | 14 +++- po/tr.po | 17 +++- po/zh_TW.Big5.po | 43 ++++++--- src/Makefile.am | 17 ++-- src/cardman.c | 108 ++++++++++++++--------- src/cm-unknown.c | 253 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/cm-unknown.h | 57 ++++++++++++ src/keytable.c | 29 ++++--- 19 files changed, 605 insertions(+), 102 deletions(-) create mode 100644 src/cm-unknown.c create mode 100644 src/cm-unknown.h hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Thu Dec 15 22:38:20 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 15 Dec 2011 22:38:20 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-164-g2708956 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 27089564b6453deaf7b4ffe7cc5f5f290b6d892b (commit) from b22d62bd1481dfe13d60a6d16b09b9297944f063 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 27089564b6453deaf7b4ffe7cc5f5f290b6d892b Author: Werner Koch Date: Thu Dec 15 21:45:35 2011 +0100 scd: Prefer application Geldkarte over DINSIG. * scd/app.c (select_application): Reorder application tests. -- Although the DINSIG application is available on most German cards, it is in reality not used. Thus showing the Geldkarte application is more desirable for a good user experience. diff --git a/scd/app.c b/scd/app.c index 31e56fb..76dc8b4 100644 --- a/scd/app.c +++ b/scd/app.c @@ -397,11 +397,11 @@ select_application (ctrl_t ctrl, int slot, const char *name, app_t *r_app) err = app_select_nks (app); if (err && is_app_allowed ("p15") && (!name || !strcmp (name, "p15"))) err = app_select_p15 (app); - if (err && is_app_allowed ("dinsig") && (!name || !strcmp (name, "dinsig"))) - err = app_select_dinsig (app); if (err && is_app_allowed ("geldkarte") && (!name || !strcmp (name, "geldkarte"))) err = app_select_geldkarte (app); + if (err && is_app_allowed ("dinsig") && (!name || !strcmp (name, "dinsig"))) + err = app_select_dinsig (app); if (err && name) err = gpg_error (GPG_ERR_NOT_SUPPORTED); @@ -435,8 +435,8 @@ get_supported_applications (void) "openpgp", "nks", "p15", - "dinsig", "geldkarte", + "dinsig", /* Note: "undefined" is not listed here because it needs special treatment by the client. */ NULL ----------------------------------------------------------------------- Summary of changes: scd/app.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Dec 15 23:40:13 2011 From: cvs at cvs.gnupg.org (by David Shaw) Date: Thu, 15 Dec 2011 23:40:13 +0100 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.18-5-g5a0ed4a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-0 has been updated via 5a0ed4a2cc809b8595c8907e91649987775731d2 (commit) from 28c6cef128219ffdf548d6f5acf819aa2303fe0d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5a0ed4a2cc809b8595c8907e91649987775731d2 Author: David Shaw Date: Thu Dec 15 16:46:28 2011 -0500 Merge fix for issue 1331 from 1.4. * photoid.c (generate_photo_id): Check for the JPEG magic numbers instead of JFIF since some programs generate an EXIF header first. diff --git a/g10/photoid.c b/g10/photoid.c index 8aa4ad4..37156f2 100644 --- a/g10/photoid.c +++ b/g10/photoid.c @@ -1,5 +1,5 @@ /* photoid.c - photo ID handling code - * Copyright (C) 2001, 2002, 2005, 2006, 2008 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2005, 2006, 2008, 2011 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -141,8 +141,7 @@ generate_photo_id(PKT_public_key *pk,const char *photo_name) iobuf_close(file); /* Is it a JPEG? */ - if(photo[0]!=0xFF || photo[1]!=0xD8 || - photo[6]!='J' || photo[7]!='F' || photo[8]!='I' || photo[9]!='F') + if(photo[0]!=0xFF || photo[1]!=0xD8) { log_error(_("`%s' is not a JPEG file\n"),filename); xfree(photo); ----------------------------------------------------------------------- Summary of changes: g10/photoid.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Dec 15 23:57:31 2011 From: cvs at cvs.gnupg.org (by David Shaw) Date: Thu, 15 Dec 2011 23:57:31 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-165-ga98260c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via a98260c39f1c0ccdad004784cbc9440376766082 (commit) from 27089564b6453deaf7b4ffe7cc5f5f290b6d892b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a98260c39f1c0ccdad004784cbc9440376766082 Author: David Shaw Date: Thu Dec 15 16:46:28 2011 -0500 Merge fix for issue 1331 from 1.4. * photoid.c (generate_photo_id): Check for the JPEG magic numbers instead of JFIF since some programs generate an EXIF header first. diff --git a/g10/photoid.c b/g10/photoid.c index 9045f0c..c3d2745 100644 --- a/g10/photoid.c +++ b/g10/photoid.c @@ -1,5 +1,5 @@ /* photoid.c - photo ID handling code - * Copyright (C) 2001, 2002, 2005, 2006, 2008 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2005, 2006, 2008, 2011 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -141,8 +141,7 @@ generate_photo_id(PKT_public_key *pk,const char *photo_name) iobuf_close(file); /* Is it a JPEG? */ - if(photo[0]!=0xFF || photo[1]!=0xD8 || - photo[6]!='J' || photo[7]!='F' || photo[8]!='I' || photo[9]!='F') + if(photo[0]!=0xFF || photo[1]!=0xD8) { log_error(_("`%s' is not a JPEG file\n"),filename); xfree(photo); ----------------------------------------------------------------------- Summary of changes: g10/photoid.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Dec 16 02:03:29 2011 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 16 Dec 2011 02:03:29 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-166-gf6251c0 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via f6251c0d0af92331388f5e9bcd1750cbadcaca8f (commit) from a98260c39f1c0ccdad004784cbc9440376766082 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f6251c0d0af92331388f5e9bcd1750cbadcaca8f Author: NIIBE Yutaka Date: Fri Dec 16 09:07:56 2011 +0900 Don't kill pinentry by SIGKILL but let it quit by SIGINT. * agent/call-pinentry.c (agent_popup_message_stop): To pinentry, send SIGINT (was: SIGKILL). diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index d0cfd2b..36093bb 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -1273,8 +1273,7 @@ agent_popup_message_stop (ctrl_t ctrl) assuan_set_flag (entry_ctx, ASSUAN_NO_WAITPID, 1); } else if (pid > 0) - kill (pid, SIGKILL); /* Need to use SIGKILL due to bad - interaction of SIGINT with Pth. */ + kill (pid, SIGINT); #endif /* Now wait for the thread to terminate. */ ----------------------------------------------------------------------- Summary of changes: agent/call-pinentry.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Dec 16 22:55:13 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 16 Dec 2011 22:55:13 +0100 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-21-g14cf1f7 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 14cf1f7e338fedb8edaff5631441746605152bd6 (commit) from 16f5654643d584e3bc739b636752d779176b2191 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 14cf1f7e338fedb8edaff5631441746605152bd6 Author: Werner Koch Date: Fri Dec 16 22:02:18 2011 +0100 Add alignment tests for the cipher tests. * tests/basic.c (check_one_cipher): Factor most code out to check_one_cipher_core. Call that core function several times using different alignment settings. (check_one_cipher_core): New. Add extra args to allow alignment testing. -- As reported in bug#1384 Serpent fails on a sparc64. One problem with the test code is that due to the bus error the error message won't be printed. diff --git a/tests/basic.c b/tests/basic.c index 9b2d0a8..4d5196f 100644 --- a/tests/basic.c +++ b/tests/basic.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "../src/gcrypt.h" @@ -1355,57 +1356,84 @@ check_bulk_cipher_modes (void) } - -static void -check_one_cipher (int algo, int mode, int flags) +/* The core of the cipher check. In addition to the parameters passed + to check_one_cipher it also receives the KEY and the plain data. + PASS is printed with error messages. The function returns 0 on + success. */ +static int +check_one_cipher_core (int algo, int mode, int flags, + const char *key, size_t nkey, + const unsigned char *plain, size_t nplain, + int bufshift, int pass) { gcry_cipher_hd_t hd; - char key[32]; - unsigned char plain[16], in[16], out[16]; + unsigned char in_buffer[17], out_buffer[17]; + unsigned char *in, *out; int keylen; gcry_error_t err = 0; - memcpy (key, "0123456789abcdef.,;/[]{}-=ABCDEF", 32); - memcpy (plain, "foobar42FOOBAR17", 16); + assert (nkey == 32); + assert (nplain == 16); + + if (!bufshift) + { + in = in_buffer; + out = out_buffer; + } + else if (bufshift == 1) + { + in = in_buffer+1; + out = out_buffer; + } + else if (bufshift == 2) + { + in = in_buffer+1; + out = out_buffer+1; + } + else + { + in = in_buffer; + out = out_buffer+1; + } keylen = gcry_cipher_get_algo_keylen (algo); if (!keylen) { - fail ("algo %d, mode %d, gcry_cipher_get_algo_keylen failed\n", - algo, mode); - return; + fail ("pass %d, algo %d, mode %d, gcry_cipher_get_algo_keylen failed\n", + pass, algo, mode); + return -1; } if (keylen < 40 / 8 || keylen > 32) { - fail ("algo %d, mode %d, keylength problem (%d)\n", algo, mode, keylen); - return; + fail ("pass %d, algo %d, mode %d, keylength problem (%d)\n", pass, algo, mode, keylen); + return -1; } err = gcry_cipher_open (&hd, algo, mode, flags); if (err) { - fail ("algo %d, mode %d, gcry_cipher_open failed: %s\n", - algo, mode, gpg_strerror (err)); - return; + fail ("pass %d, algo %d, mode %d, gcry_cipher_open failed: %s\n", + pass, algo, mode, gpg_strerror (err)); + return -1; } err = gcry_cipher_setkey (hd, key, keylen); if (err) { - fail ("algo %d, mode %d, gcry_cipher_setkey failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, gcry_cipher_setkey failed: %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } err = gcry_cipher_encrypt (hd, out, 16, plain, 16); if (err) { - fail ("algo %d, mode %d, gcry_cipher_encrypt failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, gcry_cipher_encrypt failed: %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } gcry_cipher_reset (hd); @@ -1413,14 +1441,15 @@ check_one_cipher (int algo, int mode, int flags) err = gcry_cipher_decrypt (hd, in, 16, out, 16); if (err) { - fail ("algo %d, mode %d, gcry_cipher_decrypt failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, gcry_cipher_decrypt failed: %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } if (memcmp (plain, in, 16)) - fail ("algo %d, mode %d, encrypt-decrypt mismatch\n", algo, mode); + fail ("pass %d, algo %d, mode %d, encrypt-decrypt mismatch\n", + pass, algo, mode); /* Again, using in-place encryption. */ gcry_cipher_reset (hd); @@ -1429,10 +1458,11 @@ check_one_cipher (int algo, int mode, int flags) err = gcry_cipher_encrypt (hd, out, 16, NULL, 0); if (err) { - fail ("algo %d, mode %d, in-place, gcry_cipher_encrypt failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, in-place, gcry_cipher_encrypt failed:" + " %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } gcry_cipher_reset (hd); @@ -1440,21 +1470,65 @@ check_one_cipher (int algo, int mode, int flags) err = gcry_cipher_decrypt (hd, out, 16, NULL, 0); if (err) { - fail ("algo %d, mode %d, in-place, gcry_cipher_decrypt failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, in-place, gcry_cipher_decrypt failed:" + " %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } if (memcmp (plain, out, 16)) - fail ("algo %d, mode %d, in-place, encrypt-decrypt mismatch\n",algo, mode); + fail ("pass %d, algo %d, mode %d, in-place, encrypt-decrypt mismatch\n", + pass, algo, mode); gcry_cipher_close (hd); + return 0; +} + + + +static void +check_one_cipher (int algo, int mode, int flags) +{ + char key[33]; + unsigned char plain[17]; + int bufshift; + + for (bufshift=0; bufshift < 4; bufshift++) + { + /* Pass 0: Standard test. */ + memcpy (key, "0123456789abcdef.,;/[]{}-=ABCDEF", 32); + memcpy (plain, "foobar42FOOBAR17", 16); + if (check_one_cipher_core (algo, mode, flags, key, 32, plain, 16, + bufshift, 0+10*bufshift)) + return; + + /* Pass 1: Key not aligned. */ + memmove (key+1, key, 32); + if (check_one_cipher_core (algo, mode, flags, key+1, 32, plain, 16, + bufshift, 1+10*bufshift)) + return; + + /* Pass 2: Key not aligned and data not aligned. */ + memmove (plain+1, plain, 16); + if (check_one_cipher_core (algo, mode, flags, key+1, 32, plain+1, 16, + bufshift, 2+10*bufshift)) + return; + + /* Pass 3: Key aligned and data not aligned. */ + memmove (key, key+1, 32); + if (check_one_cipher_core (algo, mode, flags, key, 32, plain+1, 16, + bufshift, 3+10*bufshift)) + return; + } + + return; } + static void check_ciphers (void) { ----------------------------------------------------------------------- Summary of changes: tests/basic.c | 138 +++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 106 insertions(+), 32 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Mon Dec 19 19:21:26 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 19 Dec 2011 19:21:26 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-167-gf4b7f71 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via f4b7f7146349c388a2f3ce224ff2006606c66232 (commit) from f6251c0d0af92331388f5e9bcd1750cbadcaca8f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f4b7f7146349c388a2f3ce224ff2006606c66232 Author: Werner Koch Date: Mon Dec 19 18:26:47 2011 +0100 scd: Fix for card change returning GPG_ERR_CARD_RESET. * scd/apdu.c (apdu_connect): Do not test for zero atrlen. -- When gpg-agent prompts for insertion of a card this error would be returned. Co-authored-by: Ben Kibbey diff --git a/scd/apdu.c b/scd/apdu.c index 5a51846..f470075 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -3150,8 +3150,7 @@ apdu_connect (int slot) ; else if (!(status & APDU_CARD_PRESENT)) sw = SW_HOST_NO_CARD; - else if (((status & APDU_CARD_PRESENT) && !(status & APDU_CARD_ACTIVE)) - || !reader_table[slot].atrlen) + else if ((status & APDU_CARD_PRESENT) && !(status & APDU_CARD_ACTIVE)) sw = SW_HOST_CARD_INACTIVE; if (DBG_READER) ----------------------------------------------------------------------- Summary of changes: scd/apdu.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Dec 20 06:32:22 2011 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 20 Dec 2011 06:32:22 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-168-g07f20f3 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 07f20f313a0b13e5c93168a8a62ff1cbb94a4514 (commit) from f4b7f7146349c388a2f3ce224ff2006606c66232 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 07f20f313a0b13e5c93168a8a62ff1cbb94a4514 Author: NIIBE Yutaka Date: Tue Dec 20 13:34:27 2011 +0900 Add error log and debug log for pcsc_keypad_verify and pcsc_keypad_modify. * scd/apdu.c (pcsc_keypad_verify): Add debug log and error log. (pcsc_keypad_modify): Likewise. diff --git a/scd/apdu.c b/scd/apdu.c index f470075..7bb122d 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2053,7 +2053,7 @@ pcsc_keypad_verify (int slot, int class, int ins, int p0, int p1, { int sw; unsigned char *pin_verify; - unsigned long len = PIN_VERIFY_STRUCTURE_SIZE; + int len = PIN_VERIFY_STRUCTURE_SIZE; unsigned char result[2]; size_t resultlen = 2; @@ -2109,12 +2109,21 @@ pcsc_keypad_verify (int slot, int class, int ins, int p0, int p1, pin_verify[22] = p1; /* abData[3] */ pin_verify[23] = 0x00; /* abData[4] */ + if (DBG_CARD_IO) + log_debug ("send secure: c=%02X i=%02X p1=%02X p2=%02X len=%d pinmax=%d\n", + class, ins, p0, p1, len, pininfo->maxlen); + sw = control_pcsc (slot, reader_table[slot].pcsc.verify_ioctl, pin_verify, len, result, &resultlen); xfree (pin_verify); if (sw || resultlen < 2) - return sw? sw : SW_HOST_INCOMPLETE_CARD_RESPONSE; + { + log_error ("control_pcsc failed: %d\n", sw); + return sw? sw: SW_HOST_INCOMPLETE_CARD_RESPONSE; + } sw = (result[resultlen-2] << 8) | result[resultlen-1]; + if (DBG_CARD_IO) + log_debug (" response: sw=%04X datalen=%d\n", sw, (unsigned int)resultlen); return sw; } @@ -2126,7 +2135,7 @@ pcsc_keypad_modify (int slot, int class, int ins, int p0, int p1, { int sw; unsigned char *pin_modify; - unsigned long len = PIN_MODIFY_STRUCTURE_SIZE; + int len = PIN_MODIFY_STRUCTURE_SIZE; unsigned char result[2]; size_t resultlen = 2; @@ -2193,12 +2202,21 @@ pcsc_keypad_modify (int slot, int class, int ins, int p0, int p1, pin_modify[27] = p1; /* abData[3] */ pin_modify[28] = 0x00; /* abData[4] */ + if (DBG_CARD_IO) + log_debug ("send secure: c=%02X i=%02X p1=%02X p2=%02X len=%d pinmax=%d\n", + class, ins, p0, p1, len, (int)pininfo->maxlen); + sw = control_pcsc (slot, reader_table[slot].pcsc.modify_ioctl, pin_modify, len, result, &resultlen); xfree (pin_modify); if (sw || resultlen < 2) - return sw? sw : SW_HOST_INCOMPLETE_CARD_RESPONSE; + { + log_error ("control_pcsc failed: %d\n", sw); + return sw? sw : SW_HOST_INCOMPLETE_CARD_RESPONSE; + } sw = (result[resultlen-2] << 8) | result[resultlen-1]; + if (DBG_CARD_IO) + log_debug (" response: sw=%04X datalen=%d\n", sw, (unsigned int)resultlen); return sw; } ----------------------------------------------------------------------- Summary of changes: scd/apdu.c | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Dec 20 12:43:53 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 20 Dec 2011 12:43:53 +0100 Subject: [git] Assuan - branch, master, updated. libassuan-2.0.2-9-g3ebe00d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 3ebe00d6854f110301a2742041d6d5c3e95d8e6b (commit) via 132c70fe697346a1c9f75d51572835f6d4951b3b (commit) from edbe8fdcea1a2c05999861f58d5f67d2e76610e0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3ebe00d6854f110301a2742041d6d5c3e95d8e6b Author: Werner Koch Date: Tue Dec 20 11:27:27 2011 +0100 Release version 2.0.3. * configure.ac: Bump LT version to C3/A3/R0. diff --git a/NEWS b/NEWS index 9775be2..a4979c9 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Noteworthy changes in version 2.0.3 (unreleased) +Noteworthy changes in version 2.0.3 (2011-12-20) ------------------------------------------------ * Make assuan_get_pid work correctly for pipe server. diff --git a/configure.ac b/configure.ac index b0e9e34..05c7deb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,6 @@ # configure.ac - for libassuan -# Copyright (C) 2001-2003, 2006, 2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2006, 2007, 2009, +# 2011 Free Software Foundation, Inc. # # This file is part of Assuan. # @@ -25,7 +26,7 @@ min_automake_version="1.10" # 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], [2.0.3]) -m4_define([my_issvn], [yes]) +m4_define([my_issvn], [no]) m4_define([svn_revision], m4_esyscmd([printf "%d" $( (svn info 2>/dev/null \ || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')])) @@ -42,8 +43,8 @@ AC_INIT([libassuan],[my_full_version],[http://bugs.gnupg.org]) # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBASSUAN_LT_CURRENT=2 -LIBASSUAN_LT_AGE=2 +LIBASSUAN_LT_CURRENT=3 +LIBASSUAN_LT_AGE=3 LIBASSUAN_LT_REVISION=0 # If the API is changed in an incompatible way: increment the next counter. diff --git a/doc/assuan.texi b/doc/assuan.texi index 9907803..637ad84 100644 --- a/doc/assuan.texi +++ b/doc/assuan.texi @@ -3,7 +3,7 @@ @setfilename assuan.info @macro copyrightnotice -Copyright @copyright{} 2002, 2003, 2006, 2007 Free Software Foundation, Inc. +Copyright @copyright{} 2002, 2003, 2006, 2007, 2011 Free Software Foundation, Inc. @end macro @macro permissionnotice Permission is granted to copy, distribute and/or modify this document diff --git a/src/assuan.h.in b/src/assuan.h.in index 7aae362..5c30a99 100644 --- a/src/assuan.h.in +++ b/src/assuan.h.in @@ -1,6 +1,6 @@ /* assuan.h - Definitions for the Assuan IPC library -*- c -*- - Copyright (C) 2001, 2002, 2003, 2005, 2007, 2008, 2009, - 2010 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010, + 2011 Free Software Foundation, Inc. This file is part of Assuan. commit 132c70fe697346a1c9f75d51572835f6d4951b3b Author: Werner Koch Date: Tue Dec 20 11:24:35 2011 +0100 Update gitlog-to-changelog to support --tear-off. diff --git a/Makefile.am b/Makefile.am index e7eeee5..3103c7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ # Assuan top level Makefile -# Copyright (C) 2001, 2002, 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2007, 2011 Free Software Foundation, Inc. # # This file is part of Assuan. # @@ -40,7 +40,7 @@ gen-ChangeLog: if test -d $(top_srcdir)/.git; then \ (cd $(top_srcdir) && \ ./build-aux/gitlog-to-changelog \ - --amend=build-aux/git-log-fix \ + --amend=build-aux/git-log-fix --tear-off \ --since=$(gen_start_date) ) > $(distdir)/cl-t; \ cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\ rm -f $(distdir)/ChangeLog; \ diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index 40a8035..d9f594f 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -64,6 +64,7 @@ OPTIONS: makes a change to SHA1's commit log text or metadata. --append-dot append a dot to the first line of each commit message if there is no other punctuation or blank at the end. + --tear-off tear off all commit log lines after a '--' line. --since=DATE convert only the logs since DATE; the default is to convert all log entries. --format=FMT set format string for commit subject and body; @@ -175,6 +176,7 @@ sub parse_amend_file($) my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; + my $tear_off = 0; GetOptions ( help => sub { usage 0 }, @@ -183,6 +185,7 @@ sub parse_amend_file($) 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, + 'tear-off' => \$tear_off, ) or usage 1; @@ -281,6 +284,18 @@ sub parse_amend_file($) @line = grep !/^Signed-off-by: .*>$/, @line; @line = grep !/^Co-authored-by: /, @line; + # Remove everything after a line with 2 dashes at the beginning. + if ($tear_off) + { + my @tmpline; + foreach (@line) + { + last if /^--\s*$/; + push @tmpline,$_; + } + @line = @tmpline; + } + # Remove leading and trailing blank lines. if (@line) { ----------------------------------------------------------------------- Summary of changes: Makefile.am | 4 ++-- NEWS | 2 +- build-aux/gitlog-to-changelog | 15 +++++++++++++++ configure.ac | 9 +++++---- doc/assuan.texi | 2 +- src/assuan.h.in | 4 ++-- 6 files changed, 26 insertions(+), 10 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Tue Dec 20 12:45:56 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 20 Dec 2011 12:45:56 +0100 Subject: [git] Assuan - branch, master, updated. libassuan-2.0.3-1-g6ff1083 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 6ff1083166366b9d627e5e909f245cfb119b27a7 (commit) from 3ebe00d6854f110301a2742041d6d5c3e95d8e6b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6ff1083166366b9d627e5e909f245cfb119b27a7 Author: Werner Koch Date: Tue Dec 20 11:52:36 2011 +0100 Post release version number update diff --git a/configure.ac b/configure.ac index 05c7deb..f08a3d7 100644 --- a/configure.ac +++ b/configure.ac @@ -25,8 +25,8 @@ min_automake_version="1.10" # 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], [2.0.3]) -m4_define([my_issvn], [no]) +m4_define([my_version], [2.0.4]) +m4_define([my_issvn], [yes]) m4_define([svn_revision], m4_esyscmd([printf "%d" $( (svn info 2>/dev/null \ || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')])) ----------------------------------------------------------------------- Summary of changes: configure.ac | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Tue Dec 20 18:02:00 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 20 Dec 2011 18:02:00 +0100 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-174-g604c130 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 604c130a85d4203b9d84137a42673aeaff1c0bd1 (commit) via 8e47f1e576f70d4dbe966523057fe3078006ae8b (commit) via 6f02c143440865781b4e3c1753e24e55a0de40e4 (commit) via fe2f1826991e8130f727ee15df1a4651f679752f (commit) via 779611494dbd187d09b05d2eb10faabd31a70156 (commit) via 366512abe44d9e71bb2c699c29477afa6ac71cdd (commit) from 07f20f313a0b13e5c93168a8a62ff1cbb94a4514 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 604c130a85d4203b9d84137a42673aeaff1c0bd1 Author: Werner Koch Date: Tue Dec 20 16:46:18 2011 +0100 Release 2.1.0beta3. commit 8e47f1e576f70d4dbe966523057fe3078006ae8b Author: Werner Koch Date: Tue Dec 20 15:55:43 2011 +0100 Prepare for the beta3 release. diff --git a/NEWS b/NEWS index 4364405..7d77406 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Noteworthy changes in version 2.1.0beta3 +Noteworthy changes in version 2.1.0beta3 (2011-12-20) ----------------------------------------------------- * Fixed regression in GPG's secret key export function. @@ -15,7 +15,7 @@ Noteworthy changes in version 2.1.0beta3 * gpg-connect-agent does now proberly display the help output for "SCD HELP" commands. - * New GPGSM validation model "steed". + * Preliminary support for the GPGSM validation model "steed". * Improved certificate creation in GPGSM. diff --git a/README.maint b/README.maint index f390afc..bdcdbf9 100644 --- a/README.maint +++ b/README.maint @@ -27,8 +27,8 @@ Release process: * Run "make -C po update-po". * Write NEWS entries and set the release date in NEWS. * In configure.ac set "my_issvn" to "no". - * Put a "Release " line into the top level ChangeLog. * Commit all changes to GIT and push them. + * Do a commit with a "Release " line. * Run "./autogen.sh --force" (--force is required for the svn magic in configure.ac and a good idea in any case) diff --git a/configure.ac b/configure.ac index 9dd555e..b3c7678 100644 --- a/configure.ac +++ b/configure.ac @@ -24,8 +24,8 @@ min_automake_version="1.10" # 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], [2.1.0]) -m4_define([my_issvn], [yes]) +m4_define([my_version], [2.1.0beta3]) +m4_define([my_issvn], [no]) m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \ | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)])) diff --git a/doc/HACKING b/doc/HACKING index d6cb8ab..0ef5b89 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -23,7 +23,8 @@ and ChangeLog entries don't give enough of the big picture. Omit the leading TABs that you're used to seeing in a "real" ChangeLog file, but keep the maximum line length at 72 or smaller, so that the generated ChangeLog lines, each with its leading TAB, will not exceed 80 columns. - +If you want to add text which shall not be copied to the ChangeLog, +separate it by a line consisting of two dashes at the begin of a line. ===> What follows is probably out of date <=== @@ -39,15 +40,17 @@ RFCs 1750 Randomness Recommendations for Security. -1991 PGP Message Exchange Formats. - -2015 MIME Security with Pretty Good Privacy (PGP). +1991 PGP Message Exchange Formats (obsolete) 2144 The CAST-128 Encryption Algorithm. 2279 UTF-8, a transformation format of ISO 10646. -2440 OpenPGP. +2440 OpenPGP (obsolete). + +3156 MIME Security with Pretty Good Privacy (PGP). + +4880 Current OpenPGP specification. commit 6f02c143440865781b4e3c1753e24e55a0de40e4 Author: Werner Koch Date: Tue Dec 20 15:54:43 2011 +0100 po: Update the German translation. diff --git a/po/de.po b/po/de.po index fe83f79..8b98258 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gnupg-2.1.0\n" "Report-Msgid-Bugs-To: translations at gnupg.org\n" -"PO-Revision-Date: 2011-11-24 14:15+0100\n" +"PO-Revision-Date: 2011-12-20 15:52+0100\n" "Last-Translator: Werner Koch \n" "Language-Team: German \n" "MIME-Version: 1.0\n" @@ -111,9 +111,9 @@ msgstr "Fehler beim Holen der Karten-Seriennummer: %s\n" msgid "detected card with S/N: %s\n" msgstr "Erkannte Karte hat die Seriennummer: %s\n" -#, fuzzy, c-format +#, c-format msgid "no authentication key for ssh on card: %s\n" -msgstr "Fehler beim Holen der Authentisierungsschl??ssel-ID der Karte: %s\n" +msgstr "Auf der Karte ist kein Authentisierungsschl??ssel f??r SSH: %s\n" #, c-format msgid "no suitable card key found: %s\n" @@ -5434,17 +5434,11 @@ msgstr "|AN|Neue Admin-PIN" msgid "|N|New PIN" msgstr "|N|Neue PIN" -#, fuzzy -msgid "||Please enter the Reset Code for the card and New PIN" -msgstr "Bitte geben Sie den R??ckstellcode f??r diese Karte ein" - -#, fuzzy msgid "||Please enter the Admin PIN and New Admin PIN" -msgstr "|A|Bitte die Admin-PIN eingeben." +msgstr "|A|Bitte die Admin-PIN sowie die neue Admin-PIN eingeben." -#, fuzzy msgid "||Please enter the PIN and New PIN" -msgstr "||Bitte die PIN eingeben" +msgstr "||Bitte die PIN sowie die neue PIN eingeben" msgid "error reading application data\n" msgstr "Fehler beim Lesen der Anwendungsdaten\n" @@ -5881,6 +5875,18 @@ msgid "line %d: invalid hash algorithm given\n" msgstr "Zeile %d: Ung??ltiges Hashverfahren\n" #, c-format +msgid "line %d: invalid authority-key-id\n" +msgstr "Zeile %d: Ung??ltige Authentisierungsschl??ssel-ID\n" + +#, c-format +msgid "line %d: invalid subject-key-id\n" +msgstr "Zeile %d: ung??ltige \"Subject-Key-Id\"\n" + +#, c-format +msgid "line %d: invalid extension syntax\n" +msgstr "Zeile %d: Ung??ltiger Syntax der Extension\n" + +#, c-format msgid "line %d: error reading key `%s' from card: %s\n" msgstr "Zeile %d: Fehler beim Lesen des Schl??ssels `%s' von der Karte: %s\n" @@ -7925,6 +7931,10 @@ msgstr "" "Syntax: gpg-check-pattern [optionen] Musterdatei\n" "Die von stdin gelesene Passphrase gegen die Musterdatei pr??fen\n" +#, fuzzy +#~ msgid "||Please enter the Reset Code for the card and New PIN" +#~ msgstr "Bitte geben Sie den R??ckstellcode f??r diese Karte ein" + #~ msgid " - probably dead - removing lock" #~ msgstr " - existiert wahrscheinlich nicht mehr - entferne Sperre" commit fe2f1826991e8130f727ee15df1a4651f679752f Author: Werner Koch Date: Tue Dec 20 15:35:42 2011 +0100 Add the STEED Self-Signing Nonthority certificate. * doc/com-certs.pem: Install it when creating a keybox. diff --git a/doc/com-certs.pem b/doc/com-certs.pem index 43e93b7..b3d5fa2 100644 --- a/doc/com-certs.pem +++ b/doc/com-certs.pem @@ -482,3 +482,21 @@ G1RRiCiWgYaEtSIDAP0V9ehpcghfJLlmMBnxSf4n7OZvkd1whvme2rXaQxnZi2qV d2qclY03eJ7zx6Zpq8VFuVvOxvmFZ4mMe706runhCq+rHc5x6x0/oIMhDrk= -----END CERTIFICATE----- +Issuer ...: /CN=The STEED Self-Signing Nonthority +Serial ...: 01 +Subject ..: /CN=The STEED Self-Signing Nonthority + +-----BEGIN CERTIFICATE----- +MIICKDCCAZGgAwIBAgIBATANBgkqhkiG9w0BAQUFADAsMSowKAYDVQQDEyFUaGUg +U1RFRUQgU2VsZi1TaWduaW5nIE5vbnRob3JpdHkwIBcNMTExMTExMDAwMDAwWhgP +MjEwNjAyMDYwMDAwMDBaMCwxKjAoBgNVBAMTIVRoZSBTVEVFRCBTZWxmLVNpZ25p +bmcgTm9udGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAk2h9kqe8 +0eb8ESY7UGV6j6S5zuP5DiM4TWJ3jKG2y+D2CyA1Sl90iZ6zyN3zCB0yR1xxhpuw +xdrwBRovRFludAbx3MeynYhzXkk0Hwn038q1oIt2YUw3Igz34s24o455ZE86JQ/6 +5dC7ppF8Z1I9KBL96NO+qZR/alVAKxYAwS8CAwEAAaNYMFYwEgYDVR0TAQH/BAgw +BgEB/wIBATARBgorBgEEAdpHAgICBAMBAf8wHQYDVR0OBBYEFGimOJmN+rrFEOpk +XONPloay7ffqMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOBgQB3JwUn +AbOdGv5ErojNSSP+yGZIy5av4wnkzK840Uj3jY6A5cuHroZGOD60hqLV2Hy0npox +zte4phWEKWmZiXd8SCmd3MFNgZSieiixye0qxSmuqYft2j6NhEXD5xc/iTTjFT42 +SjGPLKAICuMBuGPnoozOEVlgqwaDqKOUph5sqw== +-----END CERTIFICATE----- diff --git a/tests/Makefile.am b/tests/Makefile.am index 2142d33..307d829 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -41,6 +41,8 @@ EXTRA_DIST = runtest inittests $(testscripts) ChangeLog-2011 \ text-1.txt text-2.txt text-3.txt \ text-1.osig.pem text-1.dsig.pem text-1.osig-bad.pem \ text-2.osig.pem text-2.osig-bad.pem \ + samplekeys/steed-self-signing-nonthority.pem \ + samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key \ samplekeys/32100C27173EF6E9C4E9A25D3D69F86D37A4F939.key \ samplekeys/cert_g10code_pete1.pem \ samplekeys/cert_g10code_test1.pem \ diff --git a/tests/samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key b/tests/samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key new file mode 100644 index 0000000..8236349 --- /dev/null +++ b/tests/samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key @@ -0,0 +1,10 @@ +(private-key + (rsa + (n #0093687D92A7BCD1E6FC11263B50657A8FA4B9CEE3F90E23384D62778CA1B6CBE0F60B20354A5F74899EB3C8DDF3081D32475C71869BB0C5DAF0051A2F44596E7406F1DCC7B29D88735E49341F09F4DFCAB5A08B76614C37220CF7E2CDB8A38E79644F3A250FFAE5D0BBA6917C67523D2812FDE8D3BEA9947F6A55402B1600C12F#) + (e #010001#) + (d #11BAAE926B54482C04EDE1C59E877B5F382114F8D1BAAE926B54482C04EDE1C59E877B5F382114F8D1BAAE926B54482C04EDE1C59E877B5F382114F8D1BAAE905D3988DFC39FEF462A0655AC906CBC12F6D322795D3988DFC39FEF462A0655AC906CBC12F6D322795D3988DFC39FEF462A0655AC906CBC12F6D322795D3983C1#) + (p "\x00?BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA?") + (q "\x00?BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB?") + (u #00B28879D8EEE03F5546A5BBAD0C2213728879D8EEE03F5546A5BBAD0C2213728879D8EEE03F5546A5BBAD0C2213728879D8EEE03F5546A5BBAD0C221372887A30#) + ) + ) diff --git a/tests/samplekeys/README b/tests/samplekeys/README index a71f798..65255cb 100644 --- a/tests/samplekeys/README +++ b/tests/samplekeys/README @@ -1,6 +1,6 @@ This is a collection of keys we use with the regression tests. -opensc-tests.p12 PKCS#12 key and certificates taken from OpenSC. +opensc-tests.p12 PKCS#12 key and certificates taken from OpenSC. Passphrase is "password" ov-user.p12 Private tests keys from www.openvalidation.org. @@ -17,5 +17,8 @@ gte.pem GTE CyberTrust Global Root cert-with-117-akas.pem A certificate with 117 subjectAltNames. +steed-self-signing-nonthority.pem + The STEED Self-Signing Nonthority. +68A638998DFABAC510EA645CE34F9686B2EDF7EA.key + The private Key of The STEED Self-Signing Nonthority. - diff --git a/tests/samplekeys/steed-self-signing-nonthority.pem b/tests/samplekeys/steed-self-signing-nonthority.pem new file mode 100644 index 0000000..c6a9c54 --- /dev/null +++ b/tests/samplekeys/steed-self-signing-nonthority.pem @@ -0,0 +1,54 @@ + + ID: 0x72B0BD08 + S/N: 01 + Issuer: CN=The STEED Self-Signing Nonthority + Subject: CN=The STEED Self-Signing Nonthority + sha1_fpr: E6:99:39:A2:5F:5D:93:F2:06:71:5D:C9:FC:1A:25:DC:72:B0:BD:08 + md5_fpr: C9:83:C8:13:91:53:5A:C2:9A:BA:AF:0E:9C:AF:93:0E + certid: BA9A5990A0E94A627D08D4D06FD15EC561FD15E8.01 + keygrip: 68A638998DFABAC510EA645CE34F9686B2EDF7EA + notBefore: 2011-11-11 00:00:00 + notAfter: 2106-02-06 00:00:00 + hashAlgo: 1.2.840.113549.1.1.5 (sha1WithRSAEncryption) + keyType: 1024 bit RSA + subjKeyId: 68A638998DFABAC510EA645CE34F9686B2EDF7EA + authKeyId: [none] + keyUsage: certSign crlSign + extKeyUsage: [none] + policies: [none] + chainLength: 1 + crlDP: [none] + authInfo: [none] + subjInfo: [none] + extn: 1.3.6.1.4.1.11591.2.2.2 (wellKnownPrivateKey) [3 octets] + + +-----BEGIN CERTIFICATE----- +MIICKDCCAZGgAwIBAgIBATANBgkqhkiG9w0BAQUFADAsMSowKAYDVQQDEyFUaGUg +U1RFRUQgU2VsZi1TaWduaW5nIE5vbnRob3JpdHkwIBcNMTExMTExMDAwMDAwWhgP +MjEwNjAyMDYwMDAwMDBaMCwxKjAoBgNVBAMTIVRoZSBTVEVFRCBTZWxmLVNpZ25p +bmcgTm9udGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAk2h9kqe8 +0eb8ESY7UGV6j6S5zuP5DiM4TWJ3jKG2y+D2CyA1Sl90iZ6zyN3zCB0yR1xxhpuw +xdrwBRovRFludAbx3MeynYhzXkk0Hwn038q1oIt2YUw3Igz34s24o455ZE86JQ/6 +5dC7ppF8Z1I9KBL96NO+qZR/alVAKxYAwS8CAwEAAaNYMFYwEgYDVR0TAQH/BAgw +BgEB/wIBATARBgorBgEEAdpHAgICBAMBAf8wHQYDVR0OBBYEFGimOJmN+rrFEOpk +XONPloay7ffqMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOBgQB3JwUn +AbOdGv5ErojNSSP+yGZIy5av4wnkzK840Uj3jY6A5cuHroZGOD60hqLV2Hy0npox +zte4phWEKWmZiXd8SCmd3MFNgZSieiixye0qxSmuqYft2j6NhEXD5xc/iTTjFT42 +SjGPLKAICuMBuGPnoozOEVlgqwaDqKOUph5sqw== +-----END CERTIFICATE----- + +Created using these parameters: + + Key-Type: RSA + Key-Length: 1024 + Key-Grip: 68A638998DFABAC510EA645CE34F9686B2EDF7EA + Key-Usage: cert + Serial: 1 + Name-DN: CN=The STEED Self-Signing Nonthority + Not-Before: 2011-11-11 + Not-After: 2106-02-06 + Subject-Key-Id: 68A638998DFABAC510EA645CE34F9686B2EDF7EA + Extension: 2.5.29.19 c 30060101ff020101 + Extension: 1.3.6.1.4.1.11591.2.2.2 n 0101ff + Signing-Key: 68A638998DFABAC510EA645CE34F9686B2EDF7EA commit 779611494dbd187d09b05d2eb10faabd31a70156 Author: Werner Koch Date: Tue Dec 20 11:13:40 2011 +0100 faq: Add section on US export restrictions. diff --git a/doc/faq.org b/doc/faq.org index ee6c0c7..a11fabe 100644 --- a/doc/faq.org +++ b/doc/faq.org @@ -1167,13 +1167,8 @@ update this FAQ in the next month. See the section "Changes" for recent updates :CUSTOM_ID: i-get-sed-errors-when-running-configure-on-mac-os-x :END: - This will be fixed after GnuPG has been upgraded to autoconf-2.50. - Until then, find the line setting CDPATH in the configure script - and place an: - - : unset CDPATH - - statement below it. + This problem has been fixed for all modern GnuPG versions. + (By using an autoconf 2.50 generated configure script). ** Why does GnuPG 1.0.6 bail out on keyrings used with 1.0.7? :PROPERTIES: @@ -1470,6 +1465,41 @@ update this FAQ in the next month. See the section "Changes" for recent updates of the listing before before starting the import. +* Bug reporting and hacking + :PROPERTIES: + :CUSTOM_ID: bugreports-et-al + :END: + +** Copyright asssignments + :PROPERTIES: + :CUSTOM_ID: copyright-assigments + :END: + +** U.S. export restrictions + :PROPERTIES: + :CUSTOM_ID: us-export-restrictions + :END: + +GnuPG has originally been developed in Germany because we have been +able to do that without being affected by the US export restrictions. +We had to reject any contributions from US citizens or from people +living the the US. That changed by end of 2000 when the export +restrictions were basically dropped for all kind of freely available +software. However there are still some requirements in the US. +Quoting David Shaw: mail +#+begin_quote +For each release of GPG that I contributed to, I sent an email +containing a pointer to the new source code to the Commerce +Department. The rules changed slightly in 2004, so that you could +send a single email and then be done until the information in that +email changed, so I just sent "www.gnupg.org" and haven't bothered +with the email since. +#+end_quote + +The rules: http://www.bis.doc.gov/encryption/pubavailencsourcecodenofify.html +The 2004 rule change: http://edocket.access.gpo.gov/2004/04-26992.htm + + * Acknowledgements :PROPERTIES: :CUSTOM_ID: acknowledgements commit 366512abe44d9e71bb2c699c29477afa6ac71cdd Author: Werner Koch Date: Tue Dec 20 11:12:21 2011 +0100 Require Libassuan 2.0.3 * configure.ac: Require Libassuan 2.0.3. * agent/call-scd.c (ASSUAN_CONVEY_COMMENTS): Remove macro replacement. * agent/command.c (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Remove dependency. (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Ditto. * scd/command.c (cmd_killscd) [ASSUAN_FORCE_CLOSE]: Ditto. diff --git a/agent/call-scd.c b/agent/call-scd.c index 3f535db..deff294 100644 --- a/agent/call-scd.c +++ b/agent/call-scd.c @@ -45,15 +45,6 @@ #define MAX_OPEN_FDS 20 #endif -/* This Assuan flag is only available since libassuan 2.0.2. Because - comments lines are comments anyway we can use a replacement which - might not do anything. assuan_{g,s}et_flag don't return an error - thus there won't be any ABI problem. */ -#ifndef ASSUAN_CONVEY_COMMENTS -#define ASSUAN_CONVEY_COMMENTS 4 -#endif - - /* Definition of module local data of the CTRL structure. */ struct scd_local_s { diff --git a/agent/command.c b/agent/command.c index c33c0d6..ad86a35 100644 --- a/agent/command.c +++ b/agent/command.c @@ -2310,12 +2310,8 @@ cmd_killagent (assuan_context_t ctx, char *line) return set_error (GPG_ERR_NOT_SUPPORTED, "no --use-standard-socket"); ctrl->server_local->stopme = 1; -#ifdef ASSUAN_FORCE_CLOSE assuan_set_flag (ctx, ASSUAN_FORCE_CLOSE, 1); return 0; -#else - return gpg_error (GPG_ERR_EOF); -#endif } diff --git a/configure.ac b/configure.ac index f71b9e8..9dd555e 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ NEED_LIBGCRYPT_API=1 NEED_LIBGCRYPT_VERSION=1.5.0 NEED_LIBASSUAN_API=2 -NEED_LIBASSUAN_VERSION=2.0.0 +NEED_LIBASSUAN_VERSION=2.0.3 NEED_KSBA_API=1 NEED_KSBA_VERSION=1.2.0 diff --git a/scd/command.c b/scd/command.c index afd5ef2..88f8ec2 100644 --- a/scd/command.c +++ b/scd/command.c @@ -1936,15 +1936,8 @@ cmd_killscd (assuan_context_t ctx, char *line) (void)line; ctrl->server_local->stopme = 1; -#ifdef ASSUAN_FORCE_CLOSE assuan_set_flag (ctx, ASSUAN_FORCE_CLOSE, 1); return 0; -#else - /* Actually returning an EOF does not anymore work with modern - Libassuan versions. However we keep that non working code until - we make a Libassuan with the force close flag a requirement. */ - return gpg_error (GPG_ERR_EOF); -#endif } ----------------------------------------------------------------------- Summary of changes: NEWS | 4 +- README.maint | 2 +- agent/call-scd.c | 9 --- agent/command.c | 4 -- configure.ac | 6 +- doc/HACKING | 13 +++-- doc/com-certs.pem | 18 +++++++ doc/faq.org | 44 +++++++++++++--- po/de.po | 32 ++++++++---- scd/command.c | 7 --- tests/Makefile.am | 2 + .../68A638998DFABAC510EA645CE34F9686B2EDF7EA.key | 10 ++++ tests/samplekeys/README | 7 ++- tests/samplekeys/steed-self-signing-nonthority.pem | 54 ++++++++++++++++++++ 14 files changed, 161 insertions(+), 51 deletions(-) create mode 100644 tests/samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key create mode 100644 tests/samplekeys/steed-self-signing-nonthority.pem hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Dec 20 18:03:48 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 20 Dec 2011 18:03:48 +0100 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-1-g97d1c88 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 97d1c884e62bba94e42bb5b2bb13cd3880334c31 (commit) from 604c130a85d4203b9d84137a42673aeaff1c0bd1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 97d1c884e62bba94e42bb5b2bb13cd3880334c31 Author: Werner Koch Date: Tue Dec 20 17:10:28 2011 +0100 Post-release version number update diff --git a/NEWS b/NEWS index 7d77406..65297dd 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Noteworthy changes in version 2.1.0beta4 (unreleased) +----------------------------------------------------- + + Noteworthy changes in version 2.1.0beta3 (2011-12-20) ----------------------------------------------------- diff --git a/configure.ac b/configure.ac index b3c7678..9dd555e 100644 --- a/configure.ac +++ b/configure.ac @@ -24,8 +24,8 @@ min_automake_version="1.10" # 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], [2.1.0beta3]) -m4_define([my_issvn], [no]) +m4_define([my_version], [2.1.0]) +m4_define([my_issvn], [yes]) m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \ | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)])) ----------------------------------------------------------------------- Summary of changes: NEWS | 4 ++++ configure.ac | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Dec 23 21:15:09 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 23 Dec 2011 21:15:09 +0100 Subject: [git] GpgOL - branch, master, updated. gpgol-1.1.2-3-g985f5d8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 985f5d804d545af31310c0258c629ca8eb4039bf (commit) via 9373fd7565e30d02e657b8a57388e21ffee37223 (commit) via 5cd7638188ebd01133112dd1ebd1ee5d7a5b9f1b (commit) from 12353abc19fb5c19005c19ddcc9ba7ed0d02e09c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 985f5d804d545af31310c0258c629ca8eb4039bf Author: Werner Koch Date: Fri Dec 23 20:18:04 2011 +0100 Add gitignore file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..975a886 --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +/Makefile +/Makefile.in +/aclocal.m4 +/autom4te.cache +/config.h +/config.h.in +/config.log +/config.status +/configure +/doc/Makefile +/doc/Makefile.in +/doc/gpgol.info +/doc/mdate-sh +/doc/stamp-vti +/doc/version.texi +/forms/Makefile +/forms/Makefile.in +/m4/Makefile +/m4/Makefile.in +/po/Makefile +/po/Makefile.in +/po/POTFILES +/po/gpgol.pot +/po/remove-potcdate.sed +/po/stamp-po +*.o +*.Po +/src/Makefile +/src/Makefile.in +/src/gpgol.dll +/src/versioninfo.rc +/stamp-h1 +/src/libassuan.a +/src/libgpg-error.a +/src/libgpgme.a +/src/libmapi32.a commit 9373fd7565e30d02e657b8a57388e21ffee37223 Author: Werner Koch Date: Fri Dec 23 19:36:00 2011 +0100 Fix data corruption during encryption. That extra write was plainly wrong. I have no idea, how it slipped it. The error comes up with attachments of certain lengths. For example with a file length of 13859 bytes. * src/mimemaker.c (write_b64): Remove a stupid buffer write of 4 bytes. diff --git a/src/mimemaker.c b/src/mimemaker.c index b988ccf..8f25171 100644 --- a/src/mimemaker.c +++ b/src/mimemaker.c @@ -2,17 +2,17 @@ * Copyright (C) 2007, 2008 g10 Code GmbH * * This file is part of GpgOL. - * + * * GpgOL 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. - * + * * GpgOL 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 . */ @@ -30,7 +30,7 @@ #define COBJMACROS #include -#include +#include #include "mymapi.h" #include "mymapitags.h" @@ -49,9 +49,9 @@ static const char oid_mimetag[] = {0x2A, 0x86, 0x48, 0x86, 0xf7, 0x14, 0x03, 0x0a, 0x04}; /* The base-64 list used for base64 encoding. */ -static unsigned char bintoasc[64+1] = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"); +static unsigned char bintoasc[64+1] = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"); /* The object we use instead of IStream. It allows us to have a callback method for output and thus for processing stuff @@ -154,7 +154,7 @@ create_mapi_attachment (LPMESSAGE message, sink_t sink) if (hr) { log_error ("%s:%s: can't create attachment: hr=%#lx\n", - SRCNAME, __func__, hr); + SRCNAME, __func__, hr); return NULL; } @@ -164,7 +164,7 @@ create_mapi_attachment (LPMESSAGE message, sink_t sink) if (hr) { log_error ("%s:%s: can't set attach method: hr=%#lx\n", - SRCNAME, __func__, hr); + SRCNAME, __func__, hr); goto failure; } @@ -172,11 +172,11 @@ create_mapi_attachment (LPMESSAGE message, sink_t sink) if (get_gpgolattachtype_tag (message, &prop.ulPropTag) ) goto failure; prop.Value.l = ATTACHTYPE_MOSSTEMPL; - hr = HrSetOneProp ((LPMAPIPROP)att, &prop); + hr = HrSetOneProp ((LPMAPIPROP)att, &prop); if (hr) { log_error ("%s:%s: can't set %s property: hr=%#lx\n", - SRCNAME, __func__, "GpgOL Attach Type", hr); + SRCNAME, __func__, "GpgOL Attach Type", hr); goto failure; } @@ -188,7 +188,7 @@ create_mapi_attachment (LPMESSAGE message, sink_t sink) if (hr) { log_error ("%s:%s: can't set attach filename: hr=%#lx\n", - SRCNAME, __func__, hr); + SRCNAME, __func__, hr); goto failure; } @@ -209,17 +209,17 @@ create_mapi_attachment (LPMESSAGE message, sink_t sink) if (hr) { log_error ("%s:%s: can't set attach mime tag: hr=%#lx\n", - SRCNAME, __func__, hr); + SRCNAME, __func__, hr); goto failure; } - + punk = NULL; hr = IAttach_OpenProperty (att, PR_ATTACH_DATA_BIN, &IID_IStream, 0, (MAPI_CREATE|MAPI_MODIFY), &punk); - if (FAILED (hr)) + if (FAILED (hr)) { log_error ("%s:%s: can't create output stream: hr=%#lx\n", - SRCNAME, __func__, hr); + SRCNAME, __func__, hr); goto failure; } sink->cb_data = (LPSTREAM)punk; @@ -233,7 +233,7 @@ create_mapi_attachment (LPMESSAGE message, sink_t sink) /* Write data to a sink_t. */ -static int +static int write_buffer (sink_t sink, const void *data, size_t datalen) { if (!sink || !sink->writefnc) @@ -258,7 +258,7 @@ write_buffer_for_cb (void *opaque, const void *data, size_t datalen) /* Write the string TEXT to the IStream STREAM. Returns 0 on sucsess, prints an error message and returns -1 on error. */ -static int +static int write_string (sink_t sink, const char *text) { return write_buffer (sink, text, strlen (text)); @@ -275,7 +275,7 @@ write_multistring (sink_t sink, const char *text1, ...) va_list arg_ptr; int rc; const char *s; - + va_start (arg_ptr, text1); s = text1; do @@ -335,7 +335,7 @@ write_b64 (sink_t sink, const void *data, size_t datalen) |((inbuf[2]>>6)&03))&077]; outbuf[outlen++] = bintoasc[inbuf[2]&077]; idx = 0; - if (++quads >= (64/4)) + if (++quads >= (64/4)) { quads = 0; outbuf[outlen++] = '\r'; @@ -360,19 +360,17 @@ write_b64 (sink_t sink, const void *data, size_t datalen) outbuf[outlen++] = '='; outbuf[outlen++] = '='; } - else - { + else + { outbuf[outlen++] = bintoasc[(((*inbuf<<4)&060) |((inbuf[1]>>4)&017))&077]; outbuf[outlen++] = bintoasc[((inbuf[1]<<2)&074)&077]; outbuf[outlen++] = '='; } - if ((rc = write_buffer (sink, outbuf, 4))) - return rc; ++quads; } - if (quads) + if (quads) { outbuf[outlen++] = '\r'; outbuf[outlen++] = '\n'; @@ -416,7 +414,7 @@ write_qp (sink_t sink, const void *data, size_t datalen) outidx = 0; \ } \ } while (0) - + log_debug (" writing qp of length %d\n", (int)datalen); outidx = 0; for (p = data; datalen; p++, datalen--) @@ -523,8 +521,8 @@ write_plain (sink_t sink, const void *data, size_t datalen) } } else if (!outidx && *p == '.' - && ( (datalen > 2 && p[1] == '\r' && p[2] == '\n') - || (datalen > 1 && p[1] == '\n') + && ( (datalen > 2 && p[1] == '\r' && p[2] == '\n') + || (datalen > 1 && p[1] == '\n') || datalen == 1)) { /* Better protect a line with just a single dot. We do @@ -538,7 +536,7 @@ write_plain (sink_t sink, const void *data, size_t datalen) have been used. */ log_error ("%s:%s: BUG: line longer than exepcted", SRCNAME, __func__); - return -1; + return -1; } else outbuf[outidx++] = *p; @@ -569,7 +567,7 @@ infer_content_type (const char *data, size_t datalen, const char *filename, char b64; const char *suffix; const char *ct; - } suffix_table[] = + } suffix_table[] = { { 1, "3gp", "video/3gpp" }, { 1, "abw", "application/x-abiword" }, @@ -748,8 +746,8 @@ infer_content_encoding (const void *data, size_t datalen) lowbin++; else if (len == 1 && datalen > 2 && *p == '-' && p[1] == '-' && p[2] == ' ' - && ( (datalen > 4 && p[3] == '\r' && p[4] == '\n') - || (datalen > 3 && p[3] == '\n') + && ( (datalen > 4 && p[3] == '\r' && p[4] == '\n') + || (datalen > 3 && p[3] == '\n') || datalen == 3)) { /* This is a "-- \r\n" line, thus it indicates the usual @@ -781,7 +779,7 @@ infer_content_encoding (const void *data, size_t datalen) identical we use that value to behave closely to it. */ if (ntotal && ((float)(lowbin+highbin))/ntotal < 0.20) return 1; /* Use quoted printable. */ - + return 2; /* Use base64. */ } @@ -809,7 +807,7 @@ write_part (sink_t sink, const char *data, size_t datalen, that there might be slashes or backslashes. */ const char *s1 = strrchr (filename, '/'); const char *s2 = strrchr (filename, '\\'); - + if (!s1) s1 = s2; else if (s1 && s2 && s2 > s1) @@ -824,7 +822,7 @@ write_part (sink_t sink, const char *data, size_t datalen, } log_debug ("Writing part of length %d%s filename=`%s'\n", - (int)datalen, is_mapibody? " (body)":"", + (int)datalen, is_mapibody? " (body)":"", filename?filename:"[none]"); ct = infer_content_type (data, datalen, filename, is_mapibody, &use_b64); @@ -874,7 +872,7 @@ write_part (sink_t sink, const char *data, size_t datalen, use_qp? "quoted-printable\r\n":"7bit\r\n"), NULL))) return rc; - + if (filename) if ((rc=write_multistring (sink, "Content-Disposition: attachment;\r\n" @@ -882,11 +880,11 @@ write_part (sink_t sink, const char *data, size_t datalen, NULL))) return rc; - + /* Write delimiter. */ if ((rc = write_string (sink, "\r\n"))) return rc; - + /* Write the content. */ if (use_b64) rc = write_b64 (sink, data, datalen); @@ -905,7 +903,7 @@ static int count_usable_attachments (mapi_attach_item_t *table) { int idx, count = 0; - + if (table) for (idx=0; !table[idx].end_of_table; idx++) if (table[idx].attach_type == ATTACHTYPE_UNKNOWN @@ -917,8 +915,8 @@ count_usable_attachments (mapi_attach_item_t *table) /* Write out all attachments from TABLE separated by BOUNDARY to SINK. This function needs to be syncronized with count_usable_attachments. */ static int -write_attachments (sink_t sink, - LPMESSAGE message, mapi_attach_item_t *table, +write_attachments (sink_t sink, + LPMESSAGE message, mapi_attach_item_t *table, const char *boundary) { int idx, rc; @@ -964,7 +962,7 @@ delete_all_attachments (LPMESSAGE message, mapi_attach_item_t *table) if (hr) { log_error ("%s:%s: DeleteAttach failed: hr=%#lx\n", - SRCNAME, __func__, hr); + SRCNAME, __func__, hr); return -1; } } @@ -1001,7 +999,7 @@ close_mapi_attachment (LPATTACH *attach, sink_t sink) if (hr) { log_error ("%s:%s: SaveChanges of the attachment failed: hr=%#lx\n", - SRCNAME, __func__, hr); + SRCNAME, __func__, hr); return -1; } IAttach_Release (*attach); @@ -1045,7 +1043,7 @@ finalize_message (LPMESSAGE message, mapi_attach_item_t *att_table, /* Set the message class. */ prop.ulPropTag = PR_MESSAGE_CLASS_A; - prop.Value.lpszA = "IPM.Note.SMIME.MultipartSigned"; + prop.Value.lpszA = "IPM.Note.SMIME.MultipartSigned"; hr = IMessage_SetProps (message, 1, &prop, NULL); if (hr) { @@ -1063,8 +1061,8 @@ finalize_message (LPMESSAGE message, mapi_attach_item_t *att_table, property. This override is at least required for encrypted messages. */ if (mapi_set_gpgol_msg_class (message, - (encrypt? - (protocol == PROTOCOL_SMIME? + (encrypt? + (protocol == PROTOCOL_SMIME? "IPM.Note.GpgOL.OpaqueEncrypted" : "IPM.Note.GpgOL.MultipartEncrypted") : "IPM.Note.GpgOL.MultipartSigned"))) @@ -1098,7 +1096,7 @@ sink_hashing_write (sink_t hashsink, const void *data, size_t datalen) log_error ("%s:%s: sink not setup for writing", SRCNAME, __func__); return -1; } - + rc = engine_filter (filter, data, datalen); if (!rc && data && datalen) write_buffer (hashsink->extrasink, data, datalen); @@ -1150,8 +1148,8 @@ create_top_signing_header (char *buffer, size_t buflen, protocol_t protocol, attachment table at R_ATT_TABLE or sets this to NULL on error. If TMPSINK is set no attachment will be created but the output written to that sink. */ -static int -do_mime_sign (LPMESSAGE message, HWND hwnd, protocol_t protocol, +static int +do_mime_sign (LPMESSAGE message, HWND hwnd, protocol_t protocol, mapi_attach_item_t **r_att_table, sink_t tmpsink, unsigned int session_number) { @@ -1243,7 +1241,7 @@ do_mime_sign (LPMESSAGE message, HWND hwnd, protocol_t protocol, attachment or more than one attachment. */ if ((body && n_att_usable) || n_att_usable > 1) generate_boundary (inner_boundary); - else + else *inner_boundary = 0; /* Write the boundary so that it is not included in the hashing. */ @@ -1259,7 +1257,7 @@ do_mime_sign (LPMESSAGE message, HWND hwnd, protocol_t protocol, header, thus we do the same to avoid running all through an IConverterSession first. */ if (*inner_boundary - && (rc=write_multistring (hashsink, + && (rc=write_multistring (hashsink, "Content-Type: multipart/mixed;\r\n", "\tboundary=\"", inner_boundary, "\"\r\n", "\r\n", /* <-- extra line */ @@ -1291,7 +1289,7 @@ do_mime_sign (LPMESSAGE message, HWND hwnd, protocol_t protocol, goto failure; filter = NULL; /* Not valid anymore. */ hashsink->cb_data = NULL; /* Not needed anymore. */ - + /* Write signature attachment. */ if ((rc = write_boundary (sink, boundary, 0))) @@ -1334,7 +1332,7 @@ do_mime_sign (LPMESSAGE message, HWND hwnd, protocol_t protocol, /* Write the signature. We add an extra CR,LF which should not harm and a terminating 0. */ - collect_signature (&sigbuffer, "\r\n", 3); + collect_signature (&sigbuffer, "\r\n", 3); if ((rc = write_string (sink, sigbuffer.buf))) goto failure; @@ -1411,13 +1409,13 @@ do_mime_sign (LPMESSAGE message, HWND hwnd, protocol_t protocol, PGP or S/MIME) signed message. On failure the function tries to keep the original message intact but there is no 100% guarantee for it. */ -int +int mime_sign (LPMESSAGE message, HWND hwnd, protocol_t protocol) { int result = -1; mapi_attach_item_t *att_table; - result = do_mime_sign (message, hwnd, protocol, &att_table, 0, + result = do_mime_sign (message, hwnd, protocol, &att_table, 0, engine_new_session_number ()); if (!result) { @@ -1483,8 +1481,8 @@ sink_encryption_write_b64 (sink_t encsink, const void *data, size_t datalen) outbuf[2] = '='; outbuf[3] = '='; } - else - { + else + { outbuf[1] = bintoasc[(((*inbuf<<4)&060)| ((inbuf[1]>>4)&017))&077]; outbuf[2] = bintoasc[((inbuf[1]<<2)&074)&077]; @@ -1493,7 +1491,7 @@ sink_encryption_write_b64 (sink_t encsink, const void *data, size_t datalen) outbuflen = 4; quads++; } - + if (quads) { outbuf[outbuflen++] = '\r'; @@ -1521,7 +1519,7 @@ sink_encryption_write_b64 (sink_t encsink, const void *data, size_t datalen) |((inbuf[2]>>6)&03))&077]; outbuf[3] = bintoasc[inbuf[2]&077]; outbuflen = 4; - if (++quads >= (64/4)) + if (++quads >= (64/4)) { quads = 0; outbuf[4] = '\r'; @@ -1537,7 +1535,7 @@ sink_encryption_write_b64 (sink_t encsink, const void *data, size_t datalen) encsink->b64.idx = idx; memcpy (encsink->b64.inbuf, inbuf, idx); encsink->b64.quads = quads; - + return 0; } #endif /*Not used.*/ @@ -1585,7 +1583,7 @@ create_top_encryption_header (sink_t sink, protocol_t protocol, char *boundary) "Version: 1\r\n", NULL); if (rc) return rc; - + /* And start the second part. */ rc = write_boundary (sink, boundary, 0); if (rc) @@ -1600,8 +1598,8 @@ create_top_encryption_header (sink_t sink, protocol_t protocol, char *boundary) /* Encrypt the MESSAGE. */ -int -mime_encrypt (LPMESSAGE message, HWND hwnd, +int +mime_encrypt (LPMESSAGE message, HWND hwnd, protocol_t protocol, char **recipients) { int result = -1; @@ -1679,12 +1677,12 @@ mime_encrypt (LPMESSAGE message, HWND hwnd, /* Create a new sink for encrypting the following stuff. */ encsink->cb_data = filter; encsink->writefnc = sink_encryption_write; - + if ((body && n_att_usable) || n_att_usable > 1) { /* A body and at least one attachment or more than one attachment */ generate_boundary (inner_boundary); - if ((rc=write_multistring (encsink, + if ((rc=write_multistring (encsink, "Content-Type: multipart/mixed;\r\n", "\tboundary=\"", inner_boundary, "\"\r\n", NULL))) @@ -1694,7 +1692,7 @@ mime_encrypt (LPMESSAGE message, HWND hwnd, *inner_boundary = 0; if (body) - rc = write_part (encsink, body, strlen (body), + rc = write_part (encsink, body, strlen (body), *inner_boundary? inner_boundary : NULL, NULL, 1); if (!rc && n_att_usable) rc = write_attachments (encsink, message, att_table, @@ -1727,7 +1725,7 @@ mime_encrypt (LPMESSAGE message, HWND hwnd, /* Write the final boundary (for OpenPGP) and finish the attachment. */ if (*boundary && (rc = write_boundary (sink, boundary, 1))) goto failure; - + if (close_mapi_attachment (&attach, sink)) goto failure; @@ -1749,8 +1747,8 @@ mime_encrypt (LPMESSAGE message, HWND hwnd, /* Sign and Encrypt the MESSAGE. */ -int -mime_sign_encrypt (LPMESSAGE message, HWND hwnd, +int +mime_sign_encrypt (LPMESSAGE message, HWND hwnd, protocol_t protocol, char **recipients) { int result = -1; @@ -1809,15 +1807,15 @@ mime_sign_encrypt (LPMESSAGE message, HWND hwnd, } - /* Create a temporary sink to construct the signed data. */ + /* Create a temporary sink to construct the signed data. */ hr = OpenStreamOnFile (MAPIAllocateBuffer, MAPIFreeBuffer, (SOF_UNIQUEFILENAME | STGM_DELETEONRELEASE | STGM_CREATE | STGM_READWRITE), - NULL, "GPG", &tmpstream); - if (FAILED (hr)) + NULL, "GPG", &tmpstream); + if (FAILED (hr)) { log_error ("%s:%s: can't create temp file: hr=%#lx\n", - SRCNAME, __func__, hr); + SRCNAME, __func__, hr); rc = -1; goto failure; } @@ -1841,7 +1839,7 @@ mime_sign_encrypt (LPMESSAGE message, HWND hwnd, } sender = mapi_get_sender (message); - if ((rc=engine_encrypt_prepare (filter, hwnd, + if ((rc=engine_encrypt_prepare (filter, hwnd, protocol, ENGINE_FLAG_SIGN_FOLLOWS, sender, recipients, &protocol))) goto failure; @@ -1856,7 +1854,7 @@ mime_sign_encrypt (LPMESSAGE message, HWND hwnd, we need to fix up that ugly micalg parameter after having created the signature. Note that the protocol to use is taken from the encryption operation. */ - if (do_mime_sign (message, hwnd, protocol, &att_table, tmpsink, + if (do_mime_sign (message, hwnd, protocol, &att_table, tmpsink, session_number)) goto failure; @@ -1903,7 +1901,7 @@ mime_sign_encrypt (LPMESSAGE message, HWND hwnd, hr = IStream_Read (tmpstream, buffer, sizeof buffer, &nread); if (hr) { - log_error ("%s:%s: IStream::Read failed: hr=%#lx", + log_error ("%s:%s: IStream::Read failed: hr=%#lx", SRCNAME, __func__, hr); rc = gpg_error (GPG_ERR_EIO); goto failure; @@ -1913,7 +1911,7 @@ mime_sign_encrypt (LPMESSAGE message, HWND hwnd, rc = write_buffer (encsink, buffer, nread); if (rc) { - log_error ("%s:%s: writing tmpstream to encsink failed: %s", + log_error ("%s:%s: writing tmpstream to encsink failed: %s", SRCNAME, __func__, gpg_strerror (rc)); goto failure; } @@ -1935,11 +1933,11 @@ mime_sign_encrypt (LPMESSAGE message, HWND hwnd, log_debug ("%s:%s: nothing received from engine", SRCNAME, __func__); goto failure; } - + /* Write the final boundary (for OpenPGP) and finish the attachment. */ if (*boundary && (rc = write_boundary (sink, boundary, 1))) goto failure; - + if (close_mapi_attachment (&attach, sink)) goto failure; @@ -1950,7 +1948,7 @@ mime_sign_encrypt (LPMESSAGE message, HWND hwnd, failure: if (result) - log_debug ("%s:%s: failed rc=%d (%s) <%s>", SRCNAME, __func__, rc, + log_debug ("%s:%s: failed rc=%d (%s) <%s>", SRCNAME, __func__, rc, gpg_strerror (rc), gpg_strsource (rc)); engine_cancel (filter); if (tmpstream) commit 5cd7638188ebd01133112dd1ebd1ee5d7a5b9f1b Author: Werner Koch Date: Fri Dec 23 19:32:06 2011 +0100 Fix double free. This bug led to crashes unter OL2007 and Vista and W7. See bug#1110. * src/attached-file-events.cpp (decrypt_and_write_file): Set BUF to NULL after free. diff --git a/src/attached-file-events.cpp b/src/attached-file-events.cpp index 0bd40ad..d7bbdd4 100644 --- a/src/attached-file-events.cpp +++ b/src/attached-file-events.cpp @@ -1,18 +1,18 @@ /* attached-file-events.cpp - GpgolAttachedFileEvents implementation * Copyright (C) 2005, 2007 g10 Code GmbH - * + * * This file is part of GpgOL. - * + * * GpgOL 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. - * + * * GpgOL 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 . */ @@ -85,17 +85,18 @@ decrypt_and_write_file (LPSTREAM stream, const char *filename, symenc_t symenc) } } while (nread == COPYBUFFERSIZE); - + xfree (buf); + buf = NULL; if (fclose (fpout)) { - log_error ("%s:%s: fclose failed: %s", + log_error ("%s:%s: fclose failed: %s", SRCNAME, __func__, strerror (errno)); MessageBox (NULL, _("Error writing attachment."), "GpgOL", MB_ICONERROR|MB_OK); goto leave; - } + } rc = S_OK; @@ -113,14 +114,14 @@ decrypt_and_write_file (LPSTREAM stream, const char *filename, symenc_t symenc) /* Our constructor. */ GpgolAttachedFileEvents::GpgolAttachedFileEvents (GpgolExt *pParentInterface) -{ +{ m_pExchExt = pParentInterface; m_ref = 0; } /* The QueryInterfac. */ -STDMETHODIMP +STDMETHODIMP GpgolAttachedFileEvents::QueryInterface (REFIID riid, LPVOID FAR *ppvObj) { *ppvObj = NULL; @@ -138,28 +139,28 @@ GpgolAttachedFileEvents::QueryInterface (REFIID riid, LPVOID FAR *ppvObj) } return E_NOINTERFACE; } - + /* Fixme: We need to figure out what this exactly does. There is no public information available exepct for the MAPI book which is out - of print. + of print. This seems to be called if one adds a new attachment to a the composer. */ -STDMETHODIMP -GpgolAttachedFileEvents::OnReadPattFromSzFile +STDMETHODIMP +GpgolAttachedFileEvents::OnReadPattFromSzFile (LPATTACH att, LPTSTR file, ULONG flags) { - log_debug ("%s:%s: att=%p file=`%s' flags=%lx\n", + log_debug ("%s:%s: att=%p file=`%s' flags=%lx\n", SRCNAME, __func__, att, file, flags); return S_FALSE; } - - + + /* This seems to be called if one clicks on Save in the context menu. And also sometimes before an Open click. */ -STDMETHODIMP -GpgolAttachedFileEvents::OnWritePattToSzFile +STDMETHODIMP +GpgolAttachedFileEvents::OnWritePattToSzFile (LPATTACH att, LPTSTR file, ULONG flags) { HRESULT hr; @@ -172,7 +173,7 @@ GpgolAttachedFileEvents::OnWritePattToSzFile ULONG nread; int rc; - log_debug ("%s:%s: att=%p file=`%s' flags=%lx\n", + log_debug ("%s:%s: att=%p file=`%s' flags=%lx\n", SRCNAME, __func__, att, file, flags); if (!att) return E_FAIL; @@ -191,7 +192,7 @@ GpgolAttachedFileEvents::OnWritePattToSzFile return E_ABORT; } - hr = att->OpenProperty (PR_ATTACH_DATA_BIN, &IID_IStream, + hr = att->OpenProperty (PR_ATTACH_DATA_BIN, &IID_IStream, 0, 0, (LPUNKNOWN*) &stream); if (FAILED (hr)) { @@ -238,7 +239,7 @@ GpgolAttachedFileEvents::QueryDisallowOpenPatt (LPATTACH att) } -STDMETHODIMP +STDMETHODIMP GpgolAttachedFileEvents::OnOpenPatt (LPATTACH att) { log_debug ("%s:%s: att=%p\n", SRCNAME, __func__, att); @@ -247,7 +248,7 @@ GpgolAttachedFileEvents::OnOpenPatt (LPATTACH att) /* This seems to be called if one clicks on Open in the context menu. */ -STDMETHODIMP +STDMETHODIMP GpgolAttachedFileEvents::OnOpenSzFile (LPTSTR file, ULONG flags) { log_debug ("%s:%s: file=`%s' flags=%lx\n", SRCNAME, __func__, file, flags); ----------------------------------------------------------------------- Summary of changes: .gitignore | 36 ++++++++++ src/attached-file-events.cpp | 45 ++++++------ src/mimemaker.c | 158 +++++++++++++++++++++--------------------- 3 files changed, 137 insertions(+), 102 deletions(-) create mode 100644 .gitignore hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Wed Dec 28 23:38:34 2011 From: cvs at cvs.gnupg.org (by David Shaw) Date: Wed, 28 Dec 2011 23:38:34 +0100 Subject: [git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.11-25-g6fe25e5 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-1-4 has been updated via 6fe25e5602fabe92c68e5ba30e4777221e8612df (commit) from 120b0ce1362a3d77955c10a0374d6cc99e885c86 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6fe25e5602fabe92c68e5ba30e4777221e8612df Author: David Shaw Date: Wed Dec 28 16:41:31 2011 -0500 Use the longest key ID available when talking to a HKP server. This is issue 1340. Now that PKSD is dead, and SKS supports long key IDs, this is safe to do. Patch from Daniel Kahn Gillmor . diff --git a/keyserver/gpgkeys_hkp.c b/keyserver/gpgkeys_hkp.c index ae520fb..b2e1a1a 100644 --- a/keyserver/gpgkeys_hkp.c +++ b/keyserver/gpgkeys_hkp.c @@ -234,9 +234,10 @@ static int get_key(char *getkey) { CURLcode res; - char request[MAX_URL+60]; + char request[MAX_URL+92]; char *offset; struct curl_writer_ctx ctx; + size_t keylen; memset(&ctx,0,sizeof(ctx)); @@ -262,14 +263,19 @@ get_key(char *getkey) strcat(request,port); strcat(request,opt->path); /* request is MAX_URL+55 bytes long - MAX_URL covers the whole URL, - including any supplied path. The 60 overcovers this /pks/... etc - string plus the 8 bytes of key id */ + including any supplied path. The 92 overcovers this /pks/... etc + string plus the 8, 16, or 40 bytes of key id/fingerprint */ append_path(request,"/pks/lookup?op=get&options=mr&search=0x"); - /* fingerprint or long key id. Take the last 8 characters and treat - it like a short key id */ - if(strlen(getkey)>8) - offset=&getkey[strlen(getkey)-8]; + /* send only fingerprint, long key id, or short keyid. see: + https://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-3.1.1.1 */ + keylen = strlen(getkey); + if(keylen >= 40) + offset=&getkey[keylen-40]; + else if(keylen >= 16) + offset=&getkey[keylen-16]; + else if(keylen >= 8) + offset=&getkey[keylen-8]; else offset=getkey; ----------------------------------------------------------------------- Summary of changes: keyserver/gpgkeys_hkp.c | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Dec 28 23:46:27 2011 From: cvs at cvs.gnupg.org (by David Shaw) Date: Wed, 28 Dec 2011 23:46:27 +0100 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.18-6-g3005b0a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-0 has been updated via 3005b0a6f43e53bed2f9b6fba7ad1205bdb29bc5 (commit) from 5a0ed4a2cc809b8595c8907e91649987775731d2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3005b0a6f43e53bed2f9b6fba7ad1205bdb29bc5 Author: David Shaw Date: Wed Dec 28 16:41:31 2011 -0500 Use the longest key ID available when talking to a HKP server. This is issue 1340. Now that PKSD is dead, and SKS supports long key IDs, this is safe to do. Patch from Daniel Kahn Gillmor . diff --git a/keyserver/gpgkeys_hkp.c b/keyserver/gpgkeys_hkp.c index a44f091..ee6421a 100644 --- a/keyserver/gpgkeys_hkp.c +++ b/keyserver/gpgkeys_hkp.c @@ -241,9 +241,10 @@ static int get_key(char *getkey) { CURLcode res; - char request[MAX_URL+60]; + char request[MAX_URL+92]; char *offset; struct curl_writer_ctx ctx; + size_t keylen; memset(&ctx,0,sizeof(ctx)); @@ -269,14 +270,19 @@ get_key(char *getkey) strcat(request,port); strcat(request,opt->path); /* request is MAX_URL+55 bytes long - MAX_URL covers the whole URL, - including any supplied path. The 60 overcovers this /pks/... etc - string plus the 8 bytes of key id */ + including any supplied path. The 92 overcovers this /pks/... etc + string plus the 8, 16, or 40 bytes of key id/fingerprint */ append_path(request,"/pks/lookup?op=get&options=mr&search=0x"); - /* fingerprint or long key id. Take the last 8 characters and treat - it like a short key id */ - if(strlen(getkey)>8) - offset=&getkey[strlen(getkey)-8]; + /* send only fingerprint, long key id, or short keyid. see: + https://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-3.1.1.1 */ + keylen = strlen(getkey); + if(keylen >= 40) + offset=&getkey[keylen-40]; + else if(keylen >= 16) + offset=&getkey[keylen-16]; + else if(keylen >= 8) + offset=&getkey[keylen-8]; else offset=getkey; ----------------------------------------------------------------------- Summary of changes: keyserver/gpgkeys_hkp.c | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Dec 28 23:49:46 2011 From: cvs at cvs.gnupg.org (by David Shaw) Date: Wed, 28 Dec 2011 23:49:46 +0100 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-2-gc6aaf02 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via c6aaf024651c7d55ac9fb77a53c084efb3adc1a9 (commit) from 97d1c884e62bba94e42bb5b2bb13cd3880334c31 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c6aaf024651c7d55ac9fb77a53c084efb3adc1a9 Author: David Shaw Date: Wed Dec 28 16:41:31 2011 -0500 Use the longest key ID available when talking to a HKP server. This is issue 1340. Now that PKSD is dead, and SKS supports long key IDs, this is safe to do. Patch from Daniel Kahn Gillmor . diff --git a/keyserver/gpgkeys_hkp.c b/keyserver/gpgkeys_hkp.c index d43a61a..ac7039d 100644 --- a/keyserver/gpgkeys_hkp.c +++ b/keyserver/gpgkeys_hkp.c @@ -241,9 +241,10 @@ static int get_key(char *getkey) { CURLcode res; - char request[MAX_URL+60]; + char request[MAX_URL+92]; char *offset; struct curl_writer_ctx ctx; + size_t keylen; memset(&ctx,0,sizeof(ctx)); @@ -269,14 +270,19 @@ get_key(char *getkey) strcat(request,port); strcat(request,opt->path); /* request is MAX_URL+55 bytes long - MAX_URL covers the whole URL, - including any supplied path. The 60 overcovers this /pks/... etc - string plus the 8 bytes of key id */ + including any supplied path. The 92 overcovers this /pks/... etc + string plus the 8, 16, or 40 bytes of key id/fingerprint */ append_path(request,"/pks/lookup?op=get&options=mr&search=0x"); - /* fingerprint or long key id. Take the last 8 characters and treat - it like a short key id */ - if(strlen(getkey)>8) - offset=&getkey[strlen(getkey)-8]; + /* send only fingerprint, long key id, or short keyid. see: + https://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-3.1.1.1 */ + keylen = strlen(getkey); + if(keylen >= 40) + offset=&getkey[keylen-40]; + else if(keylen >= 16) + offset=&getkey[keylen-16]; + else if(keylen >= 8) + offset=&getkey[keylen-8]; else offset=getkey; ----------------------------------------------------------------------- Summary of changes: keyserver/gpgkeys_hkp.c | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org