From 30b792887db4655d916439b9b06ad287367ed52c Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 10 2020 12:26:09 +0000 Subject: gpgme-1.13.1 base --- diff --git a/AUTHORS b/AUTHORS index 6d2ce67..d680e48 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,12 +1,12 @@ Package: gpgme -Homepage: https://gnupg.org/related_software/gpgme/ +Homepage: https://gnupg.org/software/gpgme/ Download: https://gnupg.org/ftp/gcrypt/gpgme/ Repository: git://git.gnupg.org/gpgme.git Maintainer: Werner Koch Bug reports: https://bugs.gnupg.org Security related bug reports: security@gnupg.org -License (software): LGPLv2.1+ -License (manual+tools): GPLv3+ +License (software): LGPL-2.1-or-later +License (manual+tools): GPL-3.0-or-later GPGME is free software. See the files COPYING for copying conditions. @@ -19,13 +19,14 @@ List of Copyright holders Copyright (C) 1991-2013 Free Software Foundation, Inc. Copyright (C) 2000-2001 Werner Koch - Copyright (C) 2001-2017 g10 Code GmbH + Copyright (C) 2001-2018 g10 Code GmbH Copyright (C) 2002 Klarälvdalens Datakonsult AB Copyright (C) 2004-2008 Igor Belyi Copyright (C) 2002 John Goerzen Copyright (C) 2014, 2015 Martin Albrecht - Copyright (C) 2015 Ben McGinnes - Copyright (C) 2015-2016 Bundesamt für Sicherheit in der Informationstechnik + Copyright (C) 2015, 2018 Ben McGinnes + Copyright (C) 2015, 2016, 2018 + Bundesamt für Sicherheit in der Informationstechnik Copyright (C) 2016 Intevation GmbH @@ -59,6 +60,15 @@ Colin Watson Tobias Mueller 2016-11-23:1479937342.11180.3.camel@cryptobitch.de: +Ben McGinnes +2017-12-16:20171216002102.l6aejk5xdp6xhtfi@adversary.org: + +Jacob Adams +2018-06-03:ad5141df-b6cc-6c2a-59df-b2f18f7160fd@gmail.com: + +Guillaume LE VAILLANT +2018-10-11:20181011113825.76f9752a@yamatai: + Copyright 2001, 2002, 2012, 2013 g10 Code GmbH diff --git a/ChangeLog b/ChangeLog index 3691aee..f5df68b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4044 @@ +2019-06-13 Werner Koch + + Release 1.13.1. + + commit ea11c2a13cd44caf0bab395bd5132bf232318ad8 + * configure.ac: Bump LT versions to c=C33/A22/R1 cpp=C16/A10/R0 + qt=C10/A3/R4. + + python: Fix regression in t-decrypt-verify test. + + commit 7d0a979c07d2a32c1e39a9403f009cbe026f77ff + * lang/python/tests/t-decrypt-verify.py: Comment recent changes. + + python: Set a default-key into gpg.conf for the tests. + + commit ad1395f210f3a3d5839f482f1933eac80a94d174 + * lang/python/tests/Makefile.am (gpg.conf): Set a default key. + + core: At debug levels up to 9 print only an ascii dump. + + commit 4f11210b21a1914a1daf67474e9b82084b2cac01 + * src/debug.c (_gpgme_debug_buffer): Switch between two output + formats. + +2019-06-06 Werner Koch + + tests: Minor fix to run-threaded.c. + + commit f6fd90c99aea8b604d76ae49d29bc5269c236a98 + * tests/run-threaded.c (random_data_close): Correct FD test. + + core: Add commented debug helper to posix-io.c. + + commit f84abcad253ace782708c05760e52793814896f4 + * src/posix-io.c (_gpgme_is_fd_valid): New out-commented function. + + core: Fix error return value of _gpgme_run_io_cb. + + commit 6b9ff1ba391a4364b37cb116748194f3f33b4f12 + * src/wait.c (_gpgme_run_io_cb): Fix return code. + +2019-06-06 Andre Heinecke + + tests: Add option "allow-del" to run-threaded. + + commit e6f28273062ff26344163e219c1b784ae99de980 + * tests/run-threaded.c (main): Handle allow-del. + (allow-del): New. Variable to allow deletion of keys. + (import): Delete key after import if allow-del is set. + (delete_impres): Delete keys from an import result. + (delete_fpr): Delete a key by fingerprint. + +2019-06-05 Andre Heinecke + + tests: Implement import in run-threaded. + + commit 024a7f75d4b8e017b92a13552b23e7fb1d22a5ce + * tests/run-threaded.c (import): New. + (do_data_op): Call it. + +2019-06-05 Werner Koch + + core: Prettify _gpgme_io_select debug output again and fix TRACE_SYSRES. + + commit 0f68c9f16bdae7295cac4cbf3c9a197840989a85 + * src/debug.c (_gpgme_debug): Take better care of NULL userinfo. + (_gpgme_debug_end): Rework. + (_trace_sysres): Print ERRNO and not the supplied RES. + +2019-06-05 Andre Heinecke + + tests: Use synced output for error in run-threaded. + + commit 3a3648e3a56712261bda4fa866bd2419a740cec8 + * tests/run-threaded.c (do_data_op): Use synced out macro. + + tests: Avoid variable named the same as a macro. + + commit 3a11421d0f63b8cb5afa407cd65f763b11033241 + * tests/run-threaded.c (decrypt, verify): Don't use a variable name + that is also a macro. + + tests,w32: Fix thread creation in run-threaded. + + commit 9bbe15ebbc41533fa219d5b3017a26a75bc72731 + * tests/run-threaded.c (create_thread): Check proper return + value and not return value of CloseHandle. + +2019-06-05 Werner Koch + + core: Improve the debug messages even more. + + commit 8f9f3224aac78ce9d54e19e73acf7ab659787168 + * src/debug.c (_gpgme_debug): Add arg LINE. Chnage all callers. + (_gpgme_debug_begin): Remove. + * src/debug.h (TRACE_SEQ): Use the LINE arg of _gpgme_debug. + + core: Avoid explicit locks in the debug code. + + commit 856d2e8d64f668855b1c22d3d38fe783904c6c48 + * src/debug.c (debug_lock): Remove. Also remove all users. + (_gpgme_debug): Use gpgrt_bsprintf to prepare the output and finally + print using standard fprintf. Reformat to prefix to be narrower. + +2019-06-04 Werner Koch + + json: Print "nan", "-inf", "inf" if needed. + + commit f56c996318dfa1c9f0d10582b18c2fce10d24668 + * src/cJSON.c (print_number): Print NaN and INF. + + json: Improve handling of large exponents in the JSON parsor. + + commit fabe96126b4ed9c5e07b713813d7db26a02e5e5f + * src/cJSON.c: Include stdint.h. + (parse_number): Avoid overflob in SUBSCALE and cap integer values. + + core: Implement recpstring option parsing for gpgsm. + + commit 1024884e07f750ce781fa74dffa62e126bdda622 + * src/engine-gpg.c (append_args_from_recipients_string): Detect bad + options. + * src/engine-gpgsm.c (set_recipients_from_string): Implement option + parsing. + + core: Make gpgme_op_encrypt_ext work for CMS. + + commit e9ca36f876e1066227668981f5a9e1a7f1031d9e + * src/engine-gpgsm.c (gpgsm_encrypt): Fix argument check. + +2019-06-04 NIIBE Yutaka + + python: Fix typo in DecryptionError exception. + + commit 47135ffdb923de66bc275a37e31811ad22c73dd7 + * lang/python/src/errors.py (DecryptionError): Rename from + DeryptionError. + (UnsupportedAlgorithm): Use DecryptionError. + +2019-06-03 Andre Heinecke + + Add NEWS for 1.13.1. + + commit 49883023f661a18d73f9f2c7a3a98902af62ef6b + * NEWS: Add news for 1.13.1 + +2019-05-06 Andre Heinecke + + python: Make EXTRA_DIST files explicit. + + commit f9c923bb2d87711235312e8085964372d7480ce4 + * configure.ac: Configure new Makefiles. + * lang/python/Makefile.am: Remove dirs from extra dist and use + subdirs. + * lang/python/examples/Makefile.am, lang/python/src/Makefile.am, + lang/python/doc/Makefile.am: New. Files that list EXTRA_DIST files. + + Python, doc: Minor style improvement. + + commit 63055f13407760c877e5a3a94e564dfb3077dd47 + * lang/python/src/core.py (Context): Retab and shorten + max line length. + + Merge remote-tracking branch 'origin/dkg/fix-T4276' + + commit f303806a110a9813023a5fd9468a55ab0f7fb39d + + +2019-05-03 Andre Heinecke + + Always use maintainer mode -Wno cflags. + + commit 33b13d1c290d7ce35c636cce4265b512fb8e64c3 + * configure.ac (CFLAGS): Move -Wno flags out of the maintainer mode. + + cpp: Fix initialization warning. + + commit 0ed81498147723f0e9282df5ae08b8b8e40edd2f + * lanc/cpp/src/gpggencardkeyinteractor.cpp + (GpgGenCardKeyInteractor::Private): Fix initialization warning. + +2019-05-03 Daniel Kahn Gillmor + + python: stop raising BadSignatures from decrypt(verify=True) + + commit 4100794e305ba22241ea5a4f7b42bb5189fbd948 + * src/core.py (decrypt): filter out signatures with errors from the + returned verify_result, but avoid raising BadSignatures + * tests/t-decrypt-verify.py: ensure that only a single signature is + returned when evaluating cipher-3.asc, since the other signature is + unknown. + + python/tests: try to decrypt and verify new test data. + + commit bd2d282e572b5d02669238c9e087259b85638477 + * lang/python/tests/t-decrypt.py: test decryption of cipher-3.asc and + cipher-no-sig.asc + * lang/python/tests/t-decrypt-verify.py: test decryption and + verification of cipher-3.asc and cipher-no-sig.asc + + tests: add two new types of encrypted data. + + commit c5c3a9d10be415ea7bc0cd9730ad6085f16ee7a0 + * tests/gpg/cipher-3.asc: add an encrypted file containing signatures + (one from a known key, and one from an unknown key) + * tests/gpg/cipher-no-sig.asc: add an encrypted file containing no + signatures at all + + python: make it easier to run a limited number of tests. + + commit 30bd1c097544376f257d426d5feb4706fb5d3afd + * lang/python/tests/Makefile.am: prefer py_tests from the environment + if present. + +2019-05-02 Andre Heinecke + + tests: Add cms mode to run-import. + + commit 4746c5c9e2dd9a3ee471a429c19bc1f7fd1d07db + * tests/run-import.c (show_usage): Add doc for cms / openpgp. + (main): Handle protocol. + +2019-04-24 Andre Heinecke + + cpp: Add wrapper for gpgme_set_global_flag. + + commit 7981ec4147f3058d5b56905903456247993dc6f7 + * lang/cpp/src/context.cpp (setGlobalFlag): New. + * lang/cpp/src/global.h (setGlobalFlag): Export it. + +2019-04-19 NIIBE Yutaka + + core: Fix duplication of close_notify_handler for gpgsm. + + commit 7673ef7953482f42cab50dca1810e5c9d10f461e + * src/engine-gpgsm.c [!USE_DESCRIPTOR_PASSING] (gpgsm_new): Remove + last call to _gpgme_io_set_close_notify. + + core: Fix error return. + + commit 814f6c8de8006830f19a029a879bd92f9e584789 + * src/engine.c (_gpgme_set_engine_info): Add error return. + +2019-04-09 Andre Heinecke + + core,w32: Fix minor potential memleak. + + commit 140d694e1fddf16fa3fd2371b9a852ebb14622c8 + * src/w32-util.c (_gpgme_create_process_utf8): Free converted + startup info strings. + + core,w32: Fix new w32-util functions. + + commit ecbba12b869106ba03e10b7b7dd80f74d086831b + * src/w32-util.c (_gpgme_access): Respect mode parameter. + (_gpgme_create_process_utf8): Convert startupinfo, too. + + core,w32: Improve handling of Unicode paths. + + commit a82e3a0ae57a48ba173e282a050680751006c074 + * src/dirinfo.c (get_gpgconf_item): Use _gpgme_access. + * src/posix-util.c (_gpgme_access): Add forward to normal access. + * src/sys-util.h (_gpgme_access): New for posix and w32. + * src/w32-io.c (_gpgme_io_spawn): Use _gpgme_crate_process_utf8. + * src/w32-util.c (utf8_to_wchar, utf8_to_wchar0): The usual w32 conv. + (find_program_in_dir): Use _gpgme_access. + (find_program_at_standard_place): Use wchar API and convert to UTF-8. + (_gpgme_access): Convert UTF-8 to wchar and use wchar API. + (_gpgme_create_process_utf8): Convert UTF-8 to wchar and use wchar API. + + core,w32: Show w32-spawn warning only once. + + commit 937adfdcbb22f715c5a331e5e2d4546ac15a1b7e + * src/w32-io.c (_gpgme_io_spawn): Show MessageBox only once. + +2019-03-27 Andre Heinecke + + core, w32: Fix format string errors on windows. + + commit 4a4680f8901ecdcb7e8d5ed55f48226ccfccd7c8 + * src/debug.c (_gpgme_debug): Use gpgrt_vasprintf instead of + vfprintf to have a more portable format. + + core: Fix assuan logger-fd hack for windows. + + commit 19a4c4daa2cfd075b181d5131a4b8b4d54714b8c + * src/assuan-support.c (my_spawn): Zero is a perfectly fine fd. + +2019-03-26 Andre Heinecke + + core,w32,glib: Fix build of w32-glib-io.c. + + commit 213c4bc1eb1f45695cc3955cc722ebb363dcbdd0 + * src/w32-glib-io.c (_gpgme_io_pipe, _gpgme_io_connect): Do not + use TRACE_SUC in a return statement. + +2019-03-26 Werner Koch + + Release GPGME 1.13.0. + + commit 1b5a6bf27ac9b2e5a1fc4d5e879bd4901fcad5bb + * configure.ac: Bump LT versions. + For C to C33/A22/R0. + For C++ to C15/A9/R0. + For Qt to C10/A3/R3. + +2019-03-26 Andre Heinecke + + core: Fix a strtoul to strtol. + + commit 10576dc427b3746e2c3b9bc40efe618a3bd40519 + * src/assuan-support.c (my_spawn): Fix using strtoul for + a long. + + cpp: Fix GenCardKeyInteractor and extend it. + + commit ffdb75217bc09561cf651dab15cd26e0024d89a7 + * NEWS: Mention interface change. + * lang/cpp/src/gpggencardkeyinteractor.cpp + (GpgGenCardKeyInteractor::setAlgo): New. + (GpgGenCardKeyInteractor::action), + (GpgGenCardKeyInteractor::nextState: Handle new interface. + +2019-03-25 Andre Heinecke + + core, w32: Add hack to translate diag logger-fd. + + commit 129def87b262241483ba3a8b6771ad6d07c2e3be + * src/assuan-support.c (my_spawn): Add hack to + mark the logger fd for w32spawn translation. + +2019-03-20 Andre Heinecke + + qt: Handle diagnostic audit log for CMS. + + commit 47369569e23482bdd24a136b071192352b1d1347 + * lang/qt/src/threadedjobmixin.cpp(_detail::audit_log_as_html): + Handle CMS audit log. + +2019-03-19 Werner Koch + Andre Heinecke + + core: Support GPGME_AUDITLOG_DIAG for gpgsm. + + commit dd21ec997cf4b6ba18538c63c728478110ad1f60 + * src/engine-gpgsm.c (struct engine_gpgsm): Add fields diag_cb and + diagnostics. + (close_notify_handler): Close the diag fd on status fd close. + Handle diag close. + (gpgsm_cancel): Handle diag. + (gpgsm_release): Free DIAGNOSTICS. + (gpgsm_new): Support the diag feature. + (start): Set a handler for the diag fd. + (gpgsm_getauditlog): Support GPGME_AUDITLOG_DIAG. + +2019-03-13 Andre Heinecke + + cpp: Fix Error::hasSystemError. + + commit c4cc47ee8f0bedc58e58ab416689d7014b0df2e7 + * lang/cpp/src/context.cpp (Error::hasSystemError): Invert logic to + do what it says. + +2019-02-28 Werner Koch + + json: Fix cosmetic error in the repl. + + commit 1bdab961c51fc038c33ae8116595aa0213ab1dd5 + * src/gpgme-json.c (native_messaging_repl): Use correct var with sizeof. + + tests: Let run-verify print the de-vs flag. + + commit b159b2eddd9df5df6cc8f29bd999cf1603c56991 + * tests/run-verify.c (print_result): Chack is_de_vs. + * tests/run-import.c (main): Fix bad parameter for format string. + +2019-02-27 Andre Heinecke + + json: Limit recursion depth. + + commit 4a117859e7a512458ab78cfedfae0372805196b1 + * src/cJSON.c (MAX_DEPTH): New. Maximum recursion depth. + (parse_value, parse_array, parse_object): Carry and check + depth argument. + (cJSON_ParseWithOpts): Initialize depth. + +2019-02-21 Andre Heinecke + + cpp: Add ostream operators for import result. + + commit 73b2f40ae5e6881991dea609b0781373b28d7d30 + * lang/cpp/src/importresult.cpp: Add ostream operators. + * lang/cpp/src/importresult.h: Update accordingly. + + cpp: Make GpgME::Data::toKeys really const. + + commit 6175025c822678102c3f089e37952aa84b19a3ec + * lang/cpp/src/data.cpp (GpgME::Data::toKeys): Rewind afterards. + +2019-02-19 Werner Koch + + core,w32: Fix missing sentinel in dir name builder. + + commit 4c49417cc0dbd7f34269aff00fccafba150af744 + * src/w32-util.c (_gpgme_get_gpgconf_path): Add NULL top strconcat. + +2019-02-11 Andre Heinecke + + tests: Fix memleak in run-threaded. + + commit f8312d7c333193582dcb5816198219b9564023f0 + * tests/run-threaded.c (verify): Free msg. + +2019-02-10 Ben McGinnes + + python: examples. + + commit 302d5ef52e095378231efd54677b5c315354ad78 + * A rather obvious variant of the existing key import examples, except + directed at Mailvelope's keyserver. + * Yeah, Werner, I know ... but it exists because I used it and there's + no harm in sharing. + +2019-01-30 Ben McGinnes + + python: docs. + + commit e005052f4d5b29beda2252f8042dbf5728f5e2aa + * Version bump in preparation for whenever GPGME 1.13.0 happens. + * Ran the post_installer.py for docs preparation again. + +2019-01-27 Ben McGinnes + + python: post installer script. + + commit 2de1e599770cdb129b84302d963f65fdd3ddd2a4 + * Removed auto-generated .texi files from doc/src/ so only the + corrected versions are left. + * Which means now it is complete, but with the initial work to expand + it with info file generation later. + + python: post installer docs fix script. + + commit 1e265723653042bc1010b457537b69a2011b43b7 + * Moved post_installer.py into the examples/howto/ directory. + * Added instructions for its use to the Python Bindings HOWTO. + * Ran it as intended from the lang/python/ directory in order to both + prove it works and quickly and easily get the updated howto + replicated. Also to fix all those .texi files. + +2019-01-25 Werner Koch + + json: Better use gpgme_free. + + commit ed81892917f47dddc23aa99d88733e3f8f344256 + * src/gpgme-json.c (subkey_to_json): here + + json: Fix minor memory leaks. + + commit 7f2423371964263784252cf839269023b6573bd2 + * src/gpgme-json.c (interactive_repl): Fix memleak. + (subkey_to_json): Ditto + (op_config): Delay init of j_comps to avoid a leak on error. + +2019-01-16 NIIBE Yutaka + + build: With LD_LIBRARY_PATH defined, use --disable-new-dtags. + + commit 66bcb8acb2452cf19318023ed0ff1ea7d7bb8439 + * configure.ac (LDADD_FOR_TESTS_KLUDGE): New for --disable-new-dtags. + * tests/Makefile.am (LDADD): Use LDADD_FOR_TESTS_KLUDGE. + * lang/cpp/tests/Makefile.am, lang/qt/tests/Makefile.am: Likewise. + * tests/gpg/Makefile.am, tests/gpgsm/Makefile.am: Likewise. + * tests/json/Makefile.am, tests/opassuan/Makefile.am: Likewise. + +2019-01-15 Andre Heinecke + + tests: Add diagnostic example to run-import.c. + + commit ce327f994a2888b807b63cf202ddcecc3fb9c685 + * tests/run-import.c (main): Show diagnostics in verbose mode. + +2019-01-09 Andre Heinecke + + qt: Use tofu conflict test keys without expiry. + + commit 66376f3e206a1aa791d712fb8577bb3490268f60 + * lang/qt/tests/t-tofuinfo.cpp: Use new test keys without + expiry. + +2019-01-02 Ben McGinnes + + python docs: post installer. + + commit a0dbdfebbb60f0d34dd16894803e95221d8be668 + * Merging post installer script. + * Included ammended Sphinx config file to try to reduce the + auto-generated EPUB validation failures it produces. + + python: post installer doc fix script. + + commit a2e7c863c821ca035f1e3f8077bdae3b0f81f5eb + * Got rid of the bash bit in the comments. + * Made the final printed instructions far more obvious. + + python: examples. + + commit 207d4289d84971d11ec1824fbe7d4a2be63b56e4 + * Fixed inter-edit.py so it will actually work now. + * made 3 others executable. + * Fixed the semantics of assuan.py's instructions. + +2018-12-26 Ben McGinnes + + python: examples. + + commit d406471d4bf9c79140e4bc91de7d316ec7465892 + * Fixed inter-edit.py so it will actually work now. + * made 3 others executable. + * Fixed the semantics of assuan.py's instructions. + +2018-12-24 Ben McGinnes + + python: docs processing. + + commit ef9355c2fe8f81ccd73e0ed45ce33e925928f8e1 + * Added some EPUB specific config options to the Sphinx config file + which might help reduce some of Sphinx's more stupid default errors + with EPUB validation. + * Added lang/python/post_installer.py script for automating the + generation of .texi and .rst "source" files from the real source + files written in Org mode. Includes recreating the Sphinx Makefile + which is excluded due to the m4 toolchain in parent directories, it + also handles the rewriting of the reST index file properly and + rewrites the .texi files so they don't impale themselves on Unicode. + +2018-12-21 Ben McGinnes + + python: docs. + + commit 06bca0eaa8de8405fafc892ab7864990f8853bcf + * Found a bug in org-mode's export to texinfo function which will + require either manual modification of each file or a customs sed run + over the generated files for all updates. + * Manually updated the current files for now, but will need to add + some post-install processing scripts for future use (I already have + some of these for my specific setup, they just need to be made a + little more generic and platform independent for here). + + python: groups example. + + commit dc5f416351e47bfafb46a53f8fd8435dd6c231ba + * Tightened code a little more. + +2018-12-17 Ben McGinnes + + python docs: house keeping. + + commit daded4925489d306f6a65271c2f55101b331187c + * Dropped the ASCII copyright line, since even MS have conceded their + battle against Unicode enough to load UTF-8. + * Fixed the drafts section since there will be less need of multiple + output format testing from next year. + +2018-12-17 Werner Koch + + core: Silence newer compiler warnings. + + commit 8b41fb08f00f01fe0dd8b2b5455d3422d97ddc60 + * configure.ac: Add -Wno-format-truncation and + -Wno-sizeof-pointer-div. + * src/b64dec.c (_gpgme_b64dec_proc): Add fallthrough annotation. + * src/cJSON.c (parse_string): Ditto. + * src/gpgme-json.c (main): Ditto. + +2018-12-16 Ben McGinnes + + python: howto and examples. + + commit fbc298dc1b0fbb51ebc92a9d56c45b78c5e9989d + * Tightening up both the documentation and some of the example code. + +2018-12-13 Ben McGinnes + + python: examples bugfix. + + commit 4308d172816f3172454fac1dc0771014056764a1 + * Fixed a bug in the ProtonMail importers (pmkey-*.py) where multiple + keys found for a username would always result in the last email + address checked being returned in the printed output for all located + keys. + +2018-12-12 Ben McGinnes + + python: new example script. + + commit 3849b60e22432ef33f0d1d39b88e07922ad7779e + * Though Keybase really should not be encouraged due to + disengenuosness and FUD emanating from that souce, this new script + will obtain a key hosted on that site and import it when supplied + with the keybase username. + + python: what's new summary. + + commit 3ca7cf07f5d3ec4af89e69ed13ea7ab701e33c03 + * Added a little more detail to the what's new section. + + python: advanced howto example. + + commit 64758a0dac4c7c3b312dccbc1661813e2c3e2888 + * Added Cython requirement to this advanced use case. + + python: howto examples equirements. + + commit 4c324ac1beb710714262af0040dea21232ba87d9 + * Added small requirements.txt file for additional modules not in the + standard python library and not including the bindings themselves + and not including Cython, which is for more advanced examples. + +2018-12-10 Ben McGinnes + + python: hkp key importer. + + commit 772b5aae24a2a3a996f399024845de612192fc2f + * Tweaked it slightly to avoid repetition of key searches when there + is only one search pattern to check (i.e. usually a single key ID or + fingerprint). + + python: HKP search and import updates. + + commit 2e7a14c9b369096775a035091c197f2d438142a0 + * Tweaked the code again so that it can also handle the cases where + someone has included a hexadecimal string in their user ID. + * Updated the HOWTO to match. + * Exported to .rst and .texi. + + python: key import via HKP example. + + commit fe7e01d164b64ad5e7f65cb80e4bf13f06d8d3ef + * Fixed the logic used to search for any given pattern. + * Added a sensible method of checking whether a pattern is a key ID or + fingerprint. + + python: docs updates. + + commit 7c63bfe4ab434b61a871aec4bc1d0a05b4c068e6 + * Multiple updates, expanding on the Windows installation issues. + * Also adding to the new maintenance mode reference document. + * Includes content relating to the resolution of T4271 and T4191. + +2018-12-07 Andre Heinecke + + core: Fix ERR_INV_ARG check in genkey_start. + + commit 78f6291a3bf56769f53af66fe39718ddd2d74bf2 + * src/genkey.c (gpgme_op_genkey_start): Fix check for + parms. + +2018-12-05 Ben McGinnes + + python: examples. + + commit dc5600d306f808767068bad5117232fc3d35ac43 + * cut some of then poor len usage. + +2018-12-05 Daniel Kahn Gillmor + + python: overhaul logic of Context.decrypt() + + commit 65c28da4e49a8778607fdcf6f51a840166616d9f + * lang/python/src/core.py (Context.decrypt): simplify and clarify the + logic behind handling verify=False. + * lang/python/tests/t-decrypt.py: ensure that we test verify=False + + python: ctx.decrypt() has problematic error handling. + + commit 878a0ad01265dba5b06429276bdcc5c21fedb6f5 + * lang/python/src/core.py (Context.decrypt): document odd + error-handling behavior as a potential problem to be addressed. + + python: Clarify the meaning of ctx.decrypt(verify=[]) + + commit 5d8b4f74891af22379899ccee9e8ee849144eee3 + * lang/python/src/core.py (Context.decrypt): docstring clarification + of what it means to pass an empty list to the verify argument. + + python: gpg.Context.decrypt verify_sigs and sink_result are bools. + + commit b8fa76a30c02afc3d7f6aad0a59bb613d1b711fc + Both of these function-internal variables are never used for anything + other than a binary state. Implement them as the booleans they are. + Otherwise, casual readers of the code might think that they're + supposed to represent something other than a flag (e.g. "verify_sigs" + could mean "the signatures to verify", and "sink_result" could mean + "the place where we sink the result"). + + Signed-Off-By: Daniel Kahn Gillmor + + python: clarify documentation for verify argument for Context.decrypt() + + commit 49af6d76e55f348c7b3cece756d6ac643d17ee68 + It's easy to miss that verify can take a list of keys. Make it more + obvious to the average python dev who reads docstrings. + + python: simplify Context.decrypt() + + commit 2491e6f92f5b562cbd6f7f931df630cb106f6688 + In the course of trying to address https://dev.gnupg.org/T4271, i + discovered that gpg.Context.decrypt() has a bit of superfluous code. + This changeset is intended to simplify the code without making any + functional changes. + +2018-12-05 Ben McGinnes + + python: windows c and cython. + + commit 1dffdcc6e9d249111eb8761d29ef3b35b32a8c3d + * added warning that he Windows C runtime issues will also affect use + with Cython and that relying on binary installers would remove that + possible use case. + +2018-12-04 Ben McGinnes + + python: sphinx modification. + + commit c8a04af676d981b42172c9bdad82eb83f91c8ce6 + * The make.bat file incorrectly triggers the trailing whitespace check + in the git repo (it doesn't actually have any trailing whitespace, + but triggers the error on every line). + * Will need to add a script to handle future org-mode conversions of + the index page anyway, so will get that script to deal with this + problem too by generating the make.bat file if the platform is + detected as Windows. + + python: Sphinx support. + + commit 6d8823b81162c18406d40ec59bd252cfdf1df648 + * Added framework from sphinx-quickstart to lang/python/doc/rst/ so + that Python developers already using Sphinx can use the generated + reST files with existing documentation systems. + * Note that when generating source files from Org-mode, the index page + will require manual intervention to match the Sphinx requirements. + + python: docs update. + + commit 8613727f1ee985c3cfa2c815523312914f033ffd + * Expanded the section on issues with Windows installations, with + greater detail of which versions of Visual Studio are needed + depending on which version of CPython is to be used. + * Included a recommendation which is a bit harsh without being totally + prickish. + * Updated all files to not link to author's key or related data in + order to make them all consistent with the changes in commit + 649b19688132dd315e361c0f5b63ba6d8f45996d. + +2018-12-04 NIIBE Yutaka + + build: Remove --with-*-prefix, which is no need any more. + + commit 5dbac555f23bcec4adcfd82de61878f0f23ff272 + * autogen.rc (configure_opts): Remove --with-*-prefix. + +2018-12-03 Andre Heinecke + + qt,cpp: Consistently use nullptr and override. + + commit 1d31420650bfa7ca1d1503cc7431b3360e86022c + * lang/cpp/src/Makefile.am, lang/qt/src/Makefile.am (AM_CPPFLAGS): + Add suggest-override and zero-as-null-pointer-constant warnings. + + * lang/cpp/src/*, lang/qt/src/*: Consistenly use nullptr and override. + +2018-11-30 Ben McGinnes + + python: documentation fixes. + + commit 2e3a681d0c35bbf6db584fedc9d7f0a010430b51 + * Typographic and whitespace error correction pertaining to the + previous update. + + python: documentation. + + commit 3b056a01a252bb72df5744409ba494e1a6e54d31 + * Added long description to setup.py.in. + * Added maintenance mode details with clarification for what type of + things would be a bug as far as MM is concerned and what wouldn't + be. + ** Includes a not too subtle hint directed towards the donations page. + * Miscellaneous tightening of documentation. + +2018-11-28 Andre Heinecke + + tests, json: Make them run on debian stable. + + commit a9cfb6dad8ac60543bcb06f4d0515f4a64ad897a + * tests/json/t-json.c (main): Relax version check a bit. + +2018-11-26 Ben McGinnes + + python docs: checking key signatures. + + commit 1c92f3ff55ad0cdda06d05ad0a83193e3a147b7e + * Added instructions for checking key certifications or key + signatures (depending on preferred terminology). + * Added pendulum module to recommended installations, but not to + requirements. + +2018-11-22 Ben McGinnes + + python: docs update. + + commit c87155e6eba2e97e4e6c6ee7e2591088a5489556 + * Added documentation for the new methods added to gpgme.version. + * Removed the Flask based advanced use case from the what-is-new + section as that type of code will not be added here. + + python: version as integers. + + commit de6bb23279796b9ae4dc369d58591cb75f818684 + * lang/python/version.py.in: added gpg.version.versionintlist + * If gpg.version.versionintlist[2] ever returns -1 then there's a + serious problem with the build and it should be lodged as a bug if + it's repeatable. Seeing this should never happen, but checking for + it is better than not doing so. + +2018-11-19 Werner Koch + + core: Fix format string errors in w32-io.c and use of TRACE_SUC. + + commit b182838f71d8349d6cd7be9ecfb859b893d09127 + * src/w32-io.c: Fix use of TRACE_SUC. Fix some format strung errors. + +2018-11-19 Ben McGinnes + + python: import type. + + commit fd34415bdd57332424bd5a98d279e2331678a2fb + * Fixed bug T4242 and tested that dropping "Import" in favour of + "import_type" does indeed work just fine. + + python: import constant. + + commit f773ad392da57e6be4ade93c44baa5d2057c40b6 + * lang/python/src/constants/__init__.py: dropped use of Import + capitalisation and renamed lang/python/src/constants/import.py to + lang/python/src/constants/import_type.py to address bug T4242. + * lang/python/doc/src/gpgme-python-howto: minor docs updates. + +2018-11-16 Werner Koch + + core: Protect the trace macros for fun and profit. + + commit 7a1e7006d06fdbab86ea79a197c316744b09d933 + * src/debug.h: Protect macros using. + (_trace_err, _trace_sysres, _trace_syserr): New helper inline + functions. + + core: Fix a LF problem in the new debug fucntion. + + commit 7eda50a673d15320022375360fd220e8381b69ab + * src/debug.c (_gpgme_debug): Print a LF for an empty FORMAT unless we + are in legacy mode. + + core: Remove old debug helper function. + + commit 94d274a1a33c6fb30981290b127f2c4babc27245 + * src/debug.c (_gpgme_debug): Remove. + (_gpgme_debugf): Rename to _gpgme_debug. + + core: Simplify the trace maros by using variadics. + + commit 5857491a2aa7d4975100d90f1ad62c08aa345e3e + * src/debug.h (TRACE_BEG, TRACE_LOG, TRACE_SUC): Use variadic macros + and remove the TRACE_BEG1 et al. Change all users to always pass a + format string. + (TRACE): Ditto. + * src/debug.c (_gpgme_debugf): New. + * configure.ac : Add -Wno-format-zero-length. + +2018-11-15 Andre Heinecke + + tests: Add run-threaded for multithread tests. + + commit d0402f886b720d03369887c807581bd980ee70cf + * tests/Makefile.am (run-threaded): Add. + * tests/run-threaded.c: New. + + tests,json: Clean openpgp-revocs.d. + + commit 004e2cad2f26250cd010684f11dc187f08e6f9e1 + * tests/json/clean-local: Remove revocs.d + + tests,json: Move version check into t-json. + + commit 40d962b43a183070ba8602cac1e83f2292ebf2c3 + * tests/gpg/t-support.h (check_gpg_version, compare_versions), + (parse_version_string, parse_version_number): Remove version + check code. + * tests/json/t-json.c (check_gpg_version, compare_versions), + (parse_version_string, parse_version_number): Add. + +2018-11-14 Andre Heinecke + + tests,json: Add sig-notations test. + + commit d3dae4a445d950c94c952ddf54e534ef71675bd1 + * tests/json/t-sig-notations.in.json, + tests/json/t-sig-notations.out.json: New + * tests/json/Makefile.am (EXTRA_DIST): Add files. + * tests/json/t-json.c: Register it. + + tests,json: Fix distcheck. + + commit def030e843bd4576597272abe9fe12f846066576 + * tests/json/Makefile.am (EXTRA_DIST): Add inital and final scripts. + (t_json_SOURCES): Don't use cJSON.o as source. + + tests,json: Add more tests. + + commit d0087d45f0207bf82a4f078d972c28c4d1cd2690 + * t-config-opt.in.json, + t-config-opt.out.json, + t-import.in.json, + t-import.out.json, + t-sign.in.json, + t-sign.out.json: New. + + tests,json: Add missing files and chunking test. + + commit 88b7221eb737a3102ec61ea385990b7ea7ef2b30 + * tests/json/Makefile.am, tests/json/final.test, + tests/json/initial.test: New. + * tests/json/t-chunking.in.json, tests/json/t-chunking.out.json: + New test. + * tests/json/t-json.c: Register new test. + + tests,json: Fix match if the first child differs. + + commit 27ca12e815c0a582d357641a04b889d648b8766e + * tests/json/t-json.c (test_contains): Try all siblings of + the haystack child. + + tests,json: Add the bulk of tests. + + commit dd4b80a5f640232bb44eb825ff5a74ec295fad10 + * t-json.c (tests): Register new tests. + * t-createkey.in.json, + t-createkey.out.json, + t-decrypt-verify.in.json, + t-decrypt-verify.out.json, + t-decrypt.in.json, + t-decrypt.out.json, + t-delete.in.json, + t-delete.out.json, + t-encrypt-sign.in.json, + t-encrypt-sign.out.json, + t-encrypt.in.json, + t-encrypt.out.json, + t-export-secret-info.in.json, + t-export-secret-info.out.json, + t-export.in.json, + t-export.out.json, + t-json.c, + t-keylist-secret.in.json, + t-keylist-secret.out.json, + t-keylist.in.json, + t-keylist.out.json, + t-verify.in.json, + t-verify.out.json, + t-version.in.json, + t-version.out.json: New. + + tests,json: Add wildcard string matching. + + commit 9a31fdcb11d04d47dfcc38a8409b84436c549108 + * tests/json/t-json.c (test_contains): When searching for "*" accept + every string. + + tests,json: Skip tests for older GnuPG versions. + + commit e55e467d5ffb32c428566a876616d309ef2d15cd + * tests/json/t-json.c (main): Skip if version is not at least + 2.2.0 + + tests,json: Suffix .json to test pattern. + + commit ca2e2b3d6973b1f942571ba65bd8b57153847777 + * tests/json/t-config.in, tests/json/t-config.out: Renamed. + * t-json.c (run_test): Use new naming pattern. + + tests,gpg: Add version check hlp to t-support. + + commit 5b61c092e7444749b08e39ac5aa9fb0818e1a076 + * t-support.h (parse_version_number, parse_version_string) + (compare_versions): New. Copy&Paste from src/version.c + (check_gpg_version): New helper to check for a gpg version. + + tests,json: Improve verbose mode and add verbose 2. + + commit 9933641cce595ba308d0f3a1f3ae8f13a9743dd1 + * tests/json/t-json.c (main): Handle multiple verbose args. + (test-contains): Improve verbose output + + tests,json: Fix and improve t-json. + + commit 3e5684d99b881787f9739e53fd8e8c22eadc2146 + * tests/json/t-json.c (run_test): Terminate argv array correctly. + (run_test): Note and handle empty response. + + tests: Add json testrunner. + + commit 0c31837766e016227b3c8dfd44c476949cd4741e + * configure.ac: Configure makefile. + * tests/Makefile.am: Run json tests if gpg tests are run. + * tests/json/t-json.c: New testrunner for json tests. + * tests/json/t-config.in, tests/json/t-config.out: First test. + +2018-11-13 NIIBE Yutaka + + build: Update gpg-error.m4 and libassuan.m4. + + commit c4aa4af50f3102b251cfff9c9755e2dde8d1bd1f + * m4/gpg-error.m4: Update from master. + * m4/libassuan.m4: Update from master. + +2018-11-12 NIIBE Yutaka + + Fix the previous commit. + + commit 895176f42af3a1b13614f15dd537a426bb4ac16a + + + build: Make gpgme.m4 use gpgrt-config with *.pc. + + commit 60828a505a1c74fd34476c181df2a588ea6f9c83 + * src/gpgme.m4 (_AM_PATH_GPGME_CONFIG): Use gpgrt-config with gpgme.pc + when possible. + (AM_PATH_GPGME_GLIB): Likewise with gpgme-glib.pc. + + build: Provide gpgme-glib.pc too. + + commit a76e145a1057e11953b71f804cf3a499c3ad5362 + * src/gpgme-glib.pc.in: New. + * src/gpgme.pc.in (avail_lang): Remove. + + build: Provide gpgme.pc, generated by configure. + + commit f3e60521899e6126229b6efedc9f011b84122e11 + * configure.ac: Generate src/gpgme.pc. + * src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. + (EXTRA_DIST): Add gpgme.pc.in. + * src/gpgme.pc.in: New. + * src/gpgme-config.in: Use variables. + +2018-11-08 Daniel Kahn Gillmor + + spelling: fix misspellings. + + commit 2557d0ae6ff0336b041129b7bf5c1e3a8c20a805 + + +2018-11-06 Ben McGinnes + + docs: python bindings. + + commit d0a5caf73c2d6b73dd043f62574c31946e4f347d + * Continued restructuring as part of moving beyond mere;y the HOWTO + file. + * Generated the alternative source files for reST and Texinfo. + * Fixed some errors and updated links after moving the what's new + section to two new files (yes, two). + + python examples: another importer. + + commit 0cb625da84d7e5deeacad113c404a8bc2154c8e7 + * Fixed a similar type of bug with the non-protonmail importer. + + python examples: protonmail hkp scripts. + + commit 1b9d30db089e9de3ef859195ad58d2164a0231a0 + * fixed a bug in the import try statement for both versions. + +2018-11-05 Werner Koch + + gpg: Avoid error diagnostics with --override-session-key. + + commit bded8ebc59c7fdad2617f4c9232a58047656834c + * src/engine-gpg.c (gpg_decrypt): Add --no-keyring. + +2018-11-03 Ben McGinnes + + docs: typo. + + commit 13e09bd21a531b448f2f34b1f075315502b76fb6 + * lang/python/doc/src/gpgme-python-howto: s/Revokinging/Revoking/g + +2018-11-02 Werner Koch + + w32: Fix a few compiler warnings. + + commit 5262ce0c815193fc901b00a9b4132925ba672df7 + * src/debug.h (TRACE_SYSERR_NR): New. + * src/w32-io.c: Fix compiler warnings. + + w32: Log all errors from CloseHandle and WFSO in w32-io. + + commit ed3f5ad760a28566fa2571e0c7392467bfc3770d + * src/w32-io.c (close_handle, _close_handle): New macro and function; + use in place of all CloseHandle calls. + (wait_for_single_object, _wait_for_single_object): Likewise. + + w32: Don't use CloseHandle on an arbitrary integer. + + commit 4faa0ccf58c7a0f64f51dcbc8466add660080414 + * src/assuan-support.c (my_waitpid): Do not close the PID = it is not + a handle. + + w32: Revamp the closing of system objects. + + commit da89528ac39b687bfbed2209ca2637e3bd8e0ac5 + * src/w32-io.c (hddesc_t): New. + (reader_context_s, writer_context_s): Replace file_sock and file_hd by + the hddesc_t hdd. + (fd_table): Ditto. Add want_reader and want_writer. + (hddesc_lock): New lock variable. + (new_hddesc, ref_hddesc): New. + (release_hddesc): New. + (reader, writer): Call release_hddesc. + (create_reader, create_writer): Change for new hddesc scheme. + (destroy_reader, destroy_writer): Replace closing by a call to + release_hddesc. + (_gpgme_io_pipe): Change for new hddesc scheme. + (_gpgme_io_close): Ditto. + (_gpgme_io_dup): Ditto. Use want_reader and want_writer. + (_gpgme_io_socket): Change for new hddesc scheme. + + core: Print a dump of the I/O data only at level 8. + + commit 337c10825525d4084f3f437fde5af3806707e6a4 + * src/debug.h (TRACE_SUC3): New. + (TRACE_LOGBUFX): New. + * src/posix-io.c: Use TRACE_LOGBUFX instead of TRACE_LOGBUF. + * src/w32-glib-io.c: Ditto. + + w32: Fix and improve CancelSynchronousIo use. + + commit acef4f775f273bbef63bc81afbad8feaabc7414e + * src/w32-util.c (_gpgme_w32_cancel_synchronous_io): Fix name of DLL + and print trace info only on error. + +2018-11-01 Werner Koch + + w32: Use CancelSynchronousIo in destroy_reader. + + commit 63ba09b541dabbe838253926896e721cb9be564a + * src/w32-util.c (_gpgme_w32_cancel_synchronous_io): New. + * src/w32-io.c (destroy_reader): Use it here. + + w32: Merge all the object tables of w32-io into one. + + commit 338e9edfdb9239f1c9d4409f6d08d79a9d6f285b + * src/w32-io.c (fd_table_size): New. Used in most places instead of + the MAX_SLAFD constant. + (reader_table, writer_table, notify_table): Merge them into ... + (fd_table): this table. Chnage all affected code to take just one + lock. + +2018-10-31 Werner Koch + + w32: Remove unused arg from two functions. + + commit 79fc7c0fe825014e75bb825c4966a04a22e78254 + * src/w32-io.c (find_reader, find_writer): Remove unused start_it + arg. It is always passed as true. Change callers. + + w32: Remove all support for WindowsCE. + + commit 3c04dea3ecebed35208f6b631b2e8b04222ea432 + * configure.ac: Remove WindwosCE support. + * contrib/: Remove all; it was only used for WindowsCE. + * src/w32-ce.c, src/w32-ce.h: Remove files. + * src/Makefile.am (system_components): Remove these files. + * src/ath.c, src/ath.h: Remove W32CE support. + * src/data-compat.c (gpgme_data_new_from_filepart): Ditto. + (gpgme_data_new_from_file): Ditto. + * src/debug.c (debug_init, _gpgme_debug): Ditto. + * src/gpgme-tool.c (gpgme_server): Ditto. + (main): Ditto. + * src/priv-io.h: Do not include w32-ce.h. + * src/util.h: Remove WindowsCE support. + * src/w32-io.c: Ditto. + * src/w32-util.c: Ditto. + * src/debug.h (TRACE_SUC4): New. + + w32: Remove cruft in w32-io from WindowsME times. + + commit 2e07d4f89a26bb56a55b2743d39fb37532028ffd + * src/w32-io.c (set_synchronize): Remove. + (create_reader, create_writer): No need for set_synchronize. + +2018-10-30 Ben McGinnes + + docs: python docs restructure. + + commit 78be1e2f543667576a49286476e7d66a707dd17e + * Moved the what's new section out of the HOWTO (mostly), in + anticipation of expanding the docs to be more than merely a HOWTO. + + docs: python. + + commit d5c22966d5bf397cccfa171095885cd207ef6ae3 + * dropped the ".org" extension and added a mode line for each file as + this will make scripting format conversions a lot easier. + +2018-10-30 Werner Koch + + w32: Fix previous commit. + + commit 9eef23fcf39f2b2eb2645afd31a79ba1286d9885 + * src/w32-io.c (_gpgme_io_spawn): Move freeing of TMP_NAME behind its + use in an error handling. + +2018-10-29 Andre Heinecke + + core,w32: Fix memleak of tmp_name in w32-io. + + commit 7a1b58045f980c4df76daf225a2a1b604e8604d2 + * src/w32-io.c (_gpgme_io_spawn): Free tmp_name. + + tests: Add repeat argument to run-verify. + + commit 681525be003433728d127303d40712803b70cb9c + * tests/run-verify.c (main): Add repeat argument. + + core: Do not crash if CMS plaintext is ignored. + + commit 8f27511862cabac8fa1dd8f883cb78faebc05ef6 + * src/engine-gpgsm.c (gpgsm_verify): Fix handling both + plaintext and signed_text as NULL. + + cpp,tests: Add another test runner. + + commit 62c736ba76a19d3b41af69e1f340a53b80f13fe0 + * lang/cpp/tests/run-verify.cpp: New. + * lang/cpp/tests/Makefile.am: Update accordingly. + +2018-10-25 Andre Heinecke + + cpp: Add some convenience functions. + + commit 05a0e97f5c12c06082fbeab0fba6f86ddbfbe6b2 + * lang/cpp/src/context.cpp (Context::create): New. + * lang/cpp/src/context.h: Update accordingly. + * lang/cpp/src/key.cpp, lang/cpp/src/key.h: + (Key::isBad, Subkey::isBad, UserID::isBad) + (UserID::Signature::isBad): Add shorthand for the isX checks. + * NEWS: Mention it. + +2018-10-23 Ben McGinnes + + docs: python howto. + + commit 04791c896712857feaf9a472a48d7a4c4f287775 + * Fixed a few spelling and grammatical errors. + +2018-10-21 Ben McGinnes + + Python: docs tweaks. + + commit 59e38e3d2c14b40045e15c45b6c2f300e8f097dc + * Fixed a minor error in how the reST version of the HOWTO is + generated. + * Updated the help() in __init__.py with a little more detail as to + why not to use the lower level functions. + +2018-10-20 Ben McGinnes + + python bindings: callback test. + + commit 651a1afe80bcc421da26f38015e8a322e140f130 + * lang/python/tests/t-callbacks.py: Updated test logic to try + generating a key which expires in 2099 and if that fails then + fallback to an expiration in 2037 in an attempt to catch the 32-bit + systems. + +2018-10-18 Werner Koch + + core: Fix segv in genkey when no endtag is provided. + + commit fbac11b19d97730494dc9dad3b7f71453ef15581 + * src/genkey.c (get_key_parameter): Provide a fallback ENDTAG. + + core: Return an error if NULL is provided for genkey's parms. + + commit 174af15725d4989a840ff3098996cc8a0568f724 + * src/debug.c (_gpgme_debug_buffer): Bail out of BUF is NULL. + * src/genkey.c (gpgme_op_genkey): Do no deref a NULL in + TRACE_LOGBUF. + (gpgme_op_genkey_start): Ditto. Return an error if PARMS is NULL. + +2018-10-18 Daniel Kahn Gillmor + + python: do not export HAVE_CXX11 definition. + + commit 9de1c96ac3cf6fa126325002b61a1b606037ca88 + * lang/python/gpgme.i: ignore HAVE_CXX11 in SWIG interface + +2018-10-17 Werner Koch + + python: Auto-check for all installed python versions. + + commit ff6ff616aea6f59b7f2ce1176492850ecdf3851e + * m4/python.m4 (AM_PATH_PYTHON): Add a 4th arg. + * configure.ac (available_languages): Remove separate python2 and + python3 and keep just python. Simplify test for pythons. Use an + explicit list of python versions to test. + +2018-10-16 Werner Koch + + core: Really remove CR from version output. + + commit d63d6d8b8030ec1dc19f9f66c8af3b2f3288d309 + * src/version.c (_gpgme_get_program_version): Fix test. + +2018-10-10 NIIBE Yutaka + + build: Let configure create the VERSION file. + + commit 85dd0fa4b5f026a13da842bf64ab8a37a68918d4 + * autogen.sh: Update from libgpg-error. + * configure.ac: Use mym4_version to create VERSION file. + * Makefile.am (dist-hook): Do not create VERSION. + (EXTRA_DIST): Add VERSION. + +2018-10-09 Andre Heinecke + + cpp: Add KeyListMode::Locate. + + commit c565cf42a38a8bda936df8c52936589cc8a06ca3 + * cpp/src/global.h (KeyListMode): Add Locate. + + cpp: Add first manual tests. + + commit 9f85f4967e617e9f97529b89f530c1bc36b52a5c + * lang/cpp/Makefile.am: Add tests subdir. + * lang/cpp/tests/Makefile.am: New. + * lang/cpp/tests/README, + lang/cpp/tests/run-getkey.cpp, + lang/cpp/tests/run-keylist.cpp: New. + * configure.ac: Configure tests makefile. + + core: Add trust-model flag. + + commit 85627e58184529e982369cfc00ed7865244c13d6 + * src/context.h (gpgme_context): Extend with trust_model. + * src/engine-gpg.c (engine_gpg): Extend with trust_model. + (gpg_set_engine_flags): Take trust_model from context. + (build_argv): Handle trust_model. + (gpg_release): Free trust_model. + * src/gpgme.c (gpgme_set_ctx_flag): Handle trust-model flag. + (gpgme_release): Release trust-model. + * doc/gpgme.texi: Document new flag for gpgme_set_ctx_flag. + (Context Flags): New subsection for the context flags. + * tests/run-keylist.c (show_usage, main): Add new --trust-model + parameter. + + cpp: Initialize all gpgme_key_t's in context. + + commit 7a1e6dbfb16f71f692a53f7e0955bde86dbb7fee + * lang/cpp/src/context.cpp (Context::startKeyListing), + (Context::keyListResult, Context::signingKeys): Initialize key. + + core: Ensure r_key init in gpgme_get_key. + + commit ecfa88e65fda9c9766ad526d57e2fc8b2884f634 + * src/keylist.c (gpgme_get_key): Move r_key init above + the first invalid value check. + + qt, tests: Add test for single get key. + + commit bf4aae45129c1093ee7712bdbcdfe1c8f2ca7c0f + * lang/qt/tests/t-keylist.cpp (testGetKey): New. + +2018-10-08 Werner Koch + + Release 1.12.0. + + commit 1aff2512d846ea640d400caa31c20c40230b3b04 + * configure.ac: Bump core LT version to C32/A21/R0. Bump C++ LT + version to C14/A8/R0. + + * lang/qt/tests/Makefile.am (CLEANFILES): Add reader status files. + * Makefile.am (EXTRA_DIST): Add conf/whatisthis. + +2018-10-05 Werner Koch + + core: Apply GPGME_EXPORT_MODE_NOUID also to keyserver exports. + + commit 913601f4879f011878b53b885f35524df98b5570 + * src/engine-gpg.c (export_common): Add keyserver-options to the + send-keys commands. + + build: Move config.h to conf/config.h. + + commit ecfa48fffa93f3d1b66354d2d46872ff614c4a68 + * conf/: New dir. + * configure.ac (AC_CONFIG_HEADER): Move header to conf dir. + * doc/Makefile.am (mkdefsinc): Adjust rule. + * lang/python/Makefile.am (copystamp): Ditto. + +2018-10-04 Ben McGinnes + + docs: whitespace bug. + + commit 033da18b88af69b7846de62af4aeea359d27ec20 + * Same as before, but exported. + + docs: org to texinfo whitspace bug. + + commit a8d4aa6f763599bbd8ea36ef98b7b4931bf326dc + * replaced "." in headings with "·" to prevent whitspace being + appended by texinfo and breaking git. + + docs: python. + + commit 0b5930b276186afd1ca1dd91d82db7e60dd20606 + * Fixed an error in the new index page and then exported to the other + two "source" formats. + + docs: python. + + commit 48258879720a4f423d0efa955da942d69f3c49d4 + * lang/python/doc/meta/TODO.org: Added the two major documentation + build system tasks to the TODO list. + * Added an index page in preparation for sorting out the second of + those TODO lists (Docutils is a lot easier to handle than Texinfo). + * Meanwhile, have confirmed that it all builds just fine under + GNU/Linux, OS X and FreeBSD while retaining the documentation, so + that's a nice improvement from 1.11.1. + + python: makefiles. + + commit f3fc73738264d21baf0e9b49fdd5cb67faa11d31 + * doc/Makefile.am: Removed a bit I forgot about. + * Renamed lang/python/docs to lang/python/doc bvecause apparently + automake cares about that too. + * Decided to be extra explicit in the manifest because if I don't then + all sorts of things get deleted ... like lang/python + * Tested on an external linux system just in case my osx workstation + introduces too much weirdness. + + python: make file. + + commit 2cca422ca4b2df831a824393077d0b52d79532aa + * lang/python/Makefile.am: Attempting to remove the docs/meta + directory did a lot worse than I thought it was doing, so better to + just be sure the documentation is available than destroy the entire + bindings directory. + + python: make file. + + commit 582f14d97a900106dce0c8d8666a443c6ec25050 + * lang/python/Makefile.am: Now that gpg2 has been renamed back to gpg + and gpg1 is semi-deprecated, we should check what the actual gpg + binary is with gpgconf and use that rather than make assumptions per + system. + * Also, it means less worry if gpg3 is ever a thing. (Trust me, I + remember the Python 1 to 2 transition as well as the current 2 to 3 + transition). ;) + +2018-10-03 Ben McGinnes + + docs: more whitespace checks. + + commit a174b269432fd37e8546c43e0127580e826432da + * lang/python/docs/texinfo/short-history.texi: + + dpcs: python howto. + + commit 962dfca9b86b53bb00f5b89e453b9eed95454934 + * More updates to the docs themselves and the versions to be available + with the next release. + * .texi and .rst copies of the HOWTO and the short history of (this + part) of the project. + + docs: python. + + commit 2151b9828af3760867e856ab939b835a6e2f42e7 + * More restructuring. Also the painstaking task of deciphering some + of the more eclectic aspects of Texinfo and make. + + docs: python bindings. + + commit a982f9131520bce0b25f84cba19040bbe5f275bb + * Restructured the docs directory to account for the GNU preferred + source doc format (.texi) and the Python preferred source doc + format (.rst) and the real source doc format (.org). + * Both the perceived source formats will need to be generated from the + .org files and included at this stage. Unfortunately there is not + yet a native org-to-rst transformation method in the org-mode + software in Emacs nor is there a a direct means of going from reST + to Org-mode from Docutils. There's only third party packages like + Pandoc and, while very good, there is no guarantee of consistency; + so we can't entirely automate this bit (yet). + + docs: pre-python preparation. + + commit b2802053192ba0000866b145b715a557d34ed0eb + * doc/Makefile.am: removed the python howto from this file, restoring + it to just the main project and the newer .js files. + * deleted: doc/gpgme-python-howto.texi + * renamed the Short_History.org file to short-history.org to keep the + naming conventions similar. + * All the Python files can (and should) live together. + +2018-10-02 Ben McGinnes + + python bindings: CPython order. + + commit 23894ac9a96081428a590791010ca8beebaf6f9f + * Changed the order of python versions the configure/make process + checks for, placing Python 3.7 ahead of 3.6. + * Updated the HOWTO documentation to reflect this change. + +2018-10-02 Werner Koch + + core: add experimental GPGME_EXPORT_MODE_NOUID. + + commit 7b861945fdc71fd3c82c91f824172dadd2220fa0 + * src/gpgme.h.in (GPGME_EXPORT_MODE_NOUID): New. + * src/export.c (export_start): Adjust option check. + * src/engine-gpg.c (export_common): Implement option. + +2018-09-30 Ben McGinnes + + docs: python bindings. + + commit 76bdfabb057f4ffc56beee15b48d8fa836ba7cce + * Tightened up the docs a little bit, updated the "what's new" + section, dropped the "-draft" version in preparation for GPGME + 1.12.0's release. + * Exported another .texi version (and updated the draft copies to this + commit (which ought to be 1.11.1-beta313). + + python bindings: fixing decrypt-verify. + + commit 837a4760533e80f075cd727f18354904b8a54132 + * lang/python/src/core.py: First restoring the exception to the being + just that. + * The means to manipulate the error output is temporarily in commented + out code, but ought to be added to a proper test later. + * In the mean time the original test, with a very slight change, works + again. + + python bindings: ctx.decrypt. + + commit 11403a46358f9b6e98776974f3c70f211d9adf85 + * lang/python/src/core.py: Fixed methods of detecting whether verify + is a boolean variable or a list. + * Added methods of catching the missing keys exceptions. + * Still retained PEP8 compliance (which might have been where one or + two problems crept in). + * Though this is essentially the correct behaviour, it still does not + quite fit the otiginal test; so that will also require some adjustment. + +2018-09-27 Ben McGinnes + + example: local signatures. + + commit ce045a1ef9c63042fcffb5487b19646d67addba0 + * lang/python/examples/howto/local-sign-group.py: added the bit where + specifying the signing key is actually used for signing rather than + just pruning the list of keys to certify. + + example: python bindings. + + commit a047e0f68ef471097e514665249063f267257b19 + * lang/python/examples/howto/local-sign-group.py: locally sign every + key in a group line except one's own keys. Intended to address the + sort of thing one might see on lists like PGPNET or other closed + groups amongst activists, journalists, etc. where everyone encrypts + to all recipients, but may not sign everyone's keys publicly.. + + docs: python bindings installation. + + commit 1d40d360bccb05b4c66313a60a902d04a0d3c9ff + * lang/python/docs/gpgme-python-howto.org: added a section on + installing the bindings to a python virtualenv. + + tests: python bindings. + + commit b9aea3b9c2c2762a9ae8d677196f82acc6a1c028 + * Fixed the final assertion to look for what will actually be reported + in that case instead of something else (i.e. it looks for an + IMPORT_ERROR status code). + + examples: python bindings. + + commit 7c9f49a4991c1ccd0cb582875207b373d4fccf50 + * Fixed homedir specifying logic in several cases. + +2018-09-25 Ben McGinnes + + docs: a typographical two-step. + + commit b625258d54782040195cc5ad3b255685af6f6c4e + * Sometimes you really do need or want punctuation in a heading, but + ideally without something else generating whitespace and other + annoyances to go with it. + * Trying a real decimal point instead. + + docs and examples: python bindings. + + commit 62e4e2cb5edb09183b9f9d448f992fe65cb6db85 + * Woumd up the "what's new" section. + * Added an example for sending a key to the keyservers via hkp4py. + * Updated the export key code to use a more complete check for the + $GNUPGHOME location. + * Expanded on the installation and reinstallation troubleshooting + section. + +2018-09-24 Ben McGinnes + + docs: python bindings howto. + + commit e9da4d97107b40a48583775df34783f07be5dfdb + * Added a What's New section to summarise changes since the last + release. There have been quite a few and some attention does need + to be drawn to some of them. + * Confirming certain issues with some platform builds, especially + BSD/OSX vs. Linux issues which will need to update the installation + troubleshooting guides. + +2018-09-23 Ben McGinnes + + docs and examples: python bindings howto. + + commit b12b2cc99621fe32a2d698ce7f091f3225f35bd0 + * Added more comprehensive examples using hkp4py and added a couple + more example scripts for protonmail. + + examples: python bindings and hkp4py updates. + + commit ced4bdbbb239c1fe209665b4f5a7aeb9651889ed + * Mostly tightening up the details on the hkp4py example script. + * Also fixed a typo in the LGPL boiler plate text included in all the + other example scripts for the HOWTO. + + python bindings: importing from keyservers with hkp4py. + + commit 6ed9a77c92c32f77092b36c149185d4359cd6e55 + * added a new example script to search the keyservers and import the + results, this time using Marcel Fest's hkp4py module. + * Updated the key importing section to match this addition. + * Tested with the current version of hkp4py from github. + +2018-09-22 Ben McGinnes + + docs: python bindings howto. + + commit 3622576105ae1924d9b40ce0d09bf9a7accc0ed1 + * Confirmed that updates to the tests have significant'y improved that + output. + * Updated some of the additional notes for the section on hkp4py. + ** This is in anticipation adding at least import examples using that + module as well. It may also include adding examples of exporting a + key and uploading it to the keyservers. + +2018-09-20 Werner Koch + + python: Fix a couple of syntax errors. + + commit 6878126b6f53cdf7daeeaf68116dda008564c2fa + * lang/python/tests/t-keylist-from-data.py: Add missing line + continuation. + * lang/python/tests/t-keylist.py: Ditto. + * lang/python/tests/t-quick-key-creation.py: Ditto. + * lang/python/tests/t-quick-subkey-creation.py: Ditto. + + python: Silence a few warnings. + + commit dcdabf5f2ef84e1f304fcc0590ec4bb160354af5 + * src/gpgme.h.in: Obsolete "class" also for Python. + * lang/python/gpgme.i: Silenece a swig warning. Silence a gcc + warning. + + python: Fix regression in the test suite. + + commit 9f19b3aaecd23a12b2e6692faeefa936e490d343 + * lang/python/tests/Makefile.am (GNUPGHOME): Remove stray backslash. + + tests: Don't try using keys from a scmartcard. + + commit a824f4498ea9bae5dca515c56e2455ec0ce98b50 + * tests/gpg/Makefile.am: Disable scdaemon + * lang/python/tests/Makefile.am: Ditto. + +2018-09-20 Ben McGinnes + + docs: python bindings and its special request. + + commit 5cb67257f2b3b5fcfd3444e366f26a0f2ae09504 + * Added some material on using the new-ish hkp4py module with GPGME. + * Example code will be added later once a couple of little issues are + addressed. + +2018-09-19 Werner Koch + + json: Remove subkey-algo from createkey command. + + commit c569adb5e3e3082bd68cdc34a2d349b7c28d3768 + * src/gpgme-json.c (op_createkey): Remove subkey-algo param. + (GPG_AGENT_ALLOWS_KEYGEN_TRHOUGH_BROWSER): Fix typo. + * lang/js/src/Keyring.js: Remove subkey-algo support. + * lang/js/src/permittedOperations.js: Ditto. + +2018-09-18 Ben McGinnes + + docs: python bindings. + + commit 362caaf02f3a25b7e626572aa30b87771c2c8f4d + * Updated the Cython example code slightly, along with the + corresponding explanation. + +2018-09-17 Ben McGinnes + + docs: python bindings howto. + + commit f4d83800d89173e618cceca44b584778217fadb3 + * Tightened up the Cython demonstration. + +2018-09-16 Ben McGinnes + + docs: cython sanitized. + + commit 44c846345e91413b9d6a1f7b26f59db5b1c32433 + * Sanitized the shell command examples of extraneous whitespace. + * Removed keycount.c as sanitising it is pointless and it will be + generated by Cython when the example is followed. + * Regenerated the .texi version. + + docs: python bindings howto. + + commit 61c08f7435570783f5c267e42d288d31bf77e560 + * Added new advanced section with an example of using the Python + bindings with CPython code compiled back to C code using Cython. + * Though it may seem a bit counter-intuitive to use the bindings just + to go back to C via a different route, this is not actually stupid. + * Added examples/howto/advanced/cython/ directory. + * Added keycount.pyx, setup.py and the keycount.c file which the first + two generated with Cython. Not including the .so and .o files from + the build. + * Exported the .texi version of the howto for the main docs. + + docs: even more edits. + + commit fbec29fdac7a4f162e73f24dac2a6b205239ef03 + * doc/gpgme-python-howto.texi: hunting down and killing commas, + Oxford or not it can't stay in a heading. + + docs: more edits. + + commit 2a1b0b88d96b722817f3ac9edf002a54c65084b8 + * lang/python/docs/gpgme-python-howto.org: more tweaks and edits, + along with another build of output formats. + * doc/gpgme-python-howto.texi: updated texinfo version for parent docs. + + docs: whitespace culled. + + commit 91b26b0638d9f92f0e90aab1c3750c14d72db301 + * lang/python/docs/gpgme-python-howto.org: Identified and fixed the + headings which kept generating lines with trailing whitespace when + exporting to Texinfo format and adjusted them to prevent that. + + docs: renaming and drafts. + + commit 766ec0e4a36c120ed4ef5463b5fdf8e7ed3b4563 + * lang/python/docs/gpgme-python-howto.org: Renamed file to better fit + the rest of the project's docs. + * Added a section on the very unofficial drafts I periodically post + links to since they're often the easiest way to get a web version in + front of someone in a hurry. + +2018-09-15 Ben McGinnes + + docs: python howto texinfo update. + + commit 76f77022848894ee9d8490255cefdd0100248b45 + * doc/gpgme-python-howto.texi: + + docs: Python howto update. + + commit 7e9df9b9e33131f5d7c58ad58249f9ae766f1341 + * lang/python/docs/GPGMEpythonHOWTOen.org: Added corresponding GPGME + version number to table at the start and cut the shortcut from the + groups.py example. + * doc/gpgme-python-howto.texi: New export of Texinfo file for docs + build. + + docs: generated whitespace. + + commit 93a2ea0207fac0a18a48b671df11dc8575579c39 + * doc/gpgme-python-howto.texi: culled whitespace included with the + org-mode export. + + Docs: including howto with standard docs. + + commit 2e5b0603709855eb1d8a1a3fd51d3245f4301ada + * gpgme.spec.in: Added gpgme-python-howto.info build on the grounds + that it now deals with certain possible installation issues and end + users encountering them would want the docs to hand. + * doc/gpgme.texi: updated the copyright year to this year. + + Docs: Python bindings HOWTO. + + commit b19faa26e01df4d78286e013313e5ab25f517d49 + * Added doc/gpgme-python-howto.texi: generated from + GPGMEpythonHOWTOen.org and then slightly modified so the generated + Info file doesn't use camelCase. + * doc/Makefile.am: Updated makefile to include the Python HOWTO with + gpgme_TEXINFOS and to export the generated files to the webserver + along with the main GPGME one. + + Python bindings: docs. + + commit d04fb0bf1271c91b88686c947a5b14ffc9b505ef + * lang/python/docs/GPGMEpythonHOWTOen.org: Fixed a few errors in the + newer sections. + * Updated code in the examples using secret key exporting and group + lines to reflect the Python 2.7 compatibility fixes added. + + Python bindings: examples. + + commit 4e8a92ed14ea3da3d92f07d5f62fd325a2adebde + * lang/python/examples/howto/export-secret-keys.py and groups.py: + Updated the backwards compatibility adjustments to account for + unicode differences between python 2 and 3. + + Python examples: backwards compatibility. + + commit 864ef9b40f5f9d0c66a458b6033277938d7d1d50 + * lang/python/examples/howto/groups.py: subprocess update + * lang/python/examples/howto/export-secret-keys.py: subprocess update + + Both of these try the nice and easy method of getting the subprocess + output available in Python 3, but will fall back to the older Popen + method if it doesn't work. Essentially this is to be a little nicer + to Python 2.7.15 (even though the examples are filled with warnings + that py2 support is not guaranteed with the examples). + +2018-09-10 Thomas Oberndörfer + + js: Fix errorDetails of GPGME_Signature. + + commit dd7d37ca21684d4d77db4f513c6212776fc6ea82 + * lang/js/src/Signature.js (GPGME_Signature.errorDetails): + Access properties from the summary object. + +2018-09-08 Ben McGinnes + + estreams revised. + + commit 2375959180aa8eb0d23cc3f8240c3f5b5262b819 + * Egon Spengler was right, crossing the streams is bad. + * Restored both src/gpgme.def and src/libgpgme.vers to use the + estreams symbols without the leading underscore. + * The new_from_estream() function added to lang/python/src/core.py and + set to alias the new_from_stream() function remains. + * Opted for the solution favouring Linux onthree main grounds: + 1. Andre reported major problems with Windows as well, so the number + of potentially affected systems would vastly increase. + 2. All the BSDs and OS X have spent far more time and development + work in order to accommodate the eccentricities of both Microsoft + and the GNU Project (ref. GCC), so they're more likely to be able + to cope with doing so again than the other way around. + 3. If I really have to I can write a custom installer for OS X to + try this and, if it fails, to then patch the two symbol entries and + recompile from scratch. That said, I may not have to since it + actually behaved during the most recent tests for this + commit; into ten separate CPython installations and all five + supported versions (standard source installs and OS X Framework + installs for each version). + +2018-09-02 Ben McGinnes + + estreams symbols for python bindings. + + commit 879cc1f84fbf09cb4eeb78bce16f52a1a36032ba + * It turns out that even though some platforms detect differing + symbols for estreams, the two types do not appear to be in + conflict. At least they don't from the BSD/OS X side of things. + As a consequence both versions are now included. + +2018-08-31 Ben McGinnes + + docs: python bindings. + + commit 55991aa91667b9184cc9fc86a3ac21b9640511ef + * minor typographic update. + +2018-08-30 Ben McGinnes + + python bindings: estreams fix. + + commit 1d00fb987b903e245d484bddfe3c0a0aba670ac1 + * lang/python/src/core.py: Adjusted new_from_estream function to alias + new_from_stream instead of fd. + * fixed the _gpgme import errors introduced in commit + 08cd34afb762975b0273575035dacf69449ef241 by changing the exported + functions/types to match the inner module where all the work is + done, rather than the outer one(s). + +2018-08-29 Ben McGinnes + + python bindings: core. + + commit 18ea83867168e8db0a2f2c8057d087363083486c + * lang/python/src/core.py: expanded gpgme_error check lists. + + python bindings: core. + + commit dcedddecb6f8f11682aed3b09b88ee1511010faf + * lang/python/src/core.py: added gpgme_data_set_flag to the errorcheck + funtion. + + python bindings: core. + + commit 6078b5303362b2e5ce56660967fac313ca3d5ae9 + * lang/python/src/core.py: added new function new_from_estream to wrap + new_from_fd just like new_from_stream does and for the same reason. + +2018-08-29 Andre Heinecke + + json: Fix detached verify. + + commit 1420c3bd681648b032d756536311621a3627bedb + * src/gpgme-json.c (op_verify): Only create output and + use it for clearsigned and opaque signed. + +2018-08-29 Ben McGinnes + + docs: python bindings - protonmail examples. + + commit f7e5ae7f1618bd355b885c5c32dd028afad35453 + * lang/python/docs/GPGMEpythonHOWTOen.org: Updated links to the + ProtonMail keyserver import scripts and added a warning regarding + being unable to update third party keys. + * lang/python/examples/howto/pmkey-import-alt.py: added usage. + * lang/python/examples/howto/pmkey-import.py: added usage. + +2018-08-28 Ben McGinnes + + docs: python bindings HOWTO. + + commit 02d0b97bfedc732351cc4e89c92fcd9d31209535 + * Finished CFFI vs SWIG bit in known issues. + * tidied up some of the structure. + * Fixed some minor errors and links. + + docs: python bindings. + + commit a8a983c5bc0f0deeeebda455ad73309fff48b61f + * Added section on why no CFFI. + + docs: python howto. + + commit c2831e2377843c8625df158ef32e01f8c19494eb + * Added another key import example using ProtonMail's new keyserver. + +2018-08-28 Andre Heinecke + + json: Delete primary key if subkey gen fails. + + commit 3bdf8be6d2c57319399fe14e27e52b323a17750a + * src/gpgme-json.c (op_delete): Delete primary key on + subkey gen error. + + json: Allow NULL request in encode and chunk. + + commit 7d3c13df263ed88c17005920e75e0486abeae5b9 + * src/gpgme-json.c (encode_and_chunk): Don't error on NULL + request. + +2018-08-27 Ben McGinnes + + docs: python bindings. + + commit 1c261b9fa3462360b6c3f43b243091cd50534903 + * Added details on installation troubleshooting. + +2018-08-27 Werner Koch + + json: Do not put FILE_NAME into the verify result. + + commit 53c5b9a265d33f2cc54f489375a929602338aee8 + * src/gpgme-json.c (verify_result_to_json): Remove "file_name". + +2018-08-27 Jasper Spaans + + core: Export gpgme_data_new_from_estream function. + + commit 08cd34afb762975b0273575035dacf69449ef241 + + +2018-08-23 Andre Heinecke + + json: Add sender and file name to encrypt. + + commit a5f8dac77d50480a208c99398df323c58ce6dc58 + * src/gpgme-json.c (hlp_encrypt, op_encrypt): Support sender + and file_name. + +2018-08-21 Andre Heinecke + + json: Add proper decrypt_result_t handling. + + commit 263dadb04aed4f973248b32c52af6ca59bcb7c1f + * src/gpgme-json.c (recipient_to_json, decrypt_result_to_json): + New. + (op_decrypt, hlp_decrypt): Update. + + js: Update extra_dist files. + + commit 738a8e6f950af08305c082d59a91d3d5d45800fa + * lang/js/BrowserTestExtension/Makefile.am, + lang/js/Makefile.am (EXTRA_DIST): Update. + + Add example manifests for gpgme-json. + + commit 9608996d88549b60da490e5eeb41db023f97a038 + * doc/examples/gpgme-chrome.json, doc/examples/gpgme-mozilla.json: New. + * doc/Makefile.am (EXTRA_DIST): Include them. + + js: Improve README. + + commit 605eb8a8bfcb12141d7cc5626e75af812cda6c75 + * lang/js/README: Clarify structure at the beginning. + + Remove js as language from configure.ac. + + commit fe3de5b86b4a25f5b23cf1af2fd1809ef6c087a0 + * configure.ac: Remove js language. + +2018-08-20 Andre Heinecke + + json: Add subkey_algo and defaults to createkey. + + commit 8103eeba809b6e7156d861783309574b93909169 + * src/gpgme-json.c (op_createkey, hlp_createkey): Add subkey_algo + handling. + (hlp_createkey): Fix documentation of expiry. + +2018-08-19 Ben McGinnes + + Python bindings examples. + + commit 75bc5e6356eca1b7fb76653e7c82c2477f8859b0 + * import-key.py: fixed a minor typo. + * pmkey-import.py: locates and imports keys from the ProtonMail keyserver. + * pmkey-import-alt.py: the same as the previous except with setting an + alternative $GNUPGHOME directory. + +2018-08-18 Ben McGinnes + + Python bindings setup file. + + commit 03b899dbe14a3c32fd018c20c7d5156366fdcc3d + * Moved the build import back up where it belongs. + * Included comments indicating how to build and install for multiple + Python versions beyond the first 2 on the same system. + + Python bindings tests: Near PEP8 compliance. + + commit 5facba45c83f7daaacc49e66306e13a35aeb74be + * PEP8 compliance for the vast majoeity of the tests. + + Python bindings examples: PEP8 conpliance. + + commit b5fbe90676f46b9615919133753a65b20318fe63 + * Appears to be complete compliance. + + Python bindings setup: Near PEP8 compliance. + + commit fc55caccfc87253e1703df66b21917cc399fba62 + * lang/python/version.py.in: Fixed most things, but there's still an + issue near the build portion with the existing Python bugs referenced. + * lang/python/setup.py.in: Now PEP8 compliant. + + Python bindings constants: PEP8 compliance (almost) + + commit 8a6a73b9c4f92b159450edb5e4a780fc7389ca82 + * PEP8 compliance for all constants except the globals in + src/constants/__init__.py depending on whether the import sequence + affects the globals themselves. + + Python bindings src: PEP8 compliance. + + commit 7962cde13c5cbdc643bbde795e2c29e638dfc186 + * import namespace clearance for src/*.py. + * Fixed a handful of is/is not None checks as well. + +2018-08-13 Ben McGinnes + + Symmetric example. + + commit 279cac0ffbb3d865d997dc7fc9c1b53bbb55d3a2 + * lang/python/examples/howto/symcrypt-file.py: *sigh*; passphrase was + right the first time, just the error check that wasn't. + * I really should stop second guessing myself one of these days ... + + Symmetric encryption example. + + commit a256d84882616341b3f357340533893a1db8b5c1 + * lang/python/examples/howto/symcrypt-file.py: Fixed the error code + and the passphrase key word arg. + + Symmetric encryption example. + + commit ed5ef8293cdbfcc3b91268eeae1eb6b4f8d271bb + * lang/python/examples/howto/symcrypt-file.py: A variation on standard + key based encryption. + +2018-08-10 Ben McGinnes + + PEP8 compliance and other code fixes. + + commit 94bf13e78e65e1d1bc2e5d6b2311f9c9657bfe5f + * Ran all the .py files in src/ and below through Yapf. + * Included some manual edits of core.py, this time successfully making + two notorious sections a bit more pythonic than scheming. + * Left the module imports as is. + * This will be committed if it passes the most essential test: + compiling, installing and running it. + +2018-08-09 Ben McGinnes + + Link fixes. + + commit b6d2a66b41fee5b7fb484566aefcdbcc4cdad094 + * lang/python/README: Fixed links in both versions of the README. + +2018-08-08 Andre Heinecke + + json: Wipe memory in cJSON_Delete. + + commit 4dd1d0abd34a382d1cd67cabb737950a39cb3fdc + * src/cJSON.c (cJSON_Delete): Wipe memory on deletion. + + json: Only use calloc instead of malloc. + + commit fdc07b3ddc2f68e6fcb33703ea41126d0a841290 + * src/cJSON.c, src/gpgme-json.c (CALLOC_ONLY): New define + to change xmalloc / xtrymalloc to use calloc. + + json: Add checks when skipping byte. + + commit 974a95db04f9cdea02867f0246445b4679517ba0 + * src/cJSON.c (parse_string, cJSON_Minify): Check for + terminating NULL byte when skipping the byte after a an escaped + quote. + + json: Don't error out if chunksize is omitted. + + commit 6e48bb0f1cbf662026bf0f70549b52bafe00c017 + * src/gpgme-json.c (encode_and_chunk): Don't error out + if no chunksize is provided. + + cpp: Fix use after free in gencardkeyinteractor. + + commit 3b782443600e8091c5f19580cb218100bcbb4ad7 + * lang/cpp/src/gpggencardkeyinteractor.cpp + (GpgGenCardKeyInteractor::Private::keysize): Change to string. + +2018-08-06 Andre Heinecke + + Make GNUPGHOME for tests overridable. + + commit d09d19fa9fe1e81dd819b32208b4bd09f83e3918 + * lang/python/tests/Makefile.am, + lang/qt/tests/Makefile.am, + tests/Makefile.am, + tests/gpg/Makefile.am, + tests/gpgsm/Makefile.am, + tests/opassuan/Makefile.am (GNUPGHOME): Make variable explict. + +2018-07-24 Andre Heinecke + + cpp: Add safety checks for key update. + + commit a6e5c8bf18696007c48c6f362aa355020fe82f21 + * lang/cpp/src/key.cpp (Key::update): Check that the key is + not NULL. + * lang/cpp/src/verificationresult.cpp (GpgME::Signature::key): + Check for fingerprint. + +2018-07-22 Ben McGinnes + + docs: python bindings howto. + + commit 4d1642b11ea64b8009a8720d9b59e89636d691d2 + * Fixed and tested the changes necessary for org-mode to correctly + parse pythonic (Python 3) indentation. + * Updated the source blocks to recommended upper case for BEGIN_SRC + and END_SRC. + * Tested and confirmed XHTML output matches correct examples. + * Tested against pseudo-control output via exporting from org-mode to + org-mode and then exporting that to XHTML. Remaining differences + appear to be discarding the custom tags used to provide X[HT]ML id + elements to each section which does not appear to offer any benefit. + * Exporting directly to XHTML or other HTML output should no longer + cause problems, but if there are any then the first step should be + exporting from org-to-org and then exporting that to XHTML. + + doc: python bindings howto. + + commit d7c5366d58d035d7b7119f955824e842d0b6bbe0 + * Another retrofitting of the HOWTO Python example code, this time + following adjustments to python-mode configuration and having + trawled through the org-mode mailing lists for clues. + + doc: python bindings howto. + + commit b47e1bb98a8ff93cae560449bfa9103c47f4d4f8 + * Added org-mode byline. + +2018-07-19 Werner Koch + + core: Clear all flags for a new data property. + + commit 5ef492c5635ae1677eed6f439a75a86a99dbbe18 + * src/data.c (PROPERTY_TABLE_ALLOCATION_CHUNK): New. + (insert_into_property_table): Use it here. Clear all flags. + + core: Blank out the plaintext after decryption failure. + + commit 085cdeddef637cc057362fcbde13b0261b8699ec + * src/data.h (data_prop_t): New enum. + (struct gpgme_data): Add field propidx. + * src/data.c (property_t): New. + (property_table, property_table_size, property_table_lock): New. + (insert_into_property_table): New. + (remove_from_property_table): New. + (_gpgme_data_get_dserial): New. + (_gpgme_data_set_prop): New. + (_gpgme_data_get_prop): New. + (_gpgme_data_new): Connect new object to property_table. + (_gpgme_data_release): Remove from property_table. + (gpgme_data_read): With DATA_PROP_BLANKOUT set don't fill the buffer. + * src/data-mem.c (gpgme_data_release_and_get_mem): Likewise. + * src/decrypt.c (struct op_data): Add field plaintext_dserial. + (_gpgme_op_decrypt_init_result): Add arg plaintext and init new field. + (_gpgme_decrypt_status_handler): Set DATA_PROP_BLANKOUT on decryption + failure. + (_gpgme_decrypt_start): Pass PLAIN to the init function. + * src/decrypt-verify.c (decrypt_verify_start): Ditto. + * configure.ac: Check for stdint.h and bail out if uint64_t is not + available. + +2018-07-19 Andre Heinecke + + cpp: Print origin and last update for key/uid. + + commit 8168dfbeb12042a7f7b1bad918ef60df92bfd1a7 + * lang/cpp/src/key.cpp: Print origin and last update in + iostream operators. + +2018-07-19 Werner Koch + + json: Don't use strdup but the xtrystrdup wrapper. + + commit af2c74d6c06a9fb08f7de15d41162d09f871a62e + * src/gpgme-json.c (create_keylist_patterns): Use CNT as first arg for + xcalloc. + (process_request): s/strdup/xtrystrdup/. + + core: New interface gpgme_data_new_from_estream. + + commit f42cd70f18d53df47cc2d027bade736377d39b71 + * src/gpgme.h.in (gpgme_data_new_from_estream): New. + * src/data-estream.c: New. + * src/data.h (gpgme_data): New union member e_stream. + +2018-07-18 Andre Heinecke + + json: Fix memleak in native msging repl. + + commit 98a75a16ccdfe51799a27894d2eb26dba04b34f2 + * src/gpgme-json.c (native_messaging_repl): Free request and + response after each loop. + + json: Ensure that native msging request is string. + + commit 6d7b4382c3e12ba1dbbd0762dfa850c76750d838 + * src/gpgme-json.c (native_messaging_repl): Ensure that the + request is NULL terminated. + + json: Fix crash by ensuring response is never NULL. + + commit 82e4b900a96c837392259469a9a5821a95e7a707 + * src/gpgme-json.c (encode_and_chunk): Try to always + return at least an error. + (process_request): Double check that it does not return NULL. + + json: Fix memory errors in create_keylist_patterns. + + commit b78140daf7720132711314a4e5ed878b49da99f4 + * src/gpgme-json.c (create_keylist_patterns): Reserve two + pointers more then linefeeds. + (create_keylist_patterns): Fix loop to count linebreaks. + (create_keylist_patterns): Use calloc for good measure. + + qt: Handle encoding for diagnostics. + + commit 16462c54b3503e77bc48c2486234531d7bc31b6d + * lang/qt/src/threadedjobmixin.cpp (fromEncoding) + (stringFromGpgOutput): New helpers. + (markupDiagnostics): Use it. + +2018-07-16 Andre Heinecke + + json: Fix crash on invalid json. + + commit 1686e07e77a1eee3b2708d0231a5a549956021f7 + * src/gpgme-json.c (process_request): Init res. Check for + json object before encode and chunk. + + json: Fix uninitialized key unref in op_delete. + + commit cc21101a7494ea0a17c3012fcb86e77b00b494fa + * src/gpgme-json.c (op_delete): Init key. + +2018-07-16 Werner Koch + + json: Minor cleanups in cJSON.c. + + commit 1933f5b8056b2671301379106cca4504c4187795 + * src/cJSON.c: Add comments on the origin of the code. + (parse_string): Allocate an extra byte for safeness. + (cJSON_AddItemToArray): Allo ARRAY to be NULL. + + json: Fix buffer overflow in cJSON.c. + + commit 013a7f47ab486c380b3c97637d3b15f11de74fe8 + * src/cJSON.c (parse_string): Correctly detect bad hex. + +2018-07-13 Ben McGinnes + + python bindings: example scripts. + + commit 1bb3f8409d4bbec403bea768184a691d9d7ea42d + * Fixed incorrect mention of output prompt referencing secret keys + when the scripts are only for exporting public keys in whole or + minimised forms. + +2018-07-11 Andre Heinecke + + json: Add with-sec-fprs param to export. + + commit 6cc842c9aa76d19448141e5117ac59452d7a1ff3 + * src/gpgme-json.c (add_secret_fprs): New helper. + (op_export, hlp_export): Extend for with-sec fprs. + +2018-07-10 Ben McGinnes + + example scripts: python work-arounds. + + commit 0e760e396fbf13e902d0dc0c048bff0d5410fa16 + * fixed three typos which were guaranteed to break said script. + +2018-07-09 Ben McGinnes + + docs: python bindings howto. + + commit 1eceacaff4ad5d6a4b759a7d00907dbc8278f12c + * Complete typographic overhaul. + * Removed all section level indentation since it does not affect + output formatting, but might affect source code examples. + * In text-mode stripped out all tabs which had crept in and replaced + them with four spaces. + * Updated all code examples (again) to conform with Python-mode. + * Bumped version number in preparation for next release of GPG 2.2.9 + and corresponding GPGME release. + +2018-07-09 Andre Heinecke + + json: Add with-secret without secret only. + + commit 40471ec12f7b4ba37922813a02ebb2aaaa963b51 + * src/gpgme-json.c (op_keylist, hlp_keylist): Add "with-secret" + as a flag to do a public keylist with secret information. + + tests: Add --with-secret to run-keylist.c. + + commit c287f09ac0f090a65299ac7c15e3c9b4947d4b67 + * run-keylist.c (show_usage, main): Add --with-secret. + + doc: More explicit doc for EXTERN and LOCAL modes. + + commit 31bc51e2aff0a28b551410c9def2f578d0d28cea + * doc/gpgme.texi (GPGME_KEYLIST_MODE_EXTERN), + (GPGME_KEYLIST_MODE_LOCATE, GPGME_KEYLIST_MODE_LOCAL): Mention + command line flags for CMS and OpenPGP Protocol. + + Add ctx flag for auto-key-locate. + + commit 7bc5d3c7e41c6e42a583a61a4c9504058fbb2976 + * src/context.h (gpgme_context): Add auto_key_locate. + * src/engine-gpg.c (engine_gpg): Add auto_key_locate. + (gpg_set_engine_flags, build_argv): Handle auto_key_locate. + (gpg_release): Free auto_key_locate. + * src/gpgme.c (gpgme_release): Free auto_key_locate. + (gpgme_get_ctx_flag, gpgme_set_ctx_flag): Handle auto-key-locate. + * doc/gpgme.texi: Document auto-key-locate flag. + * tests/run-keylist.c (show_usage, main): Add --from-wkd option. + +2018-07-07 Ben McGinnes + + python bindings: howto examples. + + commit cacca62d06c6cf4a291f7ab2571cf52d671d140f + * Made sure all example scripts meet PEP8 compliance. + * Required fixing approx. a dozen of them in minor ways. + +2018-07-05 Andre Heinecke + + qt: Handle OpenPGP Diagnostic log. + + commit 66c2a99422dd9a52d8342165ed1d033c4f29b9e0 + * lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): + Handle OpenPGP audit log differently. + + cpp: Add enum mapping for GPGME_AUDIT_LOG_DIAG. + + commit 629afebe5017db97f2a318f6878fe1f9d3e60189 + * src/context.cpp (to_auditlog_flags): Map DIAG value. + * src/context.h (AuditLogFlags): Add it. + + core: Add gpg auditlog to get diagnostics. + + commit a2458806f8bf04b66795e1dde765b42fe1ef6797 + * src/engine-gpg.c (engine_gpg): Add diagnostics member. + (gpg_release): Release diagnostics data. + (gpg_new): Set up logger-fd and diagnostics. + (gpg_getauditlog): New. Copy diagnostics to a user data. + (engine_ops): Add getauditlog. + * src/engine-gpgsm.c (gpgsm_getauditlog): Return not implemented + for GPGME_AUDITLOG_DIAG. + * src/getauditlog.c (getauditlog_start): Don't reset engine + for diagnostics. + * src/gpgme.h.in (GPGME_AUDITLOG_DIAG): New. + (GPGME_AUDITLOG_DEFAULT): New alias to 0. + * tests/run-decrypt.c (show_usage, main): Add --diagnostics. + * doc/gpgme.texi(Additional Logs): Document getauditlog. + +2018-07-04 Andre Heinecke + + cpp: Fix memory of DecryptionResult::symkeyAlgo. + + commit 7d65dc2a5c4f32139a1b9b1f0bd375f7ab1c58f6 + * lang/cpp/src/decryptionresult.cpp (Private, ~Private): strdup + the symkey algo. + + json: Add keylist mode locate. + + commit 76b847091593669c8a7e38918267d6be97dbd4d0 + * src/gpgme-json.c (op_keylist, hlp_keylist): Add locate. + +2018-07-01 Ben McGinnes + + python bindings: scheming serpents. + + commit 5bca49975063f788b2499342d5a565faf54511db + * Apparently I am wrong and Scheme is the new Python after all. + * Non-import related PEP8 compliance must wait for another day, though + the other PEP8 fixes remain. + + python bindings: gpg.core. + + commit 789ea1b019885d5d1db1662e3cd4fda33636e30c + * Changed id/else statements to a more pythonic form from scheme + masquerading as python - sorry Justus, it had to go ;). + * With the added bonus of enabling PEP8 compliance in those sections. + * Fixed remaining PEP8 compliance issues with the exception of the + imports at the beginning of the file (changing those will break the + entire module, so we'll cope with it as it is). + +2018-06-29 Ben McGinnes + + m4 update: python 3.7. + + commit 35e29e139534ed217340879732a7adfdbd57c91d + * Fixed an error in arcane m4 syntax. + + python bindings: python 3.7. + + commit 43a2b5754571292b25402e20cd044ebda9316c77 + * Bindings confirmed to work with the newly released 3.7.0. + * Updated M4 file to reflect this change and correct the Python binary + search order (3.7 is not yet given priority, but will still be found + first via the more generic python3 executable). + * Updated setup.py.in, bindings documentation and README to reflect this. + +2018-06-28 Ben McGinnes + + whitespace police: + + commit 48174b2bcc319e4542aefd0cc3aae02c4083784e + * There's always one or, in this case, two. + + docs: python bindings howto. + + commit 6aec7d6e4a5173f54a079719020704a0098b8f0a + * Updated official doc (the org-mode file) with the instructions on + importing and exporting both public and secret keys. + + python bindings examples. + + commit a7ccdc51efd8c199b902eb942e9db7b3549e721f + * Added a secret key export variant which saves output as both GPG + binary and ASCII armoured, plus saves in $GNUPGHOME and uses + multiple methods of determining what that location is. + + python bindings examples. + + commit 7fc7e80e54235c558051cbf72b51dd60b4ca485e + * Added a key import variant which accesses the SKS keyservers in a + RESTful fashion and then imports or attempts to import the response. + + python bindings examples: three export scripts. + + commit 0d163a7d121eacacc5f6da11a3dee3548f98f124 + * Example of default exporting keys. + * Example of exporting minimised keys. + * Example of exporting secret keys to a file with correct permissions. + + python bindings: import example. + + commit 4251cae34da0d825a29f509ac828f7ecb90c1752 + * Added an example script for importing a key from a file (either + ASCII armoured or not). + + python bindings: export secret keys. + + commit a5b91b21f561d7b13ddcb62fca3749ed92ea8720 + * The holy grail: a function to export secret keys. + * GPGME will still invoke pinentry and gpg-agent as usual to authorise + the export. + * Mostly similar to the two previous export functions for public keys + except that it will return None if the result had a length of zero + bytes. Meaning that the difference between the specified pattern + (if any) not matching available keys and an incorrect passphrase is + not able to be determined from this function (or the underlying one + for that matter). + + python bindings: export public keys. + + commit 7faef33d13fa8efce152ca7aa6e9d39030c1cf08 + * Updated key_export and key_export_minimal to return None where a + pattern matched no keys in a manner simnilar to the possible result + of key_export_secret. + + python bindings: export public keys. + + commit 89c548efdf46bd7d9e6f0ca34a07efbbf420e821 + * Added functions for exporting public keys to gpg.core in both + complete form and in minimised form. + * Rather than letting people need to worry about the export modes we + are simply separating the functions as people would be more familiar + with from the command line usage anyway. + * Functions added for Context are: ctx.key_export_minimal and + ctx.key_export as the default or full export. + +2018-06-20 Andre Heinecke + + json: Add file handling for debug output. + + commit d8beab30c44482fb7a3e445b92cec482792b2ca0 + * src/gpgme-json.c (main): Add possibilty to set log file. + +2018-06-19 Andre Heinecke + + Prepare build system for gpgme-js and dist it. + + commit d27703ea4f0eed950cddf0157dc78bcb5d8d1c65 + * configure.ac: Add js as language. + * lang/Makefile.am: Add js as dist language. + * lang/js/BrowserTestExtension/Makefile.am, + lang/js/DemoExtension/Makefile.am, + lang/js/Makefile.am, + lang/js/src/Makefile.am: Populate EXTRA_DIST variables. + +2018-06-17 Ben McGinnes + + python bindings: core import statements. + + commit 19c5267f868aa41e73752ac1c76ec7ae1efe07b8 + * Fixed the bit I broke while fixing the PEP8 compliance issues. + + python bindings: core — PEP8 compliance. + + commit a5b24ae46c81d3abd3bb18bf0390cab6ebb2bd77 + * Fixed most of the PEP8 errors in core.py + * Those remaining may need more than little edits and are a bit + strange (too clearly the result of a programmer who has spent far + too much time dealing with Lisp so that for Python it looks + ... strange). + + python bindings: core - key import. + + commit 5a80e755008bbb3f4c7f91ffccd38f26cd8b3960 + * Wrapped the key import function in the try/exception statements + needed to catch at least the most likely unsuccessful import attempt + errors. + * Mostly draws on the file error and no data import statuses for + errors, with a couple of exceptions. + + python bindings: core key import. + + commit 0e762608ef5a598030b8d0e56261a830e1b7b724 + * The foundation of a pythonic key import function authored by Jacob + Adams. + * A unit testing script for the same function originally authored by + Tobias Mueller + * Added DCO reference for Jacob Adams to the GPGME AUTHORS file. + * Additional details regarding this patch are available here: + https://dev.gnupg.org/T4001 + +2018-06-10 Ben McGinnes + + script: groups.py. + + commit 92cd060f5e2f4fdbfbe4812ebe8ef57e82e1609f + * Added check for if it is run on a Windows system so that the correct + binary filename is invoked. + +2018-06-08 Andre Heinecke + + cpp: Add proper gpgme_op_createkey. + + commit 8dff414e170e4df8ea661028c4ac1588311ca26e + * lang/cpp/src/context.cpp, lang/cpp/src/context.h + (Context::createKeyEx): New. + + json: Return fingerprint as createkey result. + + commit 54146d90dd5518c24c30e6d2ebeb7f47ed4eb29e + * src/gpgme-json.c (op_createkey): Return fingerprint of new key. + + json: Add op_createkey. + + commit 6c74a59e8855d1cac0d8001ad1b7843d2d15be5e + * src/gpgme-json.c (hlp_createkey, op_createkey): New. + (process_request, hlp_help): Add it. + + json: Generalize chunking and getmore. + + commit af8510fb7f4d5c90cc53f10dcc740f377af73d68 + * src/gpgme-json.c (MIN_REPLY_CHUNK_SIZE): Lower value to + new real minimum. + (DEF_REPLY_CHUNK_SIZE): Don't chunk by default. + (pending_data): Remove type and base64. + (make_data_object): Remove chunksize handling as this is now + generic. + (encode_and_chunk): Setup the pending_data buffer for chunking + if required. + (op_getmore): Changed to generically work on a response. + (hlp_getmore): Update accordingly. + (hlp_help): Document chunksize as generic parameter for all commands. + (process_request): Use encode_and_chunk on the response. + (hlp_encrypt, op_encrypt, hlp_decrypt, op_decrypt), + (hlp_verify, op_verify, hlp_sign, op_sign), + (op_keylist, hlp_keylist, hlp_export, op_export): Update accordingly. + +2018-06-07 Andre Heinecke + + json: Rework verify_result_to_json. + + commit e48f4a18f807ee42b31968b84f6ae7811d8d8a45 + * src/gpgme-json.c (sigsum_to_json): Add bool repr. + (signature_to_json, verify_result_to_json): Extend and follow better + pattern. + (hlp_decrypt, hlp_verify): Expand doc. + + json: Add direct way to query a config option. + + commit 906ea48df3e178bea3e2c744ddd834b23fe553fb + * src/gpgme-json.c (op_config_opt, hlp_config_opt): New operation. + (process_request, hlp_help): Add it. + + json: Add op_config to query gpgconf. + + commit 7e18c7a07a1e2c58ef4d5ddeed46bcce098bdf6c + * src/gpgme-json.c (op_config, hlp_config): New. + (hlp_help, process_request): Add config. + (conf_arg_to_json, conf_opt_to_json, conf_comp_to_json): New + helpers. + +2018-06-07 Ben McGinnes + + examples: python howto. + + commit a3a08584d6e57c4b2a40d74dc52a7d8c5c11b501 + * Uses the groups module to prepare a list of recipients and encrypt + to those. + * The main version (encrypt-to-group.py) tries to check for invalid + recipients, but still falls back to always trust for the second + encryption attempt. + * The gullible version doesn't try pruning the recipient list at all, + it just tries to encrypt and if it fails, switches straight to + always trust. + * The trustno1 version doesn't use the always trust model at all and + only attempts pruning the list of invalid recipients. + +2018-06-06 Werner Koch + + core: Return a better error code on certain decryption failures. + + commit 2c4c5692472f5870f907c2c3f01870879cb0c34b + * src/decrypt.c (op_data_t): Add field first_status_error. + (parse_status_error): Set it. + (_gpgme_decrypt_status_handler): Prefer an ERROR code over a + NO_SECKEY. + +2018-06-05 Werner Koch + + json: Allow to compile with libgpg-error < 1.28. + + commit 998fec8a4fbc46315fe6836980954eed402b38c5 + * src/cJSON.c: Use gpgrt fucntion only if available. + +2018-06-02 Ben McGinnes + + docs: python bindings howto. + + commit 897423422b9d3b856bfb72fbe1995b91d153a54e + * Another attempt at fixing the org-mode version. + * A proof reader ascertained there were tabs in it instead of whitespace. + * Stripped the lot out and replaced with standard 4 spaces, fixed + every incorrect example ... and it still breaks upon save and/or export. + * Added the reference to the mutt-groups.py script to demonstrate the + groups.py module/code. + + Authors: DCO. + + commit e144a6d70657675e28d43e42b48d879ff9b81d73 + * Added mine to the GPGME AUTHORS file. Mainly so I'm doing what I + say myself when about to request another from someone ... ;) + +2018-06-01 Andre Heinecke + + cpp: Add gpgme_(get)set_ctx_flag. + + commit 00b027af86f33782933c6200fe1ffe40e85f4346 + * NEWS: Mention API extensions. + * lang/cpp/src/context.cpp, lang/cpp/src/context.h + (Context::setFlag, Context::getFlag): New. + + cpp: Add legacy_cipher_nomdc. + + commit d46768c96082b4fd076506d7d3f0c03e61c59d51 + * lang/cpp/src/decryptionresult.cpp, lang/cpp/src/decryptionresult.h + (DecryptionResult::isLegacyCipherNoMDC): New. + +2018-06-01 Werner Koch + + core: New context flag "ignore-mdc-error". + + commit 662604c5bcb4e03d3c9ecc670d4f320a2418ebb3 + * src/context.h (gpgme_context): Add field ignore_mdc_error. + * src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Set/get it. + * src/engine-gpg.c (engine_gpg): Add flags.ignore_mdc_error. + (gpg_set_engine_flags): Set it. + (build_argv): Pass option to gpg. + * src/decrypt.c (_gpgme_decrypt_status_handler): Take care of flag. + (gpgme_op_decrypt_result): Clear flag. + (gpgme_op_decrypt): Clear flag. + * src/decrypt-verify.c (gpgme_op_decrypt_verify): Clear flag + (gpgme_op_decrypt_ext): Clear flag. + + * tests/run-decrypt.c (show_usage): Add option --ignore-mdc-error. + + core: New decryption result flag 'legacy_cipher_nomdc'. + + commit dd19cabe81b7bf4177ea2ca741f6eb6cd1cab25e + * src/gpgme.h.in (_gpgme_op_decrypt_result): Add flag + legacy_cipher_nomdc. + * src/decrypt.c (parse_status_error): Set this flag. + * tests/run-decrypt.c (print_result): print it. + (main): Print the result even on error. + + core: Remove cruft from the engine-gpg code. + + commit e2aa38b56a991a0da052acfe7566cc7a146d3bb6 + * src/engine-gpg.c (read_status): Remove the handling of + GPGME_STATUS_END_STREAM; this was used only by the former experimental + --pipemode of gpg but that is not even anymore invoked here. + (struct engine_gpg): Remove cmd.linked_data and .linked_idx. + (build_argv): Remove code for linked_data. + (gpg_new): Ditto. + (gpg_set_command_handler): Remove arr linked_data. + * src/engine-backend.h (engine_ops): Remove arg data from + set_command_handler. + * src/engine.c (_gpgme_engine_set_command_handler): Remove arg + linked_data and adjust all callers. + + core: Minor cleanup in engine-gpg and -gpgsm. + + commit 2219fc19d58ae1071493de92093b711f3c71454a + * src/engine-gpg.c: Remove errno.h. + (build_argv): Use gpg_error_from_syserror instead of ERRNO. + * src/engine-gpgsm.c: Remove errno.h. + (status_handler): Remove check for EINTR; gpgme_data_write already + handles EINTR. + +2018-05-29 Andre Heinecke + + cpp: Add gpgme_data_rewind to cpp API. + + commit 618aa7f08db41911f25632d9fba23bca80908ebe + * lang/cpp/src/data.h, lang/cpp/src/data.cpp (Data::rewind): New. + * lang/qt/tests/t-various.cpp (testDataRewind): Test it. + +2018-05-28 Werner Koch + + json: Fix compiler warning. + + commit 77166851f165b1220dcf0116bb61f81e58e4512f + * src/gpgme-json.c (op_version): Mark request as unused. + + json: Do not allow to export or delete secret keys. + + commit 0de991fee05a9733ac29b2fa35643fe4607e56cb + * src/gpgme-json.c (op_export, op_delete): Return GPG_ERR_FORBIDDEN if + "secret" is used. + + json: Fix use of get_context. + + commit 368f2d9db30df16328b34787419de99fe3e1e2f1 + * src/gpgme-json.c (create_onetime_context): New. + (release_onetime_context): New. + (op_sign): Use the new fucntions to create a separate context. + (op_encrypt): Use a separate context for key listings. + (create_keylist_patterns): Remove unneeded cast. + +2018-05-25 Andre Heinecke + + json: Implement encrypt-sign. + + commit 7aa00917c7f13294584daba31a506730f0015ef5 + * src/gpgme-json.c (op_encrypt): Add optional signing_keys param. + (get_keys, create_keylist_patterns): Add param for json object name. + + json: Implement delete command. + + commit 73dc5e933d609989bd9ec428c89ada95d5eaec8a + * src/gpgme-json.c (op_delete): New. + (hlp_help, process_request): Add it. + + json: Implement op_export. + + commit a1bbe7473a4d0f31d471d6cceb2f7e1382860194 + * src/gpgme-json.c (op_export): New. + (hlp_getmore, process_request): Add it. + + json: Fix double ctx alloc. + + commit 897522527d493307d15809a41496f8b76ec4edfe + * src/gpgme-json.c (op_keylist): Only get one ctx. + + json: Add guard in create_keylist_patterns. + + commit 10683b1a913c39238c9871f5aa607334f32467f7 + * src/gpgme-json.c (create_keylist_patterns): Guard against + a string ending with a linbreak. + + json: Implement import operation. + + commit 1ff16dad595946af140b324fad2bceca7ddbc378 + * src/gpgme-json.c (op_import): New. + (import_status_to_json, import_result_to_json): New. + (hlp_help, process_request): Add import. + + json: Improve keylist help. + + commit fe06929deec6544e2f267937dc5dafe2555bf485 + * src/gpgme-json.c (hlp_keylist): Clarify doc about keys parameter. + + json: Fix keylist pattern handling. + + commit 10724e363d6b5b06f51808287ad63e142e419ae6 + * src/gpgme-json.c (xfree_array): New helper. + (create_keylist_patterns): Convert keystring to gpgme patterns. + (op_sign, op_keylist): Use it. + + json: Add additional commands to help. + + commit ed20936ce4d5bb066828346b9a06d2dfa8d6afb2 + * src/gpgme-json.c (hlp_help): Add additional commands. + + json: Refactor signature and ei code. + + commit aa59f4970ac106ccd17fa9fadfc264d11e4cd347 + * src/gpgme-json.c (add_summary_to_object): Changed to: + sigsum_to_json. + (add_signature_to_object): Changed to signature_to_json. + (add_signatures_to_object): Changed to verify_result_to_json. + (add_ei_to_object): Changed to engine_info_to_json. + (op_decrypt, op_verify, op_version): Use new functions. + + json: Implement keylist. + + commit 546e3295eaade073c34364c4ea6ab007532824d8 + * src/gpgme-json.c (xjson_AddStringToObject0) + (xjson_AddItemToObject): New helpers. + (sig_notation_to_json, key_sig_to_json, tofu_to_json) + (uid_to_json, subkey_to_json, key_to_json): New + GPGME to JSON functions. + (op_keylist): New. + (process_request): Add op_keylist. + + json: Deduplicate input handling code. + + commit a46c27b32111b1737a405c5be48c0f9ddbbbb353 + * gpgme-json.c (get_string_data): New. + (op_verify, op_sign, op_decrypt, op_encrypt): Use it. + +2018-05-24 Ben McGinnes + + examples: mutt crypt-hooks generator. + + commit 321005c12f716814d86e139eb265437bda01380f + * Added a script which demonstrates how the groups module works. + * Script generates Mutt/Neomutt crypt-hooks for every group entry in + gpg.conf, including those entries for multiple keys (Mutt handles + that differently). + + docs: python bindings howto. + + commit 48e946a96d05effd56b34761b98eebb6b2a6fae1 + * Fixed the groups.py script so it really does what is described (the + old code had the same result for groups, group_lines and + group_lists). + * Updated the corresponding example in the doc to match. + + doc: python bindings howto. + + commit 9038d30017b2e38b183d093f9b5d46e1f24c70a6 + * Fixed org-mode python source indenting. + ** Note: nested indented blocks do not indent correctly when exported + to [X]HTML. + +2018-05-24 Andre Heinecke + + json: Add code to gpg_error based messages. + + commit 9fca7c84067c0d4c968c8920dc8ef9449769c5ea + * src/gpgme-json.c (gpg_error_object): New. + (error_object_v): Extend to take error. + + json: Implement op_version. + + commit 61f4532ba979dea1acd8c7de9b7d56bb8ff552d5 + * src/gpgme-json.c (op_version): New. + (process_request): Extend for version. + (protocol_to_string, add_ei_to_object): New helpers. + + json: Implement op_verify. + + commit 5fbf81c18b277b30639ba09e8c5d21573b444b00 + * src/gpgme-json.c (op_verify): New. + (hlp_help): Add verify. + (process_request): Add verify. + + json: Put signature info before data output. + + commit c679ed24778c997fee72d3613babad8680855882 + * src/gpgme-json.c (op_decrypt): Move info before data. + + json: Add sign to help. + + commit a6cd3a1197eb4efea0950394959c252f24475f67 + * src/gpgme-json.c (hlp_help): Add sign. + + json: Add op_sign. + + commit 1c0a55a60847563fecf92a383457ab3576aec5d8 + * src/gpgme-json.c (op_sign): New. + + json: Fix invalid function call. + + commit b344933e4cb17f2f26c4ed355217428bda8b8c40 + * src/gpgme-json.c (add_signatures_to_object): Fix call to + xjson_CreateArray. + + json: Print signatures for decrypt/verify. + + commit 45036c3c4c11f7bd56a00805564108e9377b657e + * gpgme-json.c (xJSON_CreateArray), + (add_summary_to_object, validity_to_string): New helpers. + (add_signature_to_object, add_signatures_to_object) + (add_signatures_object): New. + (op_decrypt): Handle verify_result. + (hlp_help): Mention decrypt. + + json: Minor typo fixes. + + commit fd5e14660a6f4eb1a89d69534e3e435f7fb05f8a + * src/gpgme-json.c: Minor typo fixes. + +2018-05-23 Ben McGinnes + + docs and examples: python howto. + + commit 3a9e6a8e088e233097866bb0560a36cfbbc4470e + * Updated the decryption example code in the HOWTO and the + corresponding decrypt-file.py script to gracefully handle a + decryption failure. This error will always be triggered when GPGME + is used to try to decrypt an old, MDC-less encrypted message or + file. + +2018-05-22 Andre Heinecke + + cpp: Expose sessionKey and symkeyAlgo. + + commit 28e3778ce21069006153bc156a414de6d9347962 + * lang/cpp/decryptionresult.cpp, lang/cpp/decryptionresult.h + (DecryptionResult::symkeyAlgo, DecryptionResult::sessionKey): New. + +2018-05-17 Andre Heinecke + + core, w32: Add w64 handling for regkeys. + + commit e04b8142df21a49e6c4a3f8234cc14bfec217222 + * src/w32-util.c (_gpgme_get_gpg_path): Use new defines. + (GNUPG_REGKEY_2): x64 aware regkey as used by GnuPG in Gpg4win 2.x + (GNUPG_REGKEY_3): x64 aware regkey as used by GnuPG in Gpg4win 3.x + (_gpgme_get_gpgconf_path): Use new regkeys. Add another fallback. + +2018-05-17 Werner Koch + + core: Always fail if an OpenPG message is not integrity protected. + + commit 8a0c8c52510d9c2d934f85159f04b666286b1786 + * src/decrypt.c (struct op_data_t): Add field not_integrity_protected. + (parse_decryption_info): Set this. Also rename mode to aead_algo for + clarity. + (_gpgme_decrypt_status_handler): Force failure in case of a missing + MDC. + +2018-05-09 Werner Koch + + json: Improve auto-base64 encoding to not split UTF-8 chars. + + commit e54b110aec3165a32ff9551d0c5227b88aa3dd4f + * src/gpgme-json.c (make_data_object): Switch to Base64 also for UTF-8 + characters. + + core: Make the status-fd monitor work for all gpgsm commands. + + commit e2a8a87bf9cfae5d4e8a5953c2a5303b44feb398 + * src/engine-gpgsm.c (status_handler): Call the status monitor also + here. + +2018-05-05 Ben McGinnes + + python: key expiration datetime stamp tests. + + commit 46da79e3de99a7b65748994921d6aab73b9974e7 + * Changed the expiration date for the generated test key to NYE this + century, rather than the NYE this millennium as originally suggested + in job #3815. + * This covers the lifetimes of current users (except, maybe, some very + healthy millennials) as well as the 32-bit clock end date in 2038; + without falling foul of OpenPGP's 2106 expiration. + +2018-05-04 Andre Heinecke + + qt: Respect --disable-gpg-test for tests. + + commit 26820ba62920acfe2775bce8fc2bc8b3f17b1c10 + * lang/qt/Makefile.am: Respect --disable-gpg-test + +2018-04-26 Andre Heinecke + + qt: Fix filename handling in cryptoconfig. + + commit 6b267c56fd6e54fb1c254455c04495534260b547 + * src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfigEntry::urlValue): + Build url from local file. + (QGpgMENewCryptoConfigEntry::setURLValue): Set native seperated + path. + +2018-04-20 Maximilian Krambach + + js: encrypt improvement and decrypt method. + + commit 6ab25e40d904007755c5d999bf66ae264236e745 + * Compatibility class gpgme_openpgpjs offers an API that should accept + openpgpjs syntax, throwing errors if a parameter is unexpected/not + implemented + * tried to be more generic in methods + * waiting for multiple answers if 'more' is in the answer + * more consistency checking on sending and receiving + * updated the example extension + +2018-04-20 Andre Heinecke + + core: Do not modify args for ignored failures. + + commit 7706fa2c922f5e02570b01f145ed474e82341042 + * src/op-support.c (_gpgme_parse_failure): Ignore gpg-exit failures + before modifying args. + +2018-04-20 Werner Koch + + Release 1.11.1. + + commit 2e9a14912fb906c17017553ccd0941d172e095ff + * configure.ac: Bump LT version to C31/A20/R1. For cpp to C13/A7/R0. + For qt to: C10/A3/R2. + + core: Remove another debug output leftover. + + commit f779362ffbc7b9334d98f9ee50bfe3c2dc177215 + * src/decrypt.c (_gpgme_decrypt_status_handler): Remove log debug. + + build: More release creation automation. + + commit d11bec5ef5e576dab52c1dc7d87758e4f9bf3583 + * Makefile.am: Add release and sign-release targets. + +2018-04-19 Werner Koch + + json: Remove the -noinstall flag used during development. + + commit ab43d85b9a76fb5ba321f4c7280b4d72bfd67f59 + * src/Makefile.am (gpgme-json_LDFLAGS): Remove. + +2018-04-19 Andre Heinecke + + cpp: Add origin and last_update to UserID. + + commit d65d6329319bff8cc555999fc92a20e151762a10 + * NEWS: Mention it. + * lang/cpp/src/key.cpp, lang/cpp/src/key.h (UserID::lastUpdate), + (UserID::origin): New. + (gpgme_origin_to_pp_origin): New helper. + + cpp: Add origin and last_update. + + commit 0adaf7bafd352f1c3a1e797493780150e3bb0adc + * NEWS: mention interface change. + * lang/cpp/src/key.cpp (Key::origin, Key::lastUpdate): New. + * lang/cpp/src/key.h (Key::Origin): New enum. + +2018-04-19 Werner Koch + + core: Remove leftover debug output. + + commit b52a91f5a6818db6b3dd7ce86c01b5d5f6700d0d + * src/verify.c (_gpgme_verify_status_handler): Remove debug output. + + tests: Fix t-verify test for GnuPG < 2.2.7. + + commit 3d8e5c07511938a0b30b4626530822338abd9ec0 + * tests/gpg/t-verify.c (check_result): Tweak for gnupg < 2.2.7. + +2018-04-18 Werner Koch + + Release 1.11.0. + + commit 3f55c52b9adc3680c7a9fb0e598598e6ed3a2a5d + * configure.ac: Bump LT version to C31/A20/R0. For cpp to C12/A6/R0. + For qt to: C10/A3/R1. + + json: Add stpcpy replacement. + + commit 8e34a14fe694a8c765973aaa3a8b2a2d2c3ba8b9 + * src/gpgme-json.c [!HAVE_STPCPY](_my_stpcpy): New. + + core: New convenience constant GPGME_KEYLIST_MODE_LOCATE. + + commit 55e9a94680370e584fbe5d21161a2cee3fe95744 + * src/gpgme.h.in (GPGME_KEYLIST_MODE_LOCATE): New. + + json: Add command "decrypt" to gpgme-json. + + commit e5273fc4431dfb597a2d9cf4af5172572476a2de + * src/gpgme-json.c (make_data_object): Enable auto-detection of + base-64. + (op_encrypt): Support a 'mime' flag. + (op_decrypt): New. + (process_request): Add command "encrypt". + + core: Add 'is_mime' flags to the verify and decrypt results. + + commit 65479fe7b871ad6237d5a8959b73afcc7db784da + * src/op-support.c (_gpgme_parse_plaintext): Add arg r_mime. + * src/decrypt.c (_gpgme_decrypt_status_handler): Ser mime flag. + * src/verify.c (_gpgme_verify_status_handler): Ditto. + * src/gpgme.h.in (gpgme_op_verify_result_t): Append fields 'is_mime' + and '_unused'. + (gpgme_op_decrypt_result_t): New field 'is_mime'. Shrink '_unused'. + + * tests/run-decrypt.c (print_result): Print MIME flag. + * tests/run-verify.c (print_result): Ditto. + + core: Fix possible compliance mode detection error. + + commit 23177e4410d05d590c0f2e1675dc645bbb4ad62c + * src/verify.c (_gpgme_verify_status_handler): Insert missing break. + + json: Improve help meta command in gpgme-json. + + commit 49a617f8bbff116884ca5c7238c2e0ea4e26ce59 + * src/gpgme-json.c (process_meta_commands): Add ",help CMD". + + json: Add command "getmore" to gpgme-json. + + commit ed1052842df633bc149b14c4cb17859e3c66afe4 + * src/gpgme-json.c (MIN_REPLY_CHUNK_SIZE): New const. + (DEF_REPLY_CHUNK_SIZE): New const. + (MAX_REPLY_CHUNK_SIZE): New const. + (pending_data): New var. + (add_base64_to_object): Chnage to take a plain data pointer. + (get_chunksize): New. + (make_data_object): New. + (op_encrypt): Get chunksize and use make_data_object. + (op_getmore): New. + (process_request): Release pending data for all commands but "getmore" + and "help". + + json: Add meta command ,read to gpgme-json. + + commit e69b175e8ed5430b56e2e8f3d68c16a45f0fed17 + * src/gpgme-json.c: Include stat.h. + (get_file): New. + (process_meta_commands): Implement ",read". + +2018-04-17 Werner Koch + + core: Extend decryption result with symkey_algo. + + commit 01435da498af9f7538d7ee810392d7eaa407957e + * src/gpgme.h.in (gpgme_op_decrypt_result_t): Add field 'symkey_algo'. + * src/decrypt.c (release_op_data): Free SYMKEY_ALGO. + (gpgme_op_decrypt_result): Make sure SYMKEY_ALGO is not NULL. + (parse_decryption_info): New. + (_gpgme_decrypt_status_handler): Parse DECRYPTION_INFO status. + * src/conversion.c (_gpgme_cipher_algo_name): New. + (_gpgme_cipher_mode_name): New. + + * tests/run-decrypt.c (print_result): Print SYMKEY_ALGO + + * src/util.h (_gpgme_map_gnupg_error): Remove obsolete prototype. + + core: New keyword --file for OpenPGP recpstring. + + commit 3589da0500f1c80717e658d103a0cb2751d27b49 + * src/engine-gpg.c (append_args_from_recipients_string): Add new + flags. + + core: For OpenPGP let offline mode disable dirmngr. + + commit c143ab692c7fc7cf2ec0aebe40b9479ee15eaba9 + * src/engine-gpg.c (struct engine_gpg): New flag.offline. + (gpg_set_engine_flags): Set it. Also fix setting of no_symkey_cache. + (build_argv): Pass --disable-dirmngr in offline mode. + +2018-04-17 Tobias Mueller + + python: Fix crash by leaving struct members intact. + + commit bbfa7c42337bb619e6af20bf051fe0755ed5a9fd + * lang/python/setup.py.in: Copy gpgme.h instead of parsing it. + +2018-04-17 Werner Koch + + core: Allow for --hidden keyword in OpenPGP recpstrings. + + commit 4bba3b8e2c350b8ff0d562ec63cc03a096448d84 + * src/engine-gpg.c (append_args_from_recipients_string): Add special + keywords. + + core: New encryption flag GPGME_ENCRYPT_WANT_ADDRESS. + + commit 86efba2be270d2cdd0bc66c9d3fe190495b7af2f + * src/gpgme.h.in (GPGME_ENCRYPT_WANT_ADDRESS): New flag. + * src/engine-gpg.c (add_arg_recipient): New. + (add_arg_recipient_string): New. + (append_args_from_recipients): Call new helper function. + (append_args_from_recipients_string): Ditto. + * src/gpgme-json.c (op_encrypt): Add flag "want-address". + + core: Add extended versions of the encrypt functions. + + commit a1f76b3b54b75a150fe272b804d85ffd40a507a6 + * src/gpgme.h.in (gpgme_op_encrypt_ext_start) New. + (gpgme_op_encrypt_ext): New. + (gpgme_op_encrypt_sign_ext_start): New. + (gpgme_op_encrypt_sign_ext): New. + * src/libgpgme.vers, tests/run-encrypt.c: Add them. + + * src/encrypt.c (encrypt_start): Add arg recpstring. + (gpgme_op_encrypt): Factor code out to ... + (gpgme_op_encrypt_ext): new function with new arg recpstring. + (gpgme_op_encrypt_start): Factor code out to ... + (gpgme_op_encrypt_ext_start): new function with new arg recpstring. + * src/encrypt-sign.c (encrypt_sign_start): Add arg recpstring. + (gpgme_op_encrypt_sign): Factor code out to ... + (gpgme_op_encrypt_sign_ext): new function with new arg recpstring. + (gpgme_op_encrypt_sign_start): Factor code out to ... + (gpgme_op_encrypt_sign_ext_start): new function with new arg + recpstring. + + * src/engine-backend.h (struct engine_ops): Change fields encrypt and + encrypt_sign. + * src/engine.c (_gpgme_engine_op_encrypt): Add arg recpstring and pass + to engine. + (_gpgme_engine_op_encrypt_sign): Ditto. + * src/engine-gpg.c (append_args_from_recipients_string): New. + (gpg_encrypt): Add arg recpstring and call new function as needed. + (gpg_encrypt_sign): Ditto. + * src/engine-gpgsm.c (set_recipients_from_string): New. + (gpgsm_encrypt): Add arg recpstring and call new function as needed. + * src/engine-uiserver.c (set_recipients_from_string): New. + (uiserver_encrypt): Add arg recpstring and call new function as + needed. + + * tests/run-encrypt.c (xstrdup): New. + (main): Add option --keystring. + + * src/gpgme-json.c (get_keys): Simplify. + (op_encrypt): Modify to make use of the extended encrypt function. + +2018-04-12 Werner Koch + + core: Tweak STATUS_FAILURE handling. + + commit b99502274ae5efdf6df0d967900ec3d1e64373d7 + * src/op-support.c (_gpgme_parse_failure): Ignore failures with + location "gpg-exit". + * tests/gpg/t-verify.c (main): Adjust for the now working checking of + the second key. + + core: For a failed verification return the sig's fingerprint. + + commit 478d1650bbef84958ccce439fac982ef57b16cd0 + * src/verify.c (parse_new_sig): Parse the new ERRSIG fpr. + + tests: Avoid segv in run-verify due to Policy URLs. + + commit ee8fad3ea0cbc82f31c86b3483abd8549df62b69 + * tests/run-verify.c (print_result): Take care of Policy URLs. + + tests: Add another check to gpg/t-verify. + + commit bdf7cd2e28432cf0fa7e0758acdfee03d7bfd45f + * tests/gpg/t-verify.c (PGM): New. Use it instead of __FILE__. + (test_sig1_plus_unknown_key): New test signature. + (check_result): Allow checking of several signatures. + (main): Check a signature with a know and an unknown key. + + core: Add new context flag "no-symkey-cache". + + commit f7700a016926f0d8e9cb3c0337837deb7fe01079 + * src/gpgme.c (gpgme_set_ctx_flag): Set flag. + (gpgme_get_ctx_flag): Get flag. + * src/context.h (struct gpgme_context): Add field no_symkey_cache. + * src/engine-gpg.c (struct engine_gpg): Ditto. + (gpg_set_engine_flags): Set flag. + (build_argv): Pass option --no-symkey-cache to gpg. + + * tests/run-decrypt.c (print_result): Fix segv for symmetric messages. + (main): New option --no-symkey-cache. + * tests/run-encrypt.c (main): New option --no-symkey-cache. + +2018-04-04 Andre Heinecke + + qt: Add test for resetting config value. + + commit 5eb261d6028ab2c0ddd9af8e3e1f82e479c6109c + * lang/qt/tests/t-config.cpp (CryptoConfigTest::testDefault): New. + +2018-03-29 Werner Koch + + json: Build only a dummy if libgpg-error is < 1.28. + + commit 60d7a1e8f625ea0db455bff989534dd52f0650c7 + + +2018-03-29 Ben McGinnes + + example: revoke UID. + + commit 3b91f6af378ccc37dcf8924cbc157894c35b5192 + * Script to revoke a UID on an existing key. + + docs: python bindings howto. + + commit d65864989c0560b5f51cb8d05d9ea9f1957b453e + * Added section on revoking UIDs. + + example: key signing. + + commit 56bbfd39acea90eb87a28b11a515b0314cdda54c + * Added script for signing or certifying keys. + + doc: python bindings howto. + + commit 5a553f5a317e5ad5ab0274d58854df1ecf390e0d + * Fixed a typo. + +2018-03-28 Ben McGinnes + + docs python bindings howto. + + commit 2f507b045909d32bf29d23da04db02b078e5fb9d + * PEP8 compliance: a collection of minor edits across multiple example + code snippets. + + example: add user ID. + + commit 5cd419341807d8ae23fec7bd9bb7025a8a2dcb3c + * Added script to add a UID to an existing key. + +2018-03-28 Werner Koch + + json: Remove the "message" object thingy again. + + commit 3345a17dda2222e3c1592235e8a1cd9493192777 + * src/gpgme-json.c (process_request): Remove 'nm_mode'. + + json: Make native messaging work. + + commit 4b2fa657d195382d14ac99be40b66327e0fc855c + * src/gpgme-json.c (opt_debug): New. + (process_request): Add optional arg nm_mode. In this mode take the + request from a "message" object. + (native_messaging_repl): Add debug output and call process_request + in NM_MODE. + (main): Add option --debug. Parse envvar GPGME_JSON_DEBUG as an + alternative way to enable this. Use a default log file. + +2018-03-27 Andre Heinecke + + core: Initialize key return value in gpgme_get_key. + + commit 7c220e387d511b0cf66f99370759c36b729cc444 + * src/keylist.c (gpgme_get_key): Set r_key to NULL. + +2018-03-27 Ben McGinnes + + doc: python bindings howto. + + commit a2eedef630891397f8eccb5bb426a0728588bf41 + * Fixed some minor PEP8 compliance issues in the key creation examples. + + example: key creation. + + commit f9159b1d75d3209b1c22bbb0ed4472800b60a522 + * Script to generate a new key with encryption subkey taking input + from interactive prompts. + * Will also take a passphrase via pinentry and uses passphrase caching + of five minutes when used in conjunction with the temp homedir + script. + + script: temp homedir config. + + commit 1b5da37a47ceef41545e0b2474738613f36be949 + * added passphrase caching of 5 minutes. + +2018-03-25 Ben McGinnes + + doc: python bindings howto. + + commit 5b32efbaf37920b2e99d4bb87cb383b2809b1688 + * Testing the addition of a HTML header set in org-mode in order to + had RSS update links for files. + * This should work with any [X]HTML export from current versions of + Org-Mode, but if it also works on website generated pages then it'll + tick off one of the wishlist itmes. + + script: temp homedir. + + commit 40a9dea5d56506400b67b0c11f6e55a1629dc6fe + * Fixed whitespace. + + doc: python bindings howto. + + commit 3b724aae423f2de01812165d54df2a7b524c82f6 + * Added a reference to new script which will setup a temporary homedir + for a user. + + script: temporary homedir creation. + + commit dde1aae312958776fab475d6c0cdfa19cc255863 + * Script to create a temporary gnupg homedir in the user's directory + for testing or scripting purposes. + * Creates a hidden directory on POSIX systems with the correct + permissions (700). + * Creates a gpg.conf in that directory containing the same + configuration options as used in the "Danger Mouse" example in the + HOWTO with the correct permissions (600). + + doc: python bindings howto. + + commit 22247f658ce2f8e527c26746358cfc2643c4832f + * Fixed the plaintext, result and verify_result references in the + decryption section. + +2018-03-23 Ben McGinnes + + doc: python bindings howto. + + commit e6180f2b36cc8a6c6154e5f3d702324af573132a + * Fixed a minor spelling error and a minor grammatical error. + +2018-03-23 Werner Koch + + core: Need to increase an array in the gpg engine. + + commit 4763974ef6932c503e35c3d14fe47a66a5323f48 + * src/engine-gpg.c (build_argv): Allcate one slot more for ARGV. + + json: Use a request origin of "browser". + + commit e5abf4827aead50437bbdff8cfdd5e9fdc6ed72d + * src/gpgme-json.c (_create_new_context): Set flag. + + core: New gpgme_set_ctx_flag "request-origin". + + commit b9000bc293164ff62efa7e91e5cf6d5fc19d482f + * src/context.h (gpgme_context): Add 'request_origin'. + * src/gpgme.c (gpgme_release): Free that field. + (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add "request-origin". + * src/engine-backend.h (engine_ops): Add 'set_engine_ops' func ptr and + adjust all users. + * src/engine.c (_gpgme_engine_set_engine_flags): New. + * src/op-support.c (_gpgme_op_reset): Call that func. + * src/engine-gpg.c (struct engine_gpg): Add 'request_origin'. + (gpg_set_engine_flags): New. + (_gpgme_engine_ops_gpg): Hook it. + (build_argv): Use command line option --request-origin. + * src/engine-gpgsm.c (struct engine_gpgsm): Add 'request_origin'. + (gpgsm_set_engine_flags): New. + (_gpgme_engine_ops_gpgsm): Hook it. + (start): Send OPTION "request-origin". + * src/engine-assuan.c (struct engine_llass): Add 'request_origin'. + (gpgsm_set_engine_flags): New. + (_gpgme_engine_ops_assuan): Hook it. + (start): Send OPTION "pretend-request-origin". + + build: Allow building with released libgpg-error. + + commit eee68c1b13fbe21c123f469712817e0c81f16383 + * src/gpgme-json.c (add_base64_to_object): Return an error if building + with an older libgpg-error. + + json: Finish op:encrypt. + + commit d83482a1d768fc5afd3aa4836f2fefe5c549d02e + * src/gpgme-json.c (add_base64_to_object): New. + (data_from_base64_string): New. + (op_encrypt): Employ them. + (process_request): Print unformated json. + + json: Add a new function to cJSON. + + commit 6525d78d0a1d303c449762082942e71d3002b9ca + * src/cJSON.c (cJSON_CreateStringConvey): New. + +2018-03-22 Ben McGinnes + + doc: python bindings howto. + + commit 65ed4ac82598734551b87fc89deab3cee010bd37 + * Fixed table. + +2018-03-21 Ben McGinnes + + doc and examples: python bindings HOWTO. + + commit 5722148bacab5862b40a027861d64683a0f214ea + * Added GPGME Python bindings HOWTO in Australian/British English. + ** en-US "translation" still to be done. + * Added several example scripts comprised of the "Basic Functions" + section of the HOWTO (plus the work-around at the end). + ** As these scripts are very basic examples they are released under + both the GPLv2+ and the LGPLv2.1+ (just like GPGME itself). + + examples: multi-key selection operations. + + commit 05e59933056ee8ef8ba7579351a58ed25dd7f754 + * Temporarily removing multi-key selection based examples. + * There are a few issues with getting the key selections to play + nicely with gpg.Context().keylist object types. + * Will troubleshoot them separately and restore them when that's + worked out, but I don't want these more complicated examples to + delay merging the HOWTO with master. + + example: group encryption. + + commit 61a988036bd3f0d43f7d55bfa43f5f05bec978c4 + * Troubleshooting. + + examples: encryption. + + commit 7ddff71908a85111c8e0da41312197b3b1a77da6 + * Fixed two incorrect Context() objects. + + example: key selection. + + commit c6a0395f0a3a57071f0c943f7815f58a02f9d2f3 + * Removed extraneous blank line. + + example: key selection. + + commit 0a0d57fd41380cd797d29e11cec8a77c7404e960 + * Similar to group-key-selection.py, but does not use an existing + group from gpg.conf; instead takes multiple key IDs, fingerprints or + patterns on the command line and adds them to a keylist object. + + example: sign and encrypt to group. + + commit 0ccc57c9512246d82d46e7732bfb0f95c18ca9d3 + * Begins to string together some of the simpler examples to do more + useful things. + * Signs and encrypts a file while encrypting to every key in a group + specified in the gpg.conf file. + +2018-03-21 Werner Koch + + json: Use gpgrt_argparse instead of argsparse.c. + + commit e14f1f687ff618716ed17e309a0475df95e1c0aa + * src/gpgme-json.c: Remove header argparse.h. Define + GPGRT_ENABLE_ARGPARSE_MACROS. + (interactive_repl): Replace strusage by gpgrt_strusage. + (my_strusage): Add SPDX level. + (main): Switch to gpgrt_argparse stuff but keep very limited + functionality when building with an older libgpg-error. + +2018-03-21 Ben McGinnes + + example: group key selection. + + commit 8b401bfc76eac762553f76faab53c2f4cd117a8d + * Example of preparing a keylist object using an existing group line + from the gpg.conf file. + + example groups work around. + + commit 6c6af9a7b0ae4e7182d669bec282c6edaaa7eaa1 + * Updated usage so it only references importing the final list of + lists produced. Trying to use some of the mid-points can have + unpredictable results (this is part of the problem with work + arounds). + + example: groups. + + commit a4e3f827652c59d850b4e5506a92c1ecd190c1bb + * Added a docstring. + + example: verify signatures. + + commit ad6cb4f9b8b97a2bc501c17fc542a84b725dedea + * Added example for verifying detached signatures against the files + they're the signatures for. + + example: verify signed file. + + commit ae2767eb27b6a76284ee4403e575869afe2e80a8 + * Added example to verify normal and clearsigned files. + + doc: python bindings howto. + + commit e57388a69f61d14e3df3c842d227fb450c96c807 + * Fixed minor error in one of the verification examples. + + example: detach sign file. + + commit ac6a552c37147a000de74f49d1bff34dad52252e + * Added example to make detached signatures of a file with key selection. + + example: encrypt-sign-file.py. + + commit af6cbba18ba5e2bbecce5f8268c146282cd12367 + * Adjusted the doc string. + + examples: doc strings. + + commit 6fa2a344282e369e6aca8155bc77dd2c12a29414 + * Fixed minor errors in two doc strings. + + example: clear signing. + + commit 1fdd1f306d45f6aeee91c7f016f7c37286ee3b3b + * Added example to clear sign a file with signing key selection. + + doc: python bindings howto. + + commit 1d2746433c9632fc0c7bc10b59280fca15895545 + * deconstructed and fixed all three signing methods. + + example: sign file. + + commit 0390ede18696520be9cc1a42f628e23159b7c2eb + * Similar to encrypt file except for signing a file in normal mode. + * Noticed additional changes to be made to the howto to match this, + but they will have to wait due to a power outage (currently running + on battery and a mobile connection, but that won't last). + +2018-03-20 Werner Koch + + json: Implement op:encrypt. + + commit 6073789a6d3514263404c93fa795a398bfd93d91 + + + core: Do not clobber R_KEY in gpgme_get_key on error. + + commit 343d3e2232a22d0999e1693f0f95e5e290005829 + * src/keylist.c (gpgme_get_key): Assign a value to the return + parameter only on success. + + core: Fix ABI regression in recent commit. + + commit 9e1e6554834d0e803dd0889deaef4f11047c7e47 + * src/gpgme.h.in (_gpgme_op_import_result): Move new field + 'skipped_v3_keys' to the end. + +2018-03-20 Ben McGinnes + + doc: python bindings howto. + + commit 52e262991f1fdf7da93882c3b22c05537376cf49 + * Fixed typos in examples. + + example: keycount. + + commit 96d0395bccbbff91f73c06cb7bd6c131f04b8a9a + * Fixed missing parenthesis. + + example: decrypt file. + + commit 51258975d763c9471859d635e6080c2ec02e8647 + * Decrypts a file taking file names as command line parameters. + + example: groups work-around. + + commit 29e918171f352c71a90a16c04d4a3dcafa5db682 + * Added groups selection work around code. + * Intended for use as a module to be imported by other scripts, + usually with "from groups import group_lists" or "from groups import + group_lines" or similar. + +2018-03-19 Ben McGinnes + + example: encrypt file. + + commit 7221bb67642eb01a07957d66d0cbcd4ef8aadbf8 + * Nested encryption in try/except statement in case recipient key is + untrusted or invalid. + + example: sign and encrypt file. + + commit f3fe47e8fd2e7bc748016befcae494421223368c + * Example to sign and encrypt a file. + * Similar to encrypt-file.py except all keys are considered trusted + and signs with the default key. + * Also encrypts to the default key. + + example: encrypt file. + + commit f0790f224d7af9521efe96e69a8f719fb89a5af2 + * Fixed typo in second encryption call. + + example: encrypt file. + + commit 7ab42e79ade89f28507ea42d51148a40b4bfc736 + * Example to encrypt a file to a single key. + * Takes key ID and/or fpr as a CLI parameter. + * Takes path and filename as a CLI parameter. + * Encrypts to specified key only, no signing and writes the output in + both ASCII armoured and GPG binary formats with output filenames + based on input filename. + + example: python bindings key count. + + commit cfbdcb7fb3fa438cafba82e4fb8f327df596f98e + * Added script wo count the number of keys in both the public and + secret key stores. + + doc: python bindings examples. + + commit b30ebf89725641018b3b08f77876530f9b983fa2 + * Explicitly stated that all this code is released under the GPLv2+ + and the LGPLv2.1+. + + doc: python bindings example README. + + commit 8f7672ad1b267f122f647bb5f984734d0ff66a5c + * Added the same license as used with the HOWTO. + * Since these examples are so basic, they'll be dual licensed the same + as GPGME itself (otherwise it would slip too dangerously against the + need for permissive licensing of crypto libraries). + + docs: python bindings examples. + + commit 6950a63e63d60685ddb6f4cbff7b826b8acb5b13 + * Added reference to location where all the examples included in the + HOWTO will be available as executable scripts. + * Included a short README file in that location. + + example: python bindings encryption. + + commit 3e0f68fdff1998dae9cb6f8510a3e945a268d1f6 + * Since we don't want to encourage accessing the low level functions + (e.g. op_encrypt), but since this example can still be useful to + understand, renaming it and will add new encryption examples to + match the instructions in the HOWTO. + + doc: python bindings howto. + + commit d5f6dec048d3d4d94f1fcdb3f4249cf6e71c4b92 + * Slight python-gnupg clarification. See also this thread: + https://lists.gnupg.org/pipermail/gnupg-devel/2018-March/033528.html + + doc: python bindings howto. + + commit 0fb8a5d45c1c77a5928d6e356271da055aa55994 + * Adjusted the python-gnupg so the comments regarding insecure + invocation of commands via subprocess (shell=True) were a major + historical issue and not a a current issue. + * Not including Vinay Sajip's requested change to say it is now secure + since no audit of the current code base has been performed and my + last major inspection of that code was around the time I first + ported PyME to Python 3 in 2015. + + doc: python bindings todo list. + + commit bf67cf433fe82924ed40e79785e95403c07cc068 + * Checked off several points of howto coverage as completed. + * Reorganised to move S/MIME coverage to its own separate group of tasks. + * Noted only revocation remains for howto completion. + + doc: python bindings howto. + + commit 1779d7b9d6769b2e47f1e90260290e25c8c3aa02 + * deconstructing multi-recipient encryption. + + doc: python bindings howto. + + commit 64c5886132aceefc9d9600a3a6dbbbf404b95b81 + * Replaced the single encryption methods with one main way (i.e. cut + the low level stuff involving SEEK_SET instructions). + +2018-03-18 Ben McGinnes + + doc: python bindings howto. + + commit 4811ff7b6c8ef97c7d4858ce235e9bf8227f4917 + * moved single encrytion examples up to the first ones, pending merge + and major cut. + * This is basically just to make future checks of revisions a little easier. + + doc: python bindings howto. + + commit 82c5af225f2bdf3acc6fc652a96ee61c9b057395 + * Stripped decryption example to the bare bones as suggested by Justus. + +2018-03-16 Ben McGinnes + + doc: python bindings howto. + + commit b549f69d0520bb74957b95cec9ea918dba2374f6 + * Made the changes suggested by Jakub Wilk on gnupg-devel. + * Still need to make the far more comprehensive changes suggested by Justus. + +2018-03-16 Werner Koch + + json: Add framework for the gpgme-json tool. + + commit d2b31d8c106423bd0eaa5fffaa39b0983c9ae525 + * src/gpgme-json.c: New. + * src/Makefile.am (bin_PROGRAMS): Add gpgme-json. + (gpgme_json_SOURCES, gpgme_json_LDADD): New. + + core: Adjust cJSON code for use in GPGME. + + commit 81c90d0cd0f959fd5e01baed9b4af0ec35ecb85c + * src/cJSON.c: Remove util.h. Use gpgrt alloc functions. + (cJSON_Delete): Do not clobber ERRNO. + (cJSON_AddItemToObject): Return OBJECT or NULL. + (cJSON_AddNullToObject): New. + (cJSON_AddTrueToObject): New. + (cJSON_AddFalseToObject): New. + (cJSON_AddBoolToObject): New. + (cJSON_AddNumberToObject): New. + (cJSON_AddStringToObject): New. + * src/cJSON.h (cJSON__h): Replace macro by cJSON_h for C compliance. + (cJSON_AddNullToObject): Remove macro. + (cJSON_AddTrueToObject): Remove macro. + (cJSON_AddFalseToObject): Remove macro. + (cJSON_AddBoolToObject): Remove macro. + (cJSON_AddNumberToObject): Remove macro. + (cJSON_AddStringToObject): Remove macro. + +2018-03-15 Ben McGinnes + + doc: python bindings howto. + + commit 431897a4c48fe1bc9d37f655097aabaf5b685d11 + * Added clarification on why it's not on PyPI. + +2018-03-15 Andre Heinecke + + cpp: Expose skipped_v3_keys. + + commit ad95288d3b3efc38998841add4fe658c84701f98 + * lang/cpp/src/importresult.cpp, + lang/cpp/src/importresult.h (ImportResult::numV3KeysSkipped): New. + + core: Parse skipped_v3_keys. + + commit a630a1e3e74c926163864b013cb164b4cd1866fc + * src/gpgme.h.in (gpgme_import_result_t): Extend with skipped_v3_keys. + * src/import.c (gpgme_op_import_result): Extend debug with new field. + (parse_import_res): Parse skipped_v3_keys. + * tests/gpg/t-support.h, tests/run-support.h (print_import_result): + Print skipped_v3_keys. + +2018-03-15 Ben McGinnes + + doc: python bindings howto. + + commit 22e2445beee46ed1e527a98e635153c7cf03786f + * fixed custom_id for decryption so the XHTML validates. + + doc: python bindings howto. + + commit 94a95ac12364989db7f4be333107f3c023551857 + * Promoted final encryption example so that it will appear as heading + 6.1.3 when exported to HTML or PDF. + + doc: python bindings howto. + + commit 3d0c7a2202c8e9bd4f284fd00069d34b8d3d3d4c + * Fixed a minor typographic error. + * Bumped version number in preparation for merge with master. + * While there are probably a few more things worthy of being added + (mainly how to revoke things), this document is essentially ready + for publication now. + + doc: python bindings howto. + + commit 961aea212ef48914ecbfa169addf951b0854b0b4 + * Added key signing. + + doc: python bindings howto. + + commit 7ac65b10837740caf68cdade791b8c5ce4eb1b03 + * Added a new user ID for Danger Mouse. + * Removed the empty entry for key preferences since that is handled + through gpg.conf and/or editing the key directly. + + doc: python bindings howto. + + commit 9e3e4a835c64f5d06de821b1fd648af37827ff26 + * Spell checking and fixing the few errors. + + doc: python bindings howto. + + commit b02d9d0a7b96b186eb3063d94bde369339181461 + * Added an encryption subkey to Danger Mouse's primary key. + + doc: python bindings howto. + + commit 5432e5f9d1dfc02812d0b181f8d88cdf4a2bfbfb + * generated a new primary key for Danger Mouse in an alternative homedir. + + doc: python bindings howto. + + commit 5d1dd2abe5cf787875d12afe46c78c75385d7b31 + * Added sections for key generation and key editing. + + doc: python bindings howto. + + commit 1d05e6aa4ea467c8c5926b827cfcfba357d03312 + * Added c.get_key instructions and examples. + + doc: python bindings howto. + + commit b35aaef7a3b793b8f6f5b42596c0a6a51e87f78c + * Added text for verifying signatures. + +2018-03-14 Ben McGinnes + + doc: python bindings howto. + + commit 6bc12a0eeb20409770cb8b923d08c18c2b730cb8 + * Added 4 signature verification methods and partial text for them. + + doc: python bindings howto. + + commit e5c85fba25de1187949697e2dae0e89345b71e89 + * Added description for detached signatures. + + doc: python bindings howto. + + commit ada059b07178147821b1598c935aa70ae45e3e6c + * Fixed multiple sample code examples of writing output to a file. + * Added the description of detached signatures. + +2018-03-14 Werner Koch + + core: Import cJSON code from the payproc project. + + commit 8eb08b318913644d918002f3195f7ec0e75ae239 + * src/cJSON.c: New. + * src/cJSON.h: New. + * src/cJSON.readme: New. + +2018-03-14 Ben McGinnes + + doc: python bindings todo. + + commit ef27f3781a37e264d0eb7d1745eb2c804ec062c4 + * minor phrasing fix. + + doc: python bindings howto. + + commit 423fdcd4653cb01f07f2b0e72cfcf49554930f70 + * Added recommended method of single encryption with description. + +2018-03-13 Ben McGinnes + + doc: python binding howto. + + commit a71205dc3b58970adf591b4e4553824a33f353db + * Clarified which English dialects this is written in. + * Translating to American can happen *after* it's done. + ** The Yank version would probably want to change some of the examples + anyway. + * Began the description for normal/default signing. + + doc: python bindings howto. + + commit a10dcb4f138eb5a21881cdbc4806c25129d4ae4e + * Added a section on key selection. + * Included recommendation for using fingerprint when selecting one + specific key. + * Also included the most ironically amusing example of multiple key + selection in a GPG guide. Hey, it's public data ... (heh). + + doc: python bindings howto. + + commit 952b6042f78017c476452088261af8d352cfa729 + * Added explanation of the ascendance of Python 3 over Python 2 in the + guide to the intro. + * Expanded key selection description so people know what not to + include regarding key IDs with this key selection method. + + doc: python bindings howto. + + commit c92da2c7eb148ce9fb06495a8470dd9caf662f9a + * Added key selection for specifying signing key or keys. + + doc: python bindings howto. + + commit e489ddd08af29fdad8db8aa0aec0c314daa3678c + * During the course of working out the updated signature methods, + determined that key selection (including counting) will beed to be + presented before the basic functions. + * Moved "working with keys" up. + + doc: python bindings howto. + + commit f29bda8d7146b4bc0bf73d6e613131545ff86b73 + * Signatures have changed as a result of the recent update from Justus. + * Sample code updated. + * Text to follow later. + + doc: python bindings howto. + + commit c27a7a3f994dad0eccee890185582f4350fbf233 + * Added text description for the decryption example. + +2018-03-12 Ben McGinnes + + doc: python bindings howto. + + commit f81adeba992a9fd3b5a199e9a2e242a0f53cf639 + * Added a miscellaneous work-arounds section at the end. + * Included code in said miscellaneous section for accessing the groups + specified in a gpg.conf file. + * It's a bit ugly since it does require subprocess (but not call, + Popen or shell access and only accesses one command). + + doc: python bindings howto. + + commit 36dfbdffea60c529a6d1e1ff3e507be016b6a0f6 + * Fixed a spelling error in the key counting text. + + doc: python bindings howto. + + commit 484e9a6229ac9c80c6be4df638bce711f08a74c6 + * updated multi-encryption final example to be complete. + * second example shows most likely method of reading plaintext. + * updated example filenames to stick with running gag + (i.e. secret_plans.txt). + + doc: python bindings howto. + + commit a8f48b6f577d562c25fd0191c0cc2cc8e96078c1 + * error corrections. + * multiple typesetting fixes only required due to certain archaic + eccentricities of LaTeX. + * a couple of minor python PEP8 compliance corrections. + + doc: python bindings howto. + + commit 83b1336ceebb86e13a55bbf220df2d750f6b3ec6 + * Fixed an error in the encryption try/except statement. + + doc: python bindings howto. + + commit 0e1300ce777dd0c87f31ac8bc49846b9df242df9 + * Added a more complicated encryption example with a few variations on + the encryption method to account for untrusted recipient keys, + signing or not signing, including or excluding default keys and so + on. + + doc: python bindings howto. + + commit 7ebc5a357057d01b7ef965521ab68b7cb7e20a8f + * Switched from links to some external docs to using footnotes where + necessary. + * Ideally the howto should be as stand alone as possible. + * Also it makes it difficult to convert to another format for + proof-reading if there are links that the conversion can't find. + +2018-03-09 Ben McGinnes + + doc: python bindings HOWTO. + + commit 172baaf4d3e4ed03a4d3437be9efa3dfe6a847bc + * Added instructions and code to count the number of public and secret + keys available since it was quick and easy. + + doc: python TODO list. + + commit f2c1e8d8d54068a7f072efa178fc30460821eff3 + * Slightly tweaked one heading to make it clear it wasn't a duplicate. + + doc: python bindings howto. + + commit 01686463948ac6096dd8579a110c478d3a1f9a83 + * Wrote the text description explaining each step in the most basic + encryption operation. + * Will need to include additional examples for encrypting to multiple + recipients using Context().encrypt instead of Context().op_encrypt. + + doc: python bindings TODO list. + + commit 93252df9dc4c9932467814745655350a8cab900e + * Updated to reflect the most recent work on the HOWTO for the Python + bindings. + + doc: python bindings howto. + + commit ab81c2d868bba79fdb8f8d7f576b6bd88c6bdf3c + * Added example for verifying both detached and "in-line" signatures. + +2018-03-08 Ben McGinnes + + docs: TODO. + + commit e846c3daeeb4e7092169cdb7bf4f55e0b105aac3 + * Removed WS. + + doc: TODO list update. + + commit 6849924ffbd48ba3f9d32b4a59a02e1d2083fc19 + * Closed off a few ancient items and added recommendation to others to + use the dev.gnupg.org site for real bugs/features updates. + * See also this statement on the gnupg-devel list regarding this file: + https://lists.gnupg.org/pipermail/gnupg-devel/2018-March/033499.html + + docs: python bindings howto update. + + commit fa4927146b68dd045903285f1c45fb64deb2e361 + * Added all four signing code examples that are most likely to be + used: armoured, clearsigned, detached armoured and detached binary. + * May remove some examples and just discuss the differences, but it + depends on the way the text is filled out. + + doc: python bindings howto update. + + commit c767a4a3590bd8a224d0268746df443942cb28c2 + * Added example of decryption. + * included some quick notes for myself regarding aspects to explain + when I flesh out the explanatory text. + + doc: Basic operation of the python bindings. + + commit 75463d589522cba427f9e5a3a408192ffad8bb21 + * Added sample code for encrypting some text to a single key. + * Basically I'm just lifting existing production code and changing the + key IDs from mine to "0x12345678DEADBEEF" for these first few + examples. + * I'll fill in the text description after. + * Note: due to my regional location, I might split some tasks into + more commits in order to be sure no work gets lost in case of + emergency (or to put it another way: I know Telstra too well to + trust them). + + doc-howto: fundamental aspects of GPGME vs Python. + + commit a98f2c556fe6e33a9cd38279e64e4b09f05cc675 + * Added a section for those pythonistas who are too used to web + programming. Stressed that it's not simply not RESTful, it's not + even REST-like. + * Letting me move on to drawing a very loose parallel between a + session and a context. The differences should become obvious in the + subsequent sections. + + doc: Added multiple TODOs for inclusion in the HOWTO. + + commit e8adab68f8c0cd865ff220f06dfaff7fe183e8a1 + * Some instructions to include are fairly obvious; as with encryption, + decryption and signature verification. + * Some are a little less obvious. + * This includes the requests received to specifically include subkey + management (adding and revoking subkeys on a primary key that's + being retained. + * Added the UID equivalents to the list, as well as key selection + matters (and may or may not include something for handling group + lines since that involves wrapping a CLI binary). + * Key control documentation and examples requested by Mike Ingle of + confidantmail.org. + +2018-03-07 Ben McGinnes + + GPL compatible license for documentation. + + commit 47d401d159852ea08e90af21d91bb4b93be9000d + * Added the same, slightly modified GPL based license that is used in + other parts of GnuPG. + + HOWTO update. + + commit 8a76deb11efd7dadfde6e8e7e69fbcd92577982f + * removed one bit of whitespace. + * Marked up references to gpgme.h. + * Fixed one spelling error. + * Removed py2.6 from python search order since even if it is + supported, it shouldn't be encouraged. + + GPGME Python bindings HOWTO. + + commit 5215d58ae2521d81c3db0b45dfbdce01a679acab + * Started work on the GPGME Python bindings HOWTO. + * 1,050 words to begin with at approx. 7.5KB. + * Got as far as installation. + * Includes instruction not to use PyPI for this. + + TODO - HOWTO. + + commit 8f2c0f4534ea2a07f071f360a63e877f60dc52f2 + * Added suv-entry for the new HOWTO being started and, since it has + been started, checked it off. + + TODO. + + commit d4778bb23d0817ee6fbcbe4f0ff0ff0429bf3669 + * Slightly expanded the list. + + copyright fix. + + commit 3a746d5d46ffd7d332dc24fd6a4d24efc5fc1230 + * Made the copyright line a new top level org heading in order to + prevent it getting folded into other tasks which will eventually get + closed (so it doesn't go missing if those items are subsequently + archived). + + Nuxed doubles. + + commit 13d2164cd9f313b409b2210d9e63465681cccc99 + * Just because there's a lot of documentation which needs to be added, + doesn't mean it needs to be listed twice. Merged the two lists. + + Removed double. + + commit 1516c56ee4da28eb720bbacb026892393d10b24a + * default.profraw didn't need to be listed twice. + +2018-03-04 Ben McGinnes + + IDENTIFY. + + commit f61d4f585f27c13fabf7a23ad295bdc8bea7c838 + * Fixed sp error in docstring. + +2018-03-03 Ben McGinnes + + Missed a couple. + + commit 75f5e6e6672a1bbd16b7680313c0f96796c219bd + * WS indicated 2 custom-ids were missed, now they're set. + + TODO DONE. + + commit b438e5e44c2eaf22549db94141a3ec8731556674 + * Marked off a TODO for this clean-up. + + TODO. + + commit 1d910672539686e2e17fd8fa1a894cee92863417 + * WS removal + + TODO updates. + + commit 12a87af1df906744a14079ff7ff88e7d60679695 + * Updated TODO with tags to make everything appear properly when + exported to HTML or PDF. + * Added a couple more items, mainly to do with docs or future bindings. + * Marked some, but not all as actual TODO items. + * Some items should probably be removed, but haven't been yet. + * Some have probably been completed already. + +2018-02-27 Ben McGinnes + + New stuff. + + commit 85bdca3b2b095afb672f19abbffccd2bcb8bbd0a + * Added the idea for alternative Emacs bindings (to extend the + existing ones, not replace them outright). + * Added a reference to the API Squared part of the project. + + TODO the TODO. + + commit 8047e1374fe6e69e8c4502e58e6522ea86e4bef4 + * Added an actual TODO to fix the TODOs. + * Pretty sure I know who will be completing this one ... ;) + + TODO ... the TODO. + + commit 73c51bc9858de2aab25844e7e283a6334038ccc8 + * If we're going to use Org, let's actually use Org. + * Added the properties tags for each point. + * Some of thems still need custom ID tags assigned properly. + * Probably ought to make them actual TODOs at some point, but that can + wait until they can be marked as DONE anyway. + * Will add a TODO for some of this stuff ... oh, the irony. + +2018-02-27 NIIBE Yutaka + + core: Support non-thread-safe getenv. + + commit 59fe3f26c1ca0fba16f76738cd05aaf80fb735ef + * src/get-env.c (_gpgme_getenv): Use gpgrt_lock_lock + and gpgrt_lock_unlock to protect call of getnev. + +2018-02-26 Ben McGinnes + + WS removal. + + commit c58f61e92226c4a03f216f5d07bdc5479ce8a2d9 + * Whitespace removal. + + LaTeX headers. + + commit 6f2e2e0f150d5c6d53de5bc48af137f7864d5fd9 + * Set LaTeX headers to enable ligatures and a 12pt font by default. + * Paper size left for regional defaults. + * Using XeLaTeX for easier font control. + * Using default LaTeX font of Latin Main, but that's easy enough to change. + +2018-02-19 Ben McGinnes + + Renaming ad infinitum ... + + commit 272a8e778a959cb24298f488e77fce9bffd23b7a + * Dropped the .txt from the end of the file ... + + Text conversion. + + commit c82b17c6ce490738efb07186532e752e6f70ea07 + * Exported from Org Mode to UTF-8 text. + * Removed my name from just under the title. + + Title fix. + + commit ea481d4bb9e6197fbc195187d1362b844e2cba2e + * Fixed title. + + Conflict with Phabricator files. + + commit 1ae3ead2cd854258954e784bf51f03822321aefe + * The developers of Phabricator, the web front-end on dev.gnupg.org + have not implemented renderers for Markdown, Org-Mode or any other + common markdown like language. + * They also refuse to do so. + * Instead they re-invented the wheel and implemented their own version + of Markdown-like thing which is incompatible with everything else. + It is called Remarkup. + * The developers of Phabricator and Remarkup have refused to provide + conversion tools to move files to/from any format to/from Remarkup. + * They expect everyone to learn their new favourite pet project. + * Remarkup may or may not display Org Mode files, but if so then it is + likely to only want to do so as plain text. + * There is an unaffiliated and unofficial project to convert Github + Markdown to Remarkup via Pandoc. This might be adapted for our use, + but requires testing. + * Until then exporting from Org Mode to UTF-8 text is likely the least + worst plan. + * Which means renaming this file to README.org first. + + Schizophrenic file types. + + commit fe4f3edd70949329cb992dd963de2de3c86dcd81 + * Removed Markdown style heading underlining. + * Removed in-line file type declaration (which is not correctly parsed + by the web interface on dev.gnupg.org). + +2018-02-16 Andre Heinecke + + cpp: Add shorthand for key locate. + + commit 7f9d5c6cd204bfd84ea477b284df795b1dadb1af + * lang/cpp/src/key.cpp (Key::locate): New static helper. + * lang/cpp/src/key.h: Update accordingly. + +2018-02-16 Ben McGinnes + + History path. + + commit fb16eaa685fe488f12f4df9b59d1f3689c813034 + * Fixed a typo in a filepath reference. + * Moved conjecture regarding the first version of Python used to a + footnote. + +2018-02-15 Ben McGinnes + + LaTeX margins. + + commit 6f15d821404742ac2683f54ca4102ee4aaedacf2 + * Added LaTeX header for 1 inch margins in the quite likely event that + all PDF output ultimately uses LaTeX. + + TODO Documentation. + + commit 235d899a5fc24cdf9c856adbc021a69c43985c99 + * Checked off the decision to stick with Org Mode. + + TODO. + + commit 40da5022922172ed898172956a8ccf5622e5638d + * Beginning to turn the first part of this into something kind of like + an actual TODO list as Org Mode uses it (maybe). + +2018-02-15 NIIBE Yutaka + + tests: Fix previous commit. + + commit 3224d7f0ea83a3c2baaa9f97846c4a5b392d2c59 + + + tests: More Makefile portability. + + commit ba6e610baa138ba9b43be303df2c5981dd04de5a + * tests/gpg/Makefile.am: Invoke GPG with TESTS_ENVIRONMENT. + + tests: Makefile portability. + + commit b5ec21b9baf017b4cee88c9ef3cc1a638547cd20 + * tests/gpg/Makefile.am: Don't use "export" directive. + * tests/gpgsm/Makefile.am: Ditto. + * lang/qt/tests/Makefile.am: Ditto. + * lang/python/tests/Makefile.am: Ditto. + + build: More Makefile fix. + + commit c9a351f5af289c8f6919854c40f235c781b76ec7 + * lang/python/tests/Makefile.am: Avoid target with '/'. + +2018-02-14 Ben McGinnes + + Short History. + + commit 3c3b149996036e7ff4cc4c77ef2d97062d880409 + * Fixed or updated the most fundamental errors. + * Also included some details on which modules are available on PyPI, + as well as what happened to the PyME commit log. + + Subsectioned history. + + commit 7c662d22a8f7d2e6ad6532014f2ecc1769de16fb + * Split the main parts down into subsections. + * Still need to cull the incorrect stuff towards the end and add more + recent changes. + + History. + + commit a1bc710c5fb7a7d2253434c1443e33e019020a55 + * Reshaping the history file to fit Org Mode's structuring for docs. + * Also said history needs to be a bit more clear (it was kind of + unfinished). + + TODO. + + commit fccd2ea3871f5d63fb038db0733a34f9c5d550c3 + * Updated TODO. + * The entirety of the old TODO has been replaced with either more + relevant tasks or goals for the examples and a more measured + approach to the docs and why, in this project, Org Mode trumps reST, + even though it's Python through and through. + + TODO. + + commit 487ed9337e8e07d1c63e53b785cc39e3bd35ff6e + * Removed reST version of file. + + TODO. + + commit c4fa4216199b16c1f169725c0a1e0a40764b1ebb + * Converted document from reST to org-mode. + + Short History. + + commit 1d48b04cfb3d1de654f3995578e9434a6b7b2fed + * Removed reST version. + + Short History. + + commit d86fd7c54c462ef23c70370624e07fcc1bc15121 + * Converted document from reST to org-mode. + + House keeping. + + commit 1b5719cd57d80dcd9577141491a0860912e74cd4 + * Added a bunch of things to .gitignore that might otherwise creep in + during Python development. + * This really should be merged ASAP. You'll thank me later ... + +2018-02-14 NIIBE Yutaka + + build: Fix Makefiles for portability. + + commit f1d8a7975b0a166f55aef06eb25d50230781b96f + * tests/gpg/Makefile.am: Don't allow target with '/'. + * tests/gpgsm/Makefile.am: Ditto. + +2018-02-13 Andre Heinecke + + configure: Fix mingw check for getenv. + + commit 5ec890b9c76db0f23cc396108ff6f1fe658855a8 + * configure.ac: have_thread_safe_getenv=yes with have_w32_system. + +2018-02-13 NIIBE Yutaka + + configure: MinGW has thread-safe getenv. + + commit 77ca9cc2db2c6da303b9224a931679a325ebda1e + * configure.ac: have_thread_safe_getenv=yes with have_w64_system. + +2018-02-09 Andre Heinecke + + cpp: Add SpawnShowWindow flag. + + commit 7e27a0ff64626026521dc5877b278794cea72e61 + * lang/cpp/src/context.h (SpawnShowWindow): New. + + core, w32: Enable spawning GUI applications. + + commit 201db83a7f1b7759173b6e9f0a844caef4da6cce + * src/engine-spawn.c (engspawn_start): Translate spawn flag + to IOSPAWN flag. + * src/gpgme-w32spawn.c (my_spawn): Handle the new flag. + * src/gpgme.h.in (GPGME_SPAWN_SHOW_WINDOW): New. + * src/priv-io.h (IOSPAWN_FLAG_SHOW_WINDOW): New. + + core, w32: Fix flags passing to gpgme-w32-spawn. + + commit f10605ffb5cc9d457c3e432918fdfbfaf3d04185 + * src/w32-io.c (_gpgme_io_spawn): Don't hardcode flags value. + + cpp: Add conveniance Data::toString. + + commit 5a5b0d4996c17bfbc69b90f89fec23732f92813a + * lang/cpp/src/data.h, lang/cpp/src/data.cpp: Add Data::toString. + +2018-01-30 NIIBE Yutaka + + Fix for BSD Make. + + commit 59fcabbdf537b2745ef0c3cae908b21970a5b39b + * tests/gpg/Makefile.am, tests/gpgsm/Makefile.am: Remove ./. + +2018-01-29 NIIBE Yutaka + + Fix compile error message. + + commit bbb5e70e7e8598978b6c61b13ba77705ff86e469 + * src/get-env.c (_gpgme_getenv): Fix error message. + + tests: Fix for NetBSD. + + commit 58130b97f6582455fd355ac58ae3182a28812cfc + * tests/gpg/pinentry: Use /bin/sh instead of Bash. + + core: Implement _gpgme_getenv for NetBSD. + + commit 37d62e9d0f685c257fdb5f303e60ff01f8a36a2f + * src/get-env.c [HAVE_GETENV_R] (_gpgme_getenv): New. + 2017-12-12 Werner Koch Release 1.10.0. diff --git a/Makefile.am b/Makefile.am index e47ace5..1772d69 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,16 +15,28 @@ # 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 . +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later ## Process this file with automake to produce Makefile.in +# Location of the released tarball archives. Note that this is an +# internal archive and before uploading this to the public server, +# manual tests should be run and the git release tat set and pushed. +# Adjust as needed. +RELEASE_ARCHIVE_DIR = wk@vigenere:tarballs/gpgme/ + +# The key used to sign the released sources. Adjust as needed. +RELEASE_SIGNING_KEY = D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 + +# Autoconf flags ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = -EXTRA_DIST = autogen.sh autogen.rc gpgme.spec.in \ - ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 +EXTRA_DIST = autogen.sh autogen.rc gpgme.spec.in \ + ChangeLog-2011 m4/ChangeLog-2011 \ + conf/whatisthis VERSION if RUN_GPG_TESTS @@ -35,13 +47,11 @@ endif SUBDIRS = src ${tests} doc lang -# Fix the version of the spec file and create a file named VERSION -# to be used for patch's Prereq: feature. +# Fix the version of the spec file. dist-hook: gen-ChangeLog @set -e; \ sed -e 's/@pkg_version@/$(PACKAGE_VERSION)/g' \ $(top_srcdir)/gpgme.spec.in > $(distdir)/gpgme.spec - echo "$(PACKAGE_VERSION)" > $(distdir)/VERSION distcheck-hook: set -e; ( \ @@ -57,9 +67,9 @@ distcheck-hook: esac;\ done ) | tee $(distdir).swdb +.PHONY: gen-ChangeLog release sign-release gen_start_date = 2011-12-01T00:00:00 -.PHONY: gen-ChangeLog gen-ChangeLog: if test -d $(top_srcdir)/.git; then \ (cd $(top_srcdir) && \ @@ -70,3 +80,50 @@ gen-ChangeLog: rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi + + +# Macro to help the release target. +RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) + +release: + +(set -e;\ + if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \ + echo "error: build directory must not be the source directory" >&2;\ + exit 2;\ + fi ;\ + echo "/* Build started at $$(date -uIseconds) */" ;\ + cd $(top_srcdir); \ + ./autogen.sh --force; \ + cd $(abs_top_builddir); \ + rm -rf dist; mkdir dist ; cd dist ; \ + $(abs_top_srcdir)/configure --enable-maintainer-mode; \ + $(MAKE) distcheck TESTFLAGS=--parallel; \ + echo "/* Build finished at $$(date -uIseconds) */" ;\ + echo "/*" ;\ + echo " * Please run the final step interactively:" ;\ + echo " * make sign-release" ;\ + echo " */" ;\ + ) 2>&1 | tee "$(RELEASE_NAME).buildlog" + +sign-release: + +(set -e; \ + cd dist; \ + files1="$(RELEASE_NAME).tar.bz2" ;\ + files2="$(RELEASE_NAME).tar.bz2.sig \ + $(RELEASE_NAME).swdb \ + $(RELEASE_NAME).buildlog" ;\ + echo "/* Signing the source tarball ..." ;\ + gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.bz2 ;\ + cat $(RELEASE_NAME).swdb >swdb.snippet;\ + echo >>swdb.snippet ;\ + sha1sum $${files1} >>swdb.snippet ;\ + cat "../$(RELEASE_NAME).buildlog" swdb.snippet \ + | gzip >$(RELEASE_NAME).buildlog ;\ + echo "Copying to local archive ..." ;\ + scp -p $${files1} $${files2} $(RELEASE_ARCHIVE_DIR)/ || true;\ + echo "Uploading documentation ..." ;\ + $(MAKE) -C doc online; \ + echo '/*' ;\ + echo ' * All done; for checksums see dist/swdb.snippet' ;\ + echo ' */' ;\ + ) diff --git a/Makefile.in b/Makefile.in index 15dfd86..6790f8c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,9 +31,20 @@ # 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 . +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -97,21 +108,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(top_srcdir)/build-aux/mkinstalldirs \ - COPYING COPYING.LESSER THANKS TODO build-aux/compile \ - build-aux/config.guess build-aux/config.sub build-aux/depcomp \ - build-aux/install-sh build-aux/mdate-sh missing \ - build-aux/missing build-aux/mkinstalldirs \ - build-aux/texinfo.tex build-aux/ltmain.sh \ - $(top_srcdir)/build-aux/compile \ - $(top_srcdir)/build-aux/config.guess \ - $(top_srcdir)/build-aux/config.sub \ - $(top_srcdir)/build-aux/install-sh \ - $(top_srcdir)/build-aux/ltmain.sh \ - $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 \ @@ -126,10 +122,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs -CONFIG_HEADER = config.h +CONFIG_HEADER = $(top_builddir)/conf/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -167,8 +165,7 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -189,6 +186,20 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = src tests doc lang +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing \ + $(top_srcdir)/build-aux/mkinstalldirs \ + $(top_srcdir)/conf/config.h.in AUTHORS COPYING COPYING.LESSER \ + ChangeLog INSTALL NEWS README THANKS TODO build-aux/compile \ + build-aux/config.guess build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/ltmain.sh build-aux/mdate-sh \ + build-aux/missing build-aux/mkinstalldirs \ + build-aux/texinfo.tex missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -243,6 +254,7 @@ AWK = @AWK@ BUILD_FILEVERSION = @BUILD_FILEVERSION@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +BUILD_VERSION = @BUILD_VERSION@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ @@ -283,6 +295,7 @@ GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ GPGME_QT_LIBS = @GPGME_QT_LIBS@ +GPGRT_CONFIG = @GPGRT_CONFIG@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ @@ -298,6 +311,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ +LDADD_FOR_TESTS_KLUDGE = @LDADD_FOR_TESTS_KLUDGE@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ @@ -425,17 +439,31 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ + +# Location of the released tarball archives. Note that this is an +# internal archive and before uploading this to the public server, +# manual tests should be run and the git release tat set and pushed. +# Adjust as needed. +RELEASE_ARCHIVE_DIR = wk@vigenere:tarballs/gpgme/ + +# The key used to sign the released sources. Adjust as needed. +RELEASE_SIGNING_KEY = D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 + +# Autoconf flags ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = -EXTRA_DIST = autogen.sh autogen.rc gpgme.spec.in \ - ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 +EXTRA_DIST = autogen.sh autogen.rc gpgme.spec.in \ + ChangeLog-2011 m4/ChangeLog-2011 \ + conf/whatisthis VERSION @RUN_GPG_TESTS_FALSE@tests = @RUN_GPG_TESTS_TRUE@tests = tests SUBDIRS = src ${tests} doc lang gen_start_date = 2011-12-01T00:00:00 -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive + +# Macro to help the release target. +RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) +all: all-recursive .SUFFIXES: am--refresh: Makefile @@ -453,7 +481,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -473,20 +500,20 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): -config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 +conf/config.h: conf/stamp-h1 + @test -f $@ || rm -f conf/stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) conf/stamp-h1 -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) +conf/stamp-h1: $(top_srcdir)/conf/config.h.in $(top_builddir)/config.status + @rm -f conf/stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status conf/config.h +$(top_srcdir)/conf/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 + rm -f conf/stamp-h1 touch $@ distclean-hdr: - -rm -f config.h stamp-h1 + -rm -f conf/config.h conf/stamp-h1 mostlyclean-libtool: -rm -f *.lo @@ -686,15 +713,15 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -730,18 +757,18 @@ distcheck: dist esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -796,7 +823,7 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile config.h +all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive @@ -899,7 +926,7 @@ ps-am: uninstall-am: -.MAKE: $(am__recursive_targets) all install-am install-strip +.MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ @@ -918,14 +945,14 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + -# Fix the version of the spec file and create a file named VERSION -# to be used for patch's Prereq: feature. +# Fix the version of the spec file. dist-hook: gen-ChangeLog @set -e; \ sed -e 's/@pkg_version@/$(PACKAGE_VERSION)/g' \ $(top_srcdir)/gpgme.spec.in > $(distdir)/gpgme.spec - echo "$(PACKAGE_VERSION)" > $(distdir)/VERSION distcheck-hook: set -e; ( \ @@ -940,7 +967,8 @@ distcheck-hook: echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\ esac;\ done ) | tee $(distdir).swdb -.PHONY: gen-ChangeLog + +.PHONY: gen-ChangeLog release sign-release gen-ChangeLog: if test -d $(top_srcdir)/.git; then \ (cd $(top_srcdir) && \ @@ -952,6 +980,49 @@ gen-ChangeLog: mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi +release: + +(set -e;\ + if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \ + echo "error: build directory must not be the source directory" >&2;\ + exit 2;\ + fi ;\ + echo "/* Build started at $$(date -uIseconds) */" ;\ + cd $(top_srcdir); \ + ./autogen.sh --force; \ + cd $(abs_top_builddir); \ + rm -rf dist; mkdir dist ; cd dist ; \ + $(abs_top_srcdir)/configure --enable-maintainer-mode; \ + $(MAKE) distcheck TESTFLAGS=--parallel; \ + echo "/* Build finished at $$(date -uIseconds) */" ;\ + echo "/*" ;\ + echo " * Please run the final step interactively:" ;\ + echo " * make sign-release" ;\ + echo " */" ;\ + ) 2>&1 | tee "$(RELEASE_NAME).buildlog" + +sign-release: + +(set -e; \ + cd dist; \ + files1="$(RELEASE_NAME).tar.bz2" ;\ + files2="$(RELEASE_NAME).tar.bz2.sig \ + $(RELEASE_NAME).swdb \ + $(RELEASE_NAME).buildlog" ;\ + echo "/* Signing the source tarball ..." ;\ + gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.bz2 ;\ + cat $(RELEASE_NAME).swdb >swdb.snippet;\ + echo >>swdb.snippet ;\ + sha1sum $${files1} >>swdb.snippet ;\ + cat "../$(RELEASE_NAME).buildlog" swdb.snippet \ + | gzip >$(RELEASE_NAME).buildlog ;\ + echo "Copying to local archive ..." ;\ + scp -p $${files1} $${files2} $(RELEASE_ARCHIVE_DIR)/ || true;\ + echo "Uploading documentation ..." ;\ + $(MAKE) -C doc online; \ + echo '/*' ;\ + echo ' * All done; for checksums see dist/swdb.snippet' ;\ + echo ' */' ;\ + ) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/NEWS b/NEWS index 879d1af..9a7eac0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,212 @@ +Noteworthy changes in version 1.13.1 (2019-06-13) +------------------------------------------------- + + * cpp: gpgme_set_global_flag is now wrapped. [#4471] + + * w32: Improved handling of unicode install paths. [#4453] + + * w32: The gpgme_io_spawn error message is now only shown once. [#4453] + + * Fixed a crash introduced in 1.13.0 when working with S/MIME. [#4556] + + * w32: Fixed format string errors introduced in 1.13.0 that could + cause crashes. [#4440] + + * w32: Fixed an error in the new diagnostic gpgsm support introduced + in 1.13.0 that caused crashes in low fd scenarios. [#4439] + + * python: Fixed a DecryptionError Exception. [#4478] + + * python: No longer raises BadSignatures from decrypt(verify=True). + [#4276] + + * Interface changes relative to the 1.13.0 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + cpp: setGlobalFlag NEW. + + [c=C33/A22/R1 cpp=C16/A10/R0 qt=C10/A3/R4] + + Release-info: https://dev.gnupg.org/T4551 + + +Noteworthy changes in version 1.13.0 (2019-03-26) +------------------------------------------------- + + * Support GPGME_AUDITLOG_DIAG for gpgsm. [#4426] + + * New context flag "trust-model". + + * Removed support for WindowsCE and Windows ME. + + * Aligned the gpgrt-config code with our other libaries. + + * Auto-check for all installed Python versions. [#3354] + + * Fixed generating card key in the C++ bindings. [#4428] + + * Fixed a segv due to bad parameters in genkey. [#4192] + + * Fixed crash if the plaintext is ignored in a CMS verify. + + * Fixed memleak on Windows. [T4238] + + * Tweaked the Windows I/O code. + + * Fixed random crashes on Windows due to closing an arbitrary + handle. [#4237] + + * Fixed a segv on Windows. [#4369] + + * Fixed test suite problems related to dtags. [#4298] + + * Fixed bunch of python bugs. [#4242,commit 9de1c96ac3cf] + + * Several fixes to the Common Lisp bindings. + + * Fixed minor bugs in gpgme-json. [#4331,#4341,#4342,#4343 + + * Require trace level 8 to dump all I/O data. + + * The compiler must now support variadic macros. + + * Interface changes relative to the 1.12.0 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + gpgme_set_ctx_flag EXTENDED: New flag 'trust-model'. + cpp: Context::create NEW. + cpp: Key::isBad NEW. + cpp: Subkey::isBad NEW. + cpp: UserID::isBad NEW. + cpp: UserID::Signature::isBad NEW. + cpp: GenCardKeyInteractor::setAlgo NEW. + + [c=C33/A22/R0 cpp=C15/A9/R0 qt=C10/A3/R3] + + Release-info: https://dev.gnupg.org/T4376 + + +Noteworthy changes in version 1.12.0 (2018-10-08) +------------------------------------------------- + + * Enhanced the JSON based interface tool gpgme-json to support Native + Messaging as well as new Javascript code to support the browser + site. See lang/js/README for details. + + * Major overhaul of the Python language bindings documentation. + + * Even for old versions of gpg a missing MDC will now lead to a + decryption failure. + + * Added context flag "auto-key-locate" to control the + behavior of GPGME_KEYLIST_MODE_LOCATE. + + * New data function to create a data object from an estream. + + * Add more interfaces to the C++ bindings. + + * Improved error codes on decryption failure. + + * Lots of minor fixes. + + * Interface changes relative to the 1.11.1 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + gpgme_data_new_from_estream NEW. + gpgme_decrypt_result_t EXTENDED: New field legacy_cipher_nomdc. + gpgme_set_ctx_flag EXTENDED: New flag 'ignore-mdc-error'. + GPGME_AUDITLOG_DEFAULT NEW. + GPGME_AUDITLOG_DIAG NEW. + gpgme_set_ctx_flag EXTENDED: New flag 'auto-key-locate'. + cpp: DecryptionResult::sessionKey NEW. + cpp: DecryptionResult::symkeyAlgo NEW. + cpp: DecryptionResult::isLegacyCipherNoMDC New. + cpp: Data::rewind NEW. + cpp: Context::setFlag NEW. + cpp: Context::getFlag NEW. + cpp: Context::createKeyEx NEW. + + [c=C32/A21/R0 cpp=C14/A8/R0 qt=C10/A3/R2] + + Release-info: https://dev.gnupg.org/T4109 + + +Noteworthy changes in version 1.11.1 (2018-04-20) +------------------------------------------------- + + * Fixed build problems in the 1.11.0 release. + + * Added C++ interfaces which were planned for 1.11.0. + + * Interface changes relative to the 1.10.0 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + cpp: Key::origin NEW. + cpp: Key::lastUpdate NEW. + cpp: UserID::origin NEW. + cpp: UserID::lastUpdate NEW. + + [c=C31/A20/R1 cpp=C13/A7/R0 qt=C10/A3/R2] + + +Noteworthy changes in version 1.11.0 (2018-04-18) +------------------------------------------------- + + * New encryption API to support direct key specification including + hidden recipients option and taking keys from a file. This also + allows to enforce the use of a subkey. + + * New encryption flag for the new API to enforce the use of plain + mail addresses (addr-spec). + + * The import API can now tell whether v3 keys are skipped. These old + and basically broken keys are not anymore supported by GnuPG 2.1. + + * The decrypt and verify API will now return the MIME flag as + specified by RFC-4880bis. + + * The offline mode now has an effect on gpg by disabling all network + access. [#3831] + + * A failed OpenPGP verification how returns the fingerprint of the + intended key if a recent gpg version was used for signature + creation. + + * New tool gpgme-json as native messaging server for web browsers. + As of now public key encryption and decryption is supported. + Requires Libgpg-error 1.29. + + * New context flag "request-origin" which has an effect when used + with GnuPG 2.2.6 or later. + + * New context flag "no-symkey-cache" which has an effect when used + with GnuPG 2.2.7 or later. + + * New convenience constant GPGME_KEYLIST_MODE_LOCATE. + + * Improved the Python documentation. + + * Fixed a potential regression with GnuPG 2.2.6 or later. + + * Fixed a crash in the Python bindings on 32 bit platforms. [#3892] + + * Various minor fixes. + + * Interface changes relative to the 1.10.0 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + gpgme_op_encrypt_ext NEW. + gpgme_op_encrypt_ext_start NEW. + gpgme_op_encrypt_sign_ext NEW. + gpgme_op_encrypt_sign_ext_start NEW. + GPGME_ENCRYPT_WANT_ADDRESS NEW. + GPGME_KEYLIST_MODE_LOCATE NEW. + gpgme_import_result_t EXTENDED: New field 'skipped_v3_keys'. + gpgme_decrypt_result_t EXTENDED: New field 'symkey_algo'. + gpgme_decrypt_result_t EXTENDED: New field 'is_mime'. + gpgme_verify_result_t EXTENDED: New field 'is_mime'. + cpp: Key::locate NEW. + cpp: Data::toString NEW. + cpp: ImportResult::numV3KeysSkipped NEW. + + [c=C31/A20/R0 cpp=C12/A6/R0 qt=C10/A3/R1] + + Noteworthy changes in version 1.10.0 (2017-12-12) ------------------------------------------------- @@ -324,7 +533,7 @@ Noteworthy changes in version 1.6.0 (2015-08-26) [C25/A14/R0] * The passphrase handler for the loopback mode has been improved and may also be used with genkey. - * [w32] The standard GnuPG 2.1 install directory is now seached for + * [w32] The standard GnuPG 2.1 install directory is now searched for gpgconf.exe before a registry specified directory and the Gpg4win install directory. @@ -627,7 +836,7 @@ Noteworthy changes in version 1.1.8 (2008-12-08) ------------------------------------------------ * SIGPIPE is now again ignored as described in the manual. Fixes - regresion introduced with 1.1.6. + regression introduced with 1.1.6. Noteworthy changes in version 1.1.7 (2008-10-17) @@ -823,8 +1032,8 @@ Noteworthy changes in version 1.0.3 (2005-06-20) * Previousy, GPGME would use a default "include certs" of 1. This has been changed. Now GPGME will use the crypto backend engines default unless you set the value with gpgme_set_include_certs() - explicitely. A new macro GPGME_INCLUDE_CERTS_DEFAULT can be used - as a value to explicitely request the new default behaviour. + explicitly. A new macro GPGME_INCLUDE_CERTS_DEFAULT can be used + as a value to explicitly request the new default behaviour. Because the default changes, this is a slight change of the API semantics. We consider it to be a bug fix. @@ -911,7 +1120,7 @@ Noteworthy changes in version 0.4.7 (2004-04-29) disabled in the gpgme_key_t structures. * A bug fix: The flag wrong_key_usage of gpgme_signature_t was - accidently of type int instead unsigned int. + accidentally of type int instead unsigned int. * Interface changes relative to the 0.4.5 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1124,7 +1333,7 @@ Noteworthy changes in version 0.4.1 (2003-06-06) The error values have been completely replaced by a more sophisticated model that allows GPGME to transparently and accurately - report all errors from the other GnuPG components, irregardless of + report all errors from the other GnuPG components, regardless of process boundaries. This is achieved by using the library libgpg-errors, which is shared by all GnuPG components. This library is now required for GPGME. @@ -1742,7 +1951,7 @@ Noteworthy changes in version 0.3.1 (2002-02-09) selects between local keyring, remote keyserver, or both. For this, two new macros are defined, GPGME_KEYLIST_MODE_LOCAL and GPGME_KEYLIST_MODE_EXTERN. To make it possible to modify the - current setting, a fucntion gpgme_get_keylist_mode was added to + current setting, a function gpgme_get_keylist_mode was added to retrieve the current mode. * gpgme_wait accepts a new argument STATUS to return the error status diff --git a/README b/README index f7b006f..8e031ae 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ GPGME - GnuPG Made Easy --------------------------- -Copyright 2001-2017 g10 Code GmbH +Copyright 2001-2018 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/TODO b/TODO index 0458cb5..121ced2 100644 --- a/TODO +++ b/TODO @@ -1,58 +1,254 @@ +#+TITLE: TODO List Hey Emacs, this is -*- org -*- mode! -* Document all the new stuff. +* IMPORTANT! + :PROPERTIES: + :CUSTOM_ID: dev-gnupg-org + :END: + + There was a nine year gap (2009 to 2018) between edits of this file, + so it is likely that much of the old information in it is wrong or + no longer applicable. + + Bugs, feature requests and other development related work will be + tracked through the [[https://dev.gnupg.org/][dev.gnupg.org]] site. + + +* Documentation + :PROPERTIES: + :CUSTOM_ID: documentation + :END: + +** Document all the new stuff. + :PROPERTIES: + :CUSTOM_ID: more-docs-is-better + :END: + +*** TODO Fix this TODO list. + :PROPERTIES: + :CUSTOM_ID: fix-todo + :END: + + Clean up the current TODO list. Include properties as relevant (so + if someone does make a PDF or HTML version the TOC will work). + + Also check to see if some of these ancient things can be removed + (e.g. do we really need to fix things that were broken in GPG + 1.3.x? I'm thinking not so much). + +**** DONE fix TODO items + CLOSED: [2018-03-04 Sun 08:55] + :PROPERTIES: + :CUSTOM_ID: fix-todo-items + :END: + + Adjust todo items so each can now be referenced by custom-id and + checked off as necessary. + +** TODO Document validity and trust issues. + :PROPERTIES: + :CUSTOM_ID: valid-trust-issues + :END: + +** In gpgme.texi: Register callbacks under the right letter in the index. + :PROPERTIES: + :CUSTOM_ID: gpgme-texi + :END: + + * Fix the remaining UI Server problems: + :PROPERTIES: + :CUSTOM_ID: ui-server-fix + :END: ** VERIFY --silent support. + :PROPERTIES: + :CUSTOM_ID: verify-silent + :END: ** ENCRYPT/DECRYPT/VERIFY/SIGN reset the engine, shouldn't be done with UISERVER? + :PROPERTIES: + :CUSTOM_ID: reset-engine-not-ui + :END: + * IMPORTANT + :PROPERTIES: + :CUSTOM_ID: important-stuff-really + :END: ** When using descriptor passing, we need to set the fd to blocking before - issueing simple commands, because we are mixing synchronous + :PROPERTIES: + :CUSTOM_ID: set-fd-blocking + :END: + issuing simple commands, because we are mixing synchronous commands into potentially asynchronous operations. -** Might want to implement nonblock for w32 native backend! Right now, - we block reading the next line with assuan. +** Might want to implement nonblock for w32 native backend! + :PROPERTIES: + :CUSTOM_ID: nonblock-win32 + :END: + Right now we block reading the next line with assuan. + * Before release: -** Some gpg tests fail with gpg 1.3.4-cvs (gpg/t-keylist-sig) + :PROPERTIES: + :CUSTOM_ID: pre-release + :END: + +** CANCELLED Some gpg tests fail with gpg 1.3.4-cvs (gpg/t-keylist-sig) + CLOSED: [2018-03-09 Fri 08:16] + :PROPERTIES: + :CUSTOM_ID: gpg-1-3-4-really + :END: + - State "CANCELLED" from "TODO" [2018-03-09 Fri 08:16] \\ + WON'T FIX — too old or no longer applies. The test is currently disabled there and in gpg/t-import. + ** When gpg supports it, write binary subpackets directly, + :PROPERTIES: + :CUSTOM_ID: binary-subpackets + :END: and parse SUBPACKET status lines. + * ABI's to break: + :PROPERTIES: + :CUSTOM_ID: abi-breakage-apparently-on-purpose + :END: + ** Old opassuan interface. + :PROPERTIES: + :CUSTOM_ID: old-opassuan + :END: + ** Implementation: Remove support for old style error codes in + :PROPERTIES: + :CUSTOM_ID: remove-old-error-codes + :END: conversion.c::_gpgme_map_gnupg_error. + ** gpgme_edit_cb_t: Add "processed" return argument + :PROPERTIES: + :CUSTOM_ID: add-processed-return + :END: (see edit.c::command_handler). + ** I/O and User Data could be made extensible. But this can be done + :PROPERTIES: + :CUSTOM_ID: add-io-user-data + :END: without breaking the ABI hopefully. + ** All enums should be replaced by ints and simple macros for + :PROPERTIES: + :CUSTOM_ID: enums-should-be-ints + :END: maximum compatibility. + ** Compatibility interfaces that can be removed in future versions: + :PROPERTIES: + :CUSTOM_ID: compat-interfaces-to-go + :END: + *** gpgme_data_new_from_filepart + :PROPERTIES: + :CUSTOM_ID: gpgme-data-new-from-filepart + :END: + *** gpgme_data_new_from_file + :PROPERTIES: + :CUSTOM_ID: gpgme-data-new-from-file + :END: + *** gpgme_data_new_with_read_cb + :PROPERTIES: + :CUSTOM_ID: gpgme-data-new-with-read-cb + :END: + *** gpgme_data_rewind + :PROPERTIES: + :CUSTOM_ID: gpgme-data-rewind + :END: + *** gpgme_op_import_ext + :PROPERTIES: + :CUSTOM_ID: gpgme-op-import-ext + :END: + *** gpgme_get_sig_key + :PROPERTIES: + :CUSTOM_ID: gpgme-get-sig-key + :END: + *** gpgme_get_sig_ulong_attr + :PROPERTIES: + :CUSTOM_ID: gpgme-get-sig-ulong-attr + :END: + *** gpgme_get_sig_string_attr + :PROPERTIES: + :CUSTOM_ID: gpgme-get-sig-string-attr + :END: + *** GPGME_SIG_STAT_* + :PROPERTIES: + :CUSTOM_ID: gpgme-sig-stat + :END: + *** gpgme_get_sig_status + :PROPERTIES: + :CUSTOM_ID: gpgme-get-sig-status + :END: + *** gpgme_trust_item_release + :PROPERTIES: + :CUSTOM_ID: gpgme-trust-item-release + :END: + *** gpgme_trust_item_get_string_attr + :PROPERTIES: + :CUSTOM_ID: gpgme-trust-item-get-string-attr + :END: + *** gpgme_trust_item_get_ulong_attr + :PROPERTIES: + :CUSTOM_ID: gpgme-trust-item-get-ulong-attr + :END: + *** gpgme_attr_t + :PROPERTIES: + :CUSTOM_ID: gpgme-attr-t + :END: + *** All Gpgme* typedefs. + :PROPERTIES: + :CUSTOM_ID: all-gpgme-typedefs + :END: * Thread support: + :PROPERTIES: + :CUSTOM_ID: threads + :END: + ** When GNU Pth supports sendmsg/recvmsg, wrap them properly. + :PROPERTIES: + :CUSTOM_ID: wrap-oth + :END: + ** Without timegm (3) support our ISO time parser is not thread safe. + :PROPERTIES: + :CUSTOM_ID: time-threads + :END: There is a configure time warning, though. + * New features: + :PROPERTIES: + :CUSTOM_ID: new-features + :END: + ** Flow control for data objects. + :PROPERTIES: + :CUSTOM_ID: flow-control-is-not-a-euphemism-for-an-s-bend + :END: Currently, gpgme_data_t objects are assumed to be blocking. To break this assumption, we need either (A) a way for an user I/O callback to store the current operation in a continuation that can @@ -61,49 +257,99 @@ Hey Emacs, this is -*- org -*- mode! respective event loop. or (B) a way for gpgme data objects to be associated with a waitable object, that can be registered with the user event loop. Neither is particularly simple. + ** Extended notation support. When gpg supports arbitrary binary + :PROPERTIES: + :CUSTOM_ID: extended-notation + :END: notation data, provide a user interface for that. + ** notification system + :PROPERTIES: + :CUSTOM_ID: notification-system + :END: We need a simple notification system, probably a simple callback with a string and some optional arguments. This is for example required to notify an application of a changed smartcard, The application can then do whatever is required. There are other - usages too. This notfication system should be independent of any + usages too. This notification system should be independent of any contextes of course. Not sure whether this is still required. GPGME_PROTOCOL_ASSUAN is sufficient for this. ** --learn-code support + :PROPERTIES: + :CUSTOM_ID: learn-code + :END: This might be integrated with import. we still need to work out how to learn a card when gpg and gpgsm have support for smartcards. In GPA we currently invoke gpg directly. ** Might need a stat() for data objects and use it for length param to gpg. + :PROPERTIES: + :CUSTOM_ID: stat-data + :END: + ** Implement support for photo ids. + :PROPERTIES: + :CUSTOM_ID: photo-id + :END: + ** Allow selection of subkeys + :PROPERTIES: + :CUSTOM_ID: subkey-selection + :END: + ** Allow to return time stamps in ISO format - This allows us to handle years later than 2037 properly. With the - time_t interface they are all mapped to 2037-12-31 + :PROPERTIES: + :CUSTOM_ID: iso-format-datetime + :END: + This allows us to handle years later than 2037 properly. With the + time_t interface they are all mapped to 2037-12-31 + ** New features requested by our dear users, but rejected or left for + :PROPERTIES: + :CUSTOM_ID: feature-requests + :END: later consideration: + *** Allow to export secret keys. + :PROPERTIES: + :CUSTOM_ID: export-secret-keys + :END: Rejected because this is conceptually flawed. Secret keys on a smart card can not be exported, for example. May eventually e supproted with a keywrapping system. + *** Selecting the key ring, setting the version or comment in output. + :PROPERTIES: + :CUSTOM_ID: select-keyring-version + :END: Rejected because the naive implementation is engine specific, the configuration is part of the engine's configuration or readily worked around in a different way + *** Selecting the symmetric cipher. + :PROPERTIES: + :CUSTOM_ID: symmetric-cipher-selection + :END: + *** Exchanging keys with key servers. + :PROPERTIES: + :CUSTOM_ID: key-server-exchange + :END: -* Documentation -** Document validity and trust issues. -** In gpgme.texi: Register callbacks under the right letter in the index. * Engines + :PROPERTIES: + :CUSTOM_ID: engines + :END: + ** Do not create/destroy engines, but create engine and then reset it. + :PROPERTIES: + :CUSTOM_ID: reset-engine-is-not-quite-just-ignition + :END: Internally the reset operation still spawns a new engine process, but this can be replaced with a reset later. Also, be very sure to release everything properly at a reset and at an error. Think hard @@ -112,85 +358,255 @@ Hey Emacs, this is -*- org -*- mode! Note that we need support in gpgsm to set include-certs to default as RESET does not reset it, also for no_encrypt_to and probably other options. + ** Optimize the case where a data object has an underlying fd we can pass + :PROPERTIES: + :CUSTOM_ID: optimus-data-cousin-of-optimus-prime + :END: directly to the engine. This will be automatic with socket I/O and descriptor passing. + ** Move code common to all engines up from gpg to engine. + :PROPERTIES: + :CUSTOM_ID: move-code-common-to-engines-out-of-gpg + :END: + ** engine operations can return General Error on unknown protocol + :PROPERTIES: + :CUSTOM_ID: general-error-looking-to-be-court-martialled + :END: (it's an internal error, as select_protocol checks already). + ** When server mode is implemented properly, more care has to be taken to + :PROPERTIES: + :CUSTOM_ID: server-mode + :END: release all resources on error (for example to free assuan_cmd). -** op_import_keys and op_export_keys have a limit ion the number of keys. + +** op_import_keys and op_export_keys have a limit in the number of keys. + :PROPERTIES: + :CUSTOM_ID: import-export-problems + :END: This is because we pass them in gpg via the command line and gpgsm via an assuan control line. We should pipe them instead and maybe change gpg/gpgsm to not put them in memory. + * GPG breakage: -** gpg 1.4.2 lacks error reporting if sign/encrypt with revoked key. -** gpg 1.4.2 does crappy error reporting (namely none at all) when + :PROPERTIES: + :CUSTOM_ID: gpg-breakage + :END: + +** CANCELLED gpg 1.4.2 lacks error reporting if sign/encrypt with revoked key. + CLOSED: [2018-03-09 Fri 08:19] + :PROPERTIES: + :CUSTOM_ID: gpg-classic-lacks-stuff + :END: + - State "CANCELLED" from "TODO" [2018-03-09 Fri 08:19] \\ + WON'T FIX. + +** CANCELLED gpg 1.4.2 does crappy error reporting (namely none at all) when + CLOSED: [2018-03-09 Fri 08:20] + :PROPERTIES: + :CUSTOM_ID: gpg-classic-problems-but-do-we-care + :END: + - State "CANCELLED" from "TODO" [2018-03-09 Fri 08:20] \\ + WON'T FIX. smart card is missing for sign operation: [GNUPG:] CARDCTRL 4 gpg: selecting openpgp failed: ec=6.110 gpg: signing failed: general error [GNUPG:] BEGIN_ENCRYPTION 2 10 gpg: test: sign+encrypt failed: general error -** Without agent and with wrong passphrase, gpg 1.4.2 enters into an + +** DONE Without agent and with wrong passphrase, gpg 1.4.2 enters into an + CLOSED: [2018-03-09 Fri 08:20] + :PROPERTIES: + :CUSTOM_ID: recursive-gpg-classic + :END: + - State "DONE" from "TODO" [2018-03-09 Fri 08:20] \\ + Must have been fixed in a subsequent release. infinite loop. -** Use correct argv[0] + +** CANCELLED Use correct argv[0] + CLOSED: [2018-03-09 Fri 08:24] + :PROPERTIES: + :CUSTOM_ID: correct-argv + :END: + - State "CANCELLED" from "TODO" [2018-03-09 Fri 08:24] \\ + WON'T FIX. + + Also, there is no rungpg.c file in GPGME (or in GPG or most, if not + all of the rest of the libs and packages; I suspect there hasn't been + for a very long time). In rungpg.c:build_argv we use argv[argc] = strdup ("gpg"); /* argv[0] */ This should be changed to take the real file name used in account. * Operations + :PROPERTIES: + :CUSTOM_ID: operations-are-not-surgical + :END: + ** Include cert values -2, -1, 0 and 1 should be defined as macros. + :PROPERTIES: + :CUSTOM_ID: certified-macros + :END: + ** If an operation failed, make sure that the result functions don't return + :PROPERTIES: + :CUSTOM_ID: operation-failure + :END: corrupt partial information. !!! NOTE: The EOF status handler is not called in this case !!! + ** Verify must not fail on NODATA premature if auto-key-retrieval failed. + :PROPERTIES: + :CUSTOM_ID: autobot-key-retrieval + :END: It should not fail silently if it knows there is an error. !!! + ** All operations: Better error reporting. !! + :PROPERTIES: + :CUSTOM_ID: better-reporting-not-like-fox-news + :END: + ** Export status handler need much more work. !!! + :PROPERTIES: + :CUSTOM_ID: export-status-handler + :END: + ** Import should return a useful error when one happened. + :PROPERTIES: + :CUSTOM_ID: import-useful-stuff-even-wrong-stuff + :END: + *** Import does not take notice of NODATA status report. + :PROPERTIES: + :CUSTOM_ID: import-no-data + :END: + *** When GPGSM does issue IMPORT_OK status reports, make sure to check for + :PROPERTIES: + :CUSTOM_ID: gpgsm-import-ok + :END: them in tests/gpgs m/t-import.c. + ** Verify can include info about version/algo/class, but currently + :PROPERTIES: + :CUSTOM_ID: verify-class + :END: this is only available for gpg, not gpgsm. + ** Return ENC_TO output in verify result. Again, this is not available + :PROPERTIES: + :CUSTOM_ID: return-to-enc + :END: for gpgsm. + ** Genkey should return something more useful than General_Error. + :PROPERTIES: + :CUSTOM_ID: general-key-assumed-command-from-general-error + :END: + ** If possible, use --file-setsize to set the file size for proper progress + :PROPERTIES: + :CUSTOM_ID: file-setsize + :END: callback handling. Write data interface for file size. + ** Optimize the file descriptor list, so the number of open fds is + :PROPERTIES: + :CUSTOM_ID: optimus-descriptus-younger-brother-of-optimus-prime + :END: always known easily. + ** Encryption: It should be verified that the behaviour for partially untrusted + :PROPERTIES: + :CUSTOM_ID: only-mostly-dead-means-partially-alive + :END: recipients is correct. + ** When GPG issues INV_something for invalid signers, catch them. + :PROPERTIES: + :CUSTOM_ID: invalid-sig + :END: + * Error Values + :PROPERTIES: + :CUSTOM_ID: error-value + :END: + ** Map ASSUAN/GpgSM ERR error values in a better way than is done now. !! + :PROPERTIES: + :CUSTOM_ID: map-ass-error + :END: + ** Some error values should identify the source more correctly (mostly error + :PROPERTIES: + :CUSTOM_ID: source-errors + :END: values derived from status messages). + ** In rungpg.c we need to check the version of the engine + :PROPERTIES: + :CUSTOM_ID: rungpg-c-engine-ver + :END: This requires a way to get the cached version number from the engine layer. * Tests -** Write a fake gpg-agent so that we can supply known passphrases to + :PROPERTIES: + :CUSTOM_ID: tests + :END: + +** TODO Write a fake gpg-agent so that we can supply known passphrases to + :PROPERTIES: + :CUSTOM_ID: test-fake-gpg-agent + :END: gpgsm and setup the configuration files to use the agent. Without this we are testing a currently running gpg-agent which is not a clever idea. ! + ** t-data + :PROPERTIES: + :CUSTOM_ID: test-data + :END: + *** Test gpgme_data_release_and_get_mem. + :PROPERTIES: + :CUSTOM_ID: test-gpgme-data-release-mem + :END: + *** Test gpgme_data_seek for invalid types. + :PROPERTIES: + :CUSTOM_ID: test-gpgme-data-seek + :END: + ** t-keylist + :PROPERTIES: + :CUSTOM_ID: test-keylist + :END: Write a test for ext_keylist. + ** Test reading key signatures. + :PROPERTIES: + :CUSTOM_ID: test-key-sig + :END: + * Debug + :PROPERTIES: + :CUSTOM_ID: debug + :END: + ** Tracepoints should be added at: Every public interface enter/leave, + :PROPERTIES: + :CUSTOM_ID: tracepoint-pub-int + :END: before and in every callback, at major decision points, at every internal data point which might easily be observed by the outside (system handles). We also trace handles and I/O support threads in @@ -202,21 +618,83 @@ Hey Emacs, this is -*- org -*- mode! decrypt-verify.c delete.c edit.c encrypt.c encrypt-sign.c export.c genkey.c import.c key.c keylist.c passphrase.c progress.c signers.c sig-notation.c trust-item.c trustlist.c verify.c -** Handle malloc and vasprintf errors. But decide first if they should be + +** TODO Handle malloc and vasprintf errors. But decide first if they should be + :PROPERTIES: + :CUSTOM_ID: malloc-vasprintf + :END: + ignored (and logged with 255?!), or really be assertions. ! + * Build suite -** Make sure everything is cleaned correctly (esp. test area). -** Enable AC_CONFIG_MACRO_DIR and bump up autoconf version requirement. + :PROPERTIES: + :CUSTOM_ID: build-suite + :END: + +** TODO Make sure everything is cleaned correctly (esp. test area). + :PROPERTIES: + :CUSTOM_ID: clean-tests + :END: + +** TODO Enable AC_CONFIG_MACRO_DIR and bump up autoconf version requirement. + :PROPERTIES: + :CUSTOM_ID: autoconf-macros + :END: (To fix "./autogen.sh; ./configure --enable-maintainer-mode; touch configure.ac; make"). Currently worked around with ACLOCAL_AMFLAGS??? + * Error checking -** engine-gpgsm, with-validation + :PROPERTIES: + :CUSTOM_ID: error-checking + :END: + +** TODO engine-gpgsm, with-validation + :PROPERTIES: + :CUSTOM_ID: gpgsm-validation + :END: Add error checking some time after releasing a new gpgsm. -Copyright 2004, 2005 g10 Code GmbH +* Language bindings and related components + :PROPERTIES: + :CUSTOM_ID: language-bindings-and-related-stuff + :END: + +** TODO Emacs and elisp binding + :PROPERTIES: + :CUSTOM_ID: emacs-and-elisp + :END: + + Currently GNU Emacs uses EPA and EPG to provide GnuPG support. EPG + does this by calling the GPG executable and wrapping the commands + with elisp functions. A more preferable solution would be to + implement an epgme.el which integrated with GPGME, then if it could + not to attempt calling the gpgme-tool and only if those failed to + fall back to the current epg.el and calling the command line + binaries. + +** TODO API of an API + :PROPERTIES: + :CUSTOM_ID: api-squared + :END: + + See the more detailed notes on this in the [[lang/python/docs/TODO.org][python TODO]]. + +** TODO GPGME installation and package management guide + :PROPERTIES: + :CUSTOM_ID: package-management + :END: + + Write a guide/best practices for maintainers of GPGME packages with + third party package management systems. + + +* Copyright 2004, 2005, 2018 g10 Code GmbH + :PROPERTIES: + :CUSTOM_ID: copyright-and-license + :END: 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/VERSION b/VERSION index 81c871d..b50dd27 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.10.0 +1.13.1 diff --git a/aclocal.m4 b/aclocal.m4 index 8c1c40d..868a164 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_COND_IF -*- Autoconf -*- -# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# Copyright (C) 2008-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -147,7 +147,7 @@ fi[]dnl # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -178,7 +178,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -369,7 +369,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -445,7 +445,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -535,8 +535,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -610,6 +610,9 @@ END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -639,7 +642,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -650,7 +653,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -660,7 +663,7 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -682,7 +685,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -717,7 +720,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -767,7 +770,7 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -806,7 +809,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -835,7 +838,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -882,7 +885,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -901,7 +904,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -982,7 +985,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1042,7 +1045,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1070,7 +1073,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1089,7 +1092,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/autogen.rc b/autogen.rc index d0ade53..1759ef9 100644 --- a/autogen.rc +++ b/autogen.rc @@ -2,17 +2,11 @@ case "$myhost" in w32) - configure_opts=" - --with-gpg-error-prefix=@SYSROOT@ - --with-libassuan-prefix=@SYSROOT@ - " + configure_opts="" ;; amd64) - configure_opts=" - --with-gpg-error-prefix=@SYSROOT@ - --with-libassuan-prefix=@SYSROOT@ - " + configure_opts="" ;; esac diff --git a/autogen.sh b/autogen.sh index e5ba5bf..9b36158 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #! /bin/sh # autogen.sh -# Copyright (C) 2003, 2014, 2017 g10 Code GmbH +# Copyright (C) 2003, 2014, 2017, 2018 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 @@ -15,7 +15,7 @@ # configure it for the respective package. It is maintained as part of # GnuPG and source copied by other packages. # -# Version: 2017-01-17 +# Version: 2018-07-10 configure_ac="configure.ac" @@ -74,7 +74,6 @@ PRINT_HOST=no PRINT_BUILD=no tmp=$(dirname "$0") tsdir=$(cd "${tmp}"; pwd) -version_parts=3 if [ -n "${AUTOGEN_SH_SILENT}" ]; then SILENT=" --silent" @@ -85,9 +84,10 @@ if test x"$1" = x"--help"; then echo " --silent Silent operation" echo " --force Pass --force to autoconf" echo " --find-version Helper for configure.ac" - echo " --build-TYPE Configure to cross build for TYPE" + echo " --git-build Run all commands to build from a Git" echo " --print-host Print only the host triplet" echo " --print-build Print only the build platform triplet" + echo " --build-TYPE Configure to cross build for TYPE" echo "" echo " ARGS are passed to configure in --build-TYPE mode." echo " Configuration for this script is expected in autogen.rc" @@ -159,6 +159,10 @@ case "$1" in SILENT=" --silent" shift ;; + --git-build) + myhost="git-build" + shift + ;; --build-w32) myhost="w32" shift @@ -187,6 +191,25 @@ esac die_p +# **** GIT BUILD **** +# This is a helper to build from git. +if [ "$myhost" = "git-build" ]; then + tmp="$(pwd)" + cd "$tsdir" || fatal "error cd-ing to $tsdir" + ./autogen.sh || fatal "error running ./autogen.sh" + cd "$tmp" || fatal "error cd-ing back to $tmp" + die_p + "$tsdir"/configure || fatal "error running $tsdir/configure" + die_p + make || fatal "error running make" + die_p + make check || fatal "error running male check" + die_p + exit 0 +fi +# **** end GIT BUILD **** + + # Source our configuration if [ -f "${tsdir}/autogen.rc" ]; then . "${tsdir}/autogen.rc" @@ -215,18 +238,15 @@ if [ "$myhost" = "find-version" ]; then exit 1 fi - case "$version_parts" in - 2) - matchstr1="$package-$major.[0-9]*" - matchstr2="$package-$major-base" - vers="$major.$minor" - ;; - *) - matchstr1="$package-$major.$minor.[0-9]*" - matchstr2="$package-$major.$minor-base" - vers="$major.$minor.$micro" - ;; - esac + if [ -z "$micro" ]; then + matchstr1="$package-$major.[0-9]*" + matchstr2="$package-$major-base" + vers="$major.$minor" + else + matchstr1="$package-$major.$minor.[0-9]*" + matchstr2="$package-$major.$minor-base" + vers="$major.$minor.$micro" + fi beta=no if [ -e .git ]; then @@ -467,6 +487,10 @@ EOF EOF $CP build-aux/git-hooks/commit-msg .git/hooks/commit-msg chmod +x .git/hooks/commit-msg + if [ x"${display_name}" != x ]; then + git config format.subjectPrefix "PATCH ${display_name}" + git config sendemail.to "${patches_to}" + fi fi fi diff --git a/build-aux/compile b/build-aux/compile index 531136b..52f8f94 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC # 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 . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a diff --git a/build-aux/config.guess b/build-aux/config.guess index c4bd827..2132341 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -15,7 +15,7 @@ timestamp='2016-05-15' # 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 . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a diff --git a/build-aux/config.sub b/build-aux/config.sub index 9feb73b..c4b3f7a 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -15,7 +15,7 @@ timestamp='2016-06-20' # 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 . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a diff --git a/build-aux/depcomp b/build-aux/depcomp index 4ebd5b3..f0a474c 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC # 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 . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index 859599a..77963a9 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -24,7 +24,7 @@ # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# can be downloaded from https://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -75,8 +75,8 @@ # autoconf: $autoconf_version # # Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . +# GNU libtool home page: . +# General help using GNU software: . PROGRAM=libtool PACKAGE=libtool diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh index 60dc485..ad60788 100755 --- a/build-aux/mdate-sh +++ b/build-aux/mdate-sh @@ -18,7 +18,7 @@ scriptversion=2010-08-21.06; # UTC # 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 . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a diff --git a/build-aux/missing b/build-aux/missing index db98974..43e37bd 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC # 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 . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -103,7 +103,7 @@ fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +gnu_software_URL=https://www.gnu.org/software program_details () { diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index 26f732e..be5a3e0 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -20,7 +20,7 @@ % 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 . +% along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without @@ -31,7 +31,7 @@ % reports; you can get the latest version from: % http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or % http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or -% http://www.gnu.org/software/texinfo/ (the Texinfo home page) +% https://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % @@ -55,7 +55,7 @@ % extent. You can get the existing language-specific files from the % full Texinfo distribution. % -% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. +% The GNU Texinfo home page is https://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} diff --git a/conf/config.h.in b/conf/config.h.in new file mode 100644 index 0000000..d667348 --- /dev/null +++ b/conf/config.h.in @@ -0,0 +1,282 @@ +/* conf/config.h.in. Generated from configure.ac by autoheader. */ + +/* GIT commit id revision used to build this package */ +#undef BUILD_REVISION + +/* The time this package was configured for a build */ +#undef BUILD_TIMESTAMP + +/* Defined if we are building with uiserver support. */ +#undef ENABLE_UISERVER + +/* Locate binaries only via this PATH */ +#undef FIXED_SEARCH_PATH + +/* version of the libassuan library */ +#undef GPGME_LIBASSUAN_VERSION + +/* The default error source for GPGME. */ +#undef GPG_ERR_SOURCE_DEFAULT + +/* Defined if we build for an Android system */ +#undef HAVE_ANDROID_SYSTEM + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARGP_H + +/* Define if ttyname_r is does not work with small buffers */ +#undef HAVE_BROKEN_TTYNAME_R + +/* Define to 1 if you have the `closefrom' function. */ +#undef HAVE_CLOSEFROM + +/* define if the compiler supports basic C++11 syntax */ +#undef HAVE_CXX11 + +/* Define to 1 if you have the declaration of `ttyname_r', and to 0 if you + don't. */ +#undef HAVE_DECL_TTYNAME_R + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Defined if we run on some of the PCDOS like systems (DOS, Windoze. OS/2) + with special properties like no file modes */ +#undef HAVE_DOSISH_SYSTEM + +/* Define to 1 if the system has the type `error_t'. */ +#undef HAVE_ERROR_T + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#undef HAVE_FSEEKO + +/* Define to 1 if you have the `getegid' function. */ +#undef HAVE_GETEGID + +/* Define to 1 if you have the `getenv_r' function. */ +#undef HAVE_GETENV_R + +/* Define to 1 if you have the `getgid' function. */ +#undef HAVE_GETGID + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Defined if we build for an MacOS system */ +#undef HAVE_MACOS_SYSTEM + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define if the ttyname_r function has a POSIX compliant declaration. */ +#undef HAVE_POSIXDECL_TTYNAME_R + +/* Define to 1 if you have the `setenv' function. */ +#undef HAVE_SETENV + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `stpcpy' function. */ +#undef HAVE_STPCPY + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UIO_H + +/* Define if getenv() is thread-safe */ +#undef HAVE_THREAD_SAFE_GETENV + +/* Define to 1 if you have the `timegm' function. */ +#undef HAVE_TIMEGM + +/* Define if __thread is supported */ +#undef HAVE_TLS + +/* Define to 1 if you have the `ttyname_r' function. */ +#undef HAVE_TTYNAME_R + +/* Define to 1 if the system has the type `uintptr_t'. */ +#undef HAVE_UINTPTR_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Defined if we run on any kind of W32 API based system */ +#undef HAVE_W32_SYSTEM + +/* Defined if we run on a 64 bit W32 API based system */ +#undef HAVE_W64_SYSTEM + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if ttyname_r is a replacement function. */ +#undef REPLACE_TTYNAME_R + + +/* Separators as used in $PATH and file name. */ +#ifdef HAVE_DOSISH_SYSTEM +#define PATHSEP_C ';' +#define DIRSEP_C '\\' +#define DIRSEP_S "\\" +#else +#define PATHSEP_C ':' +#define DIRSEP_C '/' +#define DIRSEP_S "/" +#endif + + +/* The size of `unsigned int', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_INT + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Defined if descriptor passing is enabled and supported */ +#undef USE_DESCRIPTOR_PASSING + +/* Defined if SYS_getdents can be used on Linux */ +#undef USE_LINUX_GETDENTS + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Version number of package */ +#undef VERSION + +/* Expose all libc features (__DARWIN_C_FULL). */ +#undef _DARWIN_C_SOURCE + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +#undef _LARGEFILE_SOURCE + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* To allow the use of GPGME in multithreaded programs we have to use + special features from the library. + IMPORTANT: gpgme is not yet fully reentrant and you should use it + only from one thread. */ +#ifndef _REENTRANT +# define _REENTRANT 1 +#endif + +/* Activate POSIX interface on MacOS X */ +#undef _XOPEN_SOURCE + +/* Define to a type to use for `error_t' if it is not otherwise available. */ +#undef error_t + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `long int' if does not define. */ +#undef off_t + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +#undef uintptr_t + + +/* Definition of GCC specific attributes. */ +#if __GNUC__ > 2 +# define GPGME_GCC_A_PURE __attribute__ ((__pure__)) +#else +# define GPGME_GCC_A_PURE +#endif + +/* Under WindowsCE we need gpg-error's strerror macro. */ +#define GPG_ERR_ENABLE_ERRNO_MACROS 1 + +#define CRIGHTBLURB "Copyright (C) 2000 Werner Koch\n" \ + "Copyright (C) 2001--2018 g10 Code GmbH\n" + diff --git a/conf/whatisthis b/conf/whatisthis new file mode 100644 index 0000000..9005fe9 --- /dev/null +++ b/conf/whatisthis @@ -0,0 +1,2 @@ +Configuration files may go here. Note that config.h.in is +auto-generated so that this file is not in git. diff --git a/configure b/configure index 3584980..e2318a3 100755 --- a/configure +++ b/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gpgme 1.10.0. +# Generated by GNU Autoconf 2.69 for gpgme 1.13.1. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -275,7 +275,7 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: http://bugs.gnupg.org about your system, including any +$0: https://bugs.gnupg.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." @@ -590,9 +590,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gpgme' PACKAGE_TARNAME='gpgme' -PACKAGE_VERSION='1.10.0' -PACKAGE_STRING='gpgme 1.10.0' -PACKAGE_BUGREPORT='http://bugs.gnupg.org' +PACKAGE_VERSION='1.13.1' +PACKAGE_STRING='gpgme 1.13.1' +PACKAGE_BUGREPORT='https://bugs.gnupg.org' PACKAGE_URL='' ac_unique_file="src/gpgme.h.in" @@ -655,6 +655,7 @@ GPG_ERROR_MT_LIBS GPG_ERROR_MT_CFLAGS GPG_ERROR_LIBS GPG_ERROR_CFLAGS +GPGRT_CONFIG GPG_ERROR_CONFIG GLIBC21 LIBOBJS @@ -672,6 +673,7 @@ RUN_GPGCONF_TESTS_FALSE RUN_GPGCONF_TESTS_TRUE BUILD_TIMESTAMP BUILD_FILEVERSION +BUILD_VERSION BUILD_REVISION ENABLED_LANGUAGES PYTHONS @@ -710,8 +712,6 @@ HAVE_MACOS_SYSTEM_FALSE HAVE_MACOS_SYSTEM_TRUE HAVE_ANDROID_SYSTEM_FALSE HAVE_ANDROID_SYSTEM_TRUE -HAVE_W32CE_SYSTEM_FALSE -HAVE_W32CE_SYSTEM_TRUE HAVE_W64_SYSTEM_FALSE HAVE_W64_SYSTEM_TRUE HAVE_W32_SYSTEM_FALSE @@ -753,15 +753,6 @@ VERSION_NUMBER VERSION_MICRO VERSION_MINOR VERSION_MAJOR -LIBQGPGME_LT_REVISION -LIBQGPGME_LT_AGE -LIBQGPGME_LT_CURRENT -LIBGPGMEPP_LT_REVISION -LIBGPGMEPP_LT_AGE -LIBGPGMEPP_LT_CURRENT -LIBGPGME_LT_REVISION -LIBGPGME_LT_AGE -LIBGPGME_LT_CURRENT GITLOG_TO_CHANGELOG am__fastdepCXX_FALSE am__fastdepCXX_TRUE @@ -769,6 +760,7 @@ CXXDEPMODE ac_ct_CXX CXXFLAGS CXX +LDADD_FOR_TESTS_KLUDGE EGREP GREP CPP @@ -828,6 +820,15 @@ am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +LIBQGPGME_LT_REVISION +LIBQGPGME_LT_AGE +LIBQGPGME_LT_CURRENT +LIBGPGMEPP_LT_REVISION +LIBGPGMEPP_LT_AGE +LIBGPGMEPP_LT_CURRENT +LIBGPGME_LT_REVISION +LIBGPGME_LT_AGE +LIBGPGME_LT_CURRENT target_alias host_alias build_alias @@ -1457,7 +1458,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.10.0 to adapt to many kinds of systems. +\`configure' configures gpgme 1.13.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1527,7 +1528,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gpgme 1.10.0:";; + short | recursive ) echo "Configuration of gpgme 1.13.1:";; esac cat <<\_ACEOF @@ -1614,7 +1615,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1677,7 +1678,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gpgme configure 1.10.0 +gpgme configure 1.13.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1836,9 +1837,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------ ## -## Report this to http://bugs.gnupg.org ## -## ------------------------------------ ##" +( $as_echo "## ------------------------------------- ## +## Report this to https://bugs.gnupg.org ## +## ------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -1930,21 +1931,21 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_compile -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err + (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1953,9 +1954,12 @@ $as_echo "$ac_try_echo"; } >&5 fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 @@ -1963,26 +1967,31 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_cxx_try_compile +} # ac_fn_c_try_link -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err + (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1991,12 +2000,9 @@ $as_echo "$ac_try_echo"; } >&5 fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : + } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 @@ -2004,15 +2010,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_link +} # ac_fn_cxx_try_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- @@ -2507,7 +2508,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.10.0, which was +It was created by gpgme $as_me 1.13.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2791,6 +2792,7 @@ as_fn_append ac_header_list " locale.h" as_fn_append ac_header_list " sys/select.h" as_fn_append ac_header_list " sys/uio.h" as_fn_append ac_header_list " argp.h" +as_fn_append ac_header_list " stdint.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/time.h" as_fn_append ac_header_list " sys/types.h" @@ -2868,22 +2870,35 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # (Code changed: REVISION++) # (Interfaces added/removed/changed: CURRENT++, REVISION=0) # (Interfaces added: AGE++) -# (Interfaces removed/changed: AGE=0) +# (Interfaces removed: AGE=0) # -LIBGPGME_LT_CURRENT=30 -LIBGPGME_LT_AGE=19 -LIBGPGME_LT_REVISION=0 +LIBGPGME_LT_CURRENT=33 +LIBGPGME_LT_AGE=22 +LIBGPGME_LT_REVISION=1 # If there is an ABI break in gpgmepp or qgpgme also bump the # version in IMPORTED_LOCATION in the GpgmeppConfig-w32.cmake.in.in -LIBGPGMEPP_LT_CURRENT=11 -LIBGPGMEPP_LT_AGE=5 +LIBGPGMEPP_LT_CURRENT=16 +LIBGPGMEPP_LT_AGE=10 LIBGPGMEPP_LT_REVISION=0 LIBQGPGME_LT_CURRENT=10 LIBQGPGME_LT_AGE=3 -LIBQGPGME_LT_REVISION=0 +LIBQGPGME_LT_REVISION=4 +################################################ + + + + + + + + + + + + # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 @@ -2894,12 +2909,9 @@ NEED_LIBASSUAN_API=2 NEED_LIBASSUAN_VERSION=2.4.2 -PACKAGE=$PACKAGE_NAME -VERSION=$PACKAGE_VERSION - VERSION_MAJOR=1 -VERSION_MINOR=10 -VERSION_MICRO=0 +VERSION_MINOR=13 +VERSION_MICRO=1 ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do @@ -2932,9 +2944,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -ac_config_headers="$ac_config_headers config.h" +ac_config_headers="$ac_config_headers conf/config.h" -am__api_version='1.14' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3126,7 +3138,7 @@ else $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -3420,7 +3432,7 @@ fi # Define the identity of the package. PACKAGE='gpgme' - VERSION='1.10.0' + VERSION='1.13.1' cat >>confdefs.h <<_ACEOF @@ -3454,8 +3466,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -5149,6 +5161,38 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } +# Taken from mpfr-4.0.1, then modified for LDADD_FOR_TESTS_KLUDGE +case $host in + *-*-linux*) + if test -n "$LD_LIBRARY_PATH"; then + saved_LDFLAGS="$LDFLAGS" + LDADD_FOR_TESTS_KLUDGE="-Wl,--disable-new-dtags" + LDFLAGS="$LDFLAGS $LDADD_FOR_TESTS_KLUDGE" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether --disable-new-dtags is supported by the linker" >&5 +$as_echo_n "checking whether --disable-new-dtags is supported by the linker... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) { return 0; } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (use it since LD_LIBRARY_PATH is set)" >&5 +$as_echo "yes (use it since LD_LIBRARY_PATH is set)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LDADD_FOR_TESTS_KLUDGE="" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$saved_LDFLAGS" + fi + ;; +esac + + ac_ext=c @@ -6449,28 +6493,7 @@ test -n "$GITLOG_TO_CHANGELOG" || GITLOG_TO_CHANGELOG="gitlog-to-changelog" - - - - - - - - - - - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -VERSION_NUMBER=0x010a00 +VERSION_NUMBER=0x010d01 # We need to compile and run a program on the build machine. A @@ -17346,15 +17369,12 @@ have_w64_system=no have_macos_system=no build_w32_glib=no build_w32_qt=no -available_languages="cl cpp python python2 python3 qt" +available_languages="cl cpp python qt" default_languages="cl cpp python qt" case "${host}" in x86_64-*mingw32*) have_w64_system=yes ;; - *-mingw32ce*) - have_w32ce_system=yes - ;; *-linux-androideabi) have_android_system=yes ;; @@ -17363,7 +17383,7 @@ case "${host}" in ;; esac case "${host}" in - *-mingw32ce*|*-mingw32*) + *-mingw32*) have_dosish_system=yes have_w32_system=yes GPG_DEFAULT='c:\\gnupg\\gpg.exe' @@ -17526,7 +17546,7 @@ main () glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); @@ -17562,7 +17582,7 @@ main () printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } @@ -17628,7 +17648,7 @@ if ac_fn_c_try_link "$LINENO"; then : echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GLIB is incorrectly installed." + echo "*** exact error that occurred. This usually means GLIB is incorrectly installed." fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -17708,20 +17728,6 @@ else fi -if test "$have_w32ce_system" = yes; then - -$as_echo "#define HAVE_W32CE_SYSTEM 1" >>confdefs.h - -fi - if test "$have_w32ce_system" = yes; then - HAVE_W32CE_SYSTEM_TRUE= - HAVE_W32CE_SYSTEM_FALSE='#' -else - HAVE_W32CE_SYSTEM_TRUE='#' - HAVE_W32CE_SYSTEM_FALSE= -fi - - if test "$have_android_system" = yes; then $as_echo "#define HAVE_ANDROID_SYSTEM 1" >>confdefs.h @@ -19217,7 +19223,7 @@ fi done if test -z "$DOXYGEN"; - # This is not highlighted becase it's not really important. + # This is not highlighted because it's not really important. then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Doxygen not found - Qt binding doc will not be built." >&5 $as_echo "$as_me: WARNING: Doxygen not found - Qt binding doc will not be built." >&2;} fi @@ -19286,30 +19292,6 @@ fi # Python bindings. -name="python2" -list=$enabled_languages -found=0 - -for n in $list; do - if test "x$name" = "x$n"; then - found=1 - fi -done - -found_py2=$found - -name="python3" -list=$enabled_languages -found=0 - -for n in $list; do - if test "x$name" = "x$n"; then - found=1 - fi -done - -found_py3=$found - name="python" list=$enabled_languages found=0 @@ -19321,7 +19303,7 @@ for n in $list; do done found_py=$found -if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then +if test "$found_py" = "1"; then # Ubuntu has swig 2.0 as /usr/bin/swig2.0 for ac_prog in swig swig2.0 @@ -19450,24 +19432,25 @@ $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;} enabled_languages=$(echo $enabled_languages | sed 's/python//') fi else - # Reset all the stuff, just to be sure. + # Reset the version collecting vars. PYTHONS= PYTHON_VERSIONS= - unset PYTHON - unset PYTHON_VERSION - unset PYTHON_CPPFLAGS - unset PYTHON_LDFLAGS - unset PYTHON_SITE_PKG - unset PYTHON_EXTRA_LIBS - unset PYTHON_EXTRA_LDFLAGS - unset ac_cv_path_PYTHON - unset am_cv_pathless_PYTHON - unset am_cv_python_version - unset am_cv_python_platform - unset am_cv_python_pythondir - unset am_cv_python_pyexecdir - if test "$found_py" = "1" -o "$found_py2" = "1"; then + if test "$found_py" = "1" -o "$found_py3" = "1"; then + # Reset everything, so that we can look for another Python. + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir @@ -19509,7 +19492,7 @@ if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python2 python2.7 python python3 python3.0 python3.1 python3.2 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 none; do + for am_cv_pathless_PYTHON in python2.7 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -20085,11 +20068,7 @@ $as_echo "$as_me: WARNING: fi - fi - - if test "$found_py" = "1" -o "$found_py3" = "1"; then - # Reset everything, so that we can look for another Python. - unset PYTHON + unset PYTHON unset PYTHON_VERSION unset PYTHON_CPPFLAGS unset PYTHON_LDFLAGS @@ -20143,7 +20122,7 @@ if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python2 python2.7 python python3 python3.0 python3.1 python3.2 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 none; do + for am_cv_pathless_PYTHON in python3.4 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -20719,62 +20698,3215 @@ $as_echo "$as_me: WARNING: fi - fi - - # Recover some values lost in the second attempt to find Python. - PYTHON="$(echo $PYTHONS | cut -d ' ' -f 1)" - PYTHON_VERSION="$(echo $PYTHON_VERSIONS | cut -d ' ' -f 1)" - - # Remove duplicates. - PYTHONS="$(echo $PYTHONS | tr '[:space:]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')" - PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS | tr '[:space:]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')" - - if test "$PYTHON_VERSIONS"; then - enabled_languages_v=$(echo $enabled_languages | sed -Ee "s/python[23]?/python ($PYTHON_VERSIONS)/") - enabled_languages=$(echo $enabled_languages | sed -Ee "s/python[23]?/python/") - else - if test "$explicit_languages" = "1"; then - as_fn_error $? " -*** -*** Please install the python development packages. -***" "$LINENO" 5 - else - enabled_languages=$(echo $enabled_languages | sed 's/python//') - fi - fi - - PYTHONS=$PYTHONS - - fi -fi - -ENABLED_LANGUAGES=$enabled_languages - - -# -# Provide information about the build. -# -BUILD_REVISION="6a42eb5" + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir -cat >>confdefs.h <<_ACEOF -#define BUILD_REVISION "$BUILD_REVISION" -_ACEOF -BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` -BUILD_FILEVERSION="${BUILD_FILEVERSION}27202" -# Check whether --enable-build-timestamp was given. -if test "${enable_build_timestamp+set}" = set; then : - enableval=$enable_build_timestamp; if test "$enableval" = "yes"; then - BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` - else - BUILD_TIMESTAMP="$enableval" - fi + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.5" >&5 +$as_echo_n "checking whether $PYTHON version is >= 3.5... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.5'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - BUILD_TIMESTAMP="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.5" >&5 +$as_echo_n "checking for a Python interpreter with version >= 3.5... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python3.5 none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.5'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + + + if test "$PYTHON" = :; then + : + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + + # + # Allow the use of a (user set) custom python version + # + + + # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. +set dummy python$PYTHON_VERSION; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$PYTHON"; then + as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for a version of Python >= 2.1.0 + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver >= '2.1.0')"` + if test "$ac_supports_python_ver" != "True"; then + if test -z "$PYTHON_NOVERSIONCHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? " +This version of the AC_PYTHON_DEVEL macro +doesn't work properly with versions of Python before +2.1.0. You may need to re-run configure, setting the +variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, +PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. +Moreover, to disable this check, set PYTHON_NOVERSIONCHECK +to something else than an empty string. + +See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + # + # if the macro parameter ``version'' is set, honour it + # + if test -n ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python " >&5 +$as_echo_n "checking for a version of Python ... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver )"` + if test "$ac_supports_python_ver" = "True"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "this package requires Python . +If you have it installed, but it isn't the default Python +interpreter in your system path, please pass the PYTHON_VERSION +variable to configure. See \`\`configure --help'' for reference. +" "$LINENO" 5 + PYTHON_VERSION="" + fi + fi + + # + # Check if you have distutils, else fail + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + if test -z "$ac_distutils_result"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot import Python module \"distutils\". +Please check your Python installation. The error was: +$ac_distutils_result" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for Python include path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } + if test -z "$PYTHON_CPPFLAGS"; then + python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc (plat_specific=1));"` + if test -n "${python_path}"; then + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi + fi + PYTHON_CPPFLAGS=$python_path + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } + + + # + # Check for Python library path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } + if test -z "$PYTHON_LDFLAGS"; then + # (makes two attempts to ensure we've got a version number + # from the interpreter) + ac_python_version=`cat<&5 +$as_echo "$PYTHON_LDFLAGS" >&6; } + + + # + # Check for site packages + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } + if test -z "$PYTHON_SITE_PKG"; then + PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_lib(0,0));"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } + + + # + # libraries which must be linked in when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } + if test -z "$PYTHON_EXTRA_LIBS"; then + PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } + + + # + # linking flags needed when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } + if test -z "$PYTHON_EXTRA_LDFLAGS"; then + PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LINKFORSHARED'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } + + + # + # final check to see if everything compiles alright + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } + # save current global flags + ac_save_LIBS="$LIBS" + ac_save_CPPFLAGS="$CPPFLAGS" + LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +Py_Initialize(); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pythonexists=yes +else + pythonexists=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # turn back to default flags + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } + + if test ! "x$pythonexists" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&5 +$as_echo "$as_me: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&2;} + PYTHON_VERSION="" + fi + + # + # all done! + # + + if test "$PYTHON_VERSION"; then + PYTHONS="$(echo $PYTHONS $PYTHON)" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" + fi + + fi + + + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir + + + + + + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.6" >&5 +$as_echo_n "checking whether $PYTHON version is >= 3.6... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.6'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.6" >&5 +$as_echo_n "checking for a Python interpreter with version >= 3.6... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python3.6 none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.6'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + + + if test "$PYTHON" = :; then + : + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + + # + # Allow the use of a (user set) custom python version + # + + + # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. +set dummy python$PYTHON_VERSION; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$PYTHON"; then + as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for a version of Python >= 2.1.0 + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver >= '2.1.0')"` + if test "$ac_supports_python_ver" != "True"; then + if test -z "$PYTHON_NOVERSIONCHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? " +This version of the AC_PYTHON_DEVEL macro +doesn't work properly with versions of Python before +2.1.0. You may need to re-run configure, setting the +variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, +PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. +Moreover, to disable this check, set PYTHON_NOVERSIONCHECK +to something else than an empty string. + +See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + # + # if the macro parameter ``version'' is set, honour it + # + if test -n ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python " >&5 +$as_echo_n "checking for a version of Python ... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver )"` + if test "$ac_supports_python_ver" = "True"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "this package requires Python . +If you have it installed, but it isn't the default Python +interpreter in your system path, please pass the PYTHON_VERSION +variable to configure. See \`\`configure --help'' for reference. +" "$LINENO" 5 + PYTHON_VERSION="" + fi + fi + + # + # Check if you have distutils, else fail + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + if test -z "$ac_distutils_result"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot import Python module \"distutils\". +Please check your Python installation. The error was: +$ac_distutils_result" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for Python include path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } + if test -z "$PYTHON_CPPFLAGS"; then + python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc (plat_specific=1));"` + if test -n "${python_path}"; then + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi + fi + PYTHON_CPPFLAGS=$python_path + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } + + + # + # Check for Python library path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } + if test -z "$PYTHON_LDFLAGS"; then + # (makes two attempts to ensure we've got a version number + # from the interpreter) + ac_python_version=`cat<&5 +$as_echo "$PYTHON_LDFLAGS" >&6; } + + + # + # Check for site packages + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } + if test -z "$PYTHON_SITE_PKG"; then + PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_lib(0,0));"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } + + + # + # libraries which must be linked in when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } + if test -z "$PYTHON_EXTRA_LIBS"; then + PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } + + + # + # linking flags needed when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } + if test -z "$PYTHON_EXTRA_LDFLAGS"; then + PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LINKFORSHARED'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } + + + # + # final check to see if everything compiles alright + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } + # save current global flags + ac_save_LIBS="$LIBS" + ac_save_CPPFLAGS="$CPPFLAGS" + LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +Py_Initialize(); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pythonexists=yes +else + pythonexists=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # turn back to default flags + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } + + if test ! "x$pythonexists" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&5 +$as_echo "$as_me: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&2;} + PYTHON_VERSION="" + fi + + # + # all done! + # + + if test "$PYTHON_VERSION"; then + PYTHONS="$(echo $PYTHONS $PYTHON)" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" + fi + + fi + + + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir + + + + + + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.7" >&5 +$as_echo_n "checking whether $PYTHON version is >= 3.7... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.7'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.7" >&5 +$as_echo_n "checking for a Python interpreter with version >= 3.7... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python3.7 none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.7'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + + + if test "$PYTHON" = :; then + : + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + + # + # Allow the use of a (user set) custom python version + # + + + # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. +set dummy python$PYTHON_VERSION; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$PYTHON"; then + as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for a version of Python >= 2.1.0 + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver >= '2.1.0')"` + if test "$ac_supports_python_ver" != "True"; then + if test -z "$PYTHON_NOVERSIONCHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? " +This version of the AC_PYTHON_DEVEL macro +doesn't work properly with versions of Python before +2.1.0. You may need to re-run configure, setting the +variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, +PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. +Moreover, to disable this check, set PYTHON_NOVERSIONCHECK +to something else than an empty string. + +See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + # + # if the macro parameter ``version'' is set, honour it + # + if test -n ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python " >&5 +$as_echo_n "checking for a version of Python ... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver )"` + if test "$ac_supports_python_ver" = "True"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "this package requires Python . +If you have it installed, but it isn't the default Python +interpreter in your system path, please pass the PYTHON_VERSION +variable to configure. See \`\`configure --help'' for reference. +" "$LINENO" 5 + PYTHON_VERSION="" + fi + fi + + # + # Check if you have distutils, else fail + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + if test -z "$ac_distutils_result"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot import Python module \"distutils\". +Please check your Python installation. The error was: +$ac_distutils_result" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for Python include path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } + if test -z "$PYTHON_CPPFLAGS"; then + python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc (plat_specific=1));"` + if test -n "${python_path}"; then + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi + fi + PYTHON_CPPFLAGS=$python_path + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } + + + # + # Check for Python library path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } + if test -z "$PYTHON_LDFLAGS"; then + # (makes two attempts to ensure we've got a version number + # from the interpreter) + ac_python_version=`cat<&5 +$as_echo "$PYTHON_LDFLAGS" >&6; } + + + # + # Check for site packages + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } + if test -z "$PYTHON_SITE_PKG"; then + PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_lib(0,0));"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } + + + # + # libraries which must be linked in when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } + if test -z "$PYTHON_EXTRA_LIBS"; then + PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } + + + # + # linking flags needed when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } + if test -z "$PYTHON_EXTRA_LDFLAGS"; then + PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LINKFORSHARED'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } + + + # + # final check to see if everything compiles alright + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } + # save current global flags + ac_save_LIBS="$LIBS" + ac_save_CPPFLAGS="$CPPFLAGS" + LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +Py_Initialize(); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pythonexists=yes +else + pythonexists=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # turn back to default flags + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } + + if test ! "x$pythonexists" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&5 +$as_echo "$as_me: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&2;} + PYTHON_VERSION="" + fi + + # + # all done! + # + + if test "$PYTHON_VERSION"; then + PYTHONS="$(echo $PYTHONS $PYTHON)" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" + fi + + fi + + + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir + + + + + + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.8" >&5 +$as_echo_n "checking whether $PYTHON version is >= 3.8... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.8'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.8" >&5 +$as_echo_n "checking for a Python interpreter with version >= 3.8... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python3.8 none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.8'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + + + if test "$PYTHON" = :; then + : + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + + # + # Allow the use of a (user set) custom python version + # + + + # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. +set dummy python$PYTHON_VERSION; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$PYTHON"; then + as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for a version of Python >= 2.1.0 + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver >= '2.1.0')"` + if test "$ac_supports_python_ver" != "True"; then + if test -z "$PYTHON_NOVERSIONCHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? " +This version of the AC_PYTHON_DEVEL macro +doesn't work properly with versions of Python before +2.1.0. You may need to re-run configure, setting the +variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, +PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. +Moreover, to disable this check, set PYTHON_NOVERSIONCHECK +to something else than an empty string. + +See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + # + # if the macro parameter ``version'' is set, honour it + # + if test -n ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python " >&5 +$as_echo_n "checking for a version of Python ... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver )"` + if test "$ac_supports_python_ver" = "True"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "this package requires Python . +If you have it installed, but it isn't the default Python +interpreter in your system path, please pass the PYTHON_VERSION +variable to configure. See \`\`configure --help'' for reference. +" "$LINENO" 5 + PYTHON_VERSION="" + fi + fi + + # + # Check if you have distutils, else fail + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + if test -z "$ac_distutils_result"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot import Python module \"distutils\". +Please check your Python installation. The error was: +$ac_distutils_result" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for Python include path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } + if test -z "$PYTHON_CPPFLAGS"; then + python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc (plat_specific=1));"` + if test -n "${python_path}"; then + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi + fi + PYTHON_CPPFLAGS=$python_path + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } + + + # + # Check for Python library path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } + if test -z "$PYTHON_LDFLAGS"; then + # (makes two attempts to ensure we've got a version number + # from the interpreter) + ac_python_version=`cat<&5 +$as_echo "$PYTHON_LDFLAGS" >&6; } + + + # + # Check for site packages + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } + if test -z "$PYTHON_SITE_PKG"; then + PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_lib(0,0));"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } + + + # + # libraries which must be linked in when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } + if test -z "$PYTHON_EXTRA_LIBS"; then + PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } + + + # + # linking flags needed when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } + if test -z "$PYTHON_EXTRA_LDFLAGS"; then + PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LINKFORSHARED'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } + + + # + # final check to see if everything compiles alright + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } + # save current global flags + ac_save_LIBS="$LIBS" + ac_save_CPPFLAGS="$CPPFLAGS" + LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +Py_Initialize(); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pythonexists=yes +else + pythonexists=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # turn back to default flags + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } + + if test ! "x$pythonexists" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&5 +$as_echo "$as_me: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&2;} + PYTHON_VERSION="" + fi + + # + # all done! + # + + if test "$PYTHON_VERSION"; then + PYTHONS="$(echo $PYTHONS $PYTHON)" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" + fi + + fi + + + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir + + + + + + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= all" >&5 +$as_echo_n "checking whether $PYTHON version is >= all... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, 'all'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= all" >&5 +$as_echo_n "checking for a Python interpreter with version >= all... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in pythonall none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, 'all'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + + + if test "$PYTHON" = :; then + : + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + + # + # Allow the use of a (user set) custom python version + # + + + # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. +set dummy python$PYTHON_VERSION; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$PYTHON"; then + as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for a version of Python >= 2.1.0 + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver >= '2.1.0')"` + if test "$ac_supports_python_ver" != "True"; then + if test -z "$PYTHON_NOVERSIONCHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? " +This version of the AC_PYTHON_DEVEL macro +doesn't work properly with versions of Python before +2.1.0. You may need to re-run configure, setting the +variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, +PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. +Moreover, to disable this check, set PYTHON_NOVERSIONCHECK +to something else than an empty string. + +See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + # + # if the macro parameter ``version'' is set, honour it + # + if test -n ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python " >&5 +$as_echo_n "checking for a version of Python ... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver )"` + if test "$ac_supports_python_ver" = "True"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "this package requires Python . +If you have it installed, but it isn't the default Python +interpreter in your system path, please pass the PYTHON_VERSION +variable to configure. See \`\`configure --help'' for reference. +" "$LINENO" 5 + PYTHON_VERSION="" + fi + fi + + # + # Check if you have distutils, else fail + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + if test -z "$ac_distutils_result"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot import Python module \"distutils\". +Please check your Python installation. The error was: +$ac_distutils_result" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for Python include path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } + if test -z "$PYTHON_CPPFLAGS"; then + python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc (plat_specific=1));"` + if test -n "${python_path}"; then + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi + fi + PYTHON_CPPFLAGS=$python_path + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } + + + # + # Check for Python library path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } + if test -z "$PYTHON_LDFLAGS"; then + # (makes two attempts to ensure we've got a version number + # from the interpreter) + ac_python_version=`cat<&5 +$as_echo "$PYTHON_LDFLAGS" >&6; } + + + # + # Check for site packages + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } + if test -z "$PYTHON_SITE_PKG"; then + PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_lib(0,0));"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } + + + # + # libraries which must be linked in when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } + if test -z "$PYTHON_EXTRA_LIBS"; then + PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } + + + # + # linking flags needed when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } + if test -z "$PYTHON_EXTRA_LDFLAGS"; then + PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LINKFORSHARED'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } + + + # + # final check to see if everything compiles alright + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } + # save current global flags + ac_save_LIBS="$LIBS" + ac_save_CPPFLAGS="$CPPFLAGS" + LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +Py_Initialize(); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pythonexists=yes +else + pythonexists=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # turn back to default flags + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } + + if test ! "x$pythonexists" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&5 +$as_echo "$as_me: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&2;} + PYTHON_VERSION="" + fi + + # + # all done! + # + + if test "$PYTHON_VERSION"; then + PYTHONS="$(echo $PYTHONS $PYTHON)" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" + fi + + fi + + + + fi + + # Recover some values lost in the second attempt to find Python. + PYTHON="$(echo $PYTHONS | cut -d ' ' -f 1)" + PYTHON_VERSION="$(echo $PYTHON_VERSIONS | cut -d ' ' -f 1)" + + # Remove duplicates. + PYTHONS="$(echo $PYTHONS | tr '[:space:]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS | tr '[:space:]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')" + + if test "$PYTHON_VERSIONS"; then + enabled_languages_v=$(echo $enabled_languages | sed -Ee "s/python[23]?/python ($PYTHON_VERSIONS)/") + enabled_languages=$(echo $enabled_languages | sed -Ee "s/python[23]?/python/") + else + if test "$explicit_languages" = "1"; then + as_fn_error $? " +*** +*** Please install the python development packages. +***" "$LINENO" 5 + else + enabled_languages=$(echo $enabled_languages | sed 's/python//') + fi + fi + + PYTHONS=$PYTHONS + + fi +fi + +ENABLED_LANGUAGES=$enabled_languages + + +# +# Provide information about the build. +# +BUILD_REVISION="ea11c2a1" + + +cat >>confdefs.h <<_ACEOF +#define BUILD_REVISION "$BUILD_REVISION" +_ACEOF + + +BUILD_VERSION=`echo "$PACKAGE_VERSION" | sed 's/\([0-9.]*\).*/\1./'` +BUILD_VERSION="${BUILD_VERSION}59921" +BUILD_FILEVERSION=`echo "${BUILD_VERSION}" | tr . ,` + + + +# Check whether --enable-build-timestamp was given. +if test "${enable_build_timestamp+set}" = set; then : + enableval=$enable_build_timestamp; if test "$enableval" = "yes"; then + BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` + else + BUILD_TIMESTAMP="$enableval" + fi +else + BUILD_TIMESTAMP="" fi @@ -20886,6 +24018,8 @@ done + + # Type checks. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } @@ -21211,6 +24345,15 @@ fi +# We require uint64_t +if test "$ac_cv_header_stdint_h" != yes; then + as_fn_error $? " +*** +*** No stdint.h and thus no uint64_t type. Can't build this library. +***" "$LINENO" 5 +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 @@ -21255,16 +24398,15 @@ fi # Checks for compiler features. if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" - if test "$USE_MAINTAINER_MODE" = "yes"; then - CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security" + CFLAGS="$CFLAGS -Wno-format-y2k" - # If -Wno-missing-field-initializers is supported we can enable a - # a bunch of really useful warnings. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wno-missing-field-initializers" >&5 + # If -Wno-missing-field-initializers is supported we can expect a + # a larger set of warning options. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wno-missing-field-initializers" >&5 $as_echo_n "checking if gcc supports -Wno-missing-field-initializers... " >&6; } - _gcc_cflags_save=$CFLAGS - CFLAGS="-Wno-missing-field-initializers" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wno-missing-field-initializers" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -21281,16 +24423,23 @@ else _gcc_wopt=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_gcc_wopt" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_gcc_wopt" >&5 $as_echo "$_gcc_wopt" >&6; } - CFLAGS=$_gcc_cflags_save; + CFLAGS=$_gcc_cflags_save; + if test x"$_gcc_wopt" = xyes ; then + CFLAGS="$CFLAGS -Wno-missing-field-initializers" + CFLAGS="$CFLAGS -Wno-sign-compare" + CFLAGS="$CFLAGS -Wno-format-zero-length" + CFLAGS="$CFLAGS -Wno-format-truncation" + CFLAGS="$CFLAGS -Wno-sizeof-pointer-div" + fi + if test "$USE_MAINTAINER_MODE" = "yes"; then if test x"$_gcc_wopt" = xyes ; then CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast" CFLAGS="$CFLAGS -Wwrite-strings" CFLAGS="$CFLAGS -Wdeclaration-after-statement" - CFLAGS="$CFLAGS -Wno-missing-field-initializers" - CFLAGS="$CFLAGS -Wno-sign-compare" fi + CFLAGS="$CFLAGS -Wformat -Wformat-security" CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wpointer-arith" >&5 @@ -21662,7 +24811,7 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; } GLIBC21="$ac_cv_gnu_library_2_1" -if test $GLIBC21 = yes; then +if test $GLIBC21 = yes -o $have_w32_system = yes; then have_thread_safe_getenv=yes fi if test $have_thread_safe_getenv = yes; then @@ -21811,16 +24960,95 @@ fi min_gpg_error_version="$NEED_GPG_ERROR_VERSION" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPG Error - version >= $min_gpg_error_version" >&5 -$as_echo_n "checking for GPG Error - version >= $min_gpg_error_version... " >&6; } ok=no - if test "$GPG_ERROR_CONFIG" != "no" \ - && test -f "$GPG_ERROR_CONFIG" ; then + + if test "$prefix" = NONE ; then + prefix_option_expanded=/usr/local + else + prefix_option_expanded="$prefix" + fi + if test "$exec_prefix" = NONE ; then + exec_prefix_option_expanded=$prefix_option_expanded + else + exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix) + fi + libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir) + + if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then + gpgrt_libdir=$libdir_option_expanded + else + if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then + if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then + if test -f $possible_libdir/pkgconfig/gpg-error.pc; then + gpgrt_libdir=$possible_libdir + fi + fi + fi + fi + + if test "$GPG_ERROR_CONFIG" = "no" -a -n "$gpgrt_libdir"; then + # Extract the first word of "gpgrt-config", so it can be a program name with args. +set dummy gpgrt-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GPGRT_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GPGRT_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GPGRT_CONFIG="$GPGRT_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GPGRT_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GPGRT_CONFIG" && ac_cv_path_GPGRT_CONFIG="no" + ;; +esac +fi +GPGRT_CONFIG=$ac_cv_path_GPGRT_CONFIG +if test -n "$GPGRT_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPGRT_CONFIG" >&5 +$as_echo "$GPGRT_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$GPGRT_CONFIG" = "no"; then + unset GPGRT_CONFIG + else + GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" + if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + { $as_echo "$as_me:${as_lineno-$LINENO}: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&5 +$as_echo "$as_me: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&6;} + gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` + else + unset GPGRT_CONFIG + fi + fi + else + gpg_error_config_version=`$GPG_ERROR_CONFIG --version` + fi + if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)/\2/'` - gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` major=`echo $gpg_error_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -21834,32 +25062,102 @@ $as_echo_n "checking for GPG Error - version >= $min_gpg_error_version... " >&6; fi fi fi + if test -z "$GPGRT_CONFIG" -a -n "$gpgrt_libdir"; then + if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then + # Extract the first word of "gpgrt-config", so it can be a program name with args. +set dummy gpgrt-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GPGRT_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GPGRT_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GPGRT_CONFIG="$GPGRT_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GPGRT_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GPGRT_CONFIG" && ac_cv_path_GPGRT_CONFIG="no" + ;; +esac +fi +GPGRT_CONFIG=$ac_cv_path_GPGRT_CONFIG +if test -n "$GPGRT_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPGRT_CONFIG" >&5 +$as_echo "$GPGRT_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$GPGRT_CONFIG" = "no"; then + unset GPGRT_CONFIG + else + GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" + if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + { $as_echo "$as_me:${as_lineno-$LINENO}: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&5 +$as_echo "$as_me: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&6;} + else + unset GPGRT_CONFIG + fi + fi + fi + fi fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPG Error - version >= $min_gpg_error_version" >&5 +$as_echo_n "checking for GPG Error - version >= $min_gpg_error_version... " >&6; } if test $ok = yes; then - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` + if test -z "$GPGRT_CONFIG"; then + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` + else + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($gpg_error_config_version)" >&5 $as_echo "yes ($gpg_error_config_version)" >&6; } have_gpg_error=yes - gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none` + if test -z "$GPGRT_CONFIG"; then + gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + else + gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** -*** The config script $GPG_ERROR_CONFIG was +*** The config script \"$GPG_ERROR_CONFIG\" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. -*** You may want to use the configure option --with-gpg-error-prefix +*** You may want to use the configure option --with-libgpg-error-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&5 $as_echo "$as_me: WARNING: *** -*** The config script $GPG_ERROR_CONFIG was +*** The config script \"$GPG_ERROR_CONFIG\" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. -*** You may want to use the configure option --with-gpg-error-prefix +*** You may want to use the configure option --with-libgpg-error-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&2;} gpg_config_script_warn="$gpg_config_script_warn libgpg-error" @@ -21895,15 +25193,23 @@ else fi if test x$libassuan_config_prefix != x ; then - libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix" if test x${LIBASSUAN_CONFIG+set} != xset ; then LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config fi fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}libassuan-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}libassuan-config; ac_word=$2 + use_gpgrt_config="" + if test x"${LIBASSUAN_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if $GPGRT_CONFIG libassuan --exists; then + LIBASSUAN_CONFIG="$GPGRT_CONFIG libassuan" + { $as_echo "$as_me:${as_lineno-$LINENO}: Use gpgrt-config as libassuan-config" >&5 +$as_echo "$as_me: Use gpgrt-config as libassuan-config" >&6;} + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + # Extract the first word of "libassuan-config", so it can be a program name with args. +set dummy libassuan-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_LIBASSUAN_CONFIG+:} false; then : @@ -21929,6 +25235,7 @@ done done IFS=$as_save_IFS + test -z "$ac_cv_path_LIBASSUAN_CONFIG" && ac_cv_path_LIBASSUAN_CONFIG="no" ;; esac fi @@ -21942,63 +25249,7 @@ $as_echo "no" >&6; } fi -fi -if test -z "$ac_cv_path_LIBASSUAN_CONFIG"; then - ac_pt_LIBASSUAN_CONFIG=$LIBASSUAN_CONFIG - # Extract the first word of "libassuan-config", so it can be a program name with args. -set dummy libassuan-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_LIBASSUAN_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_LIBASSUAN_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_LIBASSUAN_CONFIG="$ac_pt_LIBASSUAN_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_LIBASSUAN_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_LIBASSUAN_CONFIG=$ac_cv_path_ac_pt_LIBASSUAN_CONFIG -if test -n "$ac_pt_LIBASSUAN_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LIBASSUAN_CONFIG" >&5 -$as_echo "$ac_pt_LIBASSUAN_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_LIBASSUAN_CONFIG" = x; then - LIBASSUAN_CONFIG="no" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIBASSUAN_CONFIG=$ac_pt_LIBASSUAN_CONFIG fi -else - LIBASSUAN_CONFIG="$ac_cv_path_LIBASSUAN_CONFIG" -fi - tmp="$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION" if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then @@ -22012,8 +25263,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBASSUAN - version >= $min_libassuan_version" >&5 $as_echo_n "checking for LIBASSUAN - version >= $min_libassuan_version... " >&6; } ok=no - if test "$LIBASSUAN_CONFIG" != "no" \ - && test -f "$LIBASSUAN_CONFIG" ; then + if test "$LIBASSUAN_CONFIG" != "no"; then req_major=`echo $min_libassuan_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'` req_minor=`echo $min_libassuan_version | \ @@ -22021,7 +25271,11 @@ $as_echo_n "checking for LIBASSUAN - version >= $min_libassuan_version... " >&6; req_micro=`echo $min_libassuan_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'` - libassuan_config_version=`$LIBASSUAN_CONFIG --version` + if test -z "$use_gpgrt_config"; then + libassuan_config_version=`$LIBASSUAN_CONFIG --version` + else + libassuan_config_version=`$LIBASSUAN_CONFIG --modversion` + fi major=`echo $libassuan_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'` minor=`echo $libassuan_config_version | \ @@ -22056,7 +25310,11 @@ $as_echo "no" >&6; } if test $ok = yes; then if test "$req_libassuan_api" -gt 0 ; then - tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`$LIBASSUAN_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBASSUAN API version" >&5 $as_echo_n "checking LIBASSUAN API version... " >&6; } @@ -22074,12 +25332,16 @@ $as_echo "does not match. want=$req_libassuan_api got=$tmp." >&6; } if test $ok = yes; then if test x"$host" != x ; then - libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none` + else + libassuan_config_host=`$LIBASSUAN_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$libassuan_config_host" != xnone ; then if test x"$libassuan_config_host" != x"$host" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** -*** The config script $LIBASSUAN_CONFIG was +*** The config script \"$LIBASSUAN_CONFIG\" was *** built for $libassuan_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libassuan-prefix @@ -22087,7 +25349,7 @@ $as_echo "does not match. want=$req_libassuan_api got=$tmp." >&6; } ***" >&5 $as_echo "$as_me: WARNING: *** -*** The config script $LIBASSUAN_CONFIG was +*** The config script \"$LIBASSUAN_CONFIG\" was *** built for $libassuan_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libassuan-prefix @@ -22099,8 +25361,8 @@ $as_echo "$as_me: WARNING: fi if test $ok = yes; then - LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags` - LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs` + LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG --cflags` + LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG --libs` have_libassuan=yes else LIBASSUAN_CFLAGS="" @@ -22325,14 +25587,14 @@ if test "$have_gpg_error" = "no"; then *** *** You need libgpg-error to build this program. ** This library is for example available at -*** ftp://ftp.gnupg.org/gcrypt/libgpg-error +*** https://www.gnupg.org/ftp/gcrypt/libgpg-error/ *** (at least version $NEED_GPG_ERROR_VERSION is required.) ***" >&5 $as_echo "$as_me: *** *** You need libgpg-error to build this program. ** This library is for example available at -*** ftp://ftp.gnupg.org/gcrypt/libgpg-error +*** https://www.gnupg.org/ftp/gcrypt/libgpg-error/ *** (at least version $NEED_GPG_ERROR_VERSION is required.) ***" >&6;} fi @@ -22342,14 +25604,14 @@ if test "$have_libassuan" = "no"; then *** *** You need libassuan to build this program. *** This library is for example available at -*** ftp://ftp.gnupg.org/gcrypt/libassuan/ +*** https://www.gnupg.org/ftp/gcrypt/libassuan/ *** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required). ***" >&5 $as_echo "$as_me: *** *** You need libassuan to build this program. *** This library is for example available at -*** ftp://ftp.gnupg.org/gcrypt/libassuan/ +*** https://www.gnupg.org/ftp/gcrypt/libassuan/ *** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required). ***" >&6;} fi @@ -22366,12 +25628,14 @@ fi # # Create config files -ac_config_files="$ac_config_files Makefile src/Makefile tests/Makefile tests/gpg/Makefile tests/gpgsm/Makefile tests/opassuan/Makefile doc/Makefile src/versioninfo.rc src/gpgme.h" +ac_config_files="$ac_config_files Makefile src/Makefile tests/Makefile tests/gpg/Makefile tests/gpgsm/Makefile tests/opassuan/Makefile tests/json/Makefile doc/Makefile src/versioninfo.rc src/gpgme.pc src/gpgme-glib.pc src/gpgme.h" ac_config_files="$ac_config_files src/gpgme-config" ac_config_files="$ac_config_files lang/cpp/Makefile lang/cpp/src/Makefile" +ac_config_files="$ac_config_files lang/cpp/tests/Makefile" + ac_config_files="$ac_config_files lang/cpp/src/GpgmeppConfig-w32.cmake.in" ac_config_files="$ac_config_files lang/cpp/src/GpgmeppConfig.cmake.in" @@ -22398,9 +25662,11 @@ if test -z "$HAVE_DOXYGEN_TRUE"; then : ac_config_files="$ac_config_files lang/qt/doc/Doxyfile" fi +ac_config_files="$ac_config_files lang/js/Makefile lang/js/src/Makefile lang/js/BrowserTestExtension/Makefile lang/js/DemoExtension/Makefile" + ac_config_files="$ac_config_files lang/qt/doc/Makefile" -ac_config_files="$ac_config_files lang/python/Makefile lang/python/version.py lang/python/tests/Makefile" +ac_config_files="$ac_config_files lang/python/Makefile lang/python/version.py lang/python/tests/Makefile lang/python/src/Makefile lang/python/examples/Makefile lang/python/doc/Makefile" ac_config_files="$ac_config_files lang/python/setup.py" @@ -22565,10 +25831,6 @@ if test -z "${HAVE_W64_SYSTEM_TRUE}" && test -z "${HAVE_W64_SYSTEM_FALSE}"; then as_fn_error $? "conditional \"HAVE_W64_SYSTEM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_W32CE_SYSTEM_TRUE}" && test -z "${HAVE_W32CE_SYSTEM_FALSE}"; then - as_fn_error $? "conditional \"HAVE_W32CE_SYSTEM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_ANDROID_SYSTEM_TRUE}" && test -z "${HAVE_ANDROID_SYSTEM_FALSE}"; then as_fn_error $? "conditional \"HAVE_ANDROID_SYSTEM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -23006,7 +26268,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.10.0, which was +This file was extended by gpgme $as_me 1.13.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23066,13 +26328,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _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.10.0 +gpgme config.status 1.13.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -23664,7 +26926,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "conf/config.h") CONFIG_HEADERS="$CONFIG_HEADERS conf/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -23673,12 +26935,16 @@ do "tests/gpg/Makefile") CONFIG_FILES="$CONFIG_FILES tests/gpg/Makefile" ;; "tests/gpgsm/Makefile") CONFIG_FILES="$CONFIG_FILES tests/gpgsm/Makefile" ;; "tests/opassuan/Makefile") CONFIG_FILES="$CONFIG_FILES tests/opassuan/Makefile" ;; + "tests/json/Makefile") CONFIG_FILES="$CONFIG_FILES tests/json/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/versioninfo.rc") CONFIG_FILES="$CONFIG_FILES src/versioninfo.rc" ;; + "src/gpgme.pc") CONFIG_FILES="$CONFIG_FILES src/gpgme.pc" ;; + "src/gpgme-glib.pc") CONFIG_FILES="$CONFIG_FILES src/gpgme-glib.pc" ;; "src/gpgme.h") CONFIG_FILES="$CONFIG_FILES src/gpgme.h" ;; "src/gpgme-config") CONFIG_FILES="$CONFIG_FILES src/gpgme-config" ;; "lang/cpp/Makefile") CONFIG_FILES="$CONFIG_FILES lang/cpp/Makefile" ;; "lang/cpp/src/Makefile") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/Makefile" ;; + "lang/cpp/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lang/cpp/tests/Makefile" ;; "lang/cpp/src/GpgmeppConfig-w32.cmake.in") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/GpgmeppConfig-w32.cmake.in" ;; "lang/cpp/src/GpgmeppConfig.cmake.in") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/GpgmeppConfig.cmake.in" ;; "lang/cpp/src/GpgmeppConfigVersion.cmake") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/GpgmeppConfigVersion.cmake" ;; @@ -23694,10 +26960,17 @@ do "lang/cl/Makefile") CONFIG_FILES="$CONFIG_FILES lang/cl/Makefile" ;; "lang/cl/gpgme.asd") CONFIG_FILES="$CONFIG_FILES lang/cl/gpgme.asd" ;; "lang/qt/doc/Doxyfile") CONFIG_FILES="$CONFIG_FILES lang/qt/doc/Doxyfile" ;; + "lang/js/Makefile") CONFIG_FILES="$CONFIG_FILES lang/js/Makefile" ;; + "lang/js/src/Makefile") CONFIG_FILES="$CONFIG_FILES lang/js/src/Makefile" ;; + "lang/js/BrowserTestExtension/Makefile") CONFIG_FILES="$CONFIG_FILES lang/js/BrowserTestExtension/Makefile" ;; + "lang/js/DemoExtension/Makefile") CONFIG_FILES="$CONFIG_FILES lang/js/DemoExtension/Makefile" ;; "lang/qt/doc/Makefile") CONFIG_FILES="$CONFIG_FILES lang/qt/doc/Makefile" ;; "lang/python/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/Makefile" ;; "lang/python/version.py") CONFIG_FILES="$CONFIG_FILES lang/python/version.py" ;; "lang/python/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/tests/Makefile" ;; + "lang/python/src/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/src/Makefile" ;; + "lang/python/examples/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/examples/Makefile" ;; + "lang/python/doc/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/doc/Makefile" ;; "lang/python/setup.py") CONFIG_FILES="$CONFIG_FILES lang/python/setup.py" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -25384,7 +28657,7 @@ fi echo " GPGME v${VERSION} has been configured as follows: - Revision: 6a42eb5 (27202) + Revision: ea11c2a1 (59921) Platform: $host UI Server: $uiserver diff --git a/configure.ac b/configure.ac index 6ea4bcd..7bc0604 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,6 @@ # configure.ac for GPGME # Copyright (C) 2000 Werner Koch (dd9jn) -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -# 2009, 2010, 2011, 2012, 2013, 2014, 2015 g10 Code GmbH +# Copyright (C) 2001-2018 g10 Code GmbH # # This file is part of GPGME. # @@ -15,8 +14,9 @@ # 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, see . +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later # (Process this file with autoconf to produce a configure script.) AC_PREREQ(2.59) @@ -27,48 +27,57 @@ min_automake_version="1.14" # bump the version number immediately after the release and do another # commit and push so that the git magic is able to work. See below # for the LT versions. -m4_define(mym4_version_major, [1]) -m4_define(mym4_version_minor, [10]) -m4_define(mym4_version_micro, [0]) - -# Below is m4 magic to extract and compute the revision number, the -# decimalized short revision number, a beta version string, and a flag -# indicating a development version (mym4_isgit). Note that the m4 -# processing is done by autoconf and not during the configure run. -m4_define(mym4_version, - [mym4_version_major.mym4_version_minor.mym4_version_micro]) -m4_define([mym4_revision], - m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r'])) -m4_define([mym4_revision_dec], - m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))])) -m4_define([mym4_betastring], - m4_esyscmd_s([git describe --match 'gpgme-[0-9].*[0-9]' --long|\ - awk -F- '$3!=0{print"-beta"$3}'])) -m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes])) -m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) - -AC_INIT([gpgme],[mym4_full_version],[http://bugs.gnupg.org]) +m4_define([mym4_package],[gpgme]) +m4_define([mym4_major], [1]) +m4_define([mym4_minor], [13]) +m4_define([mym4_micro], [1]) + +# Below is m4 magic to extract and compute the git revision number, +# the decimalized short revision number, a beta version string and a +# flag indicating a development version (mym4_isbeta). Note that the +# m4 processing is done by autoconf and not during the configure run. +m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \ + mym4_package mym4_major mym4_minor mym4_micro),[:])) +m4_define([mym4_isbeta], m4_argn(2, mym4_verslist)) +m4_define([mym4_version], m4_argn(4, mym4_verslist)) +m4_define([mym4_revision], m4_argn(7, mym4_verslist)) +m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist)) +m4_esyscmd([echo ]mym4_version[>VERSION]) +AC_INIT([mym4_package],[mym4_version], [https://bugs.gnupg.org]) # LT Version numbers, remember to change them just *before* a release. # (Code changed: REVISION++) # (Interfaces added/removed/changed: CURRENT++, REVISION=0) # (Interfaces added: AGE++) -# (Interfaces removed/changed: AGE=0) +# (Interfaces removed: AGE=0) # -LIBGPGME_LT_CURRENT=30 -LIBGPGME_LT_AGE=19 -LIBGPGME_LT_REVISION=0 +LIBGPGME_LT_CURRENT=33 +LIBGPGME_LT_AGE=22 +LIBGPGME_LT_REVISION=1 # If there is an ABI break in gpgmepp or qgpgme also bump the # version in IMPORTED_LOCATION in the GpgmeppConfig-w32.cmake.in.in -LIBGPGMEPP_LT_CURRENT=11 -LIBGPGMEPP_LT_AGE=5 +LIBGPGMEPP_LT_CURRENT=16 +LIBGPGMEPP_LT_AGE=10 LIBGPGMEPP_LT_REVISION=0 LIBQGPGME_LT_CURRENT=10 LIBQGPGME_LT_AGE=3 -LIBQGPGME_LT_REVISION=0 +LIBQGPGME_LT_REVISION=4 +################################################ + +AC_SUBST(LIBGPGME_LT_CURRENT) +AC_SUBST(LIBGPGME_LT_AGE) +AC_SUBST(LIBGPGME_LT_REVISION) + +AC_SUBST(LIBGPGMEPP_LT_CURRENT) +AC_SUBST(LIBGPGMEPP_LT_AGE) +AC_SUBST(LIBGPGMEPP_LT_REVISION) + +AC_SUBST(LIBQGPGME_LT_CURRENT) +AC_SUBST(LIBQGPGME_LT_AGE) +AC_SUBST(LIBQGPGME_LT_REVISION) # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 @@ -79,17 +88,14 @@ NEED_LIBASSUAN_API=2 NEED_LIBASSUAN_VERSION=2.4.2 -PACKAGE=$PACKAGE_NAME -VERSION=$PACKAGE_VERSION - -VERSION_MAJOR=mym4_version_major -VERSION_MINOR=mym4_version_minor -VERSION_MICRO=mym4_version_micro +VERSION_MAJOR=mym4_major +VERSION_MINOR=mym4_minor +VERSION_MICRO=mym4_micro AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR(src/gpgme.h.in) -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADER(conf/config.h) AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip]) AM_MAINTAINER_MODE AC_CANONICAL_HOST @@ -99,6 +105,41 @@ AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory]) # Enable GNU extensions on systems that have them. AC_GNU_SOURCE +# Taken from mpfr-4.0.1, then modified for LDADD_FOR_TESTS_KLUDGE +dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH +dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has +dnl the precedence over the run path, so that if a compatible MPFR library +dnl is installed in some directory from $LD_LIBRARY_PATH, then the tested +dnl MPFR library will be this library instead of the MPFR library from the +dnl build tree. Other OS with the same issue might be added later. +dnl +dnl References: +dnl https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859732 +dnl http://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html +dnl +dnl We need to check whether --disable-new-dtags is supported as alternate +dnl linkers may be used (e.g., with tcc: CC=tcc LD=tcc). +dnl +case $host in + *-*-linux*) + if test -n "$LD_LIBRARY_PATH"; then + saved_LDFLAGS="$LDFLAGS" + LDADD_FOR_TESTS_KLUDGE="-Wl,--disable-new-dtags" + LDFLAGS="$LDFLAGS $LDADD_FOR_TESTS_KLUDGE" + AC_MSG_CHECKING(whether --disable-new-dtags is supported by the linker) + AC_LINK_IFELSE([AC_LANG_SOURCE([[ +int main (void) { return 0; } + ]])], + [AC_MSG_RESULT(yes (use it since LD_LIBRARY_PATH is set))], + [AC_MSG_RESULT(no) + LDADD_FOR_TESTS_KLUDGE="" + ]) + LDFLAGS="$saved_LDFLAGS" + fi + ;; +esac +AC_SUBST([LDADD_FOR_TESTS_KLUDGE]) + AH_VERBATIM([_REENTRANT], [/* To allow the use of GPGME in multithreaded programs we have to use special features from the library. @@ -115,25 +156,12 @@ AC_PROG_CXX # Note: A suitable gitlog-to-changelog script can be found in GnuPG master. AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog, [gitlog-to-changelog]) -AC_SUBST(LIBGPGME_LT_CURRENT) -AC_SUBST(LIBGPGME_LT_AGE) -AC_SUBST(LIBGPGME_LT_REVISION) -AC_SUBST(LIBGPGMEPP_LT_CURRENT) -AC_SUBST(LIBGPGMEPP_LT_AGE) -AC_SUBST(LIBGPGMEPP_LT_REVISION) -AC_SUBST(LIBQGPGME_LT_CURRENT) -AC_SUBST(LIBQGPGME_LT_AGE) -AC_SUBST(LIBQGPGME_LT_REVISION) - -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) AC_SUBST(VERSION_MAJOR) AC_SUBST(VERSION_MINOR) AC_SUBST(VERSION_MICRO) -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) -VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_version_major \ - mym4_version_minor mym4_version_micro) + +VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \ + mym4_minor mym4_micro) AC_SUBST(VERSION_NUMBER) # We need to compile and run a program on the build machine. A @@ -188,15 +216,12 @@ have_w64_system=no have_macos_system=no build_w32_glib=no build_w32_qt=no -available_languages="cl cpp python python2 python3 qt" +available_languages="cl cpp python qt" default_languages="cl cpp python qt" case "${host}" in x86_64-*mingw32*) have_w64_system=yes ;; - *-mingw32ce*) - have_w32ce_system=yes - ;; *-linux-androideabi) have_android_system=yes ;; @@ -205,7 +230,7 @@ case "${host}" in ;; esac case "${host}" in - *-mingw32ce*|*-mingw32*) + *-mingw32*) have_dosish_system=yes have_w32_system=yes GPG_DEFAULT='c:\\gnupg\\gpg.exe' @@ -249,12 +274,6 @@ if test "$have_w64_system" = yes; then fi AM_CONDITIONAL(HAVE_W64_SYSTEM, test "$have_w64_system" = yes) -if test "$have_w32ce_system" = yes; then - AC_DEFINE(HAVE_W32CE_SYSTEM,1, - [Defined if we run on a W32 CE API based system]) -fi -AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes) - if test "$have_android_system" = yes; then AC_DEFINE(HAVE_ANDROID_SYSTEM,1, [Defined if we build for an Android system]) fi @@ -364,7 +383,7 @@ if test "$found" = "1"; then AC_CHECK_PROGS([DOXYGEN], [doxygen]) if test -z "$DOXYGEN"; - # This is not highlighted becase it's not really important. + # This is not highlighted because it's not really important. then AC_MSG_WARN([Doxygen not found - Qt binding doc will not be built.]) fi AC_CHECK_PROGS([GRAPHVIZ], [dot]) @@ -383,13 +402,9 @@ fi AC_SUBST(HAVE_DOT) # Python bindings. -LIST_MEMBER("python2", $enabled_languages) -found_py2=$found -LIST_MEMBER("python3", $enabled_languages) -found_py3=$found LIST_MEMBER("python", $enabled_languages) found_py=$found -if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then +if test "$found_py" = "1"; then AX_PKG_SWIG if test -z "$SWIG"; then if test "$explicit_languages" = "1"; then @@ -401,36 +416,15 @@ if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then enabled_languages=$(echo $enabled_languages | sed 's/python//') fi else - # Reset all the stuff, just to be sure. + # Reset the version collecting vars. PYTHONS= PYTHON_VERSIONS= - unset PYTHON - unset PYTHON_VERSION - unset PYTHON_CPPFLAGS - unset PYTHON_LDFLAGS - unset PYTHON_SITE_PKG - unset PYTHON_EXTRA_LIBS - unset PYTHON_EXTRA_LDFLAGS - unset ac_cv_path_PYTHON - unset am_cv_pathless_PYTHON - unset am_cv_python_version - unset am_cv_python_platform - unset am_cv_python_pythondir - unset am_cv_python_pyexecdir - - if test "$found_py" = "1" -o "$found_py2" = "1"; then - AM_PATH_PYTHON([2.7], [ - AX_PYTHON_DEVEL - if test "$PYTHON_VERSION"; then - PYTHONS="$(echo $PYTHONS $PYTHON)" - PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" - fi - ], :) - fi if test "$found_py" = "1" -o "$found_py3" = "1"; then - # Reset everything, so that we can look for another Python. - unset PYTHON + # Reset everything, so that we can look for another Python. + m4_foreach([mym4pythonver], + [[2.7],[3.4],[3.5],[3.6],[3.7],[3.8],[all]], + [unset PYTHON unset PYTHON_VERSION unset PYTHON_CPPFLAGS unset PYTHON_LDFLAGS @@ -443,13 +437,14 @@ if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then unset am_cv_python_platform unset am_cv_python_pythondir unset am_cv_python_pyexecdir - AM_PATH_PYTHON([3.4], [ + AM_PATH_PYTHON(mym4pythonver, [ AX_PYTHON_DEVEL if test "$PYTHON_VERSION"; then PYTHONS="$(echo $PYTHONS $PYTHON)" PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" fi - ], :) + ], :, m4_if([mym4pythonver],[all],[],[python]mym4pythonver)) + ]) fi # Recover some values lost in the second attempt to find Python. @@ -489,9 +484,11 @@ AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION", [GIT commit id revision used to build this package]) changequote(,)dnl -BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` +BUILD_VERSION=`echo "$PACKAGE_VERSION" | sed 's/\([0-9.]*\).*/\1./'` changequote([,])dnl -BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec" +BUILD_VERSION="${BUILD_VERSION}mym4_revision_dec" +BUILD_FILEVERSION=`echo "${BUILD_VERSION}" | tr . ,` +AC_SUBST(BUILD_VERSION) AC_SUBST(BUILD_FILEVERSION) AC_ARG_ENABLE([build-timestamp], @@ -538,7 +535,7 @@ AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes") # Checks for header files. -AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h +AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h stdint.h unistd.h sys/time.h sys/types.h sys/stat.h]) @@ -549,6 +546,15 @@ AC_SYS_LARGEFILE AC_TYPE_OFF_T AC_TYPE_UINTPTR_T +# We require uint64_t +if test "$ac_cv_header_stdint_h" != yes; then + AC_MSG_ERROR([[ +*** +*** No stdint.h and thus no uint64_t type. Can't build this library. +***]]) +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 @@ -593,24 +599,30 @@ AM_SUBST_NOTMAKE(API__SSIZE_T) # Checks for compiler features. if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" + CFLAGS="$CFLAGS -Wno-format-y2k" + + # If -Wno-missing-field-initializers is supported we can expect a + # a larger set of warning options. + AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers]) + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wno-missing-field-initializers" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) + AC_MSG_RESULT($_gcc_wopt) + CFLAGS=$_gcc_cflags_save; + if test x"$_gcc_wopt" = xyes ; then + CFLAGS="$CFLAGS -Wno-missing-field-initializers" + CFLAGS="$CFLAGS -Wno-sign-compare" + CFLAGS="$CFLAGS -Wno-format-zero-length" + CFLAGS="$CFLAGS -Wno-format-truncation" + CFLAGS="$CFLAGS -Wno-sizeof-pointer-div" + fi if test "$USE_MAINTAINER_MODE" = "yes"; then - CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security" - - # If -Wno-missing-field-initializers is supported we can enable a - # a bunch of really useful warnings. - AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers]) - _gcc_cflags_save=$CFLAGS - CFLAGS="-Wno-missing-field-initializers" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) - AC_MSG_RESULT($_gcc_wopt) - CFLAGS=$_gcc_cflags_save; if test x"$_gcc_wopt" = xyes ; then CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast" CFLAGS="$CFLAGS -Wwrite-strings" CFLAGS="$CFLAGS -Wdeclaration-after-statement" - CFLAGS="$CFLAGS -Wno-missing-field-initializers" - CFLAGS="$CFLAGS -Wno-sign-compare" fi + CFLAGS="$CFLAGS -Wformat -Wformat-security" CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow" AC_MSG_CHECKING([if gcc supports -Wpointer-arith]) @@ -656,7 +668,7 @@ fi # Try to find a thread-safe version of getenv(). have_thread_safe_getenv=no jm_GLIBC21 -if test $GLIBC21 = yes; then +if test $GLIBC21 = yes -o $have_w32_system = yes; then have_thread_safe_getenv=yes fi if test $have_thread_safe_getenv = yes; then @@ -810,7 +822,7 @@ AH_BOTTOM([ #define GPG_ERR_ENABLE_ERRNO_MACROS 1 #define CRIGHTBLURB "Copyright (C) 2000 Werner Koch\n" \ - "Copyright (C) 2001--2017 g10 Code GmbH\n" + "Copyright (C) 2001--2018 g10 Code GmbH\n" ]) @@ -851,7 +863,7 @@ if test "$have_gpg_error" = "no"; then *** *** You need libgpg-error to build this program. ** This library is for example available at -*** ftp://ftp.gnupg.org/gcrypt/libgpg-error +*** https://www.gnupg.org/ftp/gcrypt/libgpg-error/ *** (at least version $NEED_GPG_ERROR_VERSION is required.) ***]]) fi @@ -861,7 +873,7 @@ if test "$have_libassuan" = "no"; then *** *** You need libassuan to build this program. *** This library is for example available at -*** ftp://ftp.gnupg.org/gcrypt/libassuan/ +*** https://www.gnupg.org/ftp/gcrypt/libassuan/ *** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required). ***]]) fi @@ -883,11 +895,15 @@ AC_CONFIG_FILES(Makefile src/Makefile tests/gpg/Makefile tests/gpgsm/Makefile tests/opassuan/Makefile + tests/json/Makefile doc/Makefile src/versioninfo.rc + src/gpgme.pc + src/gpgme-glib.pc src/gpgme.h) AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile) +AC_CONFIG_FILES(lang/cpp/tests/Makefile) AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in) AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in) AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfigVersion.cmake) @@ -900,10 +916,16 @@ AC_CONFIG_FILES(lang/qt/tests/Makefile) AC_CONFIG_FILES(lang/qt/src/qgpgme_version.h) AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd]) AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([lang/qt/doc/Doxyfile])]) +AC_CONFIG_FILES([lang/js/Makefile lang/js/src/Makefile + lang/js/BrowserTestExtension/Makefile + lang/js/DemoExtension/Makefile]) AC_CONFIG_FILES(lang/qt/doc/Makefile) AC_CONFIG_FILES([lang/python/Makefile lang/python/version.py - lang/python/tests/Makefile]) + lang/python/tests/Makefile + lang/python/src/Makefile + lang/python/examples/Makefile + lang/python/doc/Makefile]) AC_CONFIG_FILES([lang/python/setup.py], [chmod a+x lang/python/setup.py]) AC_OUTPUT diff --git a/doc/ChangeLog-2011 b/doc/ChangeLog-2011 index e270fae..ac93421 100644 --- a/doc/ChangeLog-2011 +++ b/doc/ChangeLog-2011 @@ -700,7 +700,7 @@ 2002-05-26 Marcus Brinkmann - * gpgme.texi: Some typographical correctons throughout. + * gpgme.texi: Some typographical corrections throughout. 2002-05-09 Marcus Brinkmann @@ -720,7 +720,7 @@ * gpgme.texi (Manipulating Data Buffers): Changed some data types to void*. (Protocol Selection): Added gpgme_get_protocol. - (Verify): Updated to include the new attribute fucntions and + (Verify): Updated to include the new attribute functions and status codes. 2002-04-27 Werner Koch @@ -839,7 +839,7 @@ 2002-01-29 Marcus Brinkmann * gpgme.texi (Run Control): New section. - (Verify): Docuent gpgme_get_notation. + (Verify): Document gpgme_get_notation. (More Information): New section describing gpgme_get_op_info. 2002-01-22 Marcus Brinkmann @@ -865,7 +865,7 @@ * gpgme.texi (Top): Complete detailmenu. - * gpgme.texi: Convert embarassing cruft to the real thing. + * gpgme.texi: Convert embarrassing cruft to the real thing. 2002-01-16 Marcus Brinkmann diff --git a/doc/Makefile.am b/doc/Makefile.am index 905f953..f722980 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -14,8 +14,8 @@ # Public License for more details. # # You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later ## Process this file with automake to produce Makefile.in @@ -23,7 +23,8 @@ DISTCLEANFILES = gpgme.tmp CLEANFILES = mkdefsinc defs.inc EXTRA_DIST = module-overview.sk HACKING DCO ChangeLog-2011 \ - mkdefsinc.c defsincdate + mkdefsinc.c defsincdate \ + examples/gpgme-mozilla.json examples/gpgme-chrome.json BUILT_SOURCES = defsincdate defs.inc @@ -33,9 +34,9 @@ gpgme_TEXINFOS = uiserver.texi lesser.texi gpl.texi gpgme.texi : defs.inc -mkdefsinc: mkdefsinc.c Makefile ../config.h - $(CC_FOR_BUILD) -I. -I.. -I$(srcdir) $(AM_CPPFLAGS) \ - -o $@ $(srcdir)/mkdefsinc.c +mkdefsinc: mkdefsinc.c Makefile $(top_builddir)/conf/config.h + $(CC_FOR_BUILD) -I. -I$(top_builddir)/conf -I$(srcdir) \ + $(AM_CPPFLAGS) -o $@ $(srcdir)/mkdefsinc.c dist-hook: defsincdate @@ -59,4 +60,3 @@ online: gpgme.html gpgme.pdf (cd gpgme.html && rsync -vr --exclude='.svn' . \ $${user}@ftp.gnupg.org:webspace/manuals/gpgme/ ); \ rsync -v gpgme.pdf $${user}@ftp.gnupg.org:webspace/manuals/ - diff --git a/doc/Makefile.in b/doc/Makefile.in index 3c1a9d1..c107e8d 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -30,10 +30,20 @@ # Public License for more details. # # You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -97,9 +107,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/build-aux/mkinstalldirs $(gpgme_TEXINFOS) \ - $(top_srcdir)/build-aux/texinfo.tex mdate-sh texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 \ @@ -114,8 +121,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_HEADER = $(top_builddir)/conf/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -207,6 +215,9 @@ am__uninstall_files_from_dir = { \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(gpgme_TEXINFOS) $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/mkinstalldirs \ + $(top_srcdir)/build-aux/texinfo.tex mdate-sh texinfo.tex DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -220,6 +231,7 @@ AWK = @AWK@ BUILD_FILEVERSION = @BUILD_FILEVERSION@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +BUILD_VERSION = @BUILD_VERSION@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ @@ -260,6 +272,7 @@ GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ GPGME_QT_LIBS = @GPGME_QT_LIBS@ +GPGRT_CONFIG = @GPGRT_CONFIG@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ @@ -275,6 +288,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ +LDADD_FOR_TESTS_KLUDGE = @LDADD_FOR_TESTS_KLUDGE@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ @@ -405,7 +419,8 @@ top_srcdir = @top_srcdir@ DISTCLEANFILES = gpgme.tmp CLEANFILES = mkdefsinc defs.inc EXTRA_DIST = module-overview.sk HACKING DCO ChangeLog-2011 \ - mkdefsinc.c defsincdate + mkdefsinc.c defsincdate \ + examples/gpgme-mozilla.json examples/gpgme-chrome.json BUILT_SOURCES = defsincdate defs.inc info_TEXINFOS = gpgme.texi @@ -427,7 +442,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -851,12 +865,14 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am +.PRECIOUS: Makefile + gpgme.texi : defs.inc -mkdefsinc: mkdefsinc.c Makefile ../config.h - $(CC_FOR_BUILD) -I. -I.. -I$(srcdir) $(AM_CPPFLAGS) \ - -o $@ $(srcdir)/mkdefsinc.c +mkdefsinc: mkdefsinc.c Makefile $(top_builddir)/conf/config.h + $(CC_FOR_BUILD) -I. -I$(top_builddir)/conf -I$(srcdir) \ + $(AM_CPPFLAGS) -o $@ $(srcdir)/mkdefsinc.c dist-hook: defsincdate diff --git a/doc/defsincdate b/doc/defsincdate index 6a1f09f..730557d 100644 --- a/doc/defsincdate +++ b/doc/defsincdate @@ -1 +1 @@ -1512709151 +1543830060 diff --git a/doc/examples/gpgme-chrome.json b/doc/examples/gpgme-chrome.json new file mode 100644 index 0000000..d250ecb --- /dev/null +++ b/doc/examples/gpgme-chrome.json @@ -0,0 +1,9 @@ +{ + "name": "gpgmejson", + "description": "Integration with GnuPG", + "path": "/usr/bin/gpgme-json", + "type": "stdio", + "allowed_origins": [ + "chrome-extension://kajibbejlbohfaggdiogboambcijhkke/" + ] +} diff --git a/doc/examples/gpgme-mozilla.json b/doc/examples/gpgme-mozilla.json new file mode 100644 index 0000000..493b398 --- /dev/null +++ b/doc/examples/gpgme-mozilla.json @@ -0,0 +1,9 @@ +{ + "name": "gpgmejson", + "description": "Integration with GnuPG", + "path": "/usr/bin/gpgme-json", + "type": "stdio", + "allowed_extensions": [ + "jid1-AQqSMBYb0a8ADg@jetpack" + ] +} diff --git a/doc/gpgme.info b/doc/gpgme.info index 82aeb5b..af49f31 100644 --- a/doc/gpgme.info +++ b/doc/gpgme.info @@ -1,6 +1,6 @@ This is gpgme.info, produced by makeinfo version 6.3 from gpgme.texi. -Copyright © 2002–2008, 2010, 2012–2017 g10 Code GmbH. +Copyright © 2002–2008, 2010, 2012–2018 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -19,10 +19,10 @@ END-INFO-DIR-ENTRY This file documents the GPGME library. - This is Edition 1.10.0, last updated 8 December 2017, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.10.0. + This is Edition 1.12.1-beta100, last updated 3 December 2018, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.12.1-beta100. - Copyright © 2002–2008, 2010, 2012–2017 g10 Code GmbH. + Copyright © 2002–2008, 2010, 2012–2018 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -37,130 +37,132 @@ Public License for more details.  Indirect: -gpgme.info-1: 1673 -gpgme.info-2: 302282 +gpgme.info-1: 1689 +gpgme.info-2: 301885  Tag Table: (Indirect) -Node: Top1673 -Node: Introduction9267 -Node: Getting Started10057 -Node: Features11518 -Node: Overview12830 -Node: Preparation13939 -Node: Header14936 -Node: Building the Source15683 -Node: Largefile Support (LFS)17827 -Node: Using Automake23243 -Node: Using Libtool25796 -Node: Library Version Check26158 -Node: Signal Handling32218 -Node: Multi-Threading33488 -Ref: Multi-Threading-Footnote-134904 -Node: Protocols and Engines35327 -Node: Engine Version Check38078 -Node: Engine Information40601 -Node: Engine Configuration44461 -Node: OpenPGP45765 -Node: Cryptographic Message Syntax46105 -Node: Assuan46418 -Node: Algorithms46792 -Ref: Algorithms-Footnote-147271 -Node: Public Key Algorithms47399 -Node: Hash Algorithms50001 -Node: Error Handling51215 -Node: Error Values53089 -Node: Error Sources58292 -Node: Error Codes60732 -Node: Error Strings65525 -Node: Exchanging Data67332 -Node: Creating Data Buffers69217 -Node: Memory Based Data Buffers69733 -Node: File Based Data Buffers73166 -Node: Callback Based Data Buffers75368 -Node: Destroying Data Buffers79559 -Node: Manipulating Data Buffers81066 -Node: Data Buffer I/O Operations81558 -Node: Data Buffer Meta-Data83931 -Node: Data Buffer Convenience88450 -Node: Contexts90670 -Node: Creating Contexts91856 -Node: Destroying Contexts92703 -Node: Result Management93042 -Node: Context Attributes94623 -Node: Protocol Selection95660 -Node: Crypto Engine96692 -Node: Setting the Sender98581 -Node: ASCII Armor100094 -Node: Text Mode100723 -Node: Offline Mode101657 -Node: Pinentry Mode102767 -Node: Included Certificates104661 -Node: Key Listing Mode106107 -Node: Passphrase Callback110319 -Node: Progress Meter Callback113881 -Node: Status Message Callback115866 -Node: Locale121218 -Node: Key Management122796 -Node: Key objects124024 -Node: Listing Keys138248 -Node: Information About Keys146901 -Node: Manipulating Keys148209 -Node: Generating Keys148779 -Node: Signing Keys167101 -Node: Exporting Keys170734 -Node: Importing Keys177541 -Ref: Importing Keys-Footnote-1184685 -Node: Deleting Keys184813 -Node: Changing Passphrases187093 -Node: Changing TOFU Data188420 -Node: Advanced Key Editing190528 -Node: Trust Item Management193261 -Node: Listing Trust Items194297 -Node: Manipulating Trust Items196658 -Node: Crypto Operations197301 -Node: Decrypt198565 -Node: Verify205072 -Node: Decrypt and Verify217536 -Node: Sign220391 -Node: Selecting Signers220955 -Node: Creating a Signature222361 -Node: Signature Notation Data227131 -Node: Encrypt229416 -Node: Encrypting a Plaintext229772 -Node: Miscellaneous237495 -Node: Running other Programs237907 -Node: Using the Assuan protocol240070 -Node: Checking for updates242868 -Node: Run Control247685 -Node: Waiting For Completion248429 -Node: Using External Event Loops250547 -Node: I/O Callback Interface252519 -Node: Registering I/O Callbacks257759 -Node: I/O Callback Example259798 -Node: I/O Callback Example GTK+266423 -Node: I/O Callback Example GDK268212 -Node: I/O Callback Example Qt269854 -Node: Cancellation272142 -Node: UI Server Protocol274450 -Ref: UI Server Protocol-Footnote-1275885 -Node: UI Server Encrypt276004 -Node: UI Server Sign281362 -Node: UI Server Decrypt283715 -Node: UI Server Verify285370 -Node: UI Server Set Input Files288942 -Node: UI Server Sign/Encrypt Files290012 -Node: UI Server Verify/Decrypt Files291820 -Node: UI Server Import/Export Keys293696 -Node: UI Server Checksum Files294758 -Node: Miscellaneous UI Server Commands296976 -Ref: command SENDER298907 -Node: Debugging302282 -Node: Deprecated Functions304031 -Node: Library Copying329248 -Node: Copying357468 -Node: Concept Index395218 -Node: Function and Data Index409997 +Node: Top1689 +Node: Introduction9299 +Node: Getting Started10089 +Node: Features11550 +Node: Overview12862 +Node: Preparation13971 +Node: Header14968 +Node: Building the Source15715 +Node: Largefile Support (LFS)17859 +Node: Using Automake23275 +Node: Using Libtool25828 +Node: Library Version Check26190 +Node: Signal Handling32250 +Node: Multi-Threading33520 +Ref: Multi-Threading-Footnote-134936 +Node: Protocols and Engines35359 +Node: Engine Version Check38110 +Node: Engine Information40633 +Node: Engine Configuration44493 +Node: OpenPGP45797 +Node: Cryptographic Message Syntax46137 +Node: Assuan46450 +Node: Algorithms46824 +Ref: Algorithms-Footnote-147303 +Node: Public Key Algorithms47431 +Node: Hash Algorithms50033 +Node: Error Handling51247 +Node: Error Values53121 +Node: Error Sources58324 +Node: Error Codes60764 +Node: Error Strings65557 +Node: Exchanging Data67364 +Node: Creating Data Buffers69249 +Node: Memory Based Data Buffers69765 +Node: File Based Data Buffers73198 +Node: Callback Based Data Buffers76311 +Node: Destroying Data Buffers80502 +Node: Manipulating Data Buffers82009 +Node: Data Buffer I/O Operations82501 +Node: Data Buffer Meta-Data84874 +Node: Data Buffer Convenience89393 +Node: Contexts91613 +Node: Creating Contexts92799 +Node: Destroying Contexts93646 +Node: Result Management93985 +Node: Context Attributes95566 +Node: Protocol Selection96733 +Node: Crypto Engine97779 +Node: Setting the Sender99668 +Node: ASCII Armor101181 +Node: Text Mode101810 +Node: Offline Mode102744 +Node: Pinentry Mode104242 +Node: Included Certificates106136 +Node: Key Listing Mode107582 +Node: Passphrase Callback112323 +Node: Progress Meter Callback115885 +Node: Status Message Callback117870 +Node: Context Flags119635 +Node: Locale125684 +Node: Additional Logs127276 +Node: Key Management129474 +Node: Key objects130702 +Node: Listing Keys144926 +Node: Information About Keys153579 +Node: Manipulating Keys154887 +Node: Generating Keys155457 +Node: Signing Keys173777 +Node: Exporting Keys177410 +Node: Importing Keys184349 +Ref: Importing Keys-Footnote-1191752 +Node: Deleting Keys191880 +Node: Changing Passphrases194160 +Node: Changing TOFU Data195487 +Node: Advanced Key Editing197595 +Node: Trust Item Management200328 +Node: Listing Trust Items201364 +Node: Manipulating Trust Items203725 +Node: Crypto Operations204368 +Node: Decrypt205632 +Node: Verify212946 +Node: Decrypt and Verify225666 +Node: Sign228521 +Node: Selecting Signers229085 +Node: Creating a Signature230491 +Node: Signature Notation Data235261 +Node: Encrypt237546 +Node: Encrypting a Plaintext237902 +Node: Miscellaneous252314 +Node: Running other Programs252726 +Node: Using the Assuan protocol254889 +Node: Checking for updates257687 +Node: Run Control262504 +Node: Waiting For Completion263248 +Node: Using External Event Loops265373 +Node: I/O Callback Interface267345 +Node: Registering I/O Callbacks272585 +Node: I/O Callback Example274624 +Node: I/O Callback Example GTK+281249 +Node: I/O Callback Example GDK283038 +Node: I/O Callback Example Qt284680 +Node: Cancellation286968 +Node: UI Server Protocol289276 +Ref: UI Server Protocol-Footnote-1290711 +Node: UI Server Encrypt290830 +Node: UI Server Sign296188 +Node: UI Server Decrypt298541 +Node: UI Server Verify301885 +Node: UI Server Set Input Files305457 +Node: UI Server Sign/Encrypt Files306527 +Node: UI Server Verify/Decrypt Files308335 +Node: UI Server Import/Export Keys310211 +Node: UI Server Checksum Files311273 +Node: Miscellaneous UI Server Commands313491 +Ref: command SENDER315422 +Node: Debugging317124 +Node: Deprecated Functions318873 +Node: Library Copying344090 +Node: Copying372310 +Node: Concept Index410060 +Node: Function and Data Index425058  End Tag Table diff --git a/doc/gpgme.info-1 b/doc/gpgme.info-1 index 4dc3349..8910bc6 100644 --- a/doc/gpgme.info-1 +++ b/doc/gpgme.info-1 @@ -1,6 +1,6 @@ This is gpgme.info, produced by makeinfo version 6.3 from gpgme.texi. -Copyright © 2002–2008, 2010, 2012–2017 g10 Code GmbH. +Copyright © 2002–2008, 2010, 2012–2018 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -19,10 +19,10 @@ END-INFO-DIR-ENTRY This file documents the GPGME library. - This is Edition 1.10.0, last updated 8 December 2017, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.10.0. + This is Edition 1.12.1-beta100, last updated 3 December 2018, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.12.1-beta100. - Copyright © 2002–2008, 2010, 2012–2017 g10 Code GmbH. + Copyright © 2002–2008, 2010, 2012–2018 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -41,8 +41,9 @@ File: gpgme.info, Node: Top, Next: Introduction, Up: (dir) Main Menu ********* -This is Edition 1.10.0, last updated 8 December 2017, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.10.0 of the GPGME library. +This is Edition 1.12.1-beta100, last updated 3 December 2018, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.12.1-beta100 of the +GPGME library. * Menu: @@ -661,7 +662,7 @@ File: gpgme.info, Node: Library Version Check, Next: Signal Handling, Prev: U slashed even under Windows. ‘require-gnupg’ - Set the mimimum version of the required GnuPG engine. If that + Set the minimum version of the required GnuPG engine. If that version is not met, GPGME fails early instead of trying to use the existent version. The given version must be a string with major, minor, and micro number. Example: "2.1.0". @@ -1779,6 +1780,26 @@ of the data objects is not limited by GPGME. object was successfully created, and ‘GPG_ERR_ENOMEM’ if not enough memory is available. + -- Function: gpgme_error_t gpgme_data_new_from_estream + (gpgme_data_t *DH, gpgrt_stream_t STREAM) + The function ‘gpgme_data_new_from_estream’ creates a new + ‘gpgme_data_t’ object and uses the gpgrt stream STREAM to read from + (if used as an input data object) and write to (if used as an + output data object). + + When using the data object as an input buffer, the function might + read a bit more from the stream than is actually needed by the + crypto engine in the desired operation because of internal + buffering. + + Note that GPGME assumes that the stream is in blocking mode. + Errors during I/O operations, except for EINTR, are usually fatal + for crypto operations. + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the data + object was successfully created, and ‘GPG_ERR_ENOMEM’ if not enough + memory is available. +  File: gpgme.info, Node: Callback Based Data Buffers, Prev: File Based Data Buffers, Up: Creating Data Buffers @@ -2258,7 +2279,9 @@ File: gpgme.info, Node: Context Attributes, Next: Key Management, Prev: Resul * Passphrase Callback:: Getting the passphrase from the user. * Progress Meter Callback:: Being informed about the progress. * Status Message Callback:: Status messages received from gpg. +* Context Flags:: Additional flags for a context. * Locale:: Setting the locale of a context. +* Additional Logs:: Additional logs of a context.  File: gpgme.info, Node: Protocol Selection, Next: Crypto Engine, Up: Context Attributes @@ -2273,9 +2296,9 @@ File: gpgme.info, Node: Protocol Selection, Next: Crypto Engine, Up: Context the crypto engine configured for that protocol. *Note Protocols and Engines::. - Setting the protocol with ‘gpgme_set_protocol’ does not check if - the crypto engine for that protocol is available and installed - correctly. *Note Engine Version Check::. + Setting the protocol with ‘gpgme_set_protocol’ does intentionally + not check if the crypto engine for that protocol is available and + installed correctly. *Note Engine Version Check::. The function returns the error code ‘GPG_ERR_NO_ERROR’ if the protocol could be set successfully, and ‘GPG_ERR_INV_VALUE’ if @@ -2421,20 +2444,26 @@ File: gpgme.info, Node: Offline Mode, Next: Pinentry Mode, Prev: Text Mode, SINCE: 1.6.0 The function ‘gpgme_set_offline’ specifies if offline mode should - be used. By default, offline mode is not used. + be used. Offline mode is disabled if YES is zero, and enabled + otherwise. By default, offline mode is disabled. - The offline mode specifies if dirmngr should be used to do - additional validation that might require connections to external - services. (e.g. CRL / OCSP checks). + The details of the offline mode depend on the used protocol and its + backend engine. It may eventually be extended to be more stricter + and for example completely disable the use of Dirmngr for any + engine. - Offline mode only affects the keylist mode - ‘GPGME_KEYLIST_MODE_VALIDATE’ and is only relevant to the CMS - crypto engine. Offline mode is ignored otherwise. + For the CMS protocol the offline mode specifies whether Dirmngr + shall be used to do additional validation that might require + connecting external services (e.g. CRL / OCSP checks). Here the + offline mode only affects the keylist mode + ‘GPGME_KEYLIST_MODE_VALIDATE’. - This option may be extended in the future to completely disable the - use of dirmngr for any engine. + For the OpenPGP protocol offline mode entirely disables the use of + the Dirmngr and will thus guarantee that no network connections are + done as part of an operation on this context. It has only an + effect with GnuPG versions 2.1.23 or later. - Offline mode is disabled if YES is zero, and enabled otherwise. + For all other protocols the offline mode is currently ignored. -- Function: int gpgme_get_offline (gpgme_ctx_t CTX) SINCE: 1.6.0 @@ -2562,6 +2591,8 @@ File: gpgme.info, Node: Key Listing Mode, Next: Passphrase Callback, Prev: In keyring should be searched for keys in the keylisting operation. This is the default. + Using only this option results in a ‘--list-keys’. + ‘GPGME_KEYLIST_MODE_EXTERN’ The ‘GPGME_KEYLIST_MODE_EXTERN’ symbol specifies that an external source should be searched for keys in the keylisting @@ -2570,6 +2601,16 @@ File: gpgme.info, Node: Key Listing Mode, Next: Passphrase Callback, Prev: In ‘GPGME_KEYLIST_MODE_LOCAL’. For example, it can be a remote keyserver or LDAP certificate server. + Using only this option results in a ‘--search-keys’ for + ‘GPGME_PROTOCOL_OpenPGP’ and something similar to + ‘--list-external-keys’ for ‘GPGME_PROTOCOL_CMS’. + + ‘GPGME_KEYLIST_MODE_LOCATE’ + This is a shortcut for the combination of + ‘GPGME_KEYLIST_MODE_LOCAL’ and ‘GPGME_KEYLIST_MODE_EXTERN’, + which results in a ‘--locate-keys’ for + ‘GPGME_PROTOCOL_OpenPGP’. + ‘GPGME_KEYLIST_MODE_SIGS’ The ‘GPGME_KEYLIST_MODE_SIGS’ symbol specifies that the key signatures should be included in the listed keys. @@ -2754,7 +2795,7 @@ File: gpgme.info, Node: Progress Meter Callback, Next: Status Message Callback corresponding value will not be returned.  -File: gpgme.info, Node: Status Message Callback, Next: Locale, Prev: Progress Meter Callback, Up: Context Attributes +File: gpgme.info, Node: Status Message Callback, Next: Context Flags, Prev: Progress Meter Callback, Up: Context Attributes 7.4.12 Status Message Callback ------------------------------ @@ -2794,6 +2835,12 @@ File: gpgme.info, Node: Status Message Callback, Next: Locale, Prev: Progress message callback is set, or CTX is not a valid pointer, ‘NULL’ is returned in both variables. + +File: gpgme.info, Node: Context Flags, Next: Locale, Prev: Status Message Callback, Up: Context Attributes + +7.4.13 Context Flags +-------------------- + -- Function: gpgme_error_t gpgme_set_ctx_flag (gpgme_ctx_t CTX, const char *NAME, const char *VALUE) @@ -2860,6 +2907,53 @@ File: gpgme.info, Node: Status Message Callback, Next: Locale, Prev: Progress the operator can tell both your IP address and the time when you verified the signature. + ‘"request-origin"’ + The string given in VALUE is passed to the GnuPG engines to + request restrictions based on the origin of the request. + Valid values are documented in the GnuPG manual and the gpg + man page under the option ‘--request-origin’. Requires at + least GnuPG 2.2.6 to have an effect. + + ‘"no-symkey-cache"’ + For OpenPGP disable the passphrase cache used for symmetrical + en- and decryption. This cache is based on the message + specific salt value. Requires at least GnuPG 2.2.7 to have an + effect. + + ‘"ignore-mdc-error"’ + This flag passes the option ‘--ignore-mdc-error’ to gpg. This + can be used to force decryption of a message which failed due + to a missing integrity check. This flag must be used with + great caution and only if it is a known non-corrupted old + message and the decryption result of the former try had the + decryption result flag ‘legacy_cipher_nomdc’ set. For + failsafe reasons this flag is reset after each operation. + + ‘"auto-key-locate"’ + The string given in VALUE is passed to gpg. This can be used + to change the behavior of a ‘GPGME_KEYLIST_MODE_LOCATE’ + keylisting. Valid values are documented in the GnuPG manual + and the gpg man page under the option ‘--auto-key-locate’. + Requires at least GnuPG 2.1.18. + + Note: Keys retrieved through ‘auto-key-locate’ are + automatically imported in the keyring. + + ‘trust-model’ + SINCE: 1.11.2 + + Change the trust-model for all GnuPG engine operations. An + empty string sets the trust-model back to the users default. + If the trust-model is not supported by GnuPG the behavior is + undefined and will likely cause all operations to fail. + Example: "tofu+pgp". + + This options should be used carefully with a strict version + requirement. In some versions of GnuPG setting the + trust-model changes the default trust-model for future + operations. A change in the trust-model also can have + unintended side effects, like rebuilding the trust-db. + This function returns ‘0’ on success. -- Function: const char * gpgme_get_ctx_flag (gpgme_ctx_t CTX, @@ -2874,9 +2968,9 @@ File: gpgme.info, Node: Status Message Callback, Next: Locale, Prev: Progress test for an empty string can be used to get the boolean value.  -File: gpgme.info, Node: Locale, Prev: Status Message Callback, Up: Context Attributes +File: gpgme.info, Node: Locale, Next: Additional Logs, Prev: Context Flags, Up: Context Attributes -7.4.13 Locale +7.4.14 Locale ------------- A locale setting can be associated with a context. This locale is @@ -2913,6 +3007,66 @@ contexts created afterwards. The function returns an error if not enough memory is available.  +File: gpgme.info, Node: Additional Logs, Prev: Locale, Up: Context Attributes + +7.4.15 Additional Logs +---------------------- + +Additional logs can be associated with a context. These logs are engine +specific and can be be obtained with ‘gpgme_op_getauditlog’. + + -- Function: gpgme_error_t gpgme_op_getauditlog (gpgme_ctx_t CTX, + gpgme_data_t OUTPUT, unsigned int FLAGS) + SINCE: 1.1.1 + + The function ‘gpgme_op_getauditlog’ is used to obtain additional + logs as specified by FLAGS into the OUTPUT data. If + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if a log + could be queried from the engine, and ‘GPG_ERR_NOT_IMPLEMENTED’ if + the log specified in FLAGS is not available for this engine. If no + log is available ‘GPG_ERR_NO_DATA’ is returned. + + The value in FLAGS is a bitwise-or combination of one or multiple + of the following bit values: + + ‘GPGME_AUDITLOG_DIAG’ + SINCE: 1.11.2 + + Obtain diagnostic output which would be written to ‘stderr’ in + interactive use of the engine. This can be used to provide + additional diagnostic information in case of errors in other + operations. + + Note: If log-file has been set in the configuration the log + will be empty and ‘GPG_ERR_NO_DATA’ will be returned. + + Implemented for: ‘GPGME_PROTOCOL_OpenPGP’ + + ‘GPGME_AUDITLOG_DEFAULT’ + SINCE: 1.11.2 + + This flag has the value 0 for compatibility reasons. Obtains + additional information from the engine by issuing the + ‘GETAUDITLOG’ command. For ‘GPGME_PROTOCOL_CMS’ this provides + additional information about the X509 certificate chain. + + Implemented for: ‘GPGME_PROTOCOL_CMS’ + + ‘GPGME_AUDITLOG_HTML’ + SINCE: 1.1.1 + + Same as ‘GPGME_AUDITLOG_DEFAULT’ but in HTML. + + Implemented for: ‘GPGME_PROTOCOL_CMS’ + + -- Function: gpgme_error_t gpgme_op_getauditlog_start (gpgme_ctx_t CTX, + gpgme_data_t OUTPUT, unsigned int FLAGS) + SINCE: 1.1.1 + + This is the asynchronous variant of ‘gpgme_op_getauditlog’. + + File: gpgme.info, Node: Key Management, Next: Trust Item Management, Prev: Context Attributes, Up: Contexts 7.5 Key Management @@ -3624,7 +3778,7 @@ provide a fallback to the old function if the error code GnuPG. USERID is commonly the mail address associated with the key. GPGME - does not require a specificy syntax but if more than a mail address + does not require a specific syntax but if more than a mail address is given, RFC-822 style format is suggested. The value is expected to be in UTF-8 encoding (i.e. no IDN encoding for mail addresses). This is a required parameter. @@ -3798,10 +3952,10 @@ provide a fallback to the old function if the error code USERID is the user ID to add to the key. A user ID is commonly the mail address to be associated with the key. GPGME does not require - a specificy syntax but if more than a mail address is given, - RFC-822 style format is suggested. The value is expected to be in - UTF-8 encoding (i.e. no IDN encoding for mail addresses). This is - a required parameter. + a specific syntax but if more than a mail address is given, RFC-822 + style format is suggested. The value is expected to be in UTF-8 + encoding (i.e. no IDN encoding for mail addresses). This is a + required parameter. FLAGS are currently not used and must be set to zero. @@ -4153,6 +4307,10 @@ or-ed together. key the export format will be changed to PKCS#12 which also includes the certificate. This flag may not be used with OpenPGP. +‘GPGME_EXPORT_MODE_NOUID’ + SINCE: 1.12.0 - experimental Do not export user ids. Works only + with certain gpg version. + -- Function: gpgme_error_t gpgme_op_export (gpgme_ctx_t CTX, const char *PATTERN, gpgme_export_mode_t MODE, gpgme_data_t KEYDATA) @@ -4423,6 +4581,12 @@ Importing keys means the same as running ‘gpg’ with the command A list of gpgme_import_status_t objects which contain more information about the keys for which an import was attempted. + ‘int skipped_v3_keys’ + For security reasons modern versions of GnuPG do not anymore + support v3 keys (created with PGP 2.x) and ignores them on + import. This counter provides the number of such skipped v3 + keys. + -- Function: gpgme_import_result_t gpgme_op_import_result (gpgme_ctx_t CTX) The function ‘gpgme_op_import_result’ returns a @@ -4827,8 +4991,8 @@ File: gpgme.info, Node: Decrypt, Next: Verify, Up: Crypto Operations SINCE: 1.8.0 The function ‘gpgme_op_decrypt_ext’ is the same as - ‘gpgme_op_decrypt_ext’ but has an additional argument FLAGS. If - FLAGS is 0 both function behave identically. + ‘gpgme_op_decrypt’ but has an additional argument FLAGS. If FLAGS + is 0 both function behave identically. The value in FLAGS is a bitwise-or combination of one or multiple of the following bit values: @@ -4837,7 +5001,7 @@ File: gpgme.info, Node: Decrypt, Next: Verify, Up: Crypto Operations SINCE: 1.8.0 The ‘GPGME_DECRYPT_VERIFY’ symbol specifies that this function - shall exacty act as ‘gpgme_op_decrypt_verify’. + shall exactly act as ‘gpgme_op_decrypt_verify’. ‘GPGME_DECRYPT_UNWRAP’ SINCE: 1.8.0 @@ -4847,7 +5011,7 @@ File: gpgme.info, Node: Decrypt, Next: Verify, Up: Crypto Operations removed. This requires GnuPG 2.1.12 and works only for OpenPGP. This is the counterpart to ‘GPGME_ENCRYPT_WRAP’. - The function returns the error codes as descriped for + The function returns the error codes as described for ‘gpgme_op_decrypt’ respective ‘gpgme_op_encrypt’. -- Function: gpgme_error_t gpgme_op_decrypt_ext_start ( @@ -4896,7 +5060,7 @@ File: gpgme.info, Node: Decrypt, Next: Verify, Up: Crypto Operations you can retrieve the pointer to the result with ‘gpgme_op_decrypt_result’. As with all result structures, it this structure shall be considered read-only and an application must not - allocated such a strucure on its own. The structure contains the + allocate such a strucure on its own. The structure contains the following members: ‘char *unsupported_algorithm’ @@ -4904,9 +5068,22 @@ File: gpgme.info, Node: Decrypt, Next: Verify, Up: Crypto Operations describes the algorithm that is not supported. ‘unsigned int wrong_key_usage : 1’ - SINCE: 0.9.0 + SINCE: 0.9.0 This is true if the key was not used according to + its policy. - This is true if the key was not used according to its policy. + ‘unsigned int legacy_cipher_nomdc : 1’ + SINCE: 1.11.2 The message was made by a legacy algorithm + without any integrity protection. This might be an old but + legitimate message. + + ‘unsigned int is_mime : 1;’ + SINCE: 1.11.0 The message claims that the content is a MIME + object. + + ‘unsigned int is_de_vs : 1;’ + SINCE: 1.10.0 The message was encrypted in a VS-NfD compliant + way. This is a specification in Germany for a restricted + communication level. ‘gpgme_recipient_t recipients’ SINCE: 1.1.0 @@ -4933,6 +5110,13 @@ File: gpgme.info, Node: Decrypt, Next: Verify, Up: Crypto Operations success or ‘gpgme_get_ctx_flag (ctx, "export-session-key")’ returns true (non-empty string). + ‘char *symkey_algo’ + SINCE: 1.11.0 + + A string with the symmetric encryption algorithm and mode + using the format ".". Note that the deprecated + non-MDC encryption mode of OpenPGP is given as "PGPCFB". + -- Function: gpgme_decrypt_result_t gpgme_op_decrypt_result (gpgme_ctx_t CTX) The function ‘gpgme_op_decrypt_result’ returns a @@ -5099,7 +5283,7 @@ File: gpgme.info, Node: Verify, Next: Decrypt and Verify, Prev: Decrypt, Up: A policy requirement was not met. ‘GPGME_SIGSUM_SYS_ERROR’ - A system error occured. + A system error occurred. ‘GPGME_SIGSUM_TOFU_CONFLICT’ A TOFU conflict was detected. @@ -5224,7 +5408,14 @@ File: gpgme.info, Node: Verify, Next: Decrypt and Verify, Prev: Decrypt, Up: ‘char *file_name’ This is the filename of the original plaintext message file if - it is known, otherwise this is a null pointer. + it is known, otherwise this is a null pointer. Warning: The + filename is not covered by the signature. + + ‘unsigned int is_mime : 1;’ + SINCE: 1.11.0 + + The message claims that the content is a MIME object. + Warning: This flag is not covered by the signature. -- Function: gpgme_verify_result_t gpgme_op_verify_result (gpgme_ctx_t CTX) @@ -5592,7 +5783,7 @@ File: gpgme.info, Node: Encrypting a Plaintext, Up: Encrypt The ‘GPGME_ENCRYPT_SYMMETRIC’ symbol specifies that the output should be additionally encrypted symmetrically even if recipients are provided. This feature is only supported for - for the OpenPGP crypto engine. + the OpenPGP crypto engine. ‘GPGME_ENCRYPT_THROW_KEYIDS’ SINCE: 1.8.0 @@ -5611,6 +5802,19 @@ File: gpgme.info, Node: Encrypting a Plaintext, Up: Encrypt OpenPGP message and not a plain data. This is the counterpart to ‘GPGME_DECRYPT_UNWRAP’. + ‘GPGME_ENCRYPT_WANT_ADDRESS’ + SINCE: 1.11.0 + + The ‘GPGME_ENCRYPT_WANT_ADDRESS’ symbol requests that all + supplied keys or key specifications include a syntactically + valid mail address. If this is not the case the operation is + not even tried and the error code ‘GPG_ERR_INV_USER_ID’ is + returned. Only the address part of the key specification is + conveyed to the backend. As of now the key must be specified + using the RECPSTRING argument of the extended encrypt + functions. This feature is currently only supported for the + OpenPGP crypto engine. + If ‘GPG_ERR_UNUSABLE_PUBKEY’ is returned, some recipients in RECP are invalid, but not all. In this case the plaintext might be encrypted for all valid recipients and returned in CIPHER (if this @@ -5648,6 +5852,113 @@ File: gpgme.info, Node: Encrypting a Plaintext, Up: Encrypt ‘GPG_ERR_UNUSABLE_PUBKEY’ if RSET does not contain any valid recipients. + -- Function: gpgme_error_t gpgme_op_encrypt_ext (gpgme_ctx_t CTX, + gpgme_key_t RECP[], const char *RECPSTRING, + gpgme_encrypt_flags_t FLAGS, gpgme_data_t PLAIN, + gpgme_data_t CIPHER) + + SINCE: 1.11.0 + + This is an extended version of ‘gpgme_op_encrypt’ with RECPSTRING + as additional parameter. If RECP is NULL and RECPSTRING is not + NULL, the latter is expected to be a linefeed delimited string with + the set of key specifications. In contrast to RECP the keys are + given directly as strings and there is no need to first create key + objects. Leading and trailing white space is remove from each line + in RECPSTRING. The keys are then passed verbatim to the backend + engine. + + For the OpenPGP backend several special keywords are supported to + modify the operation. These keywords are given instead of a key + specification. The currently supported keywords are: + + ‘--hidden’ + ‘--no-hidden’ + These keywords toggle between normal and hidden recipients for + all following key specifications. When a hidden recipient is + requested the gpg option ‘-R’ (or ‘-F’ in file mode) is used + instead of ‘-r’ (‘-f’ in file mode). + + ‘--file’ + ‘--no-file’ + These keywords toggle between regular and file mode for all + following key specification. In file mode the option ‘-f’ or + ‘-F’ is passed to gpg. At least GnuPG version 2.1.14 is + required to handle these options. The + ‘GPGME_ENCRYPT_WANT_ADDRESS’ flag is ignored in file mode. + + ‘--’ + This keyword disables all keyword detection up to the end of + the string. All keywords are treated as verbatim arguments. + + To create a RECPSTRING it is often useful to employ a strconcat + style function. For example this function creates a string to + encrypt to two keys: + + char * + xbuild_recpstring (const char *key1, const char *key2) + { + char *result = gpgrt_strconcat ("--\n", key1, "\n", key2, NULL); + if (!result) + { perror ("strconcat failed"); exit (2); } + return result; + } + + Note the use of the double dash here; unless you want to specify a + keyword, it is a good idea to avoid any possible trouble with key + specifications starting with a double dash. The used strconcat + function is available in Libgpg-error 1.28 and later; Libgpg-error + (aka Gpgrt) is a dependency of GPGME. The number of arguments to + ‘gpgrt_strconcat’ is limited to 47 but that should always be + sufficient. In case a larger and non-fixed number of keys are to + be supplied the following code can be used: + + char * + xbuild_long_recpstring (void) + { + gpgrt_stream_t memfp; + const char *s; + void *result; + + memfp = gpgrt_fopenmem (0, "w+b"); + if (!memfp) + { perror ("fopenmem failed"); exit (2); } + gpgrt_fputs ("--", memfp); + while ((s = get_next_keyspec ())) + { + gpgrt_fputc ('\n', memfp); + gpgrt_fputs (s, memfp); + } + gpgrt_fputc (0, memfp); + if (gpgrt_ferror (memfp)) + { perror ("writing to memstream failed"); exit (2); } + if (gpgrt_fclose_snatch (memfp, &result, NULL)) + { perror ("fclose_snatch failed"); exit (2); } + return result; + } + + In this example ‘get_next_keyspec’ is expected to return the next + key to be added to the string. Please take care: Encrypting to a + large number of recipients is often questionable due to security + reasons and also for the technicality that all keys are currently + passed on the command line to ‘gpg’ which has as a platform + specific length limitation. + + -- Function: gpgme_error_t gpgme_op_encrypt_ext_start (gpgme_ctx_t CTX, + gpgme_key_t RECP[], const char *RECPSTRING, + gpgme_encrypt_flags_t FLAGS, gpgme_data_t PLAIN, + gpgme_data_t CIPHER) + + SINCE: 1.11.0 + + This is an extended version of ‘gpgme_op_encrypt_start’ with + RECPSTRING as additional parameter. If RECP is NULL and RECPSTRING + is not NULL, the latter is expected to be a linefeed delimited + string with the set of key specifications. In contrast to RECP the + keys are given directly as strings and there is no need to first + create key objects. The keys are passed verbatim to the backend + engine. + -- Data type: gpgme_encrypt_result_t This is a pointer to a structure used to store the result of a ‘gpgme_op_encrypt’ operation. After successfully encrypting data, @@ -5692,6 +6003,36 @@ File: gpgme.info, Node: Encrypting a Plaintext, Up: Encrypt operation could be started successfully, and ‘GPG_ERR_INV_VALUE’ if CTX, RSET, PLAIN or CIPHER is not a valid pointer. + -- Function: gpgme_error_t gpgme_op_encrypt_sign_ext (gpgme_ctx_t CTX, + gpgme_key_t RECP[], const char *RECPSTRING, + gpgme_encrypt_flags_t FLAGS, gpgme_data_t PLAIN, + gpgme_data_t CIPHER) + + SINCE: 1.11.0 + + This is an extended version of ‘gpgme_op_encrypt_sign’ with + RECPSTRING as additional parameter. If RECP is NULL and RECPSTRING + is not NULL, the latter is expected to be a linefeed delimited + string with the set of key specifications. In contrast to RECP the + keys are given directly as strings and there is no need to first + create the key objects. The keys are passed verbatim to the + backend engine. + + -- Function: gpgme_error_t gpgme_op_encrypt_sign_ext_start + (gpgme_ctx_t CTX, gpgme_key_t RECP[], const char *RECPSTRING, + gpgme_encrypt_flags_t FLAGS, gpgme_data_t PLAIN, + gpgme_data_t CIPHER) + + SINCE: 1.11.0 + + This is an extended version of ‘gpgme_op_encrypt_sign_start’ with + RECPSTRING as additional parameter. If RECP is NULL and RECPSTRING + is not NULL, the latter is expected to be a linefeed delimited + string with the set of key specifications. In contrast to RECP the + keys are given directly as strings and there is no need to first + create the key objects. The keys are passed verbatim to the + backend engine. +  File: gpgme.info, Node: Miscellaneous, Next: Run Control, Prev: Crypto Operations, Up: Contexts @@ -6019,8 +6360,8 @@ File: gpgme.info, Node: Waiting For Completion, Next: Using External Event Loo trust item list operations, do not affect ‘gpgme_wait’. In a multi-threaded environment, only one thread should ever call - ‘gpgme_wait’ at any time, irregardless if CTX is specified or not. - This means that all calls to this function should be fully + ‘gpgme_wait’ at any time, regardless of whether CTX is specified or + not. This means that all calls to this function should be fully synchronized by locking primitives. It is safe to start asynchronous operations while a thread is running in ‘gpgme_wait’. @@ -6931,329 +7272,3 @@ The decryption is started with the command: ‘--export-session-key’ is given and the underlying engine knows how to export the session key, it will appear on a status line - -File: gpgme.info, Node: UI Server Verify, Next: UI Server Set Input Files, Prev: UI Server Decrypt, Up: UI Server Protocol - -A.4 UI Server: Verify a Message -=============================== - -The server needs to support the verification of opaque signatures as -well as detached signatures. The kind of input sources controls what -kind message is to be verified. - - -- Command: MESSAGE FD=N - This command is used with detached signatures to set the file - descriptor for the signed data to N. The data is binary encoded - (used verbatim). For details on the file descriptor, see the - description of ‘INPUT’ in the ‘ENCRYPT’ section. - - -- Command: INPUT FD=N - Set the file descriptor for the opaque message or the signature - part of a detached signature to N. The message send to the server - is either binary encoded or – in the case of OpenPGP – ASCII - armored. For details on the file descriptor, see the description - of ‘INPUT’ in the ‘ENCRYPT’ section. - - -- Command: OUTPUT FD=N - Set the file descriptor to be used for the output. The output is - binary encoded and only used for opaque signatures. For details on - the file descriptor, see the description of ‘INPUT’ in the - ‘ENCRYPT’ section. - -The verification is then started using: - - -- Command: VERIFY --protocol=NAME [--silent] - NAME is the signing protocol used for the message. For a - description of the allowed protocols see the ‘ENCRYPT’ command. - This argument is mandatory. Depending on the combination of - ‘MESSAGE’ ‘INPUT’ and ‘OUTPUT’ commands, the server needs to select - the appropriate verification mode: - - MESSAGE and INPUT - This indicates a detached signature. Output data is not - applicable. - INPUT - This indicates an opaque signature. As no output command has - been given, the server is only required to check the - signature. - INPUT and OUTPUT - This indicates an opaque signature. The server shall write - the signed data to the file descriptor set by the output - command. This data shall even be written if the signatures - can’t be verified. - - With ‘--silent’ the server shall not display any dialog; this is for -example used by the client to get the content of opaque signed messages. -The client expects the server to send at least this status information -before the final OK response: - - -- Status line: SIGSTATUS FLAG DISPLAYSTRING - Returns the status for the signature and a short string explaining - the status. Valid values for FLAG are: - - ‘none’ - The message has a signature but it could not not be verified - due to a missing key. - ‘green’ - The signature is fully valid. - ‘yellow’ - The signature is valid but additional information was shown - regarding the validity of the key. - ‘red’ - The signature is not valid. - - DISPLAYSTRING is a percent-and-plus-encoded string with a short - human readable description of the status. For example - - S SIGSTATUS green Good+signature+from+Keith+Moon+ - - Note that this string needs to fit into an Assuan line and should - be short enough to be displayed as short one-liner on the clients - window. As usual the encoding of this string is UTF-8 and it - should be send in its translated form. - - The server shall send one status line for every signature found on - the message. - - -File: gpgme.info, Node: UI Server Set Input Files, Next: UI Server Sign/Encrypt Files, Prev: UI Server Verify, Up: UI Server Protocol - -A.5 UI Server: Specifying the input files to operate on. -======================================================== - -All file related UI server commands operate on a number of input files -or directories, specified by one or more ‘FILE’ commands: - - -- Command: FILE [--clear] NAME - Add the file or directory NAME to the list of pathnames to be - processed by the server. The parameter NAME must be an absolute - path name (including the drive letter) and is percent espaced (in - particular, the characters %, = and white space characters are - always escaped). If the option ‘--clear’ is given, the list of - files is cleared before adding NAME. - - Historical note: The original spec did not define ‘--clear’ but the - keyword ‘--continued’ after the file name to indicate that more - files are to be expected. However, this has never been used and - thus removed from the specs. - - -File: gpgme.info, Node: UI Server Sign/Encrypt Files, Next: UI Server Verify/Decrypt Files, Prev: UI Server Set Input Files, Up: UI Server Protocol - -A.6 UI Server: Encrypting and signing files. -============================================ - -First, the input files need to be specified by one or more ‘FILE’ -commands. Afterwards, the actual operation is requested: - - -- Command: ENCRYPT_FILES --nohup - -- Command: SIGN_FILES --nohup - -- Command: ENCRYPT_SIGN_FILES --nohup - Request that the files specified by ‘FILE’ are encrypted and/or - signed. The command selects the default action. The UI server may - allow the user to change this default afterwards interactively, and - even abort the operation or complete it only on some of the - selected files and directories. - - What it means to encrypt or sign a file or directory is specific to - the preferences of the user, the functionality the UI server - provides, and the selected protocol. Typically, for each input - file a new file is created under the original filename plus a - protocol specific extension (like ‘.gpg’ or ‘.sig’), which contain - the encrypted/signed file or a detached signature. For - directories, the server may offer multiple options to the user (for - example ignore or process recursively). - - The ‘ENCRYPT_SIGN_FILES’ command requests a combined sign and - encrypt operation. It may not be available for all protocols (for - example, it is available for OpenPGP but not for CMS). - - The option ‘--nohup’ is mandatory. It is currently unspecified - what should happen if ‘--nohup’ is not present. Because ‘--nohup’ - is present, the server always returns ‘OK’ promptly, and completes - the operation asynchronously. - - -File: gpgme.info, Node: UI Server Verify/Decrypt Files, Next: UI Server Import/Export Keys, Prev: UI Server Sign/Encrypt Files, Up: UI Server Protocol - -A.7 UI Server: Decrypting and verifying files. -============================================== - -First, the input files need to be specified by one or more ‘FILE’ -commands. Afterwards, the actual operation is requested: - - -- Command: DECRYPT_FILES --nohup - -- Command: VERIFY_FILES --nohup - -- Command: DECRYPT_VERIFY_FILES --nohup - Request that the files specified by ‘FILE’ are decrypted and/or - verified. The command selects the default action. The UI server - may allow the user to change this default afterwards interactively, - and even abort the operation or complete it only on some of the - selected files and directories. - - What it means to decrypt or verify a file or directory is specific - to the preferences of the user, the functionality the UI server - provides, and the selected protocol. Typically, for decryption, a - new file is created for each input file under the original filename - minus a protocol specific extension (like ‘.gpg’) which contains - the original plaintext. For verification a status is displayed for - each signed input file, indicating if it is signed, and if yes, if - the signature is valid. For files that are signed and encrypted, - the ‘VERIFY’ command transiently decrypts the file to verify the - enclosed signature. For directories, the server may offer multiple - options to the user (for example ignore or process recursively). - - The option ‘--nohup’ is mandatory. It is currently unspecified - what should happen if ‘--nohup’ is not present. Because ‘--nohup’ - is present, the server always returns ‘OK’ promptly, and completes - the operation asynchronously. - - -File: gpgme.info, Node: UI Server Import/Export Keys, Next: UI Server Checksum Files, Prev: UI Server Verify/Decrypt Files, Up: UI Server Protocol - -A.8 UI Server: Managing certificates. -===================================== - -First, the input files need to be specified by one or more ‘FILE’ -commands. Afterwards, the actual operation is requested: - - -- Command: IMPORT_FILES --nohup - Request that the certificates contained in the files specified by - ‘FILE’ are imported into the local certificate databases. - - For directories, the server may offer multiple options to the user - (for example ignore or process recursively). - - The option ‘--nohup’ is mandatory. It is currently unspecified - what should happen if ‘--nohup’ is not present. Because ‘--nohup’ - is present, the server always returns ‘OK’ promptly, and completes - the operation asynchronously. - - FIXME: It may be nice to support an ‘EXPORT’ command as well, which -is enabled by the context menu of the background of a directory. - - -File: gpgme.info, Node: UI Server Checksum Files, Next: Miscellaneous UI Server Commands, Prev: UI Server Import/Export Keys, Up: UI Server Protocol - -A.9 UI Server: Create and verify checksums for files. -===================================================== - -First, the input files need to be specified by one or more ‘FILE’ -commands. Afterwards, the actual operation is requested: - - -- Command: CHECKSUM_CREATE_FILES --nohup - Request that checksums are created for the files specified by - ‘FILE’. The choice of checksum algorithm and the destination - storage and format for the created checksums depend on the - preferences of the user and the functionality provided by the UI - server. For directories, the server may offer multiple options to - the user (for example ignore or process recursively). - - The option ‘--nohup’ is mandatory. It is currently unspecified - what should happen if ‘--nohup’ is not present. Because ‘--nohup’ - is present, the server always returns ‘OK’ promptly, and completes - the operation asynchronously. - - -- Command: CHECKSUM_VERIFY_FILES --nohup - Request that checksums are created for the files specified by - ‘FILE’ and verified against previously created and stored - checksums. The choice of checksum algorithm and the source storage - and format for previously created checksums depend on the - preferences of the user and the functionality provided by the UI - server. For directories, the server may offer multiple options to - the user (for example ignore or process recursively). - - If the source storage of previously created checksums is available - to the user through the Windows shell, this command may also accept - such checksum files as ‘FILE’ arguments. In this case, the UI - server should instead verify the checksum of the referenced files - as if they were given as INPUT files. - - The option ‘--nohup’ is mandatory. It is currently unspecified - what should happen if ‘--nohup’ is not present. Because ‘--nohup’ - is present, the server always returns ‘OK’ promptly, and completes - the operation asynchronously. - - -File: gpgme.info, Node: Miscellaneous UI Server Commands, Prev: UI Server Checksum Files, Up: UI Server Protocol - -A.10 Miscellaneous UI Server Commands -===================================== - -The server needs to implement the following commands which are not -related to a specific command: - - -- Command: GETINFO WHAT - This is a multi purpose command, commonly used to return a variety - of information. The required subcommands as described by the WHAT - parameter are: - - ‘pid’ - Return the process id of the server in decimal notation using - an Assuan data line. - -To allow the server to pop up the windows in the correct relation to the -client, the client is advised to tell the server by sending the option: - - -- Command option: window-id NUMBER - The NUMBER represents the native window ID of the clients current - window. On Windows systems this is a windows handle (‘HWND’) and - on X11 systems it is the ‘X Window ID’. The number needs to be - given as a hexadecimal value so that it is easier to convey pointer - values (e.g. ‘HWND’). - -A client may want to fire up the certificate manager of the server. To -do this it uses the Assuan command: - - -- Command: START_KEYMANAGER - The server shall pop up the main window of the key manager (aka - certificate manager). The client expects that the key manager is - brought into the foregound and that this command immediatley - returns (does not wait until the key manager has been fully brought - up). - -A client may want to fire up the configuration dialog of the server. To -do this it uses the Assuan command: - - -- Command: START_CONFDIALOG - The server shall pop up its configuration dialog. The client - expects that this dialog is brought into the foregound and that - this command immediatley returns (i.e. it does not wait until the - dialog has been fully brought up). - -When doing an operation on a mail, it is useful to let the server know -the address of the sender: - - -- Command: SENDER [--info] [--protocol=NAME] EMAIL - EMAIL is the plain ASCII encoded address ("addr-spec" as per - RFC-2822) enclosed in angle brackets. The address set with this - command is valid until a successful completion of the operation or - until a ‘RESET’ command. A second command overrides the effect of - the first one; if EMAIL is not given and ‘--info’ is not used, the - server shall use the default signing key. - - If option ‘--info’ is not given, the server shall also suggest a - protocol to use for signing. The client may use this suggested - protocol on its own discretion. The same status line as with - PREP_ENCRYPT is used for this. - - The option ‘--protocol’ may be used to give the server a hint on - which signing protocol should be preferred. - -To allow the UI-server to visually identify a running operation or to -associate operations the server MAY support the command: - - -- Command: SESSION NUMBER [STRING] - The NUMBER is an arbitrary value, a server may use to associate - simultaneous running sessions. It is a 32 bit unsigned integer - with ‘0’ as a special value indicating that no session association - shall be done. - - If STRING is given, the server may use this as the title of a - window or, in the case of an email operation, to extract the - sender’s address. The string may contain spaces; thus no - plus-escaping is used. - - This command may be used at any time and overrides the effect of - the last command. A ‘RESET’ undoes the effect of this command. - diff --git a/doc/gpgme.info-2 b/doc/gpgme.info-2 index 2a805d3..a97e21e 100644 --- a/doc/gpgme.info-2 +++ b/doc/gpgme.info-2 @@ -1,6 +1,6 @@ This is gpgme.info, produced by makeinfo version 6.3 from gpgme.texi. -Copyright © 2002–2008, 2010, 2012–2017 g10 Code GmbH. +Copyright © 2002–2008, 2010, 2012–2018 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -19,10 +19,10 @@ END-INFO-DIR-ENTRY This file documents the GPGME library. - This is Edition 1.10.0, last updated 8 December 2017, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.10.0. + This is Edition 1.12.1-beta100, last updated 3 December 2018, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.12.1-beta100. - Copyright © 2002–2008, 2010, 2012–2017 g10 Code GmbH. + Copyright © 2002–2008, 2010, 2012–2018 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -36,6 +36,332 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.  +File: gpgme.info, Node: UI Server Verify, Next: UI Server Set Input Files, Prev: UI Server Decrypt, Up: UI Server Protocol + +A.4 UI Server: Verify a Message +=============================== + +The server needs to support the verification of opaque signatures as +well as detached signatures. The kind of input sources controls what +kind message is to be verified. + + -- Command: MESSAGE FD=N + This command is used with detached signatures to set the file + descriptor for the signed data to N. The data is binary encoded + (used verbatim). For details on the file descriptor, see the + description of ‘INPUT’ in the ‘ENCRYPT’ section. + + -- Command: INPUT FD=N + Set the file descriptor for the opaque message or the signature + part of a detached signature to N. The message send to the server + is either binary encoded or – in the case of OpenPGP – ASCII + armored. For details on the file descriptor, see the description + of ‘INPUT’ in the ‘ENCRYPT’ section. + + -- Command: OUTPUT FD=N + Set the file descriptor to be used for the output. The output is + binary encoded and only used for opaque signatures. For details on + the file descriptor, see the description of ‘INPUT’ in the + ‘ENCRYPT’ section. + +The verification is then started using: + + -- Command: VERIFY --protocol=NAME [--silent] + NAME is the signing protocol used for the message. For a + description of the allowed protocols see the ‘ENCRYPT’ command. + This argument is mandatory. Depending on the combination of + ‘MESSAGE’ ‘INPUT’ and ‘OUTPUT’ commands, the server needs to select + the appropriate verification mode: + + MESSAGE and INPUT + This indicates a detached signature. Output data is not + applicable. + INPUT + This indicates an opaque signature. As no output command has + been given, the server is only required to check the + signature. + INPUT and OUTPUT + This indicates an opaque signature. The server shall write + the signed data to the file descriptor set by the output + command. This data shall even be written if the signatures + can’t be verified. + + With ‘--silent’ the server shall not display any dialog; this is for +example used by the client to get the content of opaque signed messages. +The client expects the server to send at least this status information +before the final OK response: + + -- Status line: SIGSTATUS FLAG DISPLAYSTRING + Returns the status for the signature and a short string explaining + the status. Valid values for FLAG are: + + ‘none’ + The message has a signature but it could not not be verified + due to a missing key. + ‘green’ + The signature is fully valid. + ‘yellow’ + The signature is valid but additional information was shown + regarding the validity of the key. + ‘red’ + The signature is not valid. + + DISPLAYSTRING is a percent-and-plus-encoded string with a short + human readable description of the status. For example + + S SIGSTATUS green Good+signature+from+Keith+Moon+ + + Note that this string needs to fit into an Assuan line and should + be short enough to be displayed as short one-liner on the clients + window. As usual the encoding of this string is UTF-8 and it + should be send in its translated form. + + The server shall send one status line for every signature found on + the message. + + +File: gpgme.info, Node: UI Server Set Input Files, Next: UI Server Sign/Encrypt Files, Prev: UI Server Verify, Up: UI Server Protocol + +A.5 UI Server: Specifying the input files to operate on. +======================================================== + +All file related UI server commands operate on a number of input files +or directories, specified by one or more ‘FILE’ commands: + + -- Command: FILE [--clear] NAME + Add the file or directory NAME to the list of pathnames to be + processed by the server. The parameter NAME must be an absolute + path name (including the drive letter) and is percent espaced (in + particular, the characters %, = and white space characters are + always escaped). If the option ‘--clear’ is given, the list of + files is cleared before adding NAME. + + Historical note: The original spec did not define ‘--clear’ but the + keyword ‘--continued’ after the file name to indicate that more + files are to be expected. However, this has never been used and + thus removed from the specs. + + +File: gpgme.info, Node: UI Server Sign/Encrypt Files, Next: UI Server Verify/Decrypt Files, Prev: UI Server Set Input Files, Up: UI Server Protocol + +A.6 UI Server: Encrypting and signing files. +============================================ + +First, the input files need to be specified by one or more ‘FILE’ +commands. Afterwards, the actual operation is requested: + + -- Command: ENCRYPT_FILES --nohup + -- Command: SIGN_FILES --nohup + -- Command: ENCRYPT_SIGN_FILES --nohup + Request that the files specified by ‘FILE’ are encrypted and/or + signed. The command selects the default action. The UI server may + allow the user to change this default afterwards interactively, and + even abort the operation or complete it only on some of the + selected files and directories. + + What it means to encrypt or sign a file or directory is specific to + the preferences of the user, the functionality the UI server + provides, and the selected protocol. Typically, for each input + file a new file is created under the original filename plus a + protocol specific extension (like ‘.gpg’ or ‘.sig’), which contain + the encrypted/signed file or a detached signature. For + directories, the server may offer multiple options to the user (for + example ignore or process recursively). + + The ‘ENCRYPT_SIGN_FILES’ command requests a combined sign and + encrypt operation. It may not be available for all protocols (for + example, it is available for OpenPGP but not for CMS). + + The option ‘--nohup’ is mandatory. It is currently unspecified + what should happen if ‘--nohup’ is not present. Because ‘--nohup’ + is present, the server always returns ‘OK’ promptly, and completes + the operation asynchronously. + + +File: gpgme.info, Node: UI Server Verify/Decrypt Files, Next: UI Server Import/Export Keys, Prev: UI Server Sign/Encrypt Files, Up: UI Server Protocol + +A.7 UI Server: Decrypting and verifying files. +============================================== + +First, the input files need to be specified by one or more ‘FILE’ +commands. Afterwards, the actual operation is requested: + + -- Command: DECRYPT_FILES --nohup + -- Command: VERIFY_FILES --nohup + -- Command: DECRYPT_VERIFY_FILES --nohup + Request that the files specified by ‘FILE’ are decrypted and/or + verified. The command selects the default action. The UI server + may allow the user to change this default afterwards interactively, + and even abort the operation or complete it only on some of the + selected files and directories. + + What it means to decrypt or verify a file or directory is specific + to the preferences of the user, the functionality the UI server + provides, and the selected protocol. Typically, for decryption, a + new file is created for each input file under the original filename + minus a protocol specific extension (like ‘.gpg’) which contains + the original plaintext. For verification a status is displayed for + each signed input file, indicating if it is signed, and if yes, if + the signature is valid. For files that are signed and encrypted, + the ‘VERIFY’ command transiently decrypts the file to verify the + enclosed signature. For directories, the server may offer multiple + options to the user (for example ignore or process recursively). + + The option ‘--nohup’ is mandatory. It is currently unspecified + what should happen if ‘--nohup’ is not present. Because ‘--nohup’ + is present, the server always returns ‘OK’ promptly, and completes + the operation asynchronously. + + +File: gpgme.info, Node: UI Server Import/Export Keys, Next: UI Server Checksum Files, Prev: UI Server Verify/Decrypt Files, Up: UI Server Protocol + +A.8 UI Server: Managing certificates. +===================================== + +First, the input files need to be specified by one or more ‘FILE’ +commands. Afterwards, the actual operation is requested: + + -- Command: IMPORT_FILES --nohup + Request that the certificates contained in the files specified by + ‘FILE’ are imported into the local certificate databases. + + For directories, the server may offer multiple options to the user + (for example ignore or process recursively). + + The option ‘--nohup’ is mandatory. It is currently unspecified + what should happen if ‘--nohup’ is not present. Because ‘--nohup’ + is present, the server always returns ‘OK’ promptly, and completes + the operation asynchronously. + + FIXME: It may be nice to support an ‘EXPORT’ command as well, which +is enabled by the context menu of the background of a directory. + + +File: gpgme.info, Node: UI Server Checksum Files, Next: Miscellaneous UI Server Commands, Prev: UI Server Import/Export Keys, Up: UI Server Protocol + +A.9 UI Server: Create and verify checksums for files. +===================================================== + +First, the input files need to be specified by one or more ‘FILE’ +commands. Afterwards, the actual operation is requested: + + -- Command: CHECKSUM_CREATE_FILES --nohup + Request that checksums are created for the files specified by + ‘FILE’. The choice of checksum algorithm and the destination + storage and format for the created checksums depend on the + preferences of the user and the functionality provided by the UI + server. For directories, the server may offer multiple options to + the user (for example ignore or process recursively). + + The option ‘--nohup’ is mandatory. It is currently unspecified + what should happen if ‘--nohup’ is not present. Because ‘--nohup’ + is present, the server always returns ‘OK’ promptly, and completes + the operation asynchronously. + + -- Command: CHECKSUM_VERIFY_FILES --nohup + Request that checksums are created for the files specified by + ‘FILE’ and verified against previously created and stored + checksums. The choice of checksum algorithm and the source storage + and format for previously created checksums depend on the + preferences of the user and the functionality provided by the UI + server. For directories, the server may offer multiple options to + the user (for example ignore or process recursively). + + If the source storage of previously created checksums is available + to the user through the Windows shell, this command may also accept + such checksum files as ‘FILE’ arguments. In this case, the UI + server should instead verify the checksum of the referenced files + as if they were given as INPUT files. + + The option ‘--nohup’ is mandatory. It is currently unspecified + what should happen if ‘--nohup’ is not present. Because ‘--nohup’ + is present, the server always returns ‘OK’ promptly, and completes + the operation asynchronously. + + +File: gpgme.info, Node: Miscellaneous UI Server Commands, Prev: UI Server Checksum Files, Up: UI Server Protocol + +A.10 Miscellaneous UI Server Commands +===================================== + +The server needs to implement the following commands which are not +related to a specific command: + + -- Command: GETINFO WHAT + This is a multi purpose command, commonly used to return a variety + of information. The required subcommands as described by the WHAT + parameter are: + + ‘pid’ + Return the process id of the server in decimal notation using + an Assuan data line. + +To allow the server to pop up the windows in the correct relation to the +client, the client is advised to tell the server by sending the option: + + -- Command option: window-id NUMBER + The NUMBER represents the native window ID of the clients current + window. On Windows systems this is a windows handle (‘HWND’) and + on X11 systems it is the ‘X Window ID’. The number needs to be + given as a hexadecimal value so that it is easier to convey pointer + values (e.g. ‘HWND’). + +A client may want to fire up the certificate manager of the server. To +do this it uses the Assuan command: + + -- Command: START_KEYMANAGER + The server shall pop up the main window of the key manager (aka + certificate manager). The client expects that the key manager is + brought into the foregound and that this command immediately + returns (does not wait until the key manager has been fully brought + up). + +A client may want to fire up the configuration dialog of the server. To +do this it uses the Assuan command: + + -- Command: START_CONFDIALOG + The server shall pop up its configuration dialog. The client + expects that this dialog is brought into the foregound and that + this command immediately returns (i.e. it does not wait until the + dialog has been fully brought up). + +When doing an operation on a mail, it is useful to let the server know +the address of the sender: + + -- Command: SENDER [--info] [--protocol=NAME] EMAIL + EMAIL is the plain ASCII encoded address ("addr-spec" as per + RFC-2822) enclosed in angle brackets. The address set with this + command is valid until a successful completion of the operation or + until a ‘RESET’ command. A second command overrides the effect of + the first one; if EMAIL is not given and ‘--info’ is not used, the + server shall use the default signing key. + + If option ‘--info’ is not given, the server shall also suggest a + protocol to use for signing. The client may use this suggested + protocol on its own discretion. The same status line as with + PREP_ENCRYPT is used for this. + + The option ‘--protocol’ may be used to give the server a hint on + which signing protocol should be preferred. + +To allow the UI-server to visually identify a running operation or to +associate operations the server MAY support the command: + + -- Command: SESSION NUMBER [STRING] + The NUMBER is an arbitrary value, a server may use to associate + simultaneous running sessions. It is a 32 bit unsigned integer + with ‘0’ as a special value indicating that no session association + shall be done. + + If STRING is given, the server may use this as the title of a + window or, in the case of an email operation, to extract the + sender’s address. The string may contain spaces; thus no + plus-escaping is used. + + This command may be used at any time and overrides the effect of + the last command. A ‘RESET’ undoes the effect of this command. + + File: gpgme.info, Node: Debugging, Next: Deprecated Functions, Prev: UI Server Protocol, Up: Top Appendix B How to solve problems @@ -642,7 +968,7 @@ attributes. *Note Information About Keys::. return NULL; -- Function: const char * gpgme_get_sig_ulong_attr (gpgme_ctx_t CTX, - int IDX, gpgme_attr_t WAHT, int WHATIDX) + int IDX, gpgme_attr_t WHAT, int WHATIDX) The function ‘gpgme_get_sig_ulong_attr’ is equivalent to: gpgme_verify_result_t result; @@ -1980,6 +2306,8 @@ Concept Index * ASSUAN: Assuan. (line 6) * attributes, of a key: Information About Keys. (line 6) +* auditlog: Additional Logs. (line 6) +* auditlog, of the engine: Additional Logs. (line 6) * autoconf: Using Automake. (line 6) * automake: Using Automake. (line 6) * backend: Protocols and Engines. (line 6) @@ -2069,6 +2397,7 @@ Concept Index * error values, printing of: Error Strings. (line 6) * event loop, external: Using External Event Loops. (line 6) +* flags, of a context: Context Flags. (line 6) * From:: Setting the Sender. (line 6) * GDK, using GPGME with: I/O Callback Example GDK. (line 6) @@ -2245,6 +2574,8 @@ Function and Data Index (line 12) * gpgme_data_new_from_cbs: Callback Based Data Buffers. (line 80) +* gpgme_data_new_from_estream: File Based Data Buffers. + (line 49) * gpgme_data_new_from_fd: File Based Data Buffers. (line 10) * gpgme_data_new_from_file: Memory Based Data Buffers. @@ -2290,7 +2621,7 @@ Function and Data Index * gpgme_edit_cb_t: Deprecated Functions. (line 37) * gpgme_encrypt_result_t: Encrypting a Plaintext. - (line 118) + (line 241) * gpgme_engine_check_version: Engine Version Check. (line 67) * gpgme_engine_info_t: Engine Information. (line 6) @@ -2331,8 +2662,7 @@ Function and Data Index (line 25) * gpgme_genkey_result_t: Generating Keys. (line 381) * gpgme_get_armor: ASCII Armor. (line 13) -* gpgme_get_ctx_flag: Status Message Callback. - (line 109) +* gpgme_get_ctx_flag: Context Flags. (line 121) * gpgme_get_dirinfo: Engine Version Check. (line 6) * gpgme_get_engine_info: Engine Information. (line 46) @@ -2341,8 +2671,8 @@ Function and Data Index * gpgme_get_io_cbs: Registering I/O Callbacks. (line 44) * gpgme_get_key: Listing Keys. (line 178) -* gpgme_get_keylist_mode: Key Listing Mode. (line 83) -* gpgme_get_offline: Offline Mode. (line 25) +* gpgme_get_keylist_mode: Key Listing Mode. (line 95) +* gpgme_get_offline: Offline Mode. (line 31) * gpgme_get_passphrase_cb: Passphrase Callback. (line 63) * gpgme_get_pinentry_mode: Pinentry Mode. (line 18) * gpgme_get_progress_cb: Progress Meter Callback. @@ -2407,7 +2737,7 @@ Function and Data Index * gpgme_op_decrypt: Decrypt. (line 6) * gpgme_op_decrypt_ext: Decrypt. (line 30) * gpgme_op_decrypt_ext_start: Decrypt. (line 60) -* gpgme_op_decrypt_result: Decrypt. (line 144) +* gpgme_op_decrypt_result: Decrypt. (line 164) * gpgme_op_decrypt_start: Decrypt. (line 20) * gpgme_op_decrypt_verify: Decrypt and Verify. (line 6) * gpgme_op_decrypt_verify_start: Decrypt and Verify. (line 30) @@ -2421,29 +2751,39 @@ Function and Data Index (line 72) * gpgme_op_encrypt: Encrypting a Plaintext. (line 6) +* gpgme_op_encrypt_ext: Encrypting a Plaintext. + (line 131) +* gpgme_op_encrypt_ext_start: Encrypting a Plaintext. + (line 224) * gpgme_op_encrypt_result: Encrypting a Plaintext. - (line 129) + (line 252) * gpgme_op_encrypt_sign: Encrypting a Plaintext. - (line 140) + (line 263) +* gpgme_op_encrypt_sign_ext: Encrypting a Plaintext. + (line 288) +* gpgme_op_encrypt_sign_ext_start: Encrypting a Plaintext. + (line 304) * gpgme_op_encrypt_sign_start: Encrypting a Plaintext. - (line 151) + (line 274) * gpgme_op_encrypt_start: Encrypting a Plaintext. - (line 100) -* gpgme_op_export: Exporting Keys. (line 46) -* gpgme_op_export_ext: Exporting Keys. (line 79) -* gpgme_op_export_ext_start: Exporting Keys. (line 101) -* gpgme_op_export_keys: Exporting Keys. (line 113) -* gpgme_op_export_keys_start: Exporting Keys. (line 140) -* gpgme_op_export_start: Exporting Keys. (line 67) + (line 113) +* gpgme_op_export: Exporting Keys. (line 50) +* gpgme_op_export_ext: Exporting Keys. (line 83) +* gpgme_op_export_ext_start: Exporting Keys. (line 105) +* gpgme_op_export_keys: Exporting Keys. (line 117) +* gpgme_op_export_keys_start: Exporting Keys. (line 144) +* gpgme_op_export_start: Exporting Keys. (line 71) * gpgme_op_genkey: Generating Keys. (line 304) * gpgme_op_genkey_result: Generating Keys. (line 418) * gpgme_op_genkey_start: Generating Keys. (line 369) +* gpgme_op_getauditlog: Additional Logs. (line 9) +* gpgme_op_getauditlog_start: Additional Logs. (line 54) * gpgme_op_import: Importing Keys. (line 9) * gpgme_op_import_ext: Deprecated Functions. (line 22) * gpgme_op_import_keys: Importing Keys. (line 35) * gpgme_op_import_keys_start: Importing Keys. (line 65) -* gpgme_op_import_result: Importing Keys. (line 168) +* gpgme_op_import_result: Importing Keys. (line 174) * gpgme_op_import_start: Importing Keys. (line 24) * gpgme_op_interact: Advanced Key Editing. (line 23) @@ -2485,7 +2825,7 @@ Function and Data Index * gpgme_op_trustlist_next: Listing Trust Items. (line 27) * gpgme_op_trustlist_start: Listing Trust Items. (line 6) * gpgme_op_verify: Verify. (line 6) -* gpgme_op_verify_result: Verify. (line 283) +* gpgme_op_verify_result: Verify. (line 290) * gpgme_op_verify_start: Verify. (line 26) * gpgme_passphrase_cb_t: Passphrase Callback. (line 10) * gpgme_pinentry_mode_t: Pinentry Mode. (line 26) @@ -2509,8 +2849,7 @@ Function and Data Index * gpgme_result_ref: Result Management. (line 15) * gpgme_result_unref: Result Management. (line 23) * gpgme_set_armor: ASCII Armor. (line 6) -* gpgme_set_ctx_flag: Status Message Callback. - (line 41) +* gpgme_set_ctx_flag: Context Flags. (line 6) * gpgme_set_engine_info: Engine Configuration. (line 11) * gpgme_set_global_flag: Library Version Check. diff --git a/doc/gpgme.texi b/doc/gpgme.texi index cd7bb4b..e04c301 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -14,7 +14,7 @@ @syncodeindex pg fn @copying -Copyright @copyright{} 2002--2008, 2010, 2012--2017 g10 Code GmbH. +Copyright @copyright{} 2002--2008, 2010, 2012--2018 g10 Code GmbH. @quotation Permission is granted to copy, distribute and/or modify this document @@ -732,7 +732,7 @@ directory part is used as the default installation directory; the Windows. @item require-gnupg -Set the mimimum version of the required GnuPG engine. If that version +Set the minimum version of the required GnuPG engine. If that version is not met, GPGME fails early instead of trying to use the existent version. The given version must be a string with major, minor, and micro number. Example: "2.1.0". @@ -1909,6 +1909,25 @@ data object was successfully created, and @code{GPG_ERR_ENOMEM} if not enough memory is available. @end deftypefun +@deftypefun gpgme_error_t gpgme_data_new_from_estream (@w{gpgme_data_t *@var{dh}}, @w{gpgrt_stream_t @var{stream}}) +The function @code{gpgme_data_new_from_estream} creates a new +@code{gpgme_data_t} object and uses the gpgrt stream @var{stream} to read +from (if used as an input data object) and write to (if used as an +output data object). + +When using the data object as an input buffer, the function might read +a bit more from the stream than is actually needed by the crypto +engine in the desired operation because of internal buffering. + +Note that GPGME assumes that the stream is in blocking mode. Errors +during I/O operations, except for EINTR, are usually fatal for crypto +operations. + +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +data object was successfully created, and @code{GPG_ERR_ENOMEM} if not +enough memory is available. +@end deftypefun + @node Callback Based Data Buffers @subsection Callback Based Data Buffers @@ -2425,7 +2444,9 @@ started. In fact, these references are accessed through the * Passphrase Callback:: Getting the passphrase from the user. * Progress Meter Callback:: Being informed about the progress. * Status Message Callback:: Status messages received from gpg. +* Context Flags:: Additional flags for a context. * Locale:: Setting the locale of a context. +* Additional Logs:: Additional logs of a context. @end menu @@ -2440,9 +2461,9 @@ the context @var{ctx} to @var{proto}. All crypto operations will be performed by the crypto engine configured for that protocol. @xref{Protocols and Engines}. -Setting the protocol with @code{gpgme_set_protocol} does not check if -the crypto engine for that protocol is available and installed -correctly. @xref{Engine Version Check}. +Setting the protocol with @code{gpgme_set_protocol} does intentionally +not check if the crypto engine for that protocol is available and +installed correctly. @xref{Engine Version Check}. The function returns the error code @code{GPG_ERR_NO_ERROR} if the protocol could be set successfully, and @code{GPG_ERR_INV_VALUE} if @@ -2606,22 +2627,26 @@ valid pointer. @deftypefun void gpgme_set_offline (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{yes}}) @since{1.6.0} -The function @code{gpgme_set_offline} specifies if offline mode -should be used. By default, offline mode is not used. +The function @code{gpgme_set_offline} specifies if offline mode should +be used. Offline mode is disabled if @var{yes} is zero, and enabled +otherwise. By default, offline mode is disabled. -The offline mode specifies if dirmngr should be used to do additional -validation that might require connections to external services. -(e.g. CRL / OCSP checks). +The details of the offline mode depend on the used protocol and its +backend engine. It may eventually be extended to be more stricter and +for example completely disable the use of Dirmngr for any engine. -Offline mode only affects the keylist mode @code{GPGME_KEYLIST_MODE_VALIDATE} -and is only relevant to the CMS crypto engine. Offline mode -is ignored otherwise. +For the CMS protocol the offline mode specifies whether Dirmngr shall +be used to do additional validation that might require connecting +external services (e.g. CRL / OCSP checks). Here the offline mode +only affects the keylist mode @code{GPGME_KEYLIST_MODE_VALIDATE}. -This option may be extended in the future to completely disable -the use of dirmngr for any engine. +For the OpenPGP protocol offline mode entirely disables the use of the +Dirmngr and will thus guarantee that no network connections are done +as part of an operation on this context. It has only an effect with +GnuPG versions 2.1.23 or later. + +For all other protocols the offline mode is currently ignored. -Offline mode is disabled if @var{yes} is zero, and enabled -otherwise. @end deftypefun @deftypefun int gpgme_get_offline (@w{gpgme_ctx_t @var{ctx}}) @@ -2758,6 +2783,8 @@ The @code{GPGME_KEYLIST_MODE_LOCAL} symbol specifies that the local keyring should be searched for keys in the keylisting operation. This is the default. +Using only this option results in a @code{--list-keys}. + @item GPGME_KEYLIST_MODE_EXTERN The @code{GPGME_KEYLIST_MODE_EXTERN} symbol specifies that an external source should be searched for keys in the keylisting operation. The @@ -2765,6 +2792,15 @@ type of external source is dependent on the crypto engine used and whether it is combined with @code{GPGME_KEYLIST_MODE_LOCAL}. For example, it can be a remote keyserver or LDAP certificate server. +Using only this option results in a @code{--search-keys} for +@code{GPGME_PROTOCOL_OpenPGP} and something similar to +@code{--list-external-keys} for @code{GPGME_PROTOCOL_CMS}. + +@item GPGME_KEYLIST_MODE_LOCATE +This is a shortcut for the combination of +@code{GPGME_KEYLIST_MODE_LOCAL} and @code{GPGME_KEYLIST_MODE_EXTERN}, which +results in a @code{--locate-keys} for @code{GPGME_PROTOCOL_OpenPGP}. + @item GPGME_KEYLIST_MODE_SIGS The @code{GPGME_KEYLIST_MODE_SIGS} symbol specifies that the key signatures should be included in the listed keys. @@ -2995,6 +3031,10 @@ or @var{ctx} is not a valid pointer, @code{NULL} is returned in both variables. @end deftypefun +@node Context Flags +@subsection Context Flags +@cindex flags, of a context + @deftypefun {gpgme_error_t} gpgme_set_ctx_flag @ (@w{gpgme_ctx_t @var{ctx}}, @ @w{const char *@var{name}}, @ @@ -3065,6 +3105,50 @@ a message signed by a brand new key (which you naturally will not have on your local keyring), the operator can tell both your IP address and the time when you verified the signature. +@item "request-origin" +The string given in @var{value} is passed to the GnuPG engines to +request restrictions based on the origin of the request. Valid values +are documented in the GnuPG manual and the gpg man page under the +option @option{--request-origin}. Requires at least GnuPG 2.2.6 to have an +effect. + +@item "no-symkey-cache" +For OpenPGP disable the passphrase cache used for symmetrical en- and +decryption. This cache is based on the message specific salt value. +Requires at least GnuPG 2.2.7 to have an effect. + +@item "ignore-mdc-error" +This flag passes the option @option{--ignore-mdc-error} to gpg. This +can be used to force decryption of a message which failed due to a +missing integrity check. This flag must be used with great caution +and only if it is a known non-corrupted old message and the decryption +result of the former try had the decryption result flag +@code{legacy_cipher_nomdc} set. For failsafe reasons this flag is +reset after each operation. + +@item "auto-key-locate" +The string given in @var{value} is passed to gpg. This can be used +to change the behavior of a @code{GPGME_KEYLIST_MODE_LOCATE} keylisting. +Valid values are documented in the GnuPG manual and the gpg man page under +the option @option{--auto-key-locate}. +Requires at least GnuPG 2.1.18. + +Note: Keys retrieved through @code{auto-key-locate} are automatically +imported in the keyring. + +@item trust-model +@since{1.11.2} + +Change the trust-model for all GnuPG engine operations. An empty +string sets the trust-model back to the users default. If the +trust-model is not supported by GnuPG the behavior is undefined +and will likely cause all operations to fail. Example: "tofu+pgp". + +This options should be used carefully with a strict version +requirement. In some versions of GnuPG setting the +trust-model changes the default trust-model for future operations. +A change in the trust-model also can have unintended side effects, like +rebuilding the trust-db. @end table @@ -3126,6 +3210,70 @@ The function returns an error if not enough memory is available. @end deftypefun +@node Additional Logs +@subsection Additional Logs +@cindex auditlog, of the engine +@cindex auditlog + +Additional logs can be associated with a context. These logs are +engine specific and can be be obtained with @code{gpgme_op_getauditlog}. + +@deftypefun gpgme_error_t gpgme_op_getauditlog @ + (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{output}}, @ + @w{unsigned int @var{flags}}) +@since{1.1.1} + +The function @code{gpgme_op_getauditlog} is used to obtain additional +logs as specified by @var{flags} into the @var{output} data. If + +The function returns the error code @code{GPG_ERR_NO_ERROR} if a +log could be queried from the engine, and @code{GPG_ERR_NOT_IMPLEMENTED} +if the log specified in @var{flags} is not available for this engine. +If no log is available @code{GPG_ERR_NO_DATA} is returned. + +The value in @var{flags} is a bitwise-or combination of one or +multiple of the following bit values: + +@table @code +@item GPGME_AUDITLOG_DIAG +@since{1.11.2} + +Obtain diagnostic output which would be written to @code{stderr} in +interactive use of the engine. This can be used to provide additional +diagnostic information in case of errors in other operations. + +Note: If log-file has been set in the configuration the log will +be empty and @code{GPG_ERR_NO_DATA} will be returned. + +Implemented for: @code{GPGME_PROTOCOL_OpenPGP} + +@item GPGME_AUDITLOG_DEFAULT +@since{1.11.2} + +This flag has the value 0 for compatibility reasons. Obtains additional +information from the engine by issuing the @code{GETAUDITLOG} command. +For @code{GPGME_PROTOCOL_CMS} this provides additional information about +the X509 certificate chain. + +Implemented for: @code{GPGME_PROTOCOL_CMS} + +@item GPGME_AUDITLOG_HTML +@since{1.1.1} + +Same as @code{GPGME_AUDITLOG_DEFAULT} but in HTML. + +Implemented for: @code{GPGME_PROTOCOL_CMS} +@end table +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_getauditlog_start @ + (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{output}}, @ + @w{unsigned int @var{flags}}) +@since{1.1.1} + +This is the asynchronous variant of @code{gpgme_op_getauditlog}. +@end deftypefun + @node Key Management @section Key Management @cindex key management @@ -3883,7 +4031,7 @@ does only work for OpenPGP and requires at least version 2.1.13 of GnuPG. @var{userid} is commonly the mail address associated with the key. -GPGME does not require a specificy syntax but if more than a mail +GPGME does not require a specific syntax but if more than a mail address is given, RFC-822 style format is suggested. The value is expected to be in UTF-8 encoding (i.e. no IDN encoding for mail addresses). This is a required parameter. @@ -4092,7 +4240,7 @@ requires at least version 2.1.13 of GnuPG. @var{userid} is the user ID to add to the key. A user ID is commonly the mail address to be associated with the key. GPGME does not -require a specificy syntax but if more than a mail address is given, +require a specific syntax but if more than a mail address is given, RFC-822 style format is suggested. The value is expected to be in UTF-8 encoding (i.e. no IDN encoding for mail addresses). This is a required parameter. @@ -4534,6 +4682,10 @@ If this flag is used with @code{GPGME_EXPORT_MODE_SECRET} for an X.509 key the export format will be changed to PKCS#12 which also includes the certificate. This flag may not be used with OpenPGP. +@item GPGME_EXPORT_MODE_NOUID +@since{1.12.0 - experimental} +Do not export user ids. Works only with certain gpg version. + @end table @@ -4811,6 +4963,12 @@ The number of keys not imported. @item gpgme_import_status_t imports A list of gpgme_import_status_t objects which contain more information about the keys for which an import was attempted. + +@item int skipped_v3_keys +For security reasons modern versions of GnuPG do not anymore support +v3 keys (created with PGP 2.x) and ignores them on import. This +counter provides the number of such skipped v3 keys. + @end table @end deftp @@ -5263,7 +5421,7 @@ if @var{cipher} or @var{plain} is not a valid pointer. @since{1.8.0} The function @code{gpgme_op_decrypt_ext} is the same as -@code{gpgme_op_decrypt_ext} but has an additional argument +@code{gpgme_op_decrypt} but has an additional argument @var{flags}. If @var{flags} is 0 both function behave identically. The value in @var{flags} is a bitwise-or combination of one or @@ -5274,7 +5432,7 @@ multiple of the following bit values: @since{1.8.0} The @code{GPGME_DECRYPT_VERIFY} symbol specifies that this function -shall exacty act as @code{gpgme_op_decrypt_verify}. +shall exactly act as @code{gpgme_op_decrypt_verify}. @item GPGME_DECRYPT_UNWRAP @since{1.8.0} @@ -5286,7 +5444,7 @@ counterpart to @code{GPGME_ENCRYPT_WRAP}. @end table -The function returns the error codes as descriped for +The function returns the error codes as described for @code{gpgme_op_decrypt} respective @code{gpgme_op_encrypt}. @end deftypefun @@ -5342,7 +5500,7 @@ This is a pointer to a structure used to store the result of a data, you can retrieve the pointer to the result with @code{gpgme_op_decrypt_result}. As with all result structures, it this structure shall be considered read-only and an application must -not allocated such a strucure on its own. The structure contains the +not allocate such a strucure on its own. The structure contains the following members: @table @code @@ -5352,9 +5510,22 @@ algorithm that is not supported. @item unsigned int wrong_key_usage : 1 @since{0.9.0} - This is true if the key was not used according to its policy. +@item unsigned int legacy_cipher_nomdc : 1 +@since{1.11.2} +The message was made by a legacy algorithm without any integrity +protection. This might be an old but legitimate message. + +@item unsigned int is_mime : 1; +@since{1.11.0} +The message claims that the content is a MIME object. + +@item unsigned int is_de_vs : 1; +@since{1.10.0} +The message was encrypted in a VS-NfD compliant way. This is a +specification in Germany for a restricted communication level. + @item gpgme_recipient_t recipients @since{1.1.0} @@ -5378,6 +5549,13 @@ You must not try to access this member of the struct unless or @code{gpgme_get_ctx_flag (ctx, "export-session-key")} returns true (non-empty string). +@item char *symkey_algo +@since{1.11.0} + +A string with the symmetric encryption algorithm and mode using the +format ".". Note that the deprecated non-MDC encryption mode of +OpenPGP is given as "PGPCFB". + @end table @end deftp @@ -5561,7 +5739,7 @@ The defined bits are: A policy requirement was not met. @item GPGME_SIGSUM_SYS_ERROR - A system error occured. + A system error occurred. @item GPGME_SIGSUM_TOFU_CONFLICT A TOFU conflict was detected. @@ -5690,7 +5868,15 @@ verification was attempted. @item char *file_name This is the filename of the original plaintext message file if it is -known, otherwise this is a null pointer. +known, otherwise this is a null pointer. Warning: The filename is +not covered by the signature. + +@item unsigned int is_mime : 1; +@since{1.11.0} + +The message claims that the content is a MIME object. Warning: This +flag is not covered by the signature. + @end table @end deftp @@ -6077,7 +6263,7 @@ also expect a sign command. The @code{GPGME_ENCRYPT_SYMMETRIC} symbol specifies that the output should be additionally encrypted symmetrically even -if recipients are provided. This feature is only supported for +if recipients are provided. This feature is only supported for the OpenPGP crypto engine. @item GPGME_ENCRYPT_THROW_KEYIDS @@ -6096,6 +6282,18 @@ The @code{GPGME_ENCRYPT_WRAP} symbol specifies that the input is an OpenPGP message and not a plain data. This is the counterpart to @code{GPGME_DECRYPT_UNWRAP}. +@item GPGME_ENCRYPT_WANT_ADDRESS +@since{1.11.0} + +The @code{GPGME_ENCRYPT_WANT_ADDRESS} symbol requests that all +supplied keys or key specifications include a syntactically valid mail +address. If this is not the case the operation is not even tried and +the error code @code{GPG_ERR_INV_USER_ID} is returned. Only the +address part of the key specification is conveyed to the backend. As +of now the key must be specified using the @var{recpstring} argument +of the extended encrypt functions. This feature is currently only +supported for the OpenPGP crypto engine. + @end table If @code{GPG_ERR_UNUSABLE_PUBKEY} is returned, some recipients in @@ -6137,6 +6335,128 @@ pointer, and @code{GPG_ERR_UNUSABLE_PUBKEY} if @var{rset} does not contain any valid recipients. @end deftypefun +@deftypefun gpgme_error_t gpgme_op_encrypt_ext @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{recp}[]}, @ + @w{const char *@var{recpstring}}, @ + @w{gpgme_encrypt_flags_t @var{flags}}, @ + @w{gpgme_data_t @var{plain}}, @w{gpgme_data_t @var{cipher}}) + +@since{1.11.0} + +This is an extended version of @code{gpgme_op_encrypt} with +@var{recpstring} as additional parameter. If @var{recp} is NULL and +@var{recpstring} is not NULL, the latter is expected to be a linefeed +delimited string with the set of key specifications. In contrast to +@var{recp} the keys are given directly as strings and there is no need +to first create key objects. Leading and trailing white space is +remove from each line in @var{recpstring}. The keys are then passed +verbatim to the backend engine. + +For the OpenPGP backend several special keywords are supported to +modify the operation. These keywords are given instead of a key +specification. The currently supported keywords are: + +@table @code +@item --hidden +@itemx --no-hidden +These keywords toggle between normal and hidden recipients for all +following key specifications. When a hidden recipient is requested +the gpg option @option{-R} (or @option{-F} in file mode) is used +instead of @option{-r} (@option{-f} in file mode). + +@item --file +@itemx --no-file +These keywords toggle between regular and file mode for all following +key specification. In file mode the option @option{-f} or @option{-F} +is passed to gpg. At least GnuPG version 2.1.14 is required to handle +these options. The @code{GPGME_ENCRYPT_WANT_ADDRESS} flag is ignored +in file mode. + +@item -- +This keyword disables all keyword detection up to the end of the +string. All keywords are treated as verbatim arguments. + +@end table + +To create a @var{recpstring} it is often useful to employ a strconcat +style function. For example this function creates a string to encrypt +to two keys: + +@example +char * +xbuild_recpstring (const char *key1, const char *key2) +@{ + char *result = gpgrt_strconcat ("--\n", key1, "\n", key2, NULL); + if (!result) + @{ perror ("strconcat failed"); exit (2); @} + return result; +@} +@end example + +Note the use of the double dash here; unless you want to specify a +keyword, it is a good idea to avoid any possible trouble with key +specifications starting with a double dash. The used strconcat +function is available in Libgpg-error 1.28 and later; Libgpg-error +(aka Gpgrt) is a dependency of GPGME. The number of arguments to +@code{gpgrt_strconcat} is limited to 47 but that should always be +sufficient. In case a larger and non-fixed number of keys are to be +supplied the following code can be used: + +@example +char * +xbuild_long_recpstring (void) +@{ + gpgrt_stream_t memfp; + const char *s; + void *result; + + memfp = gpgrt_fopenmem (0, "w+b"); + if (!memfp) + @{ perror ("fopenmem failed"); exit (2); @} + gpgrt_fputs ("--", memfp); + while ((s = get_next_keyspec ())) + @{ + gpgrt_fputc ('\n', memfp); + gpgrt_fputs (s, memfp); + @} + gpgrt_fputc (0, memfp); + if (gpgrt_ferror (memfp)) + @{ perror ("writing to memstream failed"); exit (2); @} + if (gpgrt_fclose_snatch (memfp, &result, NULL)) + @{ perror ("fclose_snatch failed"); exit (2); @} + return result; +@} +@end example + +In this example @code{get_next_keyspec} is expected to return the next +key to be added to the string. Please take care: Encrypting to a +large number of recipients is often questionable due to security +reasons and also for the technicality that all keys are currently +passed on the command line to @command{gpg} which has as a platform +specific length limitation. +@end deftypefun + + +@deftypefun gpgme_error_t gpgme_op_encrypt_ext_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{recp}[]}, @ + @w{const char *@var{recpstring}}, @ + @w{gpgme_encrypt_flags_t @var{flags}}, @ + @w{gpgme_data_t @var{plain}}, @w{gpgme_data_t @var{cipher}}) + +@since{1.11.0} + +This is an extended version of @code{gpgme_op_encrypt_start} with +@var{recpstring} as additional parameter. If @var{recp} is NULL and +@var{recpstring} is not NULL, the latter is expected to be a linefeed +delimited string with the set of key specifications. In contrast to +@var{recp} the keys are given directly as strings and there is no need +to first create key objects. The keys are passed verbatim to the +backend engine. + +@end deftypefun + @deftp {Data type} {gpgme_encrypt_result_t} This is a pointer to a structure used to store the result of a @code{gpgme_op_encrypt} operation. After successfully encrypting @@ -6186,6 +6506,44 @@ if @var{ctx}, @var{rset}, @var{plain} or @var{cipher} is not a valid pointer. @end deftypefun +@deftypefun gpgme_error_t gpgme_op_encrypt_sign_ext @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{recp}[]}, @ + @w{const char *@var{recpstring}}, @ + @w{gpgme_encrypt_flags_t @var{flags}}, @ + @w{gpgme_data_t @var{plain}}, @w{gpgme_data_t @var{cipher}}) + +@since{1.11.0} + +This is an extended version of @code{gpgme_op_encrypt_sign} with +@var{recpstring} as additional parameter. If @var{recp} is NULL and +@var{recpstring} is not NULL, the latter is expected to be a linefeed +delimited string with the set of key specifications. In contrast to +@var{recp} the keys are given directly as strings and there is no need +to first create the key objects. The keys are passed verbatim to the +backend engine. + +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_encrypt_sign_ext_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{recp}[]}, @ + @w{const char *@var{recpstring}}, @ + @w{gpgme_encrypt_flags_t @var{flags}}, @ + @w{gpgme_data_t @var{plain}}, @w{gpgme_data_t @var{cipher}}) + +@since{1.11.0} + +This is an extended version of @code{gpgme_op_encrypt_sign_start} with +@var{recpstring} as additional parameter. If @var{recp} is NULL and +@var{recpstring} is not NULL, the latter is expected to be a linefeed +delimited string with the set of key specifications. In contrast to +@var{recp} the keys are given directly as strings and there is no need +to first create the key objects. The keys are passed verbatim to the +backend engine. + +@end deftypefun + @node Miscellaneous @section Miscellaneous operations @@ -6539,7 +6897,7 @@ returned. Synchronous operations running in parallel, as well as key and trust item list operations, do not affect @code{gpgme_wait}. In a multi-threaded environment, only one thread should ever call -@code{gpgme_wait} at any time, irregardless if @var{ctx} is specified +@code{gpgme_wait} at any time, regardless of whether @var{ctx} is specified or not. This means that all calls to this function should be fully synchronized by locking primitives. It is safe to start asynchronous operations while a thread is running in @code{gpgme_wait}. @@ -7871,7 +8229,7 @@ The function @code{gpgme_get_sig_string_attr} is equivalent to: @end example @end deftypefun -@deftypefun {const char *} gpgme_get_sig_ulong_attr (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_attr_t @var{waht}}, @w{int @var{whatidx}}) +@deftypefun {const char *} gpgme_get_sig_ulong_attr (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_attr_t @var{what}}, @w{int @var{whatidx}}) The function @code{gpgme_get_sig_ulong_attr} is equivalent to: @example diff --git a/doc/uiserver.texi b/doc/uiserver.texi index 6938aee..e001d12 100644 --- a/doc/uiserver.texi +++ b/doc/uiserver.texi @@ -564,7 +564,7 @@ do this it uses the Assuan command: @deffn Command START_KEYMANAGER The server shall pop up the main window of the key manager (aka certificate manager). The client expects that the key manager is brought -into the foregound and that this command immediatley returns (does not +into the foregound and that this command immediately returns (does not wait until the key manager has been fully brought up). @end deffn @@ -575,7 +575,7 @@ do this it uses the Assuan command: @deffn Command START_CONFDIALOG The server shall pop up its configuration dialog. The client expects that this dialog is brought into the foregound and that this command -immediatley returns (i.e. it does not wait until the dialog has been +immediately returns (i.e. it does not wait until the dialog has been fully brought up). @end deffn diff --git a/gpgme.spec b/gpgme.spec index 1a79ae6..9ae2e39 100644 --- a/gpgme.spec +++ b/gpgme.spec @@ -1,10 +1,10 @@ # This is a template. The dist target uses it to create the real file. Summary: GPGME - GnuPG Made Easy Name: gpgme -Version: 1.10.0 +Version: 1.13.1 Release: 1 URL: https://gnupg.org/gpgme.html -Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz +Source: https://www.gnupg.org/ftp/gcrypt/gpgme/%{name}-%{version}.tar.gz Group: Development/Libraries Copyright: GPL BuildRoot: %{_tmppath}/%{name}-%{version} @@ -38,10 +38,12 @@ make distclean %post /sbin/ldconfig /sbin/install-info %{_infodir}/gpgme.info.gz %{_infodir}/dir +/sbin/install-info %{_infodir}/gpgme-python-howto.info.gz %{_infodir}/dir %preun if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/gpgme.info.gz %{_infodir}/dir + /sbin/install-info --delete %{_infodir}/gpgme-python-howto.info.gz %{_infodir}/dir fi %postun @@ -57,6 +59,7 @@ fi %{_includedir}/gpgme.h %{_datadir}/aclocal/gpgme.m4 %{_infodir}/gpgme.info* +%{_infodir}/gpgme-python-howto.info* %changelog * Sat Aug 30 2003 Robert Schiele diff --git a/gpgme.spec.in b/gpgme.spec.in index ddc0de3..6ad79e3 100644 --- a/gpgme.spec.in +++ b/gpgme.spec.in @@ -4,7 +4,7 @@ Name: gpgme Version: @pkg_version@ Release: 1 URL: https://gnupg.org/gpgme.html -Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz +Source: https://www.gnupg.org/ftp/gcrypt/gpgme/%{name}-%{version}.tar.gz Group: Development/Libraries Copyright: GPL BuildRoot: %{_tmppath}/%{name}-%{version} @@ -38,10 +38,12 @@ make distclean %post /sbin/ldconfig /sbin/install-info %{_infodir}/gpgme.info.gz %{_infodir}/dir +/sbin/install-info %{_infodir}/gpgme-python-howto.info.gz %{_infodir}/dir %preun if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/gpgme.info.gz %{_infodir}/dir + /sbin/install-info --delete %{_infodir}/gpgme-python-howto.info.gz %{_infodir}/dir fi %postun @@ -57,6 +59,7 @@ fi %{_includedir}/gpgme.h %{_datadir}/aclocal/gpgme.m4 %{_infodir}/gpgme.info* +%{_infodir}/gpgme-python-howto.info* %changelog * Sat Aug 30 2003 Robert Schiele diff --git a/lang/Makefile.am b/lang/Makefile.am index fd3ce4e..0cc36c2 100644 --- a/lang/Makefile.am +++ b/lang/Makefile.am @@ -14,10 +14,10 @@ # Public License for more details. # # You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later SUBDIRS = $(ENABLED_LANGUAGES) -DIST_SUBDIRS = cl cpp qt python +DIST_SUBDIRS = cl cpp qt python js EXTRA_DIST = README diff --git a/lang/Makefile.in b/lang/Makefile.in index 9ca2ef6..92f34df 100644 --- a/lang/Makefile.in +++ b/lang/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -30,10 +30,20 @@ # Public License for more details. # # You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -97,8 +107,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lang -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/build-aux/mkinstalldirs README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 \ @@ -113,8 +121,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_HEADER = $(top_builddir)/conf/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -171,6 +180,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -209,6 +220,7 @@ AWK = @AWK@ BUILD_FILEVERSION = @BUILD_FILEVERSION@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +BUILD_VERSION = @BUILD_VERSION@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ @@ -249,6 +261,7 @@ GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ GPGME_QT_LIBS = @GPGME_QT_LIBS@ +GPGRT_CONFIG = @GPGRT_CONFIG@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ @@ -264,6 +277,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ +LDADD_FOR_TESTS_KLUDGE = @LDADD_FOR_TESTS_KLUDGE@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ @@ -392,7 +406,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = $(ENABLED_LANGUAGES) -DIST_SUBDIRS = cl cpp qt python +DIST_SUBDIRS = cl cpp qt python js EXTRA_DIST = README all: all-recursive @@ -409,7 +423,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lang/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lang/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -704,6 +717,8 @@ uninstall-am: mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/lang/README b/lang/README index 0c5bbd9..afd7b08 100644 --- a/lang/README +++ b/lang/README @@ -13,3 +13,4 @@ cl Common Lisp cpp C++ qt Qt-Framework API python Python 2 and 3 (module name: gpg) +js Native messaging client for the gpgme-json server. diff --git a/lang/cl/Makefile.am b/lang/cl/Makefile.am index 553926e..a42c49c 100644 --- a/lang/cl/Makefile.am +++ b/lang/cl/Makefile.am @@ -13,12 +13,11 @@ # 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 -# 02111-1307, USA +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later -clfiles = gpgme.asd gpgme-package.lisp gpgme.lisp +clfiles = gpgme.asd gpgme-package.lisp gpgme-grovel.lisp gpgme.lisp # FIXME: Should be configurable. clfilesdir = $(datadir)/common-lisp/source/gpgme diff --git a/lang/cl/Makefile.in b/lang/cl/Makefile.in index 8cb02bd..2604047 100644 --- a/lang/cl/Makefile.in +++ b/lang/cl/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -29,13 +29,22 @@ # 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 -# 02111-1307, USA +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -99,9 +108,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lang/cl -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/build-aux/mkinstalldirs $(srcdir)/gpgme.asd.in \ - $(dist_clfiles_DATA) README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 \ @@ -116,8 +122,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_clfiles_DATA) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_HEADER = $(top_builddir)/conf/config.h CONFIG_CLEAN_FILES = gpgme.asd CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -169,6 +177,8 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(clfilesdir)" DATA = $(dist_clfiles_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gpgme.asd.in \ + $(top_srcdir)/build-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -182,6 +192,7 @@ AWK = @AWK@ BUILD_FILEVERSION = @BUILD_FILEVERSION@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +BUILD_VERSION = @BUILD_VERSION@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ @@ -222,6 +233,7 @@ GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ GPGME_QT_LIBS = @GPGME_QT_LIBS@ +GPGRT_CONFIG = @GPGRT_CONFIG@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ @@ -237,6 +249,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ +LDADD_FOR_TESTS_KLUDGE = @LDADD_FOR_TESTS_KLUDGE@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ @@ -364,7 +377,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -clfiles = gpgme.asd gpgme-package.lisp gpgme.lisp +clfiles = gpgme.asd gpgme-package.lisp gpgme-grovel.lisp gpgme.lisp # FIXME: Should be configurable. clfilesdir = $(datadir)/common-lisp/source/gpgme @@ -385,7 +398,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lang/cl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lang/cl/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -587,6 +599,8 @@ uninstall-am: uninstall-dist_clfilesDATA mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_clfilesDATA +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/lang/cl/README b/lang/cl/README index b4a3c81..7d8e87d 100644 --- a/lang/cl/README +++ b/lang/cl/README @@ -3,33 +3,50 @@ Common Lisp Support for GPGME Requirements: -ASDF Packaging Support -CFFI Foreign Function Interface -gpg-error GPG Error Codes +ASDF Packaging Support +CFFI Foreign Function Interface +trivial-garbage Finalizers +gpg-error GPG Error Codes Use with: -> (asdf:operate 'asdf:load-op ':gpgme) +> (asdf:load-system "gpgme") Examples -------- -(with-open-file (stream "/tmp/myout" :direction :output - :if-exists :supersede :element-type '(unsigned-byte 8)) +(with-open-file (out "/tmp/myout" + :direction :output + :if-exists :supersede + :element-type '(unsigned-byte 8)) (with-context (ctx) - (setf (armor-p ctx) t) + (setf (armorp ctx) t) (op-export ctx "DEADBEEF" out))) (with-context (ctx) (with-output-to-string (out) - (setf (armor-p ctx) t) + (setf (armorp ctx) t) (op-export ctx "McTester" out))) (gpgme:with-context (ctx :armor t) (with-output-to-string (out) (gpgme:op-export ctx "McTester" out))) +(gpgme:with-context (ctx :armor t) + (let ((recipient1 (gpgme:get-key ctx "DEADBEEF")) + (recipient2 (gpgme:get-key ctx "Alice")) + (message "Hello, world!")) + (with-output-to-string (out) + (with-input-from-string (in message) + (gpgme:op-encrypt ctx (vector recipient1 recipient2) in out))))) + +(gpgme:with-context (ctx :armor t) + (let ((message "Hello, world!")) + (with-output-to-string (out) + (with-input-from-string (in message) + (gpgme:op-sign ctx in out))))) + TODO ---- diff --git a/lang/cl/gpgme-grovel.lisp b/lang/cl/gpgme-grovel.lisp new file mode 100644 index 0000000..52dce6c --- /dev/null +++ b/lang/cl/gpgme-grovel.lisp @@ -0,0 +1,31 @@ +;;;; gpgme-grovel.lisp + +;;; 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 GPGME; if not, write to the Free Software Foundation, +;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +(in-package :gpgme) + + +(include "errno.h" "sys/types.h") + +(constant (+ebadf+ "EBADF")) + +(ctype off-t "off_t") +(ctype size-t "size_t") +(ctype ssize-t "ssize_t") + +(cvar ("errno" *errno*) :int) diff --git a/lang/cl/gpgme-package.lisp b/lang/cl/gpgme-package.lisp index 239d57f..25e01a8 100644 --- a/lang/cl/gpgme-package.lisp +++ b/lang/cl/gpgme-package.lisp @@ -26,7 +26,8 @@ (defpackage #:gpgme (:use #:common-lisp #:cffi #:gpg-error) - + (:import-from #:trivial-garbage + #:finalize) (:export #:check-version #:*version* #:context diff --git a/lang/cl/gpgme.asd b/lang/cl/gpgme.asd index 4db4d63..43c4744 100644 --- a/lang/cl/gpgme.asd +++ b/lang/cl/gpgme.asd @@ -25,11 +25,14 @@ (in-package #:gpgme-system) (defsystem gpgme - :description "GnuPG Made Easy." - :author "g10 Code GmbH" - :version "1.10.0" - :licence "GPL" - :depends-on ("cffi" "gpg-error") - :components ((:file "gpgme-package") - (:file "gpgme" - :depends-on ("gpgme-package")))) + :description "GnuPG Made Easy." + :author "g10 Code GmbH" + :version "1.13.1" + :licence "GPL" + :defsystem-depends-on ("cffi-grovel") + :depends-on ("cffi" "gpg-error" "trivial-garbage") + :components ((:file "gpgme-package") + (:cffi-grovel-file "gpgme-grovel" + :depends-on ("gpgme-package")) + (:file "gpgme" + :depends-on ("gpgme-package" "gpgme-grovel")))) diff --git a/lang/cl/gpgme.asd.in b/lang/cl/gpgme.asd.in index 86e8d51..6c5bd1f 100644 --- a/lang/cl/gpgme.asd.in +++ b/lang/cl/gpgme.asd.in @@ -25,11 +25,14 @@ (in-package #:gpgme-system) (defsystem gpgme - :description "GnuPG Made Easy." - :author "g10 Code GmbH" - :version "@VERSION@" - :licence "GPL" - :depends-on ("cffi" "gpg-error") - :components ((:file "gpgme-package") - (:file "gpgme" - :depends-on ("gpgme-package")))) + :description "GnuPG Made Easy." + :author "g10 Code GmbH" + :version "@VERSION@" + :licence "GPL" + :defsystem-depends-on ("cffi-grovel") + :depends-on ("cffi" "gpg-error" "trivial-garbage") + :components ((:file "gpgme-package") + (:cffi-grovel-file "gpgme-grovel" + :depends-on ("gpgme-package")) + (:file "gpgme" + :depends-on ("gpgme-package" "gpgme-grovel")))) diff --git a/lang/cl/gpgme.lisp b/lang/cl/gpgme.lisp index 74cb9ed..a0d5f3d 100644 --- a/lang/cl/gpgme.lisp +++ b/lang/cl/gpgme.lisp @@ -24,6 +24,12 @@ (in-package :gpgme) +(deftype byte-array () + '(simple-array (unsigned-byte 8) (*))) + +(deftype character-array () + '(simple-array character (*))) + ;;; Debugging. (defvar *debug* nil "If debugging output should be given or not.") @@ -38,23 +44,15 @@ ;;; System dependencies. -; FIXME: Use cffi-grovel? cffi-unix? - -(defctype size-t :unsigned-int "The system size_t type.") - -(defctype ssize-t :int "The system ssize_t type.") - -; FIXME: Ouch. Grovel? Helper function? -(defconstant +seek-set+ 0) -(defconstant +seek-cur+ 1) -(defconstant +seek-end+ 2) -(defctype off-t :long-long "The system off_t type.") - +; Access to ERRNO. (defcfun ("strerror" c-strerror) :string (err :int)) -; Access to ERRNO. -; FIXME: Ouch. Should be grovel + helper function. +(defun get-errno () + *errno*) + +(defun set-errno (errno) + (setf *errno* errno)) (define-condition system-error (error) ((errno :initarg :errno :reader system-error-errno)) @@ -64,14 +62,6 @@ (c-strerror (system-error-errno c))))) (:documentation "Signalled when an errno is encountered.")) -(defconstant +ebadf+ 1) - -; Ouch. -(defun get-errno () - +ebadf+) - -;;; More about errno below. - ; Needed to write passphrases. (defcfun ("write" c-write) ssize-t (fd :int) @@ -83,14 +73,6 @@ (when (< res 0) (error 'system-error :errno (get-errno))) res)) -;;; More about errno here. - -(defun set-errno (errno) - (cond - ; Works on GNU/Linux. - ((eql errno +ebadf+) (system-write -1 (null-pointer) 0)) - (t (error 'invalid-errno :errno errno)))) - ;;; ;;; C Interface Definitions ;;; @@ -100,22 +82,39 @@ ;;; Some new data types used for easier translation. ;;; The number of include certs. Translates to NIL for default. -(defctype cert-int-t :int) +(defctype cert-int-t + (:wrapper :int + :from-c translate-cert-int-t-from-foreign + :to-c translate-cert-int-t-to-foreign)) ;;; A string that may be NIL to indicate a null pointer. -(defctype string-or-nil-t :string) +(defctype string-or-nil-t + (:wrapper :string + :to-c translate-string-or-nil-t-to-foreign)) ;;; Some opaque data types used by GPGME. -(defctype gpgme-ctx-t :pointer "The GPGME context type.") +(defctype gpgme-ctx-t + (:wrapper :pointer + :to-c translate-gpgme-ctx-t-to-foreign) + "The GPGME context type.") -(defctype gpgme-data-t :pointer "The GPGME data object type.") +(defctype gpgme-data-t + (:wrapper :pointer + :to-c translate-gpgme-data-t-to-foreign) + "The GPGME data object type.") ;;; Wrappers for the libgpg-error library. -(defctype gpgme-error-t gpg-error::gpg-error-t "The GPGME error type.") +(defctype gpgme-error-t + (:wrapper gpg-error::gpg-error-t + :from-c translate-gpgme-error-t-from-foreign + :to-c translate-gpgme-error-t-to-foreign) + "The GPGME error type.") -(defctype gpgme-error-no-signal-t gpg-error::gpg-error-t +(defctype gpgme-error-no-signal-t + (:wrapper gpg-error::gpg-error-t + :from-c translate-gpgme-error-no-signal-t-from-foreign) "The GPGME error type (this version does not signal conditions in translation.") (defctype gpgme-err-code-t gpg-error::gpg-err-code-t @@ -141,11 +140,11 @@ (gpg-err-source err)) (defun gpgme-strerror (err) - "Return a string containig a description of the error code." + "Return a string containing a description of the error code." (gpg-strerror err)) (defun gpgme-strsource (err) - "Return a string containig a description of the error source." + "Return a string containing a description of the error source." (gpg-strsource err)) (defun gpgme-err-code-from-errno (err) @@ -171,7 +170,11 @@ (:none 0) (:binary 1) (:base64 2) - (:armor 3)) + (:armor 3) + (:url 4) + (:urlesc 5) + (:url0 6) + (:mime 7)) ;;; @@ -182,7 +185,11 @@ (:rsa-s 3) (:elg-e 16) (:dsa 17) - (:elg 20)) + (:ecc 18) + (:elg 20) + (:ecdsa 301) + (:ecdh 302) + (:eddsa 303)) (defcenum gpgme-hash-algo-t "Hash algorithms from libgcrypt." @@ -196,6 +203,7 @@ (:sha256 8) (:sha384 9) (:sha512 10) + (:sha224 11) (:md4 301) (:crc32 302) (:crc32-rfc1510 303) @@ -225,7 +233,14 @@ (defcenum gpgme-protocol-t "The available protocols." (:openpgp 0) - (:cms 1)) + (:cms 1) + (:gpgconf 2) + (:assuan 3) + (:g13 4) + (:uiserver 5) + (:spawn 6) + (:default 254) + (:unknown 255)) ;;; @@ -234,6 +249,10 @@ (:local 1) (:extern 2) (:sigs 4) + (:sig-notations) + (:with-secret 16) + (:with-tofu 32) + (:ephemeral 128) (:validate 256)) ;;; @@ -243,10 +262,12 @@ (:human-readable 1) (:critical 2)) -(defctype gpgme-sig-notation-t :pointer +(defctype gpgme-sig-notation-t + (:wrapper :pointer + :from-c translate-gpgme-sig-notation-t-from-foreign) "Signature notation pointer type.") -;; FIXME: Doesn't this depend on endianess? +;; FIXME: Doesn't this depend on endianness? (defbitfield (gpgme-sig-notation-bitfield :unsigned-int) (:human-readable 1) (:critical 2)) @@ -263,15 +284,115 @@ ;;; -;; FIXME: Add status codes. (defcenum gpgme-status-code-t "The possible status codes for the edit operation." (:eof 0) - (:enter 1)) + (:enter 1) + (:leave 2) + (:abort 3) + (:goodsig 4) + (:badsig 5) + (:errsig 6) + (:badarmor 7) + (:rsa-or-idea 8) + (:keyexpired 9) + (:keyrevoked 10) + (:trust-undefined 11) + (:trust-never 12) + (:trust-marginal 13) + (:trust-fully 14) + (:trust-ultimate 15) + (:shm-info 16) + (:shm-get 17) + (:shm-get-bool 18) + (:shm-get-hidden 19) + (:need-passphrase 20) + (:validsig 21) + (:sig-id 22) + (:enc-to 23) + (:nodata 24) + (:bad-passphrase 25) + (:no-pubkey 26) + (:no-seckey 27) + (:need-passphrase-sym 28) + (:decryption-failed 29) + (:decryption-okay 30) + (:missing-passphrase 31) + (:good-passphrase 32) + (:goodmdc 33) + (:badmdc 34) + (:errmdc 35) + (:imported 36) + (:import-ok 37) + (:import-problem 38) + (:import-res 39) + (:file-start 40) + (:file-done 41) + (:file-error 42) + (:begin-decryption 43) + (:end-decryption 44) + (:begin-encryption 45) + (:end-encryption 46) + (:delete-problem 47) + (:get-bool 48) + (:get-line 49) + (:get-hidden 50) + (:got-it 51) + (:progress 52) + (:sig-created 53) + (:session-key 54) + (:notation-name 55) + (:notation-data 56) + (:policy-url 57) + (:begin-stream 58) + (:end-stream 59) + (:key-created 60) + (:userid-hint 61) + (:unexpected 62) + (:inv-recp 63) + (:no-recp 64) + (:already-signed 65) + (:sigexpired 66) + (:expsig 67) + (:expkeysig 68) + (:truncated 69) + (:error 70) + (:newsig 71) + (:revkeysig 72) + (:sig-subpacket 73) + (:need-passphrase-pin 74) + (:sc-op-failure 75) + (:sc-op-success 76) + (:cardctrl 77) + (:backup-key-created 78) + (:pka-trust-bad 79) + (:pka-trust-good 80) + (:plaintext 81) + (:inv-sgnr 82) + (:no-sgnr 83) + (:success 84) + (:decryption-info 85) + (:plaintext-length 86) + (:mountpoint 87) + (:pinentry-launched 88) + (:attribute 89) + (:begin-signing 90) + (:key-not-created 91) + (:inquire-maxlen 92) + (:failure 93) + (:key-considered 94) + (:tofu-user 95) + (:tofu-stats 96) + (:tofu-stats-long 97) + (:notation-flags 98) + (:decryption-compliance-mode 99) + (:verification-compliance-mode 100)) ;;; -(defctype gpgme-engine-info-t :pointer +(defctype gpgme-engine-info-t + (:wrapper :pointer + :from-c translate-gpgme-engine-info-t-to-foreign) "The engine information structure pointer type.") (defcstruct gpgme-engine-info @@ -285,9 +406,12 @@ ;;; -(defctype gpgme-subkey-t :pointer "A subkey from a key.") +(defctype gpgme-subkey-t + (:wrapper :pointer + :from-c translate-gpgme-subkey-t-from-foreign) + "A subkey from a key.") -;; FIXME: Doesn't this depend on endianess? +;; FIXME: Doesn't this depend on endianness? (defbitfield (gpgme-subkey-bitfield :unsigned-int) "The subkey bitfield." (:revoked 1) @@ -299,7 +423,9 @@ (:can-certify 64) (:secret 128) (:can-authenticate 256) - (:is-qualified 512)) + (:is-qualified 512) + (:is-cardkey 1024) + (:is-de-vs 2048)) (defcstruct gpgme-subkey "Subkey from a key." @@ -314,10 +440,12 @@ (expires :long)) -(defctype gpgme-key-sig-t :pointer +(defctype gpgme-key-sig-t + (:wrapper :pointer + :from-c translate-gpgme-key-sig-t-from-foreign) "A signature on a user ID.") -;; FIXME: Doesn't this depend on endianess? +;; FIXME: Doesn't this depend on endianness? (defbitfield (gpgme-key-sig-bitfield :unsigned-int) "The key signature bitfield." (:revoked 1) @@ -343,10 +471,12 @@ (sig-class :unsigned-int)) -(defctype gpgme-user-id-t :pointer +(defctype gpgme-user-id-t + (:wrapper :pointer + :from-c translate-gpgme-user-id-t-from-foreign) "A user ID from a key.") -;; FIXME: Doesn't this depend on endianess? +;; FIXME: Doesn't this depend on endianness? (defbitfield (gpgme-user-id-bitfield :unsigned-int) "The user ID bitfield." (:revoked 1) @@ -365,10 +495,13 @@ (-last-keysig gpgme-key-sig-t)) -(defctype gpgme-key-t :pointer +(defctype gpgme-key-t + (:wrapper :pointer + :from-c translate-gpgme-key-t-from-foreign + :to-c translate-gpgme-key-t-to-foreign) "A key from the keyring.") -;; FIXME: Doesn't this depend on endianess? +;; FIXME: Doesn't this depend on endianness? (defbitfield (gpgme-key-bitfield :unsigned-int) "The key bitfield." (:revoked 1) @@ -693,7 +826,9 @@ ;;; -(defctype gpgme-invalid-key-t :pointer +(defctype gpgme-invalid-key-t + (:wrapper :pointer + :from-c translate-gpgme-invalid-key-t-from-foreign) "An invalid key structure.") (defcstruct gpgme-invalid-key @@ -708,7 +843,9 @@ "Encryption result structure." (invalid-recipients gpgme-invalid-key-t)) -(defctype gpgme-op-encrypt-result-t :pointer +(defctype gpgme-op-encrypt-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-encrypt-result-t-from-foreign) "An encryption result structure.") (defcfun ("gpgme_op_encrypt_result" c-gpgme-op-encrypt-result) @@ -716,7 +853,15 @@ (ctx gpgme-ctx-t)) (defbitfield gpgme-encrypt-flags-t - (:always-trust 1)) + (:always-trust 1) + (:no-encrypt-to 2) + (:prepare 4) + (:expect-sign 8) + (:no-compress 16) + (:symmetric 32) + (:throw-keyids 64) + (:wrap 128) + (:want-address 256)) (defcfun ("gpgme_op_encrypt_start" c-gpgme-op-encrypt-start) gpgme-error-t (ctx gpgme-ctx-t) @@ -749,7 +894,9 @@ ;;; Decryption. -(defctype gpgme-recipient-t :pointer +(defctype gpgme-recipient-t + (:wrapper :pointer + :from-c translate-gpgme-recipient-t-from-foreign) "A recipient structure.") (defcstruct gpgme-recipient @@ -762,7 +909,9 @@ (defbitfield gpgme-op-decrypt-result-bitfield "Decryption result structure bitfield." - (:wrong-key-usage 1)) + (:wrong-key-usage 1) + (:is-de-vs 2) + (:is-mine 4)) (defcstruct gpgme-op-decrypt-result "Decryption result structure." @@ -771,7 +920,9 @@ (recipients gpgme-recipient-t) (file-name :string)) -(defctype gpgme-op-decrypt-result-t :pointer +(defctype gpgme-op-decrypt-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-decrypt-result-t-from-foreign) "A decryption result structure.") (defcfun ("gpgme_op_decrypt_result" c-gpgme-op-decrypt-result) @@ -801,7 +952,9 @@ ;;; Signing. -(defctype gpgme-new-signature-t :pointer +(defctype gpgme-new-signature-t + (:wrapper :pointer + :from-c translate-gpgme-new-signature-t-from-foreign) "A new signature structure.") (defcstruct gpgme-new-signature @@ -821,7 +974,9 @@ (invalid-signers gpgme-invalid-key-t) (signatures gpgme-new-signature-t)) -(defctype gpgme-op-sign-result-t :pointer +(defctype gpgme-op-sign-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-sign-result-t-from-foreign) "A signing result structure.") (defcfun ("gpgme_op_sign_result" c-gpgme-op-sign-result) @@ -854,15 +1009,21 @@ (:crl-missing #x0100) (:crl-too-old #x0200) (:bad-policy #x0400) - (:sys-error #x0800)) + (:sys-error #x0800) + (:tofu-conflict #x1000)) -(defctype gpgme-signature-t :pointer +(defctype gpgme-signature-t + (:wrapper :pointer + :from-c translate-gpgme-signature-t-from-foreign) "A signature structure.") -;; FIXME: Doesn't this depend on endianess? +;; FIXME: Doesn't this depend on endianness? (defbitfield (gpgme-signature-bitfield :unsigned-int) "The signature bitfield." - (:wrong-key-usage 1)) + (:wrong-key-usage 1) + (:pka-trust 2) + (:chain-model 4) + (:is-de-vs 8)) (defcstruct gpgme-signature "Signature structure." @@ -884,7 +1045,9 @@ (signatures gpgme-signature-t) (file-name :string)) -(defctype gpgme-op-verify-result-t :pointer +(defctype gpgme-op-verify-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-verify-result-t-from-foreign) "A verify result structure.") (defcfun ("gpgme_op_verify_result" c-gpgme-op-verify-result) @@ -913,7 +1076,9 @@ (:subkey #x0008) (:secret #x0010)) -(defctype gpgme-import-status-t :pointer +(defctype gpgme-import-status-t + (:wrapper :pointer + :from-c translate-gpgme-import-status-t-from-foreign) "An import status structure.") (defcstruct gpgme-import-status @@ -941,7 +1106,9 @@ (not-imported :int) (imports gpgme-import-status-t)) -(defctype gpgme-op-import-result-t :pointer +(defctype gpgme-op-import-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-import-result-t-from-foreign) "An import status result structure.") (defcfun ("gpgme_op_import_result" c-gpgme-op-import-result) @@ -977,7 +1144,8 @@ (defbitfield (gpgme-genkey-flags-t :unsigned-int) "Flags used for the key generation result bitfield." (:primary #x0001) - (:sub #x0002)) + (:sub #x0002) + (:uid #x0004)) (defcstruct gpgme-op-genkey-result "Key generation result structure." @@ -1078,21 +1246,20 @@ ;;; cert-int-t is a helper type that takes care of representing the ;;; default number of certs as NIL. -(defmethod translate-from-foreign (value (type (eql 'cert-int-t))) +(defun translate-cert-int-t-from-foreign (value) (cond ((eql value +include-certs-default+) nil) (t value))) -(defmethod translate-to-foreign (value (type (eql 'cert-int-t))) +(defun translate-cert-int-t-to-foreign (value) (cond (value value) (t +include-certs-default+))) ;;; string-or-nil-t translates a null pointer to NIL and vice versa. ;;; Translation from foreign null pointer already works as expected. -;;; FIXME: May the "to foreign" conversion problem be a bug in CFFI? -(defmethod translate-to-foreign (value (type (eql 'string-or-nil-t))) +(defun translate-string-or-nil-t-to-foreign (value) (cond (value value) (t (null-pointer)))) @@ -1109,12 +1276,12 @@ ;;; FIXME: Should we use a hash table (or struct, or clos) instead of ;;; property list, as recommended by the Lisp FAQ? -(defmethod translate-from-foreign (value (type (eql 'gpgme-engine-info-t))) +(defun translate-gpgme-engine-info-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next protocol file-name version req-version home-dir) - value gpgme-engine-info) + value (:struct gpgme-engine-info)) (append (list protocol (list :file-name file-name :version version @@ -1122,55 +1289,53 @@ :home-dir home-dir)) next))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-invalid-key-t))) +(defun translate-gpgme-invalid-key-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next fpr reason) - value gpgme-invalid-key) + value (:struct gpgme-invalid-key)) (append (list (list :fpr fpr :reason reason)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-encrypt-result-t))) +(defun translate-gpgme-op-encrypt-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((invalid-recipients) - value gpgme-op-encrypt-result) + value (:struct gpgme-op-encrypt-result)) (list :encrypt (list :invalid-recipients invalid-recipients)))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-recipient-t))) +(defun translate-gpgme-recipient-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next keyid pubkey-algo status) - value gpgme-recipient) + value (:struct gpgme-recipient)) (append (list (list :keyid keyid :pubkey-algo pubkey-algo :status status)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-decrypt-result-t))) +(defun translate-gpgme-op-decrypt-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((unsupported-algorithm bitfield recipients file-name) - value gpgme-op-decrypt-result) + value (:struct gpgme-op-decrypt-result)) (list :decrypt (list :unsupported-algorithm unsupported-algorithm :bitfield bitfield :recipients recipients :file-name file-name)))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-new-signature-t))) +(defun translate-gpgme-new-signature-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next type pubkey-algo hash-algo timestamp fpr sig-class) - value gpgme-new-signature) + value (:struct gpgme-new-signature)) (append (list (list :type type :pubkey-algo pubkey-algo :hash-algo hash-algo @@ -1179,24 +1344,23 @@ :sig-class sig-class)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-sign-result-t))) +(defun translate-gpgme-op-sign-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((invalid-signers signatures) - value gpgme-op-sign-result) + value (:struct gpgme-op-sign-result)) (list :sign (list :invalid-signers invalid-signers :signatures signatures)))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-signature-t))) +(defun translate-gpgme-signature-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next summary fpr status notations timestamp exp-timestamp bitfield validity validity-reason pubkey-algo hash-algo) - value gpgme-signature) + value (:struct gpgme-signature)) (append (list (list :summary summary :fpr fpr :status status @@ -1209,29 +1373,27 @@ :pubkey-algo pubkey-algo)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-verify-result-t))) +(defun translate-gpgme-op-verify-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((signatures file-name) - value gpgme-op-verify-result) + value (:struct gpgme-op-verify-result)) (list :verify (list :signatures signatures :file-name file-name)))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-import-status-t))) +(defun translate-gpgme-import-status-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next fpr result status) - value gpgme-import-status) + value (:struct gpgme-import-status)) (append (list (list :fpr fpr :result result :status status)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-import-result-t))) +(defun translate-gpgme-op-import-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots @@ -1240,7 +1402,7 @@ new-revocations secret-read secret-imported secret-unchanged skipped-new-keys not-imported imports) - value gpgme-op-import-result) + value (:struct gpgme-op-import-result)) (list :verify (list :considered considered :no-user-id no-user-id :imported imported @@ -1272,19 +1434,19 @@ (gpgme-strsource (gpgme-error-value c))))) (:documentation "Signalled when a GPGME function returns an error.")) -(defmethod translate-from-foreign (value (name (eql 'gpgme-error-t))) +(defun translate-gpgme-error-t-from-foreign (value) "Raise a GPGME-ERROR if VALUE is non-zero." (when (not (eql (gpgme-err-code value) :gpg-err-no-error)) (error 'gpgme-error :gpgme-error value)) (gpg-err-canonicalize value)) -(defmethod translate-to-foreign (value (name (eql 'gpgme-error-t))) +(defun translate-gpgme-error-t-to-foreign (value) "Canonicalize the error value." (if (eql (gpgme-err-code value) :gpg-err-no-error) 0 (gpg-err-as-value value))) -(defmethod translate-from-foreign (value (name (eql 'gpgme-error-no-signal-t))) +(defun translate-gpgme-error-no-signal-t-from-foreign (value) "Canonicalize the error value." (gpg-err-canonicalize value)) @@ -1521,68 +1683,75 @@ ;;; The release callback removes the stream from the *data-handles* ;;; hash and releases the CBS structure that is used as the key in -;;; that hash. It is implicitely invoked (through GPGME) by +;;; that hash. It is implicitly invoked (through GPGME) by ;;; gpgme-data-release. (defcallback data-release-cb :void ((handle :pointer)) (unwind-protect (remhash (pointer-address handle) *data-handles*) (when (not (null-pointer-p handle)) (foreign-free handle)))) (defcallback data-read-cb ssize-t ((handle :pointer) (buffer :pointer) - (size size-t)) + (size size-t)) (when *debug* (format t "DEBUG: gpgme-data-read-cb: want ~A~%" size)) (let ((stream (gethash (pointer-address handle) *data-handles*))) (cond (stream (let* ((stream-type (stream-element-type stream)) - (seq (make-array size :element-type stream-type)) - (read (read-sequence seq stream))) - (loop for i from 0 to (- read 1) - do (setf (mem-aref buffer :unsigned-char i) - ;;; FIXME: This is a half-assed attempt at - ;;; supporting character streams. - (cond - ((eql stream-type 'character) - (char-code (elt seq i))) - (t (coerce (elt seq i) stream-type))))) - (when *debug* (format t "DEBUG: gpgme-data-read-cb: read ~A~%" read)) - read)) - (t (set-errno +ebadf+) - -1)))) + (seq (make-array size :element-type stream-type)) + (read (read-sequence seq stream))) + (cond + ((equal stream-type '(unsigned-byte 8)) + (dotimes (i read) + (setf (mem-aref buffer :unsigned-char i) + (aref (the byte-array seq) i)))) + ((eql stream-type 'character) + (dotimes (i read) + (setf (mem-aref buffer :unsigned-char i) + (char-code (aref (the character-array seq) i))))) + (t + (dotimes (i read) + (setf (mem-aref buffer :unsigned-char i) + (coerce (aref seq i) '(unsigned-byte 8)))))) + (when *debug* (format t "DEBUG: gpgme-data-read-cb: read ~A~%" read)) + read)) + (t + (set-errno +ebadf+) + -1)))) (defcallback data-write-cb ssize-t ((handle :pointer) (buffer :pointer) - (size size-t)) + (size size-t)) (when *debug* (format t "DEBUG: gpgme-data-write-cb: want ~A~%" size)) (let ((stream (gethash (pointer-address handle) *data-handles*))) (cond (stream (let* ((stream-type (stream-element-type stream)) - (seq (make-array size :element-type stream-type))) - (loop for i from 0 to (- size 1) - do (setf (elt seq i) - ;;; FIXME: This is a half-assed attempt at - ;;; supporting character streams. - (cond - ((eql stream-type 'character) - (code-char (mem-aref buffer :unsigned-char i))) - (t (coerce (mem-aref buffer :unsigned-char i) - stream-type))))) - (write-sequence seq stream) - ;;; FIXME: What about write errors? - size)) - (t (set-errno +ebadf+) - -1)))) + (seq (make-array size :element-type stream-type))) + (cond + ((equal stream-type '(unsigned-byte 8)) + (dotimes (i size) + (setf (aref (the byte-array seq) i) + (mem-aref buffer :unsigned-char i)))) + ((eql stream-type 'character) + (dotimes (i size) + (setf (aref (the character-array seq) i) + (code-char (mem-aref buffer :unsigned-char i))))) + (t + (dotimes (i size) + (setf (aref seq i) + (coerce (mem-aref buffer :unsigned-char i) stream-type))))) + (write-sequence seq stream) + size)) + (t + (set-errno +ebadf+) + -1)))) ;;; This little helper macro allows us to swallow the cbs structure by ;;; simply setting it to a null pointer, but still protect against ;;; conditions. (defmacro with-cbs-swallowed ((cbs) &body body) - `(let ((,cbs (foreign-alloc 'gpgme-data-cbs))) + `(let ((,cbs (foreign-alloc '(:struct gpgme-data-cbs)))) (unwind-protect (progn ,@body) (when (not (null-pointer-p ,cbs)) (foreign-free ,cbs))))) -;;; FIXME: Wrap the object and attach to it a finalizer. Requires new -;;; CFFI. Should we use an OO interface, ie make-instance? For now, -;;; we do not provide direct access to data objects. (defun gpgme-data-new (stream &key encoding file-name) "Allocate a new GPGME data object for STREAM." (with-foreign-object (dh-p 'gpgme-data-t) @@ -1592,12 +1761,14 @@ ;;; unique C pointer as handle anyway to look up the stream in the ;;; callback. This is a convenient one to use. (with-cbs-swallowed (cbs) - (setf - (foreign-slot-value cbs 'gpgme-data-cbs 'read) (callback data-read-cb) - (foreign-slot-value cbs 'gpgme-data-cbs 'write) (callback data-write-cb) - (foreign-slot-value cbs 'gpgme-data-cbs 'seek) (null-pointer) - (foreign-slot-value cbs 'gpgme-data-cbs 'release) (callback - data-release-cb)) + (setf (foreign-slot-value cbs '(:struct gpgme-data-cbs) 'read) + (callback data-read-cb)) + (setf (foreign-slot-value cbs '(:struct gpgme-data-cbs) 'write) + (callback data-write-cb)) + (setf (foreign-slot-value cbs '(:struct gpgme-data-cbs) 'seek) + (null-pointer)) + (setf (foreign-slot-value cbs '(:struct gpgme-data-cbs) 'release) + (callback data-release-cb)) (c-gpgme-data-new-from-cbs dh-p cbs cbs) (let ((dh (mem-ref dh-p 'gpgme-data-t))) (when encoding (gpgme-data-set-encoding dh encoding)) @@ -1612,19 +1783,40 @@ (when *debug* (format t "DEBUG: gpgme-data-new: ~A~%" dh)) dh)))) -;;; This function releases a GPGME data object. It implicitely +;;; This function releases a GPGME data object. It implicitly ;;; invokes the data-release-cb function to clean up associated junk. (defun gpgme-data-release (dh) "Release a GPGME data object." (when *debug* (format t "DEBUG: gpgme-data-release: ~A~%" dh)) (c-gpgme-data-release dh)) +(defclass data () + (c-data) ; The C data object pointer + (:documentation "The GPGME data type.")) + +(defmethod initialize-instance :after ((data data) &key streamspec + &allow-other-keys) + (let ((c-data (if (listp streamspec) + (apply #'gpgme-data-new streamspec) + (gpgme-data-new streamspec))) + (cleanup t)) + (unwind-protect + (progn + (setf (slot-value data 'c-data) c-data) + (finalize data (lambda () (gpgme-data-release c-data))) + (setf cleanup nil)) + (if cleanup (gpgme-data-release c-data))))) + +(defun translate-gpgme-data-t-to-foreign (value) + ;; Allow a pointer to be passed directly for the finalizer to work. + (cond + ((null value) (null-pointer)) + ((pointerp value) value) + (t (slot-value value 'c-data)))) + (defmacro with-gpgme-data ((dh streamspec) &body body) - `(let ((,dh (if (listp ,streamspec) - (apply 'gpgme-data-new ,streamspec) - (gpgme-data-new ,streamspec)))) - (unwind-protect (progn ,@body) - (when (not (null-pointer-p ,dh)) (gpgme-data-release ,dh))))) + `(let ((,dh (make-instance 'data :streamspec ,streamspec))) + ,@body)) (defun gpgme-data-get-encoding (dh) "Get the encoding associated with the data object DH." @@ -1693,7 +1885,7 @@ (setf cleanup nil)) (if cleanup (gpgme-release c-ctx))))) -(defmethod translate-to-foreign (value (type (eql 'gpgme-ctx-t))) +(defun translate-gpgme-ctx-t-to-foreign (value) ;; Allow a pointer to be passed directly for the finalizer to work. (if (pointerp value) value (slot-value value 'c-ctx))) @@ -1715,7 +1907,7 @@ (:documentation "Set the protocol of CONTEXT to PROTOCOL.")) ;;; FIXME: Adjust translator to reject invalid protocols. Currently, -;;; specifing an invalid protocol throws a "NIL is not 32 signed int" +;;; specifying an invalid protocol throws a "NIL is not 32 signed int" ;;; error. This is suboptimal. (defmethod (setf protocol) (protocol (ctx context)) (gpgme-set-protocol ctx protocol)) @@ -1848,11 +2040,11 @@ (setf (slot-value key 'c-key) c-key) (finalize key (lambda () (gpgme-key-unref c-key)))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-key-t))) +(defun translate-gpgme-key-t-from-foreign (value) (when *debug* (format t "DEBUG: import key: ~A~%" value)) (make-instance 'key :c-key value)) -(defmethod translate-to-foreign (value (type (eql 'gpgme-key-t))) +(defun translate-gpgme-key-t-to-foreign (value) ;; Allow a pointer to be passed directly for the finalizer to work. (if (pointerp value) value (slot-value value 'c-key))) @@ -1867,12 +2059,12 @@ ;;; and zero length value (omit?) and human-readable (convert to string). ;;; FIXME: Turn binary data into sequence or vector or what it should be. ;;; FIXME: Turn the whole thing into a hash? -(defmethod translate-from-foreign (value (type (eql 'gpgme-sig-notation-t))) +(defun translate-gpgme-sig-notation-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next name value name-len value-len flags bitfield) - value gpgme-sig-notation) + value (:struct gpgme-sig-notation)) (append (list (list :name name :value value @@ -1883,12 +2075,12 @@ next))))) ;;; FIXME: Deal nicer with timestamps. bitfield field name? -(defmethod translate-from-foreign (value (type (eql 'gpgme-subkey-t))) +(defun translate-gpgme-subkey-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next bitfield pubkey-algo length keyid fpr timestamp expires) - value gpgme-subkey) + value (:struct gpgme-subkey)) (append (list (list :bitfield bitfield :pubkey-algo pubkey-algo @@ -1899,13 +2091,13 @@ :expires expires)) next))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-key-sig-t))) +(defun translate-gpgme-key-sig-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next bitfield pubkey-algo keyid timestamp expires status uid name email comment sig-class) - value gpgme-key-sig) + value (:struct gpgme-key-sig)) (append (list (list :bitfield bitfield :pubkey-algo pubkey-algo @@ -1920,12 +2112,12 @@ :sig-class sig-class)) next))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-user-id-t))) +(defun translate-gpgme-user-id-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next bitfield validity uid name email comment signatures) - value gpgme-user-id) + value (:struct gpgme-user-id)) (append (list (list :bitfield bitfield :validity validity @@ -1941,7 +2133,7 @@ (with-foreign-slots ((bitfield protocol issuer-serial issuer-name chain-id owner-trust subkeys uids keylist-mode) - c-key gpgme-key) + c-key (:struct gpgme-key)) (list :bitfield bitfield :protocol protocol diff --git a/lang/cpp/Makefile.am b/lang/cpp/Makefile.am index 026ca00..724da6c 100644 --- a/lang/cpp/Makefile.am +++ b/lang/cpp/Makefile.am @@ -14,11 +14,10 @@ # 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 -# 02111-1307, USA +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later -SUBDIRS = src +SUBDIRS = src tests EXTRA_DIST = README diff --git a/lang/cpp/Makefile.in b/lang/cpp/Makefile.in index 0527499..801dfb0 100644 --- a/lang/cpp/Makefile.in +++ b/lang/cpp/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -30,12 +30,21 @@ # 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 -# 02111-1307, USA +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -99,8 +108,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lang/cpp -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/build-aux/mkinstalldirs README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 \ @@ -115,8 +122,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_HEADER = $(top_builddir)/conf/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -174,6 +182,8 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -212,6 +222,7 @@ AWK = @AWK@ BUILD_FILEVERSION = @BUILD_FILEVERSION@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +BUILD_VERSION = @BUILD_VERSION@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ @@ -252,6 +263,7 @@ GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ GPGME_QT_LIBS = @GPGME_QT_LIBS@ +GPGRT_CONFIG = @GPGRT_CONFIG@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ @@ -267,6 +279,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ +LDADD_FOR_TESTS_KLUDGE = @LDADD_FOR_TESTS_KLUDGE@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ @@ -394,7 +407,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = src +SUBDIRS = src tests EXTRA_DIST = README all: all-recursive @@ -411,7 +424,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lang/cpp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lang/cpp/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -706,6 +718,8 @@ uninstall-am: mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/lang/cpp/README b/lang/cpp/README index e142e37..16c9a4a 100644 --- a/lang/cpp/README +++ b/lang/cpp/README @@ -43,7 +43,7 @@ pattern so the documentation for GPGME itself provides a good way to start. The context structure in GPGME is mapped to a Context object in -GpgMEpp. Additional convienience code provides Data objects and +GpgMEpp. Additional convenience code provides Data objects and a Dataprovider interface that can be used to implement GPGME's data with any subclass by implementing the right callbacks. diff --git a/lang/cpp/src/Makefile.am b/lang/cpp/src/Makefile.am index 1e6bdc2..1b1de32 100644 --- a/lang/cpp/src/Makefile.am +++ b/lang/cpp/src/Makefile.am @@ -66,7 +66,8 @@ libgpgmepp_la_SOURCES = $(main_sources) $(gpgmepp_headers) context_vanilla.cpp \ $(interface_headers) $(private_gpgmepp_headers) AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \ - -DBUILDING_GPGMEPP + -DBUILDING_GPGMEPP -Wsuggest-override \ + -Wzero-as-null-pointer-constant libgpgmepp_la_LIBADD = ../../../src/libgpgme.la @LIBASSUAN_LIBS@ libgpgmepp_la_LDFLAGS = -no-undefined -version-info \ diff --git a/lang/cpp/src/Makefile.in b/lang/cpp/src/Makefile.in index 21b259d..7ae2d5e 100644 --- a/lang/cpp/src/Makefile.in +++ b/lang/cpp/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -37,7 +37,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -101,13 +111,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lang/cpp/src -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/build-aux/mkinstalldirs \ - $(srcdir)/GpgmeppConfig-w32.cmake.in.in \ - $(srcdir)/GpgmeppConfig.cmake.in.in \ - $(srcdir)/GpgmeppConfigVersion.cmake.in \ - $(srcdir)/gpgmepp_version.h.in $(top_srcdir)/build-aux/depcomp \ - $(gpgmeppinclude_HEADERS) $(nobase_gpgmeppinclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 \ @@ -122,8 +125,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(gpgmeppinclude_HEADERS) \ + $(nobase_gpgmeppinclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_HEADER = $(top_builddir)/conf/config.h CONFIG_CLEAN_FILES = GpgmeppConfig-w32.cmake.in GpgmeppConfig.cmake.in \ GpgmeppConfigVersion.cmake gpgmepp_version.h CONFIG_CLEAN_VPATH_FILES = @@ -195,7 +200,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/conf depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -263,6 +268,11 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/GpgmeppConfig-w32.cmake.in.in \ + $(srcdir)/GpgmeppConfig.cmake.in.in \ + $(srcdir)/GpgmeppConfigVersion.cmake.in $(srcdir)/Makefile.in \ + $(srcdir)/gpgmepp_version.h.in $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -276,6 +286,7 @@ AWK = @AWK@ BUILD_FILEVERSION = @BUILD_FILEVERSION@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +BUILD_VERSION = @BUILD_VERSION@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ @@ -316,6 +327,7 @@ GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ GPGME_QT_LIBS = @GPGME_QT_LIBS@ +GPGRT_CONFIG = @GPGRT_CONFIG@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ @@ -331,6 +343,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ +LDADD_FOR_TESTS_KLUDGE = @LDADD_FOR_TESTS_KLUDGE@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ @@ -503,7 +516,8 @@ libgpgmepp_la_SOURCES = $(main_sources) $(gpgmepp_headers) context_vanilla.cpp \ $(interface_headers) $(private_gpgmepp_headers) AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \ - -DBUILDING_GPGMEPP + -DBUILDING_GPGMEPP -Wsuggest-override \ + -Wzero-as-null-pointer-constant libgpgmepp_la_LIBADD = ../../../src/libgpgme.la @LIBASSUAN_LIBS@ libgpgmepp_la_LDFLAGS = -no-undefined -version-info \ @@ -530,7 +544,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lang/cpp/src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lang/cpp/src/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -941,6 +954,8 @@ uninstall-am: uninstall-gpgmeppincludeHEADERS uninstall-libLTLIBRARIES \ uninstall-local uninstall-nobase_gpgmeppincludeHEADERS \ uninstall-nodist_gpgmeppincludeHEADERS +.PRECIOUS: Makefile + @HAVE_W32_SYSTEM_TRUE@GpgmeppConfig.cmake: GpgmeppConfig-w32.cmake.in @HAVE_W32_SYSTEM_TRUE@ sed -e 's|[@]resolved_bindir@|$(bindir)|g' < "$<" | \ diff --git a/lang/cpp/src/callbacks.cpp b/lang/cpp/src/callbacks.cpp index f7692a0..21c2a81 100644 --- a/lang/cpp/src/callbacks.cpp +++ b/lang/cpp/src/callbacks.cpp @@ -76,7 +76,7 @@ gpgme_error_t passphrase_callback(void *opaque, const char *uid_hint, const char PassphraseProvider *provider = static_cast(opaque); bool canceled = false; gpgme_error_t err = GPG_ERR_NO_ERROR; - char *passphrase = provider ? provider->getPassphrase(uid_hint, desc, prev_was_bad, canceled) : 0 ; + char *passphrase = provider ? provider->getPassphrase(uid_hint, desc, prev_was_bad, canceled) : nullptr ; if (canceled) { err = make_error(GPG_ERR_CANCELED); } else { diff --git a/lang/cpp/src/configuration.cpp b/lang/cpp/src/configuration.cpp index 8ccc05e..33c812f 100644 --- a/lang/cpp/src/configuration.cpp +++ b/lang/cpp/src/configuration.cpp @@ -64,7 +64,7 @@ std::vector Component::load(Error &returnedError) // // 1. get a context: // - gpgme_ctx_t ctx_native = 0; + gpgme_ctx_t ctx_native = nullptr; if (const gpgme_error_t err = gpgme_new(&ctx_native)) { returnedError = Error(err); return std::vector(); @@ -74,7 +74,7 @@ std::vector Component::load(Error &returnedError) // // 2. load the config: // - gpgme_conf_comp_t conf_list_native = 0; + gpgme_conf_comp_t conf_list_native = nullptr; if (const gpgme_error_t err = gpgme_op_conf_load(ctx_native, &conf_list_native)) { returnedError = Error(err); return std::vector(); @@ -94,7 +94,7 @@ std::vector Component::load(Error &returnedError) } // now prevent double-free of next.get() and following: - head->next = 0; + head->next = nullptr; // now add a new Component to 'result' (may throw): result.resize(result.size() + 1); @@ -115,7 +115,7 @@ Error Component::save() const // // 1. get a context: // - gpgme_ctx_t ctx_native = 0; + gpgme_ctx_t ctx_native = nullptr; if (const gpgme_error_t err = gpgme_new(&ctx_native)) { return Error(err); } @@ -129,22 +129,22 @@ Error Component::save() const const char *Component::name() const { - return comp ? comp->name : 0 ; + return comp ? comp->name : nullptr; } const char *Component::description() const { - return comp ? comp->description : 0 ; + return comp ? comp->description : nullptr ; } const char *Component::programName() const { - return comp ? comp->program_name : 0 ; + return comp ? comp->program_name : nullptr ; } Option Component::option(unsigned int idx) const { - gpgme_conf_opt_t opt = 0; + gpgme_conf_opt_t opt = nullptr; if (comp) { opt = comp->options; } @@ -160,7 +160,7 @@ Option Component::option(unsigned int idx) const Option Component::option(const char *name) const { - gpgme_conf_opt_t opt = 0; + gpgme_conf_opt_t opt = nullptr; if (comp) { opt = comp->options; } @@ -177,7 +177,7 @@ Option Component::option(const char *name) const unsigned int Component::numOptions() const { unsigned int result = 0; - for (gpgme_conf_opt_t opt = comp ? comp->options : 0 ; opt ; opt = opt->next) { + for (gpgme_conf_opt_t opt = comp ? comp->options : nullptr ; opt ; opt = opt->next) { ++result; } return result; @@ -186,7 +186,7 @@ unsigned int Component::numOptions() const std::vector