aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix additional memleaks in thread testsAndre Heinecke2016-11-102-2/+10
| | | | | | | * tests/gpg/t-thread-keylist-verify.c (start_verify): Release data. (start_keylist): Unref keys. * tests/gpg/t-thread-keylist.c (start_keylist): Unref keys.
* tests: Improve new thread testsAndre Heinecke2016-11-102-0/+14
| | | | | | | | | | * tests/gpg/t-thread-keylist-verify.c (start_keylist): Mark arg as unused. Release context. (start_verify): Ditto. (main): Mark args as unused. * tests/gpg/t-thread-keylist.c (start_keylist): Mark arg as unused. Release context. (main): Mark args as unused.
* core: Use gpgrt locking for thread safenessAndre Heinecke2016-11-1014-539/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Require libgpg-error 1.17. No longer check for pthread. * doc/gpgme.texi: Document removed neccessity for thread safe gpgme flavours. * src/sema.h (DEFINE_GLOBAL_LOCK), (DEFINE_STATIC_LOCK, INIT_LOCK, DECLARE_LOCK) (DESTROY_LOCK, LOCK, UNLOCK): Change to gpgrt equivalents. * src/posix-sema.c, src/w32-sema.c: Removed. * src/Makefile.am: Remove libpthread and Update accordingly. * src/ath.c, src/ath.h (ath_mutex_init) (ath_mutex_destroy, ath_mutex_lock, ath_mutex_unlock): Removed. * src/ath.h (ATH_MUTEX_INITIALIZER): Removed. * src/version.c (do_subsystem_inits): sema_subsystem_init is no longer required. * tests/gpg/Makefile.am: Add new threading tests. (t_thread1_LDADD, t_cancel_LDADD): Use just gpgme. * tests/gpg/t-thread-keylist-verify.c, tests/gpg/t-thread-keylist.c: New. * src/gpgme-config.in: Use -lgpgme for thread-model pthread. -- Using gpgrt locks instead of pthread locks removes the neccessity to link pthread directly to gpgme and have a different, thread safe flavor of gpgme. Now gpgme is thread-safe if the conditions mentioned in the doc are met. As the cpp bindings linked against libgpgme and not libgpgme-pthread this fixes threading problems with them. libgpgme-pthread is removed but gpgme-config still supports --thread=pthread for compatibility with find scripts.
* python: Require at least GPGME 1.7 for out-of-tree builds.Justus Winter2016-11-091-2/+2
| | | | | | * lang/python/setup.py.in: Bump required version to 1.7. Signed-off-by: Justus Winter <[email protected]>
* w32: Better protect the IO-system's fd_tableWerner Koch2016-11-091-12/+26
| | | | | | | | | | | | * src/w32-io.c (fd_table_lock): New. (new_fd): Lock allocation of a new slot. (release_fd): Lock deallocation of a slot. -- Note that we lock only the allocation but not the sanitiy checks we do further down in the code. Signed-off-by: Werner Koch <[email protected]>
* cpp: Add API for swdb queriesAndre Heinecke2016-11-044-2/+362
| | | | | | * lang/cpp/src/swdbresult.cpp, lang/cpp/src/swdbresult.h (SwdbResult): New. * lang/cpp/src/Makefile.am: Update accordingly.
* cpp: Add more EngineInfo::Version ctorsAndre Heinecke2016-11-042-0/+18
| | | | | | * lang/cpp/src/engineinfo.h (EngineInfo::Version::Version(const char*)), (EngineInfo::Version::Version()): New.
* cpp: Don't include gpgme.h in tofuinfo headerAndre Heinecke2016-11-041-2/+0
| | | | | | | * lang/cpp/src/tofuinfo.h: Don't include gpgme.h -- No public header should include gpgme.h
* cpp: Extend gpgmefw for tofuinfo and swdb queryAndre Heinecke2016-11-041-0/+6
| | | | | * lang/cpp/src/gpgmefw.h (gpgme_tofu_info_t) (gpgme_query_swdb_result_t): New forwards.
* w32: Fix locating gpgconf on 64 bit systems.Werner Koch2016-11-041-2/+11
| | | | | | | | | | | | * src/w32-util.c (find_program_at_standard_place): Use access to check whether the binary is at CSIDL_PROGRAM_FILES before testing CSIDL_PROGRAM_FILESX86. -- Suggested-by: ticho Fixes-commit: a82e9b182f62966207cad0972be6fa284329a5a1 GnuPG-bug-id: 2814 Signed-off-by: Werner Koch <[email protected]>
* core: Add gpgme_op_query_swdb and helper.Werner Koch2016-11-0322-7/+736
| | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_query_swdb_result_t): New. (gpgme_op_query_swdb): New. (gpgme_op_query_swdb_result): New. * src/libgpgme.vers, src/gpgme.def: Add the two new functions. * src/queryswdb.c: New. * src/Makefile.am (main_sources): Add new file. * src/context.h (OPDATA_QUERY_SWDB): New. * src/engine-backend.h (struct engine_ops): Add field 'query_swdb'. Adjust all initializer. * src/engine.c (_gpgme_engine_op_query_swdb): New. * src/engine-gpgconf.c (parse_swdb_line): New. (gpgconf_query_swdb): New. (_gpgme_engine_ops_gpgconf): Register that function. * src/util.h (GPG_ERR_TOO_OLD): Define for older libgpg-error. (GPG_ERR_ENGINE_TOO_OLD): Ditto. * tests/run-swdb.c: New. * tests/Makefile.am (noinst_PROGRAMS): Add new debug tool. Signed-off-by: Werner Koch <[email protected]>
* qt: Change license of export / version headerAndre Heinecke2016-11-032-34/+54
| | | | | | | | | | | * lang/qt/src/qgpgme_export.h, lang/qt/src/qgpgme_version.h: Change license to GPLv2+ -- These files were based on copies from the cpp version/export headers. This change is meant to clarify the licensing by bringing it in line with the overall licesense of the qgpgme library.
* core: Make use of --homedir in gpgconf.Werner Koch2016-11-031-13/+45
| | | | | | | | | | * src/engine-gpgconf.c (struct engine_gpgconf): Add field 'version'. (have_gpgconf_version): New. (gpgconf_release): Free VERSION. (gpgconf_new): Set VERSION. (gpgconf_read, gpgconf_write): Use --homedir with recent gnupg. Signed-off-by: Werner Koch <[email protected]>
* qt: Fix build with g++ 4.8.xAndras Mantia2016-11-021-3/+3
| | | | | | | | | * lang/qt/src/defaultkeygenerationjob.cpp (DefaultKeyGenerationJob::start): Explicitly connect pointer in the QPointer. -- Commit message written by Andre Heinecke <[email protected]>
* qt, cpp: Fix versioning in cmake config and headerAndre Heinecke2016-11-025-13/+19
| | | | | | | | | | | | | | | | | * configure.ac (VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO): New subst variables for the version header. * lang/cpp/src/GpgmeppConfigVersion.cmake.in, lang/cpp/src/gpgmepp_version.h.in, lang/qt/src/QGpgmeConfigVersion.cmake.in, lang/qt/src/qgpgme_version.h.in: Use new variables. -- Using the LT_* variables was just wrong. Reporting the package version also makes more sense then the library version. Having different versions might make ABI breaks more visible by increasing the major version number, but to have different versions in the same package is too confusing imo and gpgme uses a versioning that is unrelated to the library version number.
* qt: Install cmake config into qgpgme subdirAndre Heinecke2016-11-021-6/+6
| | | | | | | | * lang/qt/src/Makefile.am: Install cmake config file in qgpgme subdir. -- Putting it together with Gpgmepp was done for historic reasons but the proper way is for each library to have its own subdir.
* qt: Require gpgmepp from cmake config scriptAndre Heinecke2016-11-021-0/+3
| | | | | | | * lang/qt/src/QGpgmeConfig.cmake.in.in: Require cpp. -- This fixes an error if a user only does find_package(QGpgme)
* qt, cpp: Add all generated files to cleanfilesAndre Heinecke2016-11-022-2/+5
| | | | | | * cpp/src/Makefile.am (CLEANFILES), qt/src/Makefile.am (CLEANFILES): Add all generated files to cleanfiles.
* qt: Add Distinguished Name parser from libkleoAndre Heinecke2016-11-014-2/+640
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/dn.cpp (DN, DN::Attribute): New public API. * lang/qt/src/dn.h: New. * lang/qt/src/Makefile.am: Update accordingly. -- This is a general useful API to work with X509 distinguished names and is useful when doing CMS with GpgME. Adding this class from libkleo allows kmails messagelib to avoid any KDE UI Frameworks and so can be used more versatile in the future. This class can be combined with libkleos DNAttributeMapper to have the same bevavior as before in libkleo when using DN::prettyDN calls can be converted from: Kleo::DN(uid).prettyDN(); to: QGpgME::DN dn(uid); uid.setAttributeOrder( Kleo::DNAttributeMapper::instance()->attributeOrder()); dn.prettyDN();
* qt, cpp: Install version headers in subdirsAndre Heinecke2016-11-012-2/+2
| | | | | | | | | | | | * lang/cpp/src/Makefile.am, lang/qt/src/Makefile.am: Install version headers in include subdirs. -- This change was requested on the gnupg-devel mailing list to avoid placing these headers into the top level include directories. There is currently no known user of these headers so changing it now should not break things downstream.
* python: Use vanity modules for constants in tests and examples.Justus Winter2016-10-3125-78/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/gpg/constants/sig/notation.py: New file. * lang/python/gpg/constants/sig/__init__.py: Import new module. * lang/python/examples/assuan.py: Use more specific module for constants, e.g. 'protocol.ASSUAN' instead of 'PROTOCOL_ASSUAN'. * lang/python/examples/testCMSgetkey.py: Likewise. * lang/python/tests/initial.py: Likewise. * lang/python/tests/t-callbacks.py: Likewise. * lang/python/tests/t-decrypt-verify.py: Likewise. * lang/python/tests/t-decrypt.py: Likewise. * lang/python/tests/t-edit.py: Likewise. * lang/python/tests/t-encrypt-large.py: Likewise. * lang/python/tests/t-encrypt-sign.py: Likewise. * lang/python/tests/t-encrypt-sym.py: Likewise. * lang/python/tests/t-encrypt.py: Likewise. * lang/python/tests/t-export.py: Likewise. * lang/python/tests/t-file-name.py: Likewise. * lang/python/tests/t-idiomatic.py: Likewise. * lang/python/tests/t-import.py: Likewise. * lang/python/tests/t-keylist.py: Likewise. * lang/python/tests/t-protocol-assuan.py: Likewise. * lang/python/tests/t-sig-notation.py: Likewise. * lang/python/tests/t-sign.py: Likewise. * lang/python/tests/t-signers.py: Likewise. * lang/python/tests/t-trustlist.py: Likewise. * lang/python/tests/t-verify.py: Likewise. * lang/python/tests/t-wait.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Import the topmost module in tests and examples.Justus Winter2016-10-3122-225/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * examples/verifydetails.py: Only import the topmost module 'gpg' and update the code accordingly. * tests/support.py: Likewise. * tests/t-callbacks.py: Likewise. * tests/t-data.py: Likewise. * tests/t-decrypt-verify.py: Likewise. * tests/t-decrypt.py: Likewise. * tests/t-edit.py: Likewise. * tests/t-encrypt-large.py: Likewise. * tests/t-encrypt-sign.py: Likewise. * tests/t-encrypt-sym.py: Likewise. * tests/t-encrypt.py: Likewise. * tests/t-export.py: Likewise. * tests/t-file-name.py: Likewise. * tests/t-import.py: Likewise. * tests/t-keylist.py: Likewise. * tests/t-sig-notation.py: Likewise. * tests/t-sign.py: Likewise. * tests/t-signers.py: Likewise. * tests/t-trustlist.py: Likewise. * tests/t-verify.py: Likewise. * tests/t-wait.py: Likewise. * tests/t-wrapper.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Improve constants module.Justus Winter2016-10-3112-0/+39
| | | | | | | | | | | | | | | | | | * lang/python/gpg/constants/__init__.py: Import all modules below 'constants/'. Interface hygiene: delete 'util'. * lang/python/gpg/constants/data/encoding.py: Delete 'util'. * lang/python/gpg/constants/event.py: Likewise. * lang/python/gpg/constants/import.py: Likewise. * lang/python/gpg/constants/keylist/mode.py: Likewise. * lang/python/gpg/constants/md.py: Likewise. * lang/python/gpg/constants/pk.py: Likewise. * lang/python/gpg/constants/protocol.py: Likewise. * lang/python/gpg/constants/sig/mode.py: Likewise. * lang/python/gpg/constants/sigsum.py: Likewise. * lang/python/gpg/constants/validity.py: Likewise. * lang/python/gpg/errors.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Rename Python module from PyME to gpg.Daniel Kahn Gillmor2016-10-3170-288/+289
| | | | | | | | This follows weeks of discussion on the gnupg-devel mailing list. Hopefully it will make it easier for people using Python to use GnuPG in the future. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* core: New API functions gpgme_set_sender, gpgme_get_sender.Werner Koch2016-10-2517-20/+234
| | | | | | | | | | | | | | | | | | | | | | | * src/context.h (struct gpgme_context): Add field 'sender'. * src/gpgme.c: Include mbox-util.h. (gpgme_release): Free SENDER. (gpgme_set_sender): New. (gpgme_get_sender): New. * src/gpgme.def, src/libgpgme.vers: Add new functions. * src/engine-gpg.c (append_args_from_sender): New. (gpg_encrypt_sign, gpg_sign): Call append_args_from_sender. (gpg_verify): Add arg CTX. Call append_args_from_sender/ * src/engine-gpgsm.c (gpgsm_verify): Add dummy arg CTX. * src/engine-uiserver.c (uiserver_verify): Ditto. * src/engine.c (_gpgme_engine_op_verify): Add arg CTX. * src/verify.c (verify_start): Pass CTX to engine function. * tests/gpg/t-verify.c (main): Add some checks for new functions. * tests/run-sign.c (main): Add option --sender. * tests/run-verify.c (main): Ditto. Signed-off-by: Werner Koch <[email protected]>
* qt: Improve WKSPublishJob apidocAndre Heinecke2016-10-191-4/+13
| | | | * lang/qt/src/wkspublishjob.h: Improve doc.
* Post release updatesgpgme-1.7-branchWerner Koch2016-10-182-1/+5
| | | | --
* Release 1.7.1.gpgme-1.7.1Werner Koch2016-10-182-18/+22
| | | | | | | * configure.ac: Set LT version to C27/A16/R0. Note that the LT versions for cpp and Qt have already been updated. Signed-off-by: Werner Koch <[email protected]>
* tests: Make t-cancel more portable.Werner Koch2016-10-141-1/+7
| | | | | | * tests/gpg/t-cancel.c: Include sys/time.h and protect sys/select.h. Signed-off-by: Werner Koch <[email protected]>
* python: Call ln(1) in a portable way.Werner Koch2016-10-141-2/+2
| | | | | | * lang/python/Makefile.am: Specify target dir for ln. Signed-off-by: Werner Koch <[email protected]>
* cpp: Fix init of string from nullAndre Heinecke2016-10-141-3/+6
| | | | | * lang/cpp/src/key.cpp (UserID::addrSpecFromString): Check return value before creating the string.
* python: Make 'get_key' more idiomatic.Justus Winter2016-10-134-4/+52
| | | | | | | | | | | | * lang/python/pyme/core.py (Context.get_key): Raise errors.KeyNotFound if the key is not found. This error is both a KeyError for idiomatic error handling as well as a GPGMEError so we don't break existing code. * lang/python/pyme/errors.py (KeyNotFound): New class. * lang/python/tests/support.py (no_such_key): New variable. * lang/python/tests/t-keylist.py: Test the new behavior. Signed-off-by: Justus Winter <[email protected]>
* python: Return public keys by default.Justus Winter2016-10-133-7/+18
| | | | | | | | | | * lang/python/pyme/core.py (Core.get_key): Return public keys by default, improve docstring. * lang/python/examples/testCMSgetkey.py: Update example. * lang/python/examples/verifydetails.py: Likewise. GnuPG-bug-id: 2751 Signed-off-by: Justus Winter <[email protected]>
* python: Fix example.Justus Winter2016-10-131-2/+2
| | | | | | | * lang/python/examples/inter-edit.py: Fix example. Fixes-commit: a458e7fe Signed-off-by: Justus Winter <[email protected]>
* cpp: Fix version numberAndre Heinecke2016-10-131-3/+3
| | | | | | | * configure.ac (LIBGPGMEPP_LT_CURRENT): Bump. -- Added API so it should have been correct to bump current and age and not to bump age.
* qt, cpp: Fix permissions of Config filesAndre Heinecke2016-10-132-4/+4
| | | | | * lang/cpp/src/Makefile.am, lang/qt/src/Makefile.am: Do not install config files as executable.
* qt: Install SpecialJobAndre Heinecke2016-10-132-1/+3
| | | | | | | | * lang/qt/src/Makefile.am: Install SpecialJob * NEWS: mention it. -- SpecialJob was and is public API. So it needs to be installed.
* qt, cpp: Fix expected targets in Config filesAndre Heinecke2016-10-132-2/+2
| | | | | * lang/cpp/src/GpgmeppConfig.cmake.in.in, lang/qt/src/QGpgmeConfig.cmake.in.in: Remove KF5 variants.
* Mention Qt API fixes in newsAndre Heinecke2016-10-111-0/+7
| | | | --
* qt: Add missing implementation of MultiDeleteJobDaniel Vrátil2016-10-113-2/+120
| | | | | | | * lang/qt/src/multideletejob.h: Fix include, cryptobackend.h is now called protocol.h * lang/qt/src/multideletejob.cpp: New file. * lang/qt/src/Makefile.am: Add multideletejob.cpp.
* qt: Install abstractimportjob.hDaniel Vrátil2016-10-111-1/+1
| | | | | | | | * lang/cpp/src/Makefile.am: Install abstractimportjob.h since it's included from importjob.h -- Fixes build when someone inclues importjob.h in their code.
* cpp: Add API for gpgme_addrspec_from_uidAndre Heinecke2016-10-113-1/+34
| | | | | | | * lang/cpp/src/key.cpp (UserID::addrSpecFromString): New static function to expose addrspec from uid. (UserID::addrSpec): New. Get addrSpec from Userid. * NEWS: Update accordingly.
* Add NEWS for cpp and qt, bump cpp versionAndre Heinecke2016-10-102-1/+9
| | | | | * NEWS: Add entries for cpp and qt changes. * configure.ac: Bump cpp version because of added API.
* Add convenience function to get key from sigAndre Heinecke2016-10-102-0/+53
| | | | | | | | | | | | | | * lang/cpp/src/verificationresult.cpp (Signature::key(bool, bool)): New. Can be used to search / update the key associcated with this signature. -- By using update a caller can ensure that an incomplete key obtainable through the new key() function is fully loaded. With search the key can be looked up in the internal keyring. As the results are cached this can be done in the crypto thread and the result then better used in the UI thread.
* cpp: Return null key if the signature had no keyAndre Heinecke2016-10-101-0/+2
| | | | | | | | | * lang/cpp/src/verificationresult.cpp (Private): Add null key to list when there is no key associated with the signature. -- This fixes an out of bounds read when a verification did not have a key.
* qt: Add simple verify testAndre Heinecke2016-10-102-3/+97
| | | | | | * lang/qt/tests/t-verify.cpp: New. Small test if a signature returns a key with fingerprint. * lang/qt/tests/Makefile.am: Add new test.
* core: Fix w32 crash in find_program_in_dirAndre Heinecke2016-10-101-1/+1
| | | | | | | | * src/w32-util.c (find_program_in_dir): Fix call to _gpgme_strconcat. -- This fixes a crash introduced by dc39552d0 because it tried to concat a strlen.
* core: New helper function gpgme_addrspec_from_uid.Werner Koch2016-10-086-1/+50
| | | | | | | | * src/gpgme.h.in: Add gpgme_addrspec_from_uid. * src/gpgme.def, src/libgpgme.vers: Ditto. * src/mbox-util.c (gpgme_addrspec_from_uid): New. Signed-off-by: Werner Koch <[email protected]>
* Add missing includes.Justus Winter2016-10-062-0/+2
| | | | | | | | * lang/cpp/src/key.cpp: Include <strings.h> for 'strcasecmp'. * tests/gpg/t-cancel.c: Include <sys/select.h> for 'fd_set' and friends. Signed-off-by: Justus Winter <[email protected]>
* cpp: Bump RevisionAndre Heinecke2016-10-051-1/+1
| | | | | | | | * configure.ac (LIBGPGMEPP_LT_REVISION): Bump revision. -- The Data::Encoding enum now supports more encodings so this should have been done then.