diff options
author | JinWang An <jinwang.an@samsung.com> | 2021-12-01 16:54:34 +0900 |
---|---|---|
committer | JinWang An <jinwang.an@samsung.com> | 2021-12-01 16:54:34 +0900 |
commit | ad62d9510e9c28596872f53b263b96ca7210dcbe (patch) | |
tree | b62ed62bdb962da24f89cc9a80ca812477d495c0 | |
parent | 995a02825947cf6f11b67998d850c748d320c8cd (diff) | |
download | gpgme-ad62d9510e9c28596872f53b263b96ca7210dcbe.tar.gz gpgme-ad62d9510e9c28596872f53b263b96ca7210dcbe.tar.bz2 gpgme-ad62d9510e9c28596872f53b263b96ca7210dcbe.zip |
Imported Upstream version 1.5.1upstream/1.5.1
-rw-r--r-- | ChangeLog | 31 | ||||
-rw-r--r-- | NEWS | 13 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rwxr-xr-x | configure | 32 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | doc/gpgme.info | 228 | ||||
-rw-r--r-- | doc/gpgme.info-1 | 22 | ||||
-rw-r--r-- | doc/gpgme.info-2 | 12 | ||||
-rw-r--r-- | doc/gpgme.texi | 22 | ||||
-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/assuan-support.c | 6 | ||||
-rw-r--r-- | src/engine-gpg.c | 2 | ||||
-rw-r--r-- | src/engine-gpgsm.c | 14 | ||||
-rw-r--r-- | src/engine-uiserver.c | 2 | ||||
-rw-r--r-- | src/gpgme-tool.c | 10 | ||||
-rw-r--r-- | src/gpgme-w32spawn.c | 25 | ||||
-rw-r--r-- | src/gpgme.h.in | 1 | ||||
-rw-r--r-- | src/keylist.c | 24 | ||||
-rw-r--r-- | src/op-support.c | 8 | ||||
-rw-r--r-- | src/priv-io.h | 1 |
23 files changed, 293 insertions, 188 deletions
@@ -1,3 +1,34 @@ +2014-07-30 Werner Koch <wk@gnupg.org> + + Release 1.5.1. + * configure.ac: Change LT version to C24/A13/R0. + + Fix possible realloc overflow for gpgsm and uiserver engines. + * src/engine-gpgsm.c (status_handler): + * src/engine-uiserver.c (status_handler): + +2014-06-26 Werner Koch <wk@gnupg.org> + + w32: Get IOSPAWN flag back in sync with spawn helper. + * src/gpgme-w32spawn.c: Include priv-io.h. + +2014-06-10 Werner Koch <wk@gnupg.org> + + Add new reason codes to the INV_RECP status code. + * src/op-support.c (_gpgme_parse_inv_recp): Add codes 13 and 14. + +2014-06-04 Werner Koch <wk@gnupg.org> + + Add new keylist mode GPGME_KEYLIST_MODE_WITH_SECRET. + * src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_SECRET): New. + * src/engine-gpg.c (gpg_keylist_build_options): Handle new mode. + * src/engine-gpgsm.c (gpgsm_keylist, gpgsm_keylist_ext): Ditto. + * src/keylist.c (parse_sec_field15): Add arg key and take care of + --with-secret output. + + * src/gpgme-tool.c (gt_get_keylist_mode, cmd_keylist_mode): Add + "with_secret". Print card info and and secret flag for subkeys. + 2014-05-21 Werner Koch <wk@gnupg.org> Release 1.5.0. @@ -1,3 +1,16 @@ +Noteworthy changes in version 1.5.1 (2014-07-30) [C24/A13/R0] +------------------------------------------------------------- + + * Fixed possible overflow in gpgsm and uiserver engines. + [CVE-2014-3564] + + * Added support for GnuPG 2.1's --with-secret option. + + * Interface changes relative to the 1.5.0 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + GPGME_KEYLIST_MODE_WITH_SECRET NEW. + + Noteworthy changes in version 1.5.0 (2014-05-21) [C23/A12/R0] ------------------------------------------------------------- @@ -1 +1 @@ -1.5.0 +1.5.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.5.0. +# Generated by GNU Autoconf 2.69 for gpgme 1.5.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.5.0' -PACKAGE_STRING='gpgme 1.5.0' +PACKAGE_VERSION='1.5.1' +PACKAGE_STRING='gpgme 1.5.1' PACKAGE_BUGREPORT='http://bugs.gnupg.org' PACKAGE_URL='' @@ -1405,7 +1405,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.5.0 to adapt to many kinds of systems. +\`configure' configures gpgme 1.5.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1475,7 +1475,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gpgme 1.5.0:";; + short | recursive ) echo "Configuration of gpgme 1.5.1:";; esac cat <<\_ACEOF @@ -1599,7 +1599,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gpgme configure 1.5.0 +gpgme configure 1.5.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2429,7 +2429,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.5.0, which was +It was created by gpgme $as_me 1.5.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2792,10 +2792,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBGPGME_LT_CURRENT=23 +LIBGPGME_LT_CURRENT=24 # 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=12 +LIBGPGME_LT_AGE=13 LIBGPGME_LT_REVISION=0 # If the API is changed in an incompatible way: increment the next counter. @@ -3283,7 +3283,7 @@ fi # Define the identity of the package. PACKAGE='gpgme' - VERSION='1.5.0' + VERSION='1.5.1' cat >>confdefs.h <<_ACEOF @@ -6015,7 +6015,7 @@ cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF -VERSION_NUMBER=0x010500 +VERSION_NUMBER=0x010501 # Don't default to build static libs. @@ -17359,7 +17359,7 @@ fi # # Provide information about the build. # -BUILD_REVISION="0eca211" +BUILD_REVISION="16835c3" cat >>confdefs.h <<_ACEOF @@ -17368,7 +17368,7 @@ _ACEOF BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` -BUILD_FILEVERSION="${BUILD_FILEVERSION}3786" +BUILD_FILEVERSION="${BUILD_FILEVERSION}5763" BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` @@ -19645,7 +19645,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.5.0, which was +This file was extended by gpgme $as_me 1.5.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19711,7 +19711,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.5.0 +gpgme config.status 1.5.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -22005,7 +22005,7 @@ fi echo " GPGME v${VERSION} has been configured as follows: - Revision: 0eca211 (3786) + Revision: 16835c3 (5763) Platform: $host UI Server: $uiserver diff --git a/configure.ac b/configure.ac index f3d3195..b3e17fa 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, [5]) -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 @@ -55,10 +55,10 @@ AC_INIT([gpgme],[mym4_full_version],[http://bugs.gnupg.org]) # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBGPGME_LT_CURRENT=23 +LIBGPGME_LT_CURRENT=24 # 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=12 +LIBGPGME_LT_AGE=13 LIBGPGME_LT_REVISION=0 # If the API is changed in an incompatible way: increment the next counter. diff --git a/doc/gpgme.info b/doc/gpgme.info index 3465aa6..b7fc85b 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.5.0, last updated 8 May 2014, of `The `GnuPG Made -Easy' Reference Manual', for Version 1.5.0. + This is Edition 1.5.1, last updated 30 July 2014, of `The `GnuPG +Made Easy' Reference Manual', for Version 1.5.1. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, 2014 g10 Code GmbH. @@ -41,120 +41,120 @@ General Public License for more details. Indirect: -gpgme.info-1: 1767 -gpgme.info-2: 289212 +gpgme.info-1: 1769 +gpgme.info-2: 289901 Tag Table: (Indirect) -Node: Top1767 -Node: Introduction8876 -Node: Getting Started9663 -Node: Features10788 -Node: Overview11938 -Node: Preparation13047 -Node: Header14044 -Node: Building the Source14743 -Node: Largefile Support (LFS)16852 -Node: Using Automake22163 -Node: Using Libtool23799 -Node: Library Version Check24149 -Node: Signal Handling29167 -Node: Multi Threading30383 -Ref: Multi Threading-Footnote-132565 -Node: Protocols and Engines32979 -Node: Engine Version Check35414 -Node: Engine Information36981 -Node: Engine Configuration40753 -Node: OpenPGP42015 -Node: Cryptographic Message Syntax42351 -Node: Algorithms42645 -Ref: Algorithms-Footnote-143124 -Node: Public Key Algorithms43252 -Node: Hash Algorithms45173 -Node: Error Handling46294 -Node: Error Values48156 -Node: Error Sources53234 -Node: Error Codes55561 -Node: Error Strings60200 -Node: Exchanging Data61979 -Node: Creating Data Buffers63808 -Node: Memory Based Data Buffers64324 -Node: File Based Data Buffers67678 -Node: Callback Based Data Buffers69849 -Node: Destroying Data Buffers75405 -Node: Manipulating Data Buffers76764 -Node: Data Buffer I/O Operations77256 -Node: Data Buffer Meta-Data79959 -Node: Data Buffer Convenience83341 -Node: Contexts85277 -Node: Creating Contexts86459 -Node: Destroying Contexts87270 -Node: Result Management87605 -Node: Context Attributes89011 -Node: Protocol Selection89791 -Node: Crypto Engine90803 -Node: ASCII Armor92624 -Node: Text Mode93236 -Node: Included Certificates94167 -Node: Key Listing Mode95542 -Node: Passphrase Callback98899 -Node: Progress Meter Callback102037 -Node: Locale103961 -Node: Key Management105500 -Node: Listing Keys115688 -Node: Information About Keys122950 -Node: Key Signatures130948 -Node: Manipulating Keys134960 -Node: Generating Keys135802 -Node: Exporting Keys140409 -Node: Importing Keys146308 -Ref: Importing Keys-Footnote-1153471 -Node: Deleting Keys153599 -Node: Changing Passphrases154996 -Node: Advanced Key Editing156257 -Node: Trust Item Management159361 -Node: Listing Trust Items160431 -Node: Information About Trust Items162729 -Node: Manipulating Trust Items164611 -Node: Crypto Operations165572 -Node: Decrypt166818 -Node: Verify170564 -Node: Decrypt and Verify188503 -Node: Sign190507 -Node: Selecting Signers191071 -Node: Creating a Signature192223 -Node: Signature Notation Data196834 -Node: Encrypt199018 -Node: Encrypting a Plaintext199374 -Node: Miscellaneous205873 -Node: Running other Programs206161 -Node: Run Control208138 -Node: Waiting For Completion208881 -Node: Using External Event Loops210927 -Node: I/O Callback Interface212894 -Node: Registering I/O Callbacks218006 -Node: I/O Callback Example219991 -Node: I/O Callback Example GTK+226208 -Node: I/O Callback Example GDK227997 -Node: I/O Callback Example Qt229639 -Node: Cancellation231927 -Node: UI Server Protocol234180 -Ref: UI Server Protocol-Footnote-1235611 -Node: UI Server Encrypt235730 -Node: UI Server Sign240990 -Node: UI Server Decrypt243298 -Node: UI Server Verify244736 -Node: UI Server Set Input Files248238 -Node: UI Server Sign/Encrypt Files249038 -Node: UI Server Verify/Decrypt Files250807 -Node: UI Server Import/Export Keys252653 -Node: UI Server Checksum Files253686 -Node: Miscellaneous UI Server Commands255852 -Ref: command SENDER257764 -Node: Debugging259440 -Node: Library Copying261095 -Node: Copying289212 -Node: Function and Data Index326843 -Node: Concept Index353007 +Node: Top1769 +Node: Introduction8880 +Node: Getting Started9667 +Node: Features10792 +Node: Overview11942 +Node: Preparation13051 +Node: Header14048 +Node: Building the Source14747 +Node: Largefile Support (LFS)16856 +Node: Using Automake22167 +Node: Using Libtool23803 +Node: Library Version Check24153 +Node: Signal Handling29171 +Node: Multi Threading30387 +Ref: Multi Threading-Footnote-132569 +Node: Protocols and Engines32983 +Node: Engine Version Check35418 +Node: Engine Information36985 +Node: Engine Configuration40757 +Node: OpenPGP42019 +Node: Cryptographic Message Syntax42355 +Node: Algorithms42649 +Ref: Algorithms-Footnote-143128 +Node: Public Key Algorithms43256 +Node: Hash Algorithms45177 +Node: Error Handling46298 +Node: Error Values48160 +Node: Error Sources53238 +Node: Error Codes55565 +Node: Error Strings60204 +Node: Exchanging Data61983 +Node: Creating Data Buffers63812 +Node: Memory Based Data Buffers64328 +Node: File Based Data Buffers67682 +Node: Callback Based Data Buffers69853 +Node: Destroying Data Buffers75409 +Node: Manipulating Data Buffers76768 +Node: Data Buffer I/O Operations77260 +Node: Data Buffer Meta-Data79963 +Node: Data Buffer Convenience83345 +Node: Contexts85281 +Node: Creating Contexts86463 +Node: Destroying Contexts87274 +Node: Result Management87609 +Node: Context Attributes89015 +Node: Protocol Selection89795 +Node: Crypto Engine90807 +Node: ASCII Armor92628 +Node: Text Mode93240 +Node: Included Certificates94171 +Node: Key Listing Mode95546 +Node: Passphrase Callback99319 +Node: Progress Meter Callback102457 +Node: Locale104381 +Node: Key Management105920 +Node: Listing Keys116377 +Node: Information About Keys123639 +Node: Key Signatures131637 +Node: Manipulating Keys135649 +Node: Generating Keys136491 +Node: Exporting Keys141098 +Node: Importing Keys146997 +Ref: Importing Keys-Footnote-1154160 +Node: Deleting Keys154288 +Node: Changing Passphrases155685 +Node: Advanced Key Editing156946 +Node: Trust Item Management160050 +Node: Listing Trust Items161120 +Node: Information About Trust Items163418 +Node: Manipulating Trust Items165300 +Node: Crypto Operations166261 +Node: Decrypt167507 +Node: Verify171253 +Node: Decrypt and Verify189192 +Node: Sign191196 +Node: Selecting Signers191760 +Node: Creating a Signature192912 +Node: Signature Notation Data197523 +Node: Encrypt199707 +Node: Encrypting a Plaintext200063 +Node: Miscellaneous206562 +Node: Running other Programs206850 +Node: Run Control208827 +Node: Waiting For Completion209570 +Node: Using External Event Loops211616 +Node: I/O Callback Interface213583 +Node: Registering I/O Callbacks218695 +Node: I/O Callback Example220680 +Node: I/O Callback Example GTK+226897 +Node: I/O Callback Example GDK228686 +Node: I/O Callback Example Qt230328 +Node: Cancellation232616 +Node: UI Server Protocol234869 +Ref: UI Server Protocol-Footnote-1236300 +Node: UI Server Encrypt236419 +Node: UI Server Sign241679 +Node: UI Server Decrypt243987 +Node: UI Server Verify245425 +Node: UI Server Set Input Files248927 +Node: UI Server Sign/Encrypt Files249727 +Node: UI Server Verify/Decrypt Files251496 +Node: UI Server Import/Export Keys253342 +Node: UI Server Checksum Files254375 +Node: Miscellaneous UI Server Commands256541 +Ref: command SENDER258453 +Node: Debugging260129 +Node: Library Copying261784 +Node: Copying289901 +Node: Function and Data Index327532 +Node: Concept Index353696 End Tag Table diff --git a/doc/gpgme.info-1 b/doc/gpgme.info-1 index 9ce1bc9..bdfd347 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.5.0, last updated 8 May 2014, of `The `GnuPG Made -Easy' Reference Manual', for Version 1.5.0. + This is Edition 1.5.1, last updated 30 July 2014, of `The `GnuPG +Made Easy' Reference Manual', for Version 1.5.1. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, 2014 g10 Code GmbH. @@ -45,8 +45,8 @@ File: gpgme.info, Node: Top, Next: Introduction, Up: (dir) Main Menu ********* -This is Edition 1.5.0, last updated 8 May 2014, of `The `GnuPG Made -Easy' Reference Manual', for Version 1.5.0 of the GPGME library. +This is Edition 1.5.1, last updated 30 July 2014, of `The `GnuPG Made +Easy' Reference Manual', for Version 1.5.1 of the GPGME library. * Menu: @@ -2348,6 +2348,14 @@ File: gpgme.info, Node: Key Listing Mode, Next: Passphrase Callback, Prev: In in the listed keys. This only works if `GPGME_KEYLIST_MODE_SIGS' is also enabled. + `GPGME_KEYLIST_MODE_WITH_SECRET' + The `GPGME_KEYLIST_MODE_WITH_SECRET' returns information about + the presence of a corresponding secret key in a public key + listing. A public key listing with this mode is slower than + a standard listing but can be used instead of a second run to + list the secret keys. This is only supported for GnuPG + versions >= 2.1. + `GPGME_KEYLIST_MODE_EPHEMERAL' The `GPGME_KEYLIST_MODE_EPHEMERAL' symbol specifies that keys flagged as ephemeral are included in the listing. @@ -2586,6 +2594,8 @@ how such keys can be selected and manipulated. This is true if the subkey is a secret key. Note that it will be false if the key is actually a stub key; i.e. a secret key operation is currently not possible (offline-key). + This is only set if a listing of secret keys has been + requested or if `GPGME_KEYLIST_MODE_WITH_SECRET' is active. `gpgme_pubkey_algo_t pubkey_algo' This is the public key algorithm supported by this subkey. @@ -2771,7 +2781,9 @@ how such keys can be selected and manipulated. `unsigned int secret : 1' This is true if the key is a secret key. Note, that this will always be true even if the corresponding subkey flag may - be false (offline/stub keys). + be false (offline/stub keys). This is only set if a listing + of secret keys has been requested or if + `GPGME_KEYLIST_MODE_WITH_SECRET' is active. `gpgme_protocol_t protocol' This is the protocol supported by this key. diff --git a/doc/gpgme.info-2 b/doc/gpgme.info-2 index bb166e3..68be411 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.5.0, last updated 8 May 2014, of `The `GnuPG Made -Easy' Reference Manual', for Version 1.5.0. + This is Edition 1.5.1, last updated 30 July 2014, of `The `GnuPG +Made Easy' Reference Manual', for Version 1.5.1. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, 2014 g10 Code GmbH. @@ -905,7 +905,7 @@ Function and Data Index * gpgme_get_io_cbs: Registering I/O Callbacks. (line 46) * gpgme_get_key: Listing Keys. (line 149) -* gpgme_get_keylist_mode: Key Listing Mode. (line 64) +* gpgme_get_keylist_mode: Key Listing Mode. (line 72) * gpgme_get_passphrase_cb: Passphrase Callback. (line 55) * gpgme_get_progress_cb: Progress Meter Callback. (line 33) @@ -932,8 +932,8 @@ Function and Data Index * gpgme_key_release: Manipulating Keys. (line 20) * gpgme_key_sig_get_string_attr: Key Signatures. (line 78) * gpgme_key_sig_get_ulong_attr: Key Signatures. (line 92) -* gpgme_key_sig_t: Key Management. (line 92) -* gpgme_key_t: Key Management. (line 200) +* gpgme_key_sig_t: Key Management. (line 94) +* gpgme_key_t: Key Management. (line 202) * gpgme_key_unref: Manipulating Keys. (line 11) * gpgme_keylist_result_t: Listing Keys. (line 125) * gpgme_new: Creating Contexts. (line 7) @@ -1070,7 +1070,7 @@ Function and Data Index (line 9) * gpgme_trust_item_unref: Manipulating Trust Items. (line 11) -* gpgme_user_id_t: Key Management. (line 165) +* gpgme_user_id_t: Key Management. (line 167) * gpgme_validity_t: Information About Keys. (line 10) * gpgme_verify_result_t: Verify. (line 248) diff --git a/doc/gpgme.texi b/doc/gpgme.texi index e326574..1f4a9e1 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -2472,6 +2472,13 @@ signature notations on key signatures should be included in the listed keys. This only works if @code{GPGME_KEYLIST_MODE_SIGS} is also enabled. +@item GPGME_KEYLIST_MODE_WITH_SECRET +The @code{GPGME_KEYLIST_MODE_WITH_SECRET} returns information about +the presence of a corresponding secret key in a public key listing. A +public key listing with this mode is slower than a standard listing +but can be used instead of a second run to list the secret keys. This +is only supported for GnuPG versions >= 2.1. + @item GPGME_KEYLIST_MODE_EPHEMERAL The @code{GPGME_KEYLIST_MODE_EPHEMERAL} symbol specifies that keys flagged as ephemeral are included in the listing. @@ -2712,9 +2719,11 @@ This is true if the subkey can be used for qualified signatures according to local government regulations. @item unsigned int secret : 1 -This is true if the subkey is a secret key. Note that it will be false -if the key is actually a stub key; i.e. a secret key operation is -currently not possible (offline-key). +This is true if the subkey is a secret key. Note that it will be +false if the key is actually a stub key; i.e. a secret key operation +is currently not possible (offline-key). This is only set if a +listing of secret keys has been requested or if +@code{GPGME_KEYLIST_MODE_WITH_SECRET} is active. @item gpgme_pubkey_algo_t pubkey_algo This is the public key algorithm supported by this subkey. @@ -2905,9 +2914,10 @@ This is true if the key can be used for qualified signatures according to local government regulations. @item unsigned int secret : 1 -This is true if the key is a secret key. Note, that this will always be -true even if the corresponding subkey flag may be false (offline/stub -keys). +This is true if the key is a secret key. Note, that this will always +be true even if the corresponding subkey flag may be false +(offline/stub keys). This is only set if a listing of secret keys has +been requested or if @code{GPGME_KEYLIST_MODE_WITH_SECRET} is active. @item gpgme_protocol_t protocol This is the protocol supported by this key. diff --git a/doc/stamp-vti b/doc/stamp-vti index 66f8204..c3a4de7 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 8 May 2014 -@set UPDATED-MONTH May 2014 -@set EDITION 1.5.0 -@set VERSION 1.5.0 +@set UPDATED 30 July 2014 +@set UPDATED-MONTH July 2014 +@set EDITION 1.5.1 +@set VERSION 1.5.1 diff --git a/doc/version.texi b/doc/version.texi index 66f8204..c3a4de7 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 8 May 2014 -@set UPDATED-MONTH May 2014 -@set EDITION 1.5.0 -@set VERSION 1.5.0 +@set UPDATED 30 July 2014 +@set UPDATED-MONTH July 2014 +@set EDITION 1.5.1 +@set VERSION 1.5.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.5.0 +Version: 1.5.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 53bd37b..47a486a 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.5.0" + :version "1.5.1" :licence "GPL" :depends-on ("cffi" "gpg-error") :components ((:file "gpgme-package") diff --git a/src/assuan-support.c b/src/assuan-support.c index 0a11d9f..745d2aa 100644 --- a/src/assuan-support.c +++ b/src/assuan-support.c @@ -238,6 +238,12 @@ my_connect (assuan_context_t ctx, int sock, struct sockaddr *addr, } +/* Note for Windows: Ignore the incompatible pointer type warning for + my_read and my_write. Mingw has been changed to use int for + ssize_t on 32 bit systems while we use long. For 64 bit we use + int64_t while mingw uses __int64_t. It doe not matter at all + because under Windows long and int are both 32 bit even on 64 + bit. */ struct assuan_system_hooks _gpgme_assuan_system_hooks = { ASSUAN_SYSTEM_HOOKS_VERSION, diff --git a/src/engine-gpg.c b/src/engine-gpg.c index ede098e..4df0f3e 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -2194,6 +2194,8 @@ gpg_keylist_build_options (engine_gpg_t gpg, int secret_only, err = add_arg (gpg, "--with-fingerprint"); if (!err) err = add_arg (gpg, "--with-fingerprint"); + if (!err && (mode & GPGME_KEYLIST_MODE_WITH_SECRET)) + err = add_arg (gpg, "--with-secret"); if (!err && (mode & GPGME_KEYLIST_MODE_SIGS) && (mode & GPGME_KEYLIST_MODE_SIG_NOTATIONS)) diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c index 710bf14..3a83757 100644 --- a/src/engine-gpgsm.c +++ b/src/engine-gpgsm.c @@ -836,7 +836,7 @@ status_handler (void *opaque, int fd) else { *aline = newline; - gpgsm->colon.attic.linesize += linelen + 1; + gpgsm->colon.attic.linesize = *alinelen + linelen + 1; } } if (!err) @@ -1551,7 +1551,7 @@ gpgsm_keylist (void *engine, const char *pattern, int secret_only, the agent. However on a fresh installation no public keys are available and thus there is no need for gpgsm to ask the agent whether a secret key exists for the public key. */ - if (secret_only) + if (secret_only || (mode & GPGME_KEYLIST_MODE_WITH_SECRET)) gpgsm_assuan_simple_command (gpgsm->assuan_ctx, "GETINFO agent-check", NULL, NULL); @@ -1580,6 +1580,11 @@ gpgsm_keylist (void *engine, const char *pattern, int secret_only, "OPTION with-ephemeral-keys=1": "OPTION with-ephemeral-keys=0" , NULL, NULL); + gpgsm_assuan_simple_command (gpgsm->assuan_ctx, + (mode & GPGME_KEYLIST_MODE_WITH_SECRET)? + "OPTION with-secret=1": + "OPTION with-secret=0" , + NULL, NULL); /* Length is "LISTSECRETKEYS " + p + '\0'. */ @@ -1645,6 +1650,11 @@ gpgsm_keylist_ext (void *engine, const char *pattern[], int secret_only, "OPTION with-validation=1": "OPTION with-validation=0" , NULL, NULL); + gpgsm_assuan_simple_command (gpgsm->assuan_ctx, + (mode & GPGME_KEYLIST_MODE_WITH_SECRET)? + "OPTION with-secret=1": + "OPTION with-secret=0" , + NULL, NULL); if (pattern && *pattern) diff --git a/src/engine-uiserver.c b/src/engine-uiserver.c index 2738c36..a7184b7 100644 --- a/src/engine-uiserver.c +++ b/src/engine-uiserver.c @@ -698,7 +698,7 @@ status_handler (void *opaque, int fd) else { *aline = newline; - uiserver->colon.attic.linesize += linelen + 1; + uiserver->colon.attic.linesize = *alinelen + linelen + 1; } } if (!err) diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c index be8ed07..f02fffa 100644 --- a/src/gpgme-tool.c +++ b/src/gpgme-tool.c @@ -1861,6 +1861,8 @@ gt_get_keylist_mode (gpgme_tool_t gt) modes[idx++] = "sigs"; if (mode & GPGME_KEYLIST_MODE_SIG_NOTATIONS) modes[idx++] = "sig_notations"; + if (mode & GPGME_KEYLIST_MODE_WITH_SECRET) + modes[idx++] = "with_secret"; if (mode & GPGME_KEYLIST_MODE_EPHEMERAL) modes[idx++] = "ephemeral"; if (mode & GPGME_KEYLIST_MODE_VALIDATE) @@ -2591,6 +2593,8 @@ cmd_keylist_mode (assuan_context_t ctx, char *line) mode |= GPGME_KEYLIST_MODE_SIGS; if (strstr (line, "sig_notations")) mode |= GPGME_KEYLIST_MODE_SIG_NOTATIONS; + if (strstr (line, "with_secret")) + mode |= GPGME_KEYLIST_MODE_WITH_SECRET; if (strstr (line, "ephemeral")) mode |= GPGME_KEYLIST_MODE_EPHEMERAL; if (strstr (line, "validate")) @@ -3299,6 +3303,12 @@ cmd_keylist (assuan_context_t ctx, char *line) result_xml_tag_start (&state, "subkey", NULL); /* FIXME: more data */ result_add_fpr (&state, "fpr", subkey->fpr); + result_add_value (&state, "secret", subkey->secret); + result_add_value (&state, "is_cardkey", subkey->is_cardkey); + if (subkey->card_number) + result_add_string (&state, "card_number", subkey->card_number); + if (subkey->curve) + result_add_string (&state, "curve", subkey->curve); result_xml_tag_end (&state); /* subkey */ subkey = subkey->next; } diff --git a/src/gpgme-w32spawn.c b/src/gpgme-w32spawn.c index 8a4ab54..b510ba3 100644 --- a/src/gpgme-w32spawn.c +++ b/src/gpgme-w32spawn.c @@ -36,10 +36,8 @@ #endif #include <stdint.h> #include <process.h> -#include <windows.h> -/* Flag values as used by gpgme. */ -#define IOSPAWN_FLAG_ALLOW_SET_FG 1 +#include "priv-io.h" /* Name of this program. */ @@ -47,15 +45,6 @@ -struct spawn_fd_item_s -{ - int handle; - int dup_to; - int peer_name; - int arg_loc; -}; - - static char * build_commandline (char **argv) { @@ -160,7 +149,7 @@ my_spawn (char **argv, struct spawn_fd_item_s *fd_list, unsigned int flags) fprintf (stderr, PGM": spawning: %s\n", arg_string); - for (i = 0; fd_list[i].handle != -1; i++) + for (i = 0; fd_list[i].fd != -1; i++) { /* The handle already is inheritable. */ if (fd_list[i].dup_to == 0) @@ -240,8 +229,8 @@ my_spawn (char **argv, struct spawn_fd_item_s *fd_list, unsigned int flags) if (hnul != INVALID_HANDLE_VALUE) CloseHandle (hnul); - for (i = 0; fd_list[i].handle != -1; i++) - CloseHandle ((HANDLE) fd_list[i].handle); + for (i = 0; fd_list[i].fd != -1; i++) + CloseHandle ((HANDLE) fd_list[i].fd); if (flags & IOSPAWN_FLAG_ALLOW_SET_FG) { @@ -379,12 +368,12 @@ translate_get_from_file (const char *trans_file, break; linep = tail; - fd_list[idx].handle = from; + fd_list[idx].fd = from; fd_list[idx].dup_to = dup_to; fd_list[idx].peer_name = to; fd_list[idx].arg_loc = loc; } - fd_list[idx].handle = -1; + fd_list[idx].fd = -1; fd_list[idx].dup_to = -1; fd_list[idx].peer_name = -1; fd_list[idx].arg_loc = 0; @@ -420,7 +409,7 @@ translate_handles (const char *trans_file, const char * const *argv, args[idx] = NULL; n_args = idx; - for (idx = 0; fd_list[idx].handle != -1; idx++) + for (idx = 0; fd_list[idx].fd != -1; idx++) { char buf[25]; int aidx; diff --git a/src/gpgme.h.in b/src/gpgme.h.in index d47f4ba..15ed803 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -370,6 +370,7 @@ gpgme_protocol_t; #define GPGME_KEYLIST_MODE_EXTERN 2 #define GPGME_KEYLIST_MODE_SIGS 4 #define GPGME_KEYLIST_MODE_SIG_NOTATIONS 8 +#define GPGME_KEYLIST_MODE_WITH_SECRET 16 #define GPGME_KEYLIST_MODE_EPHEMERAL 128 #define GPGME_KEYLIST_MODE_VALIDATE 256 diff --git a/src/keylist.c b/src/keylist.c index 582b241..36ee3ea 100644 --- a/src/keylist.c +++ b/src/keylist.c @@ -367,7 +367,7 @@ set_ownertrust (gpgme_key_t key, const char *src) reference to smartcards. FIELD is the content of the field and we are allowed to modify it. */ static gpg_error_t -parse_sec_field15 (gpgme_subkey_t subkey, char *field) +parse_sec_field15 (gpgme_key_t key, gpgme_subkey_t subkey, char *field) { if (!*field) ; /* Empty. */ @@ -375,17 +375,25 @@ parse_sec_field15 (gpgme_subkey_t subkey, char *field) { /* This is a stub for an offline key. We reset the SECRET flag of the subkey here. Note that the secret flag of the entire - key will be true even then. */ + key will be true even then. We even explicitly set + key->secret to make it works for GPGME_KEYLIST_MODE_WITH_SECRET. */ subkey->secret = 0; + key->secret = 1; } else if (strchr ("01234567890ABCDEFabcdef", *field)) { /* Fields starts with a hex digit; thus it is a serial number. */ + key->secret = 1; subkey->is_cardkey = 1; subkey->card_number = strdup (field); if (!subkey->card_number) return gpg_error_from_syserror (); } + else if (*field == '+') + { + key->secret = 1; + subkey->secret = 1; + } else { /* RFU. */ @@ -578,9 +586,11 @@ keylist_colon_handler (void *priv, char *line) set_mainkey_capability (key, field[11]); /* Field 15 carries special flags of a secret key. */ - if (fields >= 15 && key->secret) + if (fields >= 15 + && (key->secret + || (ctx->keylist_mode & GPGME_KEYLIST_MODE_WITH_SECRET))) { - err = parse_sec_field15 (subkey, field[14]); + err = parse_sec_field15 (key, subkey, field[14]); if (err) return err; } @@ -649,9 +659,11 @@ keylist_colon_handler (void *priv, char *line) set_subkey_capability (subkey, field[11]); /* Field 15 carries special flags of a secret key. */ - if (fields >= 15 && key->secret) + if (fields >= 15 + && (key->secret + || (ctx->keylist_mode & GPGME_KEYLIST_MODE_WITH_SECRET))) { - err = parse_sec_field15 (subkey, field[14]); + err = parse_sec_field15 (key, subkey, field[14]); if (err) return err; } diff --git a/src/op-support.c b/src/op-support.c index edd317d..2bcb3a3 100644 --- a/src/op-support.c +++ b/src/op-support.c @@ -266,6 +266,14 @@ _gpgme_parse_inv_recp (char *args, gpgme_invalid_key_t *key) case 12: inv_key->reason = gpg_error (GPG_ERR_MISSING_ISSUER_CERT); break; + + case 13: + inv_key->reason = gpg_error (252); /*GPG_ERR_KEY_DISABLED*/ + break; + + case 14: + inv_key->reason = gpg_error (GPG_ERR_INV_USER_ID); + break; } while (*tail && *tail == ' ') diff --git a/src/priv-io.h b/src/priv-io.h index 583f06a..2306175 100644 --- a/src/priv-io.h +++ b/src/priv-io.h @@ -26,6 +26,7 @@ # ifdef HAVE_W32CE_SYSTEM # include "w32-ce.h" # endif +# include <winsock2.h> # include <windows.h> #else # include <sys/socket.h> |