diff options
author | JinWang An <jinwang.an@samsung.com> | 2021-12-01 16:54:33 +0900 |
---|---|---|
committer | JinWang An <jinwang.an@samsung.com> | 2021-12-01 16:54:33 +0900 |
commit | 8c4d36ec6eea1511a5241521c1001ebc56d00d6a (patch) | |
tree | 7358f97094a34a8f825ae2f92bcd75f6c980b9f7 | |
parent | 262a6d564b513034547cfb9840eb6b6e1dc48a13 (diff) | |
download | gpgme-8c4d36ec6eea1511a5241521c1001ebc56d00d6a.tar.gz gpgme-8c4d36ec6eea1511a5241521c1001ebc56d00d6a.tar.bz2 gpgme-8c4d36ec6eea1511a5241521c1001ebc56d00d6a.zip |
Imported Upstream version 1.4.1upstream/1.4.1
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | NEWS | 11 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rwxr-xr-x | configure | 54 | ||||
-rw-r--r-- | configure.ac | 31 | ||||
-rw-r--r-- | doc/gpgme.info | 221 | ||||
-rw-r--r-- | doc/gpgme.info-1 | 48 | ||||
-rw-r--r-- | doc/gpgme.info-2 | 6 | ||||
-rw-r--r-- | doc/gpgme.texi | 42 | ||||
-rw-r--r-- | doc/stamp-vti | 8 | ||||
-rw-r--r-- | doc/version.texi | 8 | ||||
-rw-r--r-- | gpgme.spec | 2 | ||||
-rw-r--r-- | lang/cl/gpgme.asd | 2 | ||||
-rw-r--r-- | src/engine-gpgconf.c | 119 |
14 files changed, 370 insertions, 203 deletions
@@ -1,3 +1,22 @@ +2013-05-01 Werner Koch <wk@gnupg.org> + + Release 1.4.1. + * configure.ac: Bump LT version to C20/A9/R1. + + Disable fd-passing for Apple. + * configure.ac: Disable fd-passing by default for Apple. + +2013-04-30 Werner Koch <wk@gnupg.org> + + Allow reading of long gpgconf output lines. + * src/engine-gpgconf.c (gpgconf_read): Rewrite to allow for line + lengths up to 64k. + +2013-04-29 Werner Koch <wk@gnupg.org> + + Fix for i686-w64-mingw32. + * configure.ac (NEED__FILE_OFFSET_BITS): Do not define under Windows. + 2013-02-26 Werner Koch <wk@gnupg.org> Release 1.4.0. @@ -1,3 +1,14 @@ +Noteworthy changes in version 1.4.1 (2013-05-01) +------------------------------------------------ + + * Fixed reading of gpg.conf files with excessive use of the group + option. + + * Fixed building with the i686-w64-mingw32 toolchain. + + * Disabled FD passing by default for Apple. + + Noteworthy changes in version 1.4.0 (2013-02-26) ------------------------------------------------ @@ -1 +1 @@ -1.4.0 +1.4.1 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gpgme 1.4.0. +# Generated by GNU Autoconf 2.69 for gpgme 1.4.1. # # Report bugs to <http://bugs.gnupg.org>. # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gpgme' PACKAGE_TARNAME='gpgme' -PACKAGE_VERSION='1.4.0' -PACKAGE_STRING='gpgme 1.4.0' +PACKAGE_VERSION='1.4.1' +PACKAGE_STRING='gpgme 1.4.1' PACKAGE_BUGREPORT='http://bugs.gnupg.org' PACKAGE_URL='' @@ -1418,7 +1418,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gpgme 1.4.0 to adapt to many kinds of systems. +\`configure' configures gpgme 1.4.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1488,7 +1488,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gpgme 1.4.0:";; + short | recursive ) echo "Configuration of gpgme 1.4.1:";; esac cat <<\_ACEOF @@ -1618,7 +1618,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gpgme configure 1.4.0 +gpgme configure 1.4.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2448,7 +2448,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gpgme $as_me 1.4.0, which was +It was created by gpgme $as_me 1.4.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2815,7 +2815,7 @@ LIBGPGME_LT_CURRENT=20 # Subtract 2 from this value if you want to make the LFS transition an # ABI break. [Note to self: Remove this comment with the next regular break.] LIBGPGME_LT_AGE=9 -LIBGPGME_LT_REVISION=0 +LIBGPGME_LT_REVISION=1 # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 @@ -3300,7 +3300,7 @@ fi # Define the identity of the package. PACKAGE='gpgme' - VERSION='1.4.0' + VERSION='1.4.1' cat >>confdefs.h <<_ACEOF @@ -5993,7 +5993,7 @@ cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF -VERSION_NUMBER=0x010400 +VERSION_NUMBER=0x010401 # Don't default to build static libs. @@ -17321,7 +17321,7 @@ fi # # Provide information about the build. # -BUILD_REVISION="ef5cd38" +BUILD_REVISION="5075c0d" cat >>confdefs.h <<_ACEOF @@ -17330,7 +17330,7 @@ _ACEOF BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` -BUILD_FILEVERSION="${BUILD_FILEVERSION}61276" +BUILD_FILEVERSION="${BUILD_FILEVERSION}20597" BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` @@ -17709,12 +17709,14 @@ fi # A simple compile time check in gpgme.h for GNU/Linux systems that # prevents a file offset bits mismatch between gpgme and the application. NEED__FILE_OFFSET_BITS=0 -case "$ac_cv_sys_file_offset_bits" in - "" | no | unknown) ;; - *) - NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits - ;; -esac +if test "$have_w32_system" != yes; then + case "$ac_cv_sys_file_offset_bits" in + "" | no | unknown) ;; + *) + NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits + ;; + esac +fi # Figure out platform dependent typedefs for gpgme.h @@ -19545,7 +19547,15 @@ $as_echo "$as_me: WARNING: fi -use_descriptor_passing=yes + +case "${host}" in + *-apple-darwin*) + use_descriptor_passing=no + ;; + *) + use_descriptor_passing=yes + ;; +esac # Check whether --enable-fd-passing was given. if test "${enable_fd_passing+set}" = set; then : enableval=$enable_fd_passing; use_descriptor_passing=$enableval @@ -20304,7 +20314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gpgme $as_me 1.4.0, which was +This file was extended by gpgme $as_me 1.4.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20370,7 +20380,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gpgme config.status 1.4.0 +gpgme config.status 1.4.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -22664,7 +22674,7 @@ fi echo " GPGME v${VERSION} has been configured as follows: - Revision: ef5cd38 (61276) + Revision: 5075c0d (20597) Platform: $host GnuPG path: $GPG diff --git a/configure.ac b/configure.ac index 5126797..5dee0aa 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,7 @@ min_automake_version="1.11" # for the LT versions. m4_define(mym4_version_major, [1]) m4_define(mym4_version_minor, [4]) -m4_define(mym4_version_micro, [0]) +m4_define(mym4_version_micro, [1]) # Below is m4 magic to extract and compute the revision number, the # decimalized short revision number, a beta version string, and a flag @@ -59,7 +59,7 @@ LIBGPGME_LT_CURRENT=20 # Subtract 2 from this value if you want to make the LFS transition an # ABI break. [Note to self: Remove this comment with the next regular break.] LIBGPGME_LT_AGE=9 -LIBGPGME_LT_REVISION=0 +LIBGPGME_LT_REVISION=1 # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 @@ -270,12 +270,14 @@ AC_TYPE_UINTPTR_T # A simple compile time check in gpgme.h for GNU/Linux systems that # prevents a file offset bits mismatch between gpgme and the application. NEED__FILE_OFFSET_BITS=0 -case "$ac_cv_sys_file_offset_bits" in - "" | no | unknown) ;; - *) - NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits - ;; -esac +if test "$have_w32_system" != yes; then + case "$ac_cv_sys_file_offset_bits" in + "" | no | unknown) ;; + *) + NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits + ;; + esac +fi AC_SUBST(NEED__FILE_OFFSET_BITS) # Figure out platform dependent typedefs for gpgme.h @@ -870,7 +872,18 @@ AC_CHECK_MEMBER(struct cmsghdr.cmsg_len, #include <unistd.h> ]) -use_descriptor_passing=yes + +dnl There seems to be a problem with Apple and decriptor passing. +dnl Until we found a solution we change the default to no. +dnl See bug 1483. +case "${host}" in + *-apple-darwin*) + use_descriptor_passing=no + ;; + *) + use_descriptor_passing=yes + ;; +esac AC_ARG_ENABLE(fd-passing, AC_HELP_STRING([--disable-fd-passing], [do not use FD passing]), use_descriptor_passing=$enableval) diff --git a/doc/gpgme.info b/doc/gpgme.info index 77cb4d5..2ec045e 100644 --- a/doc/gpgme.info +++ b/doc/gpgme.info @@ -22,8 +22,8 @@ General Public License for more details. This file documents the GPGME library. - This is Edition 1.4.0, last updated 26 February 2013, of `The `GnuPG -Made Easy' Reference Manual', for Version 1.4.0. + This is Edition 1.4.1, last updated 30 April 2013, of `The `GnuPG +Made Easy' Reference Manual', for Version 1.4.1. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013 g10 Code GmbH. @@ -41,116 +41,117 @@ General Public License for more details. Indirect: -gpgme.info-1: 1761 -gpgme.info-2: 277587 +gpgme.info-1: 1758 +gpgme.info-2: 279278 Tag Table: (Indirect) -Node: Top1761 -Node: Introduction8548 -Node: Getting Started9335 -Node: Features10460 -Node: Overview11610 -Node: Preparation12719 -Node: Header13716 -Node: Building the Source14415 -Node: Largefile Support (LFS)16524 -Node: Using Automake20528 -Node: Using Libtool22164 -Node: Library Version Check22514 -Node: Signal Handling26469 -Node: Multi Threading27685 -Ref: Multi Threading-Footnote-129867 -Node: Protocols and Engines30281 -Node: Engine Version Check32630 -Node: Engine Information33207 -Node: Engine Configuration36907 -Node: OpenPGP38169 -Node: Cryptographic Message Syntax38505 -Node: Algorithms38799 -Ref: Algorithms-Footnote-139278 -Node: Public Key Algorithms39406 -Node: Hash Algorithms41337 -Node: Error Handling42435 -Node: Error Values44297 -Node: Error Sources49375 -Node: Error Codes51702 -Node: Error Strings56341 -Node: Exchanging Data58120 -Node: Creating Data Buffers59434 -Node: Memory Based Data Buffers59950 -Node: File Based Data Buffers63304 -Node: Callback Based Data Buffers65475 -Node: Destroying Data Buffers71031 -Node: Manipulating Data Buffers72390 -Node: Data Buffer I/O Operations72809 -Node: Data Buffer Meta-Data75512 -Node: Contexts78862 -Node: Creating Contexts79985 -Node: Destroying Contexts80796 -Node: Result Management81131 -Node: Context Attributes82537 -Node: Protocol Selection83315 -Node: Crypto Engine84327 -Node: ASCII Armor86148 -Node: Text Mode86760 -Node: Included Certificates87691 -Node: Key Listing Mode89066 -Node: Passphrase Callback92423 -Node: Progress Meter Callback95561 -Node: Locale97485 -Node: Key Management99024 -Node: Listing Keys108952 -Node: Information About Keys116214 -Node: Key Signatures124212 -Node: Manipulating Keys128224 -Node: Generating Keys129066 -Node: Exporting Keys133673 -Node: Importing Keys139572 -Ref: Importing Keys-Footnote-1146735 -Node: Deleting Keys146863 -Node: Changing Passphrases148260 -Node: Advanced Key Editing149521 -Node: Trust Item Management152625 -Node: Listing Trust Items153695 -Node: Information About Trust Items155993 -Node: Manipulating Trust Items157875 -Node: Crypto Operations158836 -Node: Decrypt160080 -Node: Verify163938 -Node: Decrypt and Verify181794 -Node: Sign183798 -Node: Selecting Signers184362 -Node: Creating a Signature185343 -Node: Signature Notation Data189932 -Node: Encrypt192116 -Node: Encrypting a Plaintext192472 -Node: Run Control198317 -Node: Waiting For Completion199064 -Node: Using External Event Loops201110 -Node: I/O Callback Interface203077 -Node: Registering I/O Callbacks208171 -Node: I/O Callback Example210162 -Node: I/O Callback Example GTK+216381 -Node: I/O Callback Example GDK218170 -Node: I/O Callback Example Qt219812 -Node: Cancellation222100 -Node: UI Server Protocol224353 -Ref: UI Server Protocol-Footnote-1225790 -Node: UI Server Encrypt225909 -Node: UI Server Sign231090 -Node: UI Server Decrypt233319 -Node: UI Server Verify234757 -Node: UI Server Set Input Files238259 -Node: UI Server Sign/Encrypt Files239059 -Node: UI Server Verify/Decrypt Files240828 -Node: UI Server Import/Export Keys242674 -Node: UI Server Checksum Files243707 -Node: Miscellaneous UI Server Commands245873 -Ref: command SENDER247785 -Node: Library Copying249461 -Node: Copying277587 -Node: Function and Data Index315218 -Node: Concept Index340334 +Node: Top1758 +Node: Introduction8599 +Node: Getting Started9386 +Node: Features10511 +Node: Overview11661 +Node: Preparation12770 +Node: Header13767 +Node: Building the Source14466 +Node: Largefile Support (LFS)16575 +Node: Using Automake20579 +Node: Using Libtool22215 +Node: Library Version Check22565 +Node: Signal Handling26520 +Node: Multi Threading27736 +Ref: Multi Threading-Footnote-129918 +Node: Protocols and Engines30332 +Node: Engine Version Check32681 +Node: Engine Information33258 +Node: Engine Configuration36958 +Node: OpenPGP38220 +Node: Cryptographic Message Syntax38556 +Node: Algorithms38850 +Ref: Algorithms-Footnote-139329 +Node: Public Key Algorithms39457 +Node: Hash Algorithms41388 +Node: Error Handling42486 +Node: Error Values44348 +Node: Error Sources49426 +Node: Error Codes51753 +Node: Error Strings56392 +Node: Exchanging Data58171 +Node: Creating Data Buffers59485 +Node: Memory Based Data Buffers60001 +Node: File Based Data Buffers63355 +Node: Callback Based Data Buffers65526 +Node: Destroying Data Buffers71082 +Node: Manipulating Data Buffers72441 +Node: Data Buffer I/O Operations72860 +Node: Data Buffer Meta-Data75563 +Node: Contexts78913 +Node: Creating Contexts80036 +Node: Destroying Contexts80847 +Node: Result Management81182 +Node: Context Attributes82588 +Node: Protocol Selection83366 +Node: Crypto Engine84378 +Node: ASCII Armor86199 +Node: Text Mode86811 +Node: Included Certificates87742 +Node: Key Listing Mode89117 +Node: Passphrase Callback92474 +Node: Progress Meter Callback95612 +Node: Locale97536 +Node: Key Management99075 +Node: Listing Keys109003 +Node: Information About Keys116265 +Node: Key Signatures124263 +Node: Manipulating Keys128275 +Node: Generating Keys129117 +Node: Exporting Keys133724 +Node: Importing Keys139623 +Ref: Importing Keys-Footnote-1146786 +Node: Deleting Keys146914 +Node: Changing Passphrases148311 +Node: Advanced Key Editing149572 +Node: Trust Item Management152676 +Node: Listing Trust Items153746 +Node: Information About Trust Items156044 +Node: Manipulating Trust Items157926 +Node: Crypto Operations158887 +Node: Decrypt160131 +Node: Verify163989 +Node: Decrypt and Verify181845 +Node: Sign183849 +Node: Selecting Signers184413 +Node: Creating a Signature185394 +Node: Signature Notation Data189983 +Node: Encrypt192167 +Node: Encrypting a Plaintext192523 +Node: Run Control198368 +Node: Waiting For Completion199115 +Node: Using External Event Loops201161 +Node: I/O Callback Interface203128 +Node: Registering I/O Callbacks208222 +Node: I/O Callback Example210213 +Node: I/O Callback Example GTK+216432 +Node: I/O Callback Example GDK218221 +Node: I/O Callback Example Qt219863 +Node: Cancellation222151 +Node: UI Server Protocol224404 +Ref: UI Server Protocol-Footnote-1225835 +Node: UI Server Encrypt225954 +Node: UI Server Sign231135 +Node: UI Server Decrypt233364 +Node: UI Server Verify234802 +Node: UI Server Set Input Files238304 +Node: UI Server Sign/Encrypt Files239104 +Node: UI Server Verify/Decrypt Files240873 +Node: UI Server Import/Export Keys242719 +Node: UI Server Checksum Files243752 +Node: Miscellaneous UI Server Commands245918 +Ref: command SENDER247830 +Node: Debugging249506 +Node: Library Copying251161 +Node: Copying279278 +Node: Function and Data Index316909 +Node: Concept Index342025 End Tag Table diff --git a/doc/gpgme.info-1 b/doc/gpgme.info-1 index 1275165..beb3286 100644 --- a/doc/gpgme.info-1 +++ b/doc/gpgme.info-1 @@ -22,8 +22,8 @@ General Public License for more details. This file documents the GPGME library. - This is Edition 1.4.0, last updated 26 February 2013, of `The `GnuPG -Made Easy' Reference Manual', for Version 1.4.0. + This is Edition 1.4.1, last updated 30 April 2013, of `The `GnuPG +Made Easy' Reference Manual', for Version 1.4.1. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013 g10 Code GmbH. @@ -45,8 +45,8 @@ File: gpgme.info, Node: Top, Next: Introduction, Up: (dir) Main Menu ********* -This is Edition 1.4.0, last updated 26 February 2013, of `The `GnuPG -Made Easy' Reference Manual', for Version 1.4.0 of the GPGME library. +This is Edition 1.4.1, last updated 30 April 2013, of `The `GnuPG Made +Easy' Reference Manual', for Version 1.4.1 of the GPGME library. * Menu: @@ -61,6 +61,7 @@ Made Easy' Reference Manual', for Version 1.4.0 of the GPGME library. Appendices * UI Server Protocol:: The GnuPG UI Server Protocol. +* Debugging:: How to solve problems. * Library Copying:: The GNU Lesser General Public License says how you can copy and share `GnuPG Made Easy'. @@ -5543,7 +5544,7 @@ I/O occurs in the target context). this case the state of CTX is not modified). -File: gpgme.info, Node: UI Server Protocol, Next: Library Copying, Prev: Contexts, Up: Top +File: gpgme.info, Node: UI Server Protocol, Next: Debugging, Prev: Contexts, Up: Top Appendix A The GnuPG UI Server Protocol *************************************** @@ -6111,7 +6112,42 @@ associate operations the server MAY support the command: -File: gpgme.info, Node: Library Copying, Next: Copying, Prev: UI Server Protocol, Up: Top +File: gpgme.info, Node: Debugging, Next: Library Copying, Prev: UI Server Protocol, Up: Top + +Appendix B How to solve problems +******************************** + +Everyone knows that software often does not do what it should do and +thus there is a need to track down problems. This is in particular true +for applications using a complex library like GPGME and of course also +for the library itself. Here we give a few hints on how to solve such +problems. + + First of all you should make sure that the keys you want to use are +installed in the GnuPG engine and are usable. Thus the first test is +to run the desired operation using `gpg' or `gpgsm' on the command +line. If you can't figure out why things don't work, you may use +GPGME's built in trace feature. This feature is either enabled using +the environment variable `GPGME_DEBUG' or, if this is not possible, by +calling the function `gpgme_set_global_flag'. The value is the trace +level and an optional file name. + +For example + GPGME_DEBUG=9:/home/user/mygpgme.log + (Note that under Windows you use a semicolon in place of the colon to +separate the fields.) + + A trace level of 9 is pretty verbose and thus you may want to start +off with a lower level. The exact definition of the trace levels and +the output format may change with any release; you need to check the +source code for details. In any case the trace log should be helpful +to understand what is going going on. Warning: The trace log may +reveal sensitive details like passphrases or other data you use in your +application. If you are asked to send a log file, make sure that you +run your tests only with play data. + + +File: gpgme.info, Node: Library Copying, Next: Copying, Prev: Debugging, Up: Top GNU Lesser General Public License ********************************* diff --git a/doc/gpgme.info-2 b/doc/gpgme.info-2 index 35239ba..8d7a6ab 100644 --- a/doc/gpgme.info-2 +++ b/doc/gpgme.info-2 @@ -22,8 +22,8 @@ General Public License for more details. This file documents the GPGME library. - This is Edition 1.4.0, last updated 26 February 2013, of `The `GnuPG -Made Easy' Reference Manual', for Version 1.4.0. + This is Edition 1.4.1, last updated 30 April 2013, of `The `GnuPG +Made Easy' Reference Manual', for Version 1.4.1. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013 g10 Code GmbH. @@ -1189,6 +1189,7 @@ Concept Index * data buffer, write: Data Buffer I/O Operations. (line 6) * data, exchanging: Exchanging Data. (line 6) +* debug: Debugging. (line 6) * decryption: Decrypt. (line 6) * decryption and verification: Decrypt and Verify. (line 6) * encryption: Encrypt. (line 6) @@ -1214,6 +1215,7 @@ Concept Index * GDK, using GPGME with: I/O Callback Example GDK. (line 6) * GnuPG: OpenPGP. (line 6) +* GPGME_DEBUG: Debugging. (line 6) * GpgSM: Cryptographic Message Syntax. (line 6) * GTK+, using GPGME with: I/O Callback Example GTK+. diff --git a/doc/gpgme.texi b/doc/gpgme.texi index af2e163..b47d438 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -101,6 +101,7 @@ This is Edition @value{EDITION}, last updated @value{UPDATED}, of Appendices * UI Server Protocol:: The GnuPG UI Server Protocol. +* Debugging:: How to solve problems. * Library Copying:: The GNU Lesser General Public License says how you can copy and share `GnuPG Made Easy'. @@ -5794,6 +5795,47 @@ case the state of @var{ctx} is not modified). @include uiserver.texi +@node Debugging +@appendix How to solve problems +@cindex debug +@cindex GPGME_DEBUG + +Everyone knows that software often does not do what it should do and thus +there is a need to track down problems. This is in particular true +for applications using a complex library like @acronym{GPGME} and of +course also for the library itself. Here we give a few hints on how +to solve such problems. + +First of all you should make sure that the keys you want to use are +installed in the GnuPG engine and are usable. Thus the first test is +to run the desired operation using @command{gpg} or @command{gpgsm} on +the command line. If you can't figure out why things don't work, you +may use @acronym{GPGME}'s built in trace feature. This feature is +either enabled using the environment variable @code{GPGME_DEBUG} or, +if this is not possible, by calling the function +@code{gpgme_set_global_flag}. The value is the trace level and +an optional file name. + +@noindent +For example +@smallexample +GPGME_DEBUG=9:/home/user/mygpgme.log +@end smallexample +@noindent +(Note that under Windows you use a semicolon in place of the colon to +separate the fields.) + +A trace level of 9 is pretty verbose and thus you may want to start +off with a lower level. The exact definition of the trace levels and +the output format may change with any release; you need to check the +source code for details. In any case the trace log should be helpful +to understand what is going going on. Warning: The trace log may +reveal sensitive details like passphrases or other data you use in +your application. If you are asked to send a log file, make sure that +you run your tests only with play data. + + + @include lesser.texi @include gpl.texi diff --git a/doc/stamp-vti b/doc/stamp-vti index 1040955..1131294 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 26 February 2013 -@set UPDATED-MONTH February 2013 -@set EDITION 1.4.0 -@set VERSION 1.4.0 +@set UPDATED 30 April 2013 +@set UPDATED-MONTH April 2013 +@set EDITION 1.4.1 +@set VERSION 1.4.1 diff --git a/doc/version.texi b/doc/version.texi index 1040955..1131294 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 26 February 2013 -@set UPDATED-MONTH February 2013 -@set EDITION 1.4.0 -@set VERSION 1.4.0 +@set UPDATED 30 April 2013 +@set UPDATED-MONTH April 2013 +@set EDITION 1.4.1 +@set VERSION 1.4.1 @@ -1,7 +1,7 @@ # This is a template. The dist target uses it to create the real file. Summary: GPGME - GnuPG Made Easy Name: gpgme -Version: 1.4.0 +Version: 1.4.1 Release: 1 URL: http://www.gnupg.org/gpgme.html Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz diff --git a/lang/cl/gpgme.asd b/lang/cl/gpgme.asd index 089fb65..134577a 100644 --- a/lang/cl/gpgme.asd +++ b/lang/cl/gpgme.asd @@ -27,7 +27,7 @@ (defsystem gpgme :description "GnuPG Made Easy." :author "g10 Code GmbH" - :version "1.4.0" + :version "1.4.1" :licence "GPL" :depends-on ("cffi" "gpg-error") :components ((:file "gpgme-package") diff --git a/src/engine-gpgconf.c b/src/engine-gpgconf.c index fec0fc3..3a1c1c1 100644 --- a/src/engine-gpgconf.c +++ b/src/engine-gpgconf.c @@ -1,6 +1,7 @@ /* engine-gpgconf.c - gpg-conf engine. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, + 2013 g10 Code GmbH This file is part of GPGME. @@ -191,7 +192,10 @@ gpgconf_config_release (gpgme_conf_comp_t conf) } } - +/* Read from gpgconf and pass line after line to the hook function. + We put a limit of 64 k on the maximum size for a line. This should + allow for quite a long "group" line, which is usually the longest + line (mine is currently ~3k). */ static gpgme_error_t gpgconf_read (void *engine, char *arg1, char *arg2, gpgme_error_t (*cb) (void *hook, char *line), @@ -199,9 +203,9 @@ gpgconf_read (void *engine, char *arg1, char *arg2, { struct engine_gpgconf *gpgconf = engine; gpgme_error_t err = 0; -#define LINELENGTH 1024 - char linebuf[LINELENGTH] = ""; - int linelen = 0; + char *linebuf; + size_t linebufsize; + int linelen; char *argv[4] = { NULL /* file_name */, NULL, NULL, NULL }; int rp[2]; struct spawn_fd_item_s cfd[] = { {-1, 1 /* STDOUT_FILENO */, -1, 0}, @@ -232,51 +236,80 @@ gpgconf_read (void *engine, char *arg1, char *arg2, return gpg_error_from_syserror (); } - do + linebufsize = 1024; /* Usually enough for conf lines. */ + linebuf = malloc (linebufsize); + if (!linebuf) { - nread = _gpgme_io_read (rp[0], - linebuf + linelen, LINELENGTH - linelen - 1); - if (nread > 0) - { - char *line; - const char *lastmark = NULL; - size_t nused; - - linelen += nread; - linebuf[linelen] = '\0'; + err = gpg_error_from_syserror (); + goto leave; + } + linelen = 0; - for (line=linebuf; (mark = strchr (line, '\n')); line = mark+1 ) - { - lastmark = mark; - if (mark > line && mark[-1] == '\r') - mark[-1] = '\0'; - else - mark[0] = '\0'; - - /* Got a full line. Due to the CR removal code (which - occurs only on Windows) we might be one-off and thus - would see empty lines. Don't pass them to the - callback. */ - err = *line? (*cb) (hook, line) : 0; - if (err) - goto leave; - } + while ((nread = _gpgme_io_read (rp[0], linebuf + linelen, + linebufsize - linelen - 1))) + { + char *line; + const char *lastmark = NULL; + size_t nused; + + if (nread < 0) + { + err = gpg_error_from_syserror (); + goto leave; + } + + linelen += nread; + linebuf[linelen] = '\0'; + + for (line=linebuf; (mark = strchr (line, '\n')); line = mark+1 ) + { + lastmark = mark; + if (mark > line && mark[-1] == '\r') + mark[-1] = '\0'; + else + mark[0] = '\0'; + + /* Got a full line. Due to the CR removal code (which + occurs only on Windows) we might be one-off and thus + would see empty lines. Don't pass them to the + callback. */ + err = *line? (*cb) (hook, line) : 0; + if (err) + goto leave; + } + + nused = lastmark? (lastmark + 1 - linebuf) : 0; + memmove (linebuf, linebuf + nused, linelen - nused); + linelen -= nused; + + if (!(linelen < linebufsize - 1)) + { + char *newlinebuf; + + if (linelen < 8 * 1024 - 1) + linebufsize = 8 * 1024; + else if (linelen < 64 * 1024 - 1) + linebufsize = 64 * 1024; + else + { + /* We reached our limit - give up. */ + err = gpg_error (GPG_ERR_LINE_TOO_LONG); + goto leave; + } - nused = lastmark? (lastmark + 1 - linebuf) : 0; - memmove (linebuf, linebuf + nused, linelen - nused); - linelen -= nused; - } + newlinebuf = realloc (linebuf, linebufsize); + if (!newlinebuf) + { + err = gpg_error_from_syserror (); + goto leave; + } + linebuf = newlinebuf; + } } - while (nread > 0 && linelen < LINELENGTH - 1); - - if (!err && nread < 0) - err = gpg_error_from_syserror (); - if (!err && nread > 0) - err = gpg_error (GPG_ERR_LINE_TOO_LONG); leave: + free (linebuf); _gpgme_io_close (rp[0]); - return err; } |