From e158cb38f461261d019c653a5f5e0ca9ddab8d6d Mon Sep 17 00:00:00 2001 From: JinWang An Date: Wed, 1 Dec 2021 16:54:36 +0900 Subject: [PATCH] Imported Upstream version 1.7.0 --- AUTHORS | 2 +- ChangeLog | 2771 +++++++++++++++ Makefile.am | 18 +- Makefile.in | 76 +- NEWS | 105 + README | 46 +- VERSION | 2 +- acinclude.m4 | 16 + aclocal.m4 | 277 ++ autogen.sh | 2 +- build-aux/config.guess | 159 +- build-aux/config.sub | 46 +- config.h.in | 8 +- configure | 3570 ++++++++++++++++++-- configure.ac | 306 +- doc/Makefile.am | 28 +- doc/Makefile.in | 147 +- doc/defsincdate | 1 + doc/gpgme.info | 243 +- doc/gpgme.info-1 | 3183 ++++++++--------- doc/gpgme.info-2 | 741 +++- doc/gpgme.texi | 2663 ++++++++++----- doc/mkdefsinc.c | 310 ++ doc/stamp-vti | 4 - doc/version.texi | 4 - gpgme.spec | 2 +- lang/Makefile.am | 3 +- lang/Makefile.in | 54 +- lang/README | 3 + lang/cl/Makefile.in | 50 +- lang/cl/gpgme.asd | 2 +- lang/cpp/Makefile.am | 23 + lang/cpp/Makefile.in | 709 ++++ lang/cpp/README | 101 + lang/cpp/src/GpgmeppConfig.cmake.in.in | 108 + lang/cpp/src/GpgmeppConfigVersion.cmake.in | 31 + lang/cpp/src/Makefile.am | 99 + lang/cpp/src/Makefile.in | 955 ++++++ lang/cpp/src/callbacks.cpp | 149 + lang/cpp/src/callbacks.h | 45 + lang/cpp/src/configuration.cpp | 934 +++++ lang/cpp/src/configuration.h | 290 ++ lang/cpp/src/context.cpp | 1639 +++++++++ lang/cpp/src/context.h | 420 +++ lang/cpp/src/context_p.h | 84 + lang/cpp/src/context_vanilla.cpp | 33 + lang/cpp/src/data.cpp | 222 ++ lang/cpp/src/data.h | 126 + lang/cpp/src/data_p.h | 40 + lang/cpp/src/decryptionresult.cpp | 240 ++ lang/cpp/src/decryptionresult.h | 130 + lang/cpp/src/defaultassuantransaction.cpp | 78 + lang/cpp/src/defaultassuantransaction.h | 65 + lang/cpp/src/editinteractor.cpp | 339 ++ lang/cpp/src/editinteractor.h | 68 + lang/cpp/src/encryptionresult.cpp | 159 + lang/cpp/src/encryptionresult.h | 113 + lang/cpp/src/engineinfo.cpp | 88 + lang/cpp/src/engineinfo.h | 126 + lang/cpp/src/error.h | 78 + lang/cpp/src/eventloopinteractor.cpp | 199 ++ lang/cpp/src/eventloopinteractor.h | 156 + lang/cpp/src/exception.cpp | 58 + lang/cpp/src/exception.h | 68 + lang/cpp/src/global.h | 218 ++ lang/cpp/src/gpgadduserideditinteractor.cpp | 189 ++ lang/cpp/src/gpgadduserideditinteractor.h | 67 + lang/cpp/src/gpgagentgetinfoassuantransaction.cpp | 119 + lang/cpp/src/gpgagentgetinfoassuantransaction.h | 73 + lang/cpp/src/gpgmefw.h | 70 + lang/cpp/src/gpgmepp_export.h | 73 + lang/cpp/src/gpgmepp_version.h.in | 32 + lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp | 141 + lang/cpp/src/gpgsetexpirytimeeditinteractor.h | 49 + lang/cpp/src/gpgsetownertrusteditinteractor.cpp | 151 + lang/cpp/src/gpgsetownertrusteditinteractor.h | 50 + lang/cpp/src/gpgsignkeyeditinteractor.cpp | 318 ++ lang/cpp/src/gpgsignkeyeditinteractor.h | 64 + lang/cpp/src/importresult.cpp | 215 ++ lang/cpp/src/importresult.h | 134 + lang/cpp/src/interfaces/assuantransaction.h | 49 + lang/cpp/src/interfaces/dataprovider.h | 53 + lang/cpp/src/interfaces/passphraseprovider.h | 40 + lang/cpp/src/interfaces/progressprovider.h | 40 + lang/cpp/src/key.cpp | 912 +++++ lang/cpp/src/key.h | 415 +++ lang/cpp/src/keygenerationresult.cpp | 92 + lang/cpp/src/keygenerationresult.h | 82 + lang/cpp/src/keylistresult.cpp | 107 + lang/cpp/src/keylistresult.h | 81 + lang/cpp/src/notation.h | 84 + lang/cpp/src/result.h | 58 + lang/cpp/src/result_p.h | 43 + lang/cpp/src/scdgetinfoassuantransaction.cpp | 156 + lang/cpp/src/scdgetinfoassuantransaction.h | 76 + lang/cpp/src/signingresult.cpp | 265 ++ lang/cpp/src/signingresult.h | 162 + lang/cpp/src/tofuinfo.cpp | 167 + lang/cpp/src/tofuinfo.h | 124 + lang/cpp/src/trustitem.cpp | 114 + lang/cpp/src/trustitem.h | 81 + lang/cpp/src/util.h | 149 + lang/cpp/src/verificationresult.cpp | 575 ++++ lang/cpp/src/verificationresult.h | 180 + lang/cpp/src/vfsmountresult.cpp | 90 + lang/cpp/src/vfsmountresult.h | 76 + lang/python/MANIFEST.in | 4 + lang/python/Makefile.am | 106 + lang/python/Makefile.in | 798 +++++ lang/python/README | 59 + lang/python/examples/assuan.py | 28 + lang/python/examples/decryption-filter.py | 32 + lang/python/examples/delkey.py | 33 + lang/python/examples/encrypt-to-all.py | 53 + lang/python/examples/exportimport.py | 61 + lang/python/examples/genkey.py | 44 + lang/python/examples/inter-edit.py | 56 + lang/python/examples/sign.py | 28 + lang/python/examples/signverify.py | 41 + lang/python/examples/simple.py | 47 + lang/python/examples/testCMSgetkey.py | 35 + lang/python/examples/verifydetails.py | 79 + lang/python/gpgme-h-clean.py | 53 + lang/python/gpgme.i | 625 ++++ lang/python/helpers.c | 1169 +++++++ lang/python/helpers.h | 39 + lang/python/private.h | 54 + lang/python/pyme/__init__.py | 125 + .../pyme/__pycache__/__init__.cpython-34.pyc | Bin 0 -> 4633 bytes .../python/pyme/__pycache__/version.cpython-34.pyc | Bin 0 -> 1997 bytes lang/python/pyme/callbacks.py | 49 + lang/python/pyme/constants/__init__.py | 114 + lang/python/pyme/constants/data/__init__.py | 6 + lang/python/pyme/constants/data/encoding.py | 22 + lang/python/pyme/constants/event.py | 22 + lang/python/pyme/constants/import.py | 22 + lang/python/pyme/constants/keylist/__init__.py | 6 + lang/python/pyme/constants/keylist/mode.py | 22 + lang/python/pyme/constants/md.py | 22 + lang/python/pyme/constants/pk.py | 22 + lang/python/pyme/constants/protocol.py | 22 + lang/python/pyme/constants/sig/__init__.py | 6 + lang/python/pyme/constants/sig/mode.py | 22 + lang/python/pyme/constants/sigsum.py | 22 + lang/python/pyme/constants/status.py | 124 + lang/python/pyme/constants/validity.py | 22 + lang/python/pyme/core.py | 1145 +++++++ lang/python/pyme/errors.py | 111 + lang/python/pyme/gpgme.py | 125 + lang/python/pyme/results.py | 118 + lang/python/pyme/util.py | 53 + lang/python/pyme/version.py | 68 + lang/python/pyme/version.py.in | 68 + lang/python/setup.py.in | 190 ++ lang/python/tests/Makefile.am | 114 + lang/python/tests/Makefile.in | 620 ++++ lang/python/tests/encrypt-only.asc | 33 + lang/python/tests/final.py | 27 + lang/python/tests/initial.py | 41 + lang/python/tests/run-tests.py | 90 + lang/python/tests/sign-only.asc | 33 + lang/python/tests/support.py | 69 + lang/python/tests/t-callbacks.py | 257 ++ lang/python/tests/t-data.py | 129 + lang/python/tests/t-decrypt-verify.py | 77 + lang/python/tests/t-decrypt.py | 45 + lang/python/tests/t-edit.py | 72 + lang/python/tests/t-encrypt-large.py | 66 + lang/python/tests/t-encrypt-sign.py | 98 + lang/python/tests/t-encrypt-sym.py | 86 + lang/python/tests/t-encrypt.py | 65 + lang/python/tests/t-export.py | 40 + lang/python/tests/t-file-name.py | 45 + lang/python/tests/t-idiomatic.py | 84 + lang/python/tests/t-import.py | 79 + lang/python/tests/t-keylist.py | 246 ++ lang/python/tests/t-protocol-assuan.py | 69 + lang/python/tests/t-sig-notation.py | 79 + lang/python/tests/t-sign.py | 122 + lang/python/tests/t-signers.py | 98 + lang/python/tests/t-trustlist.py | 43 + lang/python/tests/t-verify.py | 195 ++ lang/python/tests/t-wait.py | 45 + lang/python/tests/t-wrapper.py | 25 + lang/qt/Makefile.am | 23 + lang/qt/Makefile.in | 709 ++++ lang/qt/README | 130 + lang/qt/doc/Doxyfile.in | 2352 +++++++++++++ lang/qt/doc/Makefile.am | 31 + lang/qt/doc/Makefile.in | 540 +++ lang/qt/src/AddUserIDJob | 1 + lang/qt/src/ChangeExpiryJob | 1 + lang/qt/src/ChangeOwnerTrustJob | 1 + lang/qt/src/ChangePasswdJob | 1 + lang/qt/src/CryptoConfig | 1 + lang/qt/src/DataProvider | 1 + lang/qt/src/DecryptJob | 1 + lang/qt/src/DecryptVerifyJob | 1 + lang/qt/src/DefaultKeyGenerationJob | 1 + lang/qt/src/DeleteJob | 1 + lang/qt/src/DownloadJob | 1 + lang/qt/src/EncryptJob | 1 + lang/qt/src/ExportJob | 1 + lang/qt/src/HierarchicalKeyKistJob | 1 + lang/qt/src/ImportFromKeyserverJob | 1 + lang/qt/src/ImportJob | 1 + lang/qt/src/Job | 1 + lang/qt/src/KeyForMailboxJob | 1 + lang/qt/src/KeyGenerationJob | 1 + lang/qt/src/KeyListJob | 1 + lang/qt/src/ListAllKeysJob | 1 + lang/qt/src/Makefile.am | 256 ++ lang/qt/src/Makefile.in | 1123 ++++++ lang/qt/src/MultiDeleteJob | 1 + lang/qt/src/Protocol | 1 + lang/qt/src/QGpgMENewCryptoConfig | 1 + lang/qt/src/QGpgmeConfig.cmake.in.in | 107 + lang/qt/src/QGpgmeConfigVersion.cmake.in | 31 + lang/qt/src/RefreshKeysJob | 1 + lang/qt/src/SignEncryptJob | 1 + lang/qt/src/SignJob | 1 + lang/qt/src/SignKeyJob | 1 + lang/qt/src/TofuPolicyJob | 1 + lang/qt/src/VerifyDetachedJob | 1 + lang/qt/src/VerifyOpaqueJob | 1 + lang/qt/src/WKSPublishJob | 1 + lang/qt/src/abstractimportjob.h | 64 + lang/qt/src/adduseridjob.h | 84 + lang/qt/src/changeexpiryjob.h | 84 + lang/qt/src/changeownertrustjob.h | 81 + lang/qt/src/changepasswdjob.h | 82 + lang/qt/src/cryptoconfig.h | 400 +++ lang/qt/src/dataprovider.cpp | 282 ++ lang/qt/src/dataprovider.h | 95 + lang/qt/src/decryptjob.h | 100 + lang/qt/src/decryptverifyjob.h | 105 + lang/qt/src/defaultkeygenerationjob.cpp | 125 + lang/qt/src/defaultkeygenerationjob.h | 76 + lang/qt/src/deletejob.h | 83 + lang/qt/src/downloadjob.h | 103 + lang/qt/src/encryptjob.h | 136 + lang/qt/src/exportjob.h | 87 + lang/qt/src/gpgme_backend_debug.cpp | 10 + lang/qt/src/gpgme_backend_debug.h | 11 + lang/qt/src/hierarchicalkeylistjob.h | 125 + lang/qt/src/importfromkeyserverjob.h | 84 + lang/qt/src/importjob.h | 83 + lang/qt/src/job.cpp | 159 + lang/qt/src/job.h | 92 + lang/qt/src/keyformailboxjob.h | 106 + lang/qt/src/keygenerationjob.h | 85 + lang/qt/src/keylistjob.h | 109 + lang/qt/src/listallkeysjob.h | 104 + lang/qt/src/multideletejob.h | 107 + lang/qt/src/protocol.h | 183 + lang/qt/src/protocol_p.h | 419 +++ lang/qt/src/qgpgme_export.h | 73 + lang/qt/src/qgpgme_version.h.in | 32 + lang/qt/src/qgpgmeadduseridjob.cpp | 80 + lang/qt/src/qgpgmeadduseridjob.h | 65 + lang/qt/src/qgpgmebackend.cpp | 203 ++ lang/qt/src/qgpgmebackend.h | 92 + lang/qt/src/qgpgmechangeexpiryjob.cpp | 80 + lang/qt/src/qgpgmechangeexpiryjob.h | 66 + lang/qt/src/qgpgmechangeownertrustjob.cpp | 76 + lang/qt/src/qgpgmechangeownertrustjob.h | 65 + lang/qt/src/qgpgmechangepasswdjob.cpp | 79 + lang/qt/src/qgpgmechangepasswdjob.h | 66 + lang/qt/src/qgpgmedecryptjob.cpp | 128 + lang/qt/src/qgpgmedecryptjob.h | 84 + lang/qt/src/qgpgmedecryptverifyjob.cpp | 135 + lang/qt/src/qgpgmedecryptverifyjob.h | 89 + lang/qt/src/qgpgmedeletejob.cpp | 65 + lang/qt/src/qgpgmedeletejob.h | 71 + lang/qt/src/qgpgmedownloadjob.cpp | 100 + lang/qt/src/qgpgmedownloadjob.h | 69 + lang/qt/src/qgpgmeencryptjob.cpp | 170 + lang/qt/src/qgpgmeencryptjob.h | 109 + lang/qt/src/qgpgmeexportjob.cpp | 76 + lang/qt/src/qgpgmeexportjob.h | 66 + lang/qt/src/qgpgmeimportfromkeyserverjob.cpp | 82 + lang/qt/src/qgpgmeimportfromkeyserverjob.h | 81 + lang/qt/src/qgpgmeimportjob.cpp | 85 + lang/qt/src/qgpgmeimportjob.h | 81 + lang/qt/src/qgpgmekeyformailboxjob.cpp | 138 + lang/qt/src/qgpgmekeyformailboxjob.h | 84 + lang/qt/src/qgpgmekeygenerationjob.cpp | 71 + lang/qt/src/qgpgmekeygenerationjob.h | 72 + lang/qt/src/qgpgmekeylistjob.cpp | 172 + lang/qt/src/qgpgmekeylistjob.h | 88 + lang/qt/src/qgpgmelistallkeysjob.cpp | 168 + lang/qt/src/qgpgmelistallkeysjob.h | 86 + lang/qt/src/qgpgmenewcryptoconfig.cpp | 738 ++++ lang/qt/src/qgpgmenewcryptoconfig.h | 189 ++ lang/qt/src/qgpgmerefreshkeysjob.cpp | 225 ++ lang/qt/src/qgpgmerefreshkeysjob.h | 79 + lang/qt/src/qgpgmesecretkeyexportjob.cpp | 142 + lang/qt/src/qgpgmesecretkeyexportjob.h | 81 + lang/qt/src/qgpgmesignencryptjob.cpp | 171 + lang/qt/src/qgpgmesignencryptjob.h | 121 + lang/qt/src/qgpgmesignjob.cpp | 163 + lang/qt/src/qgpgmesignjob.h | 101 + lang/qt/src/qgpgmesignkeyjob.cpp | 125 + lang/qt/src/qgpgmesignkeyjob.h | 94 + lang/qt/src/qgpgmetofupolicyjob.cpp | 65 + lang/qt/src/qgpgmetofupolicyjob.h | 65 + lang/qt/src/qgpgmeverifydetachedjob.cpp | 118 + lang/qt/src/qgpgmeverifydetachedjob.h | 85 + lang/qt/src/qgpgmeverifyopaquejob.cpp | 125 + lang/qt/src/qgpgmeverifyopaquejob.h | 84 + lang/qt/src/qgpgmewkspublishjob.cpp | 189 ++ lang/qt/src/qgpgmewkspublishjob.h | 70 + lang/qt/src/refreshkeysjob.h | 94 + lang/qt/src/signencryptjob.h | 153 + lang/qt/src/signjob.h | 122 + lang/qt/src/signkeyjob.h | 117 + lang/qt/src/specialjob.h | 91 + lang/qt/src/threadedjobmixin.cpp | 110 + lang/qt/src/threadedjobmixin.h | 272 ++ lang/qt/src/tofupolicyjob.h | 80 + lang/qt/src/verifydetachedjob.h | 99 + lang/qt/src/verifyopaquejob.h | 101 + lang/qt/src/wkspublishjob.h | 101 + lang/qt/tests/Makefile.am | 95 + lang/qt/tests/Makefile.in | 951 ++++++ lang/qt/tests/initial.test | 2 + lang/qt/tests/run-keyformailboxjob.cpp | 56 + lang/qt/tests/t-encrypt.cpp | 254 ++ lang/qt/tests/t-keylist.cpp | 107 + lang/qt/tests/t-keylocate.cpp | 130 + lang/qt/tests/t-ownertrust.cpp | 107 + lang/qt/tests/t-support.cpp | 95 + lang/qt/tests/t-support.h | 63 + lang/qt/tests/t-tofuinfo.cpp | 367 ++ lang/qt/tests/t-wkspublish.cpp | 278 ++ m4/ax_cxx_compile_stdcxx.m4 | 558 +++ m4/ax_pkg_swig.m4 | 135 + m4/ax_python_devel.m4 | 323 ++ m4/pkg.m4 | 157 + m4/qt.m4 | 80 + src/Makefile.am | 42 +- src/Makefile.in | 272 +- src/argparse.c | 1610 +++++++++ src/argparse.h | 203 ++ src/assuan-support.c | 17 + src/b64dec.c | 251 ++ src/context.h | 11 +- src/conversion.c | 67 + src/data-compat.c | 6 +- src/data-identify.c | 279 +- src/data-mem.c | 3 +- src/data.c | 32 +- src/data.h | 6 + src/decrypt.c | 2 +- src/delete.c | 38 +- src/dirinfo.c | 103 +- src/edit.c | 113 +- src/encrypt-sign.c | 2 +- src/encrypt.c | 38 +- src/engine-assuan.c | 34 +- src/engine-backend.h | 18 +- src/engine-g13.c | 31 +- src/engine-gpg.c | 552 ++- src/engine-gpgconf.c | 18 +- src/engine-gpgsm.c | 170 +- src/engine-spawn.c | 11 +- src/engine-uiserver.c | 97 +- src/engine.c | 138 +- src/engine.h | 24 +- src/export.c | 2 +- src/funopen.c | 2 +- src/genkey.c | 401 ++- src/getauditlog.c | 3 + src/gpgme-config.in | 35 +- src/gpgme-tool.c | 611 +--- src/gpgme.c | 120 +- src/gpgme.def | 21 + src/gpgme.h.in | 429 ++- src/kdpipeiodevice.cpp | 951 ------ src/kdpipeiodevice.h | 73 - src/kdpipeiodevice.moc | 183 - src/key.c | 31 + src/keylist.c | 150 +- src/keysign.c | 218 ++ src/libgpgme.vers | 19 + src/mbox-util.c | 257 ++ src/mbox-util.h | 29 + src/moc_kdpipeiodevice.cpp | 60 - src/op-support.c | 73 +- src/ops.h | 12 +- src/passphrase.c | 11 +- src/passwd.c | 8 + src/posix-io.c | 81 +- src/posix-util.c | 11 + src/sign.c | 27 +- src/status-table.c | 17 + src/sys-util.h | 1 + src/tofupolicy.c | 184 + src/trustlist.c | 3 + src/util.h | 38 + src/verify.c | 294 +- src/version.c | 6 +- src/versioninfo.rc.in | 2 +- src/vfs-create.c | 2 + src/vfs-mount.c | 2 + src/w32-glib-io.c | 2 +- src/w32-io.c | 37 +- src/w32-qt-io.cpp | 700 ---- src/w32-util.c | 60 +- src/wait-global.c | 4 +- src/wait-private.c | 6 +- src/wait-user.c | 2 + tests/Makefile.am | 3 +- tests/Makefile.in | 128 +- tests/gpg/Makefile.am | 8 +- tests/gpg/Makefile.in | 89 +- tests/gpg/t-decrypt-verify.c | 49 +- tests/gpg/t-decrypt.c | 18 +- tests/gpg/t-edit.c | 29 +- tests/gpg/t-encrypt-large.c | 21 +- tests/gpg/t-encrypt-mixed.c | 129 + tests/gpg/t-encrypt-sign.c | 3 + tests/gpg/t-encrypt-sym.c | 12 +- tests/gpg/t-encrypt.c | 13 +- tests/gpg/t-eventloop.c | 12 +- tests/gpg/t-export.c | 17 +- tests/gpg/t-file-name.c | 14 +- tests/gpg/t-genkey.c | 15 +- tests/gpg/t-gpgconf.c | 18 +- tests/gpg/t-import.c | 19 +- tests/gpg/t-keylist-sig.c | 20 +- tests/gpg/t-keylist.c | 27 +- tests/gpg/t-sig-notation.c | 53 +- tests/gpg/t-sign.c | 17 +- tests/gpg/t-signers.c | 19 +- tests/gpg/t-support.h | 26 +- tests/gpg/t-thread1.c | 25 +- tests/gpg/t-trustlist.c | 11 +- tests/gpg/t-verify.c | 18 +- tests/gpg/t-wait.c | 10 +- tests/gpgsm/Makefile.in | 50 +- tests/gpgsm/t-decrypt.c | 12 +- tests/gpgsm/t-encrypt.c | 12 +- tests/gpgsm/t-export.c | 12 +- tests/gpgsm/t-genkey.c | 14 +- tests/gpgsm/t-import.c | 26 +- tests/gpgsm/t-keylist.c | 25 +- tests/gpgsm/t-sign.c | 14 +- tests/gpgsm/t-support.h | 19 +- tests/gpgsm/t-verify.c | 16 +- tests/opassuan/Makefile.in | 50 +- tests/opassuan/t-command.c | 23 +- tests/run-decrypt.c | 189 ++ tests/run-encrypt.c | 293 ++ tests/run-genkey.c | 439 +++ tests/run-identify.c | 129 + tests/run-keylist.c | 108 +- tests/run-keysign.c | 261 ++ tests/run-sign.c | 2 + tests/run-support.h | 16 +- tests/run-tofu.c | 178 + tests/run-verify.c | 115 +- tests/t-data.c | 16 +- tests/t-engine-info.c | 16 +- 464 files changed, 64339 insertions(+), 6471 deletions(-) create mode 100644 doc/defsincdate create mode 100644 doc/mkdefsinc.c delete mode 100644 doc/stamp-vti delete mode 100644 doc/version.texi create mode 100644 lang/cpp/Makefile.am create mode 100644 lang/cpp/Makefile.in create mode 100644 lang/cpp/README create mode 100644 lang/cpp/src/GpgmeppConfig.cmake.in.in create mode 100644 lang/cpp/src/GpgmeppConfigVersion.cmake.in create mode 100644 lang/cpp/src/Makefile.am create mode 100644 lang/cpp/src/Makefile.in create mode 100644 lang/cpp/src/callbacks.cpp create mode 100644 lang/cpp/src/callbacks.h create mode 100644 lang/cpp/src/configuration.cpp create mode 100644 lang/cpp/src/configuration.h create mode 100644 lang/cpp/src/context.cpp create mode 100644 lang/cpp/src/context.h create mode 100644 lang/cpp/src/context_p.h create mode 100644 lang/cpp/src/context_vanilla.cpp create mode 100644 lang/cpp/src/data.cpp create mode 100644 lang/cpp/src/data.h create mode 100644 lang/cpp/src/data_p.h create mode 100644 lang/cpp/src/decryptionresult.cpp create mode 100644 lang/cpp/src/decryptionresult.h create mode 100644 lang/cpp/src/defaultassuantransaction.cpp create mode 100644 lang/cpp/src/defaultassuantransaction.h create mode 100644 lang/cpp/src/editinteractor.cpp create mode 100644 lang/cpp/src/editinteractor.h create mode 100644 lang/cpp/src/encryptionresult.cpp create mode 100644 lang/cpp/src/encryptionresult.h create mode 100644 lang/cpp/src/engineinfo.cpp create mode 100644 lang/cpp/src/engineinfo.h create mode 100644 lang/cpp/src/error.h create mode 100644 lang/cpp/src/eventloopinteractor.cpp create mode 100644 lang/cpp/src/eventloopinteractor.h create mode 100644 lang/cpp/src/exception.cpp create mode 100644 lang/cpp/src/exception.h create mode 100644 lang/cpp/src/global.h create mode 100644 lang/cpp/src/gpgadduserideditinteractor.cpp create mode 100644 lang/cpp/src/gpgadduserideditinteractor.h create mode 100644 lang/cpp/src/gpgagentgetinfoassuantransaction.cpp create mode 100644 lang/cpp/src/gpgagentgetinfoassuantransaction.h create mode 100644 lang/cpp/src/gpgmefw.h create mode 100644 lang/cpp/src/gpgmepp_export.h create mode 100644 lang/cpp/src/gpgmepp_version.h.in create mode 100644 lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp create mode 100644 lang/cpp/src/gpgsetexpirytimeeditinteractor.h create mode 100644 lang/cpp/src/gpgsetownertrusteditinteractor.cpp create mode 100644 lang/cpp/src/gpgsetownertrusteditinteractor.h create mode 100644 lang/cpp/src/gpgsignkeyeditinteractor.cpp create mode 100644 lang/cpp/src/gpgsignkeyeditinteractor.h create mode 100644 lang/cpp/src/importresult.cpp create mode 100644 lang/cpp/src/importresult.h create mode 100644 lang/cpp/src/interfaces/assuantransaction.h create mode 100644 lang/cpp/src/interfaces/dataprovider.h create mode 100644 lang/cpp/src/interfaces/passphraseprovider.h create mode 100644 lang/cpp/src/interfaces/progressprovider.h create mode 100644 lang/cpp/src/key.cpp create mode 100644 lang/cpp/src/key.h create mode 100644 lang/cpp/src/keygenerationresult.cpp create mode 100644 lang/cpp/src/keygenerationresult.h create mode 100644 lang/cpp/src/keylistresult.cpp create mode 100644 lang/cpp/src/keylistresult.h create mode 100644 lang/cpp/src/notation.h create mode 100644 lang/cpp/src/result.h create mode 100644 lang/cpp/src/result_p.h create mode 100644 lang/cpp/src/scdgetinfoassuantransaction.cpp create mode 100644 lang/cpp/src/scdgetinfoassuantransaction.h create mode 100644 lang/cpp/src/signingresult.cpp create mode 100644 lang/cpp/src/signingresult.h create mode 100644 lang/cpp/src/tofuinfo.cpp create mode 100644 lang/cpp/src/tofuinfo.h create mode 100644 lang/cpp/src/trustitem.cpp create mode 100644 lang/cpp/src/trustitem.h create mode 100644 lang/cpp/src/util.h create mode 100644 lang/cpp/src/verificationresult.cpp create mode 100644 lang/cpp/src/verificationresult.h create mode 100644 lang/cpp/src/vfsmountresult.cpp create mode 100644 lang/cpp/src/vfsmountresult.h create mode 100644 lang/python/MANIFEST.in create mode 100644 lang/python/Makefile.am create mode 100644 lang/python/Makefile.in create mode 100644 lang/python/README create mode 100644 lang/python/examples/assuan.py create mode 100644 lang/python/examples/decryption-filter.py create mode 100755 lang/python/examples/delkey.py create mode 100755 lang/python/examples/encrypt-to-all.py create mode 100755 lang/python/examples/exportimport.py create mode 100755 lang/python/examples/genkey.py create mode 100644 lang/python/examples/inter-edit.py create mode 100755 lang/python/examples/sign.py create mode 100755 lang/python/examples/signverify.py create mode 100755 lang/python/examples/simple.py create mode 100644 lang/python/examples/testCMSgetkey.py create mode 100755 lang/python/examples/verifydetails.py create mode 100755 lang/python/gpgme-h-clean.py create mode 100644 lang/python/gpgme.i create mode 100644 lang/python/helpers.c create mode 100644 lang/python/helpers.h create mode 100644 lang/python/private.h create mode 100644 lang/python/pyme/__init__.py create mode 100644 lang/python/pyme/__pycache__/__init__.cpython-34.pyc create mode 100644 lang/python/pyme/__pycache__/version.cpython-34.pyc create mode 100644 lang/python/pyme/callbacks.py create mode 100644 lang/python/pyme/constants/__init__.py create mode 100644 lang/python/pyme/constants/data/__init__.py create mode 100644 lang/python/pyme/constants/data/encoding.py create mode 100644 lang/python/pyme/constants/event.py create mode 100644 lang/python/pyme/constants/import.py create mode 100644 lang/python/pyme/constants/keylist/__init__.py create mode 100644 lang/python/pyme/constants/keylist/mode.py create mode 100644 lang/python/pyme/constants/md.py create mode 100644 lang/python/pyme/constants/pk.py create mode 100644 lang/python/pyme/constants/protocol.py create mode 100644 lang/python/pyme/constants/sig/__init__.py create mode 100644 lang/python/pyme/constants/sig/mode.py create mode 100644 lang/python/pyme/constants/sigsum.py create mode 100644 lang/python/pyme/constants/status.py create mode 100644 lang/python/pyme/constants/validity.py create mode 100644 lang/python/pyme/core.py create mode 100644 lang/python/pyme/errors.py create mode 100644 lang/python/pyme/gpgme.py create mode 100644 lang/python/pyme/results.py create mode 100644 lang/python/pyme/util.py create mode 100644 lang/python/pyme/version.py create mode 100644 lang/python/pyme/version.py.in create mode 100755 lang/python/setup.py.in create mode 100644 lang/python/tests/Makefile.am create mode 100644 lang/python/tests/Makefile.in create mode 100644 lang/python/tests/encrypt-only.asc create mode 100755 lang/python/tests/final.py create mode 100755 lang/python/tests/initial.py create mode 100644 lang/python/tests/run-tests.py create mode 100644 lang/python/tests/sign-only.asc create mode 100644 lang/python/tests/support.py create mode 100755 lang/python/tests/t-callbacks.py create mode 100755 lang/python/tests/t-data.py create mode 100755 lang/python/tests/t-decrypt-verify.py create mode 100755 lang/python/tests/t-decrypt.py create mode 100755 lang/python/tests/t-edit.py create mode 100755 lang/python/tests/t-encrypt-large.py create mode 100755 lang/python/tests/t-encrypt-sign.py create mode 100755 lang/python/tests/t-encrypt-sym.py create mode 100755 lang/python/tests/t-encrypt.py create mode 100755 lang/python/tests/t-export.py create mode 100755 lang/python/tests/t-file-name.py create mode 100755 lang/python/tests/t-idiomatic.py create mode 100755 lang/python/tests/t-import.py create mode 100755 lang/python/tests/t-keylist.py create mode 100755 lang/python/tests/t-protocol-assuan.py create mode 100755 lang/python/tests/t-sig-notation.py create mode 100755 lang/python/tests/t-sign.py create mode 100755 lang/python/tests/t-signers.py create mode 100755 lang/python/tests/t-trustlist.py create mode 100755 lang/python/tests/t-verify.py create mode 100755 lang/python/tests/t-wait.py create mode 100755 lang/python/tests/t-wrapper.py create mode 100644 lang/qt/Makefile.am create mode 100644 lang/qt/Makefile.in create mode 100644 lang/qt/README create mode 100644 lang/qt/doc/Doxyfile.in create mode 100644 lang/qt/doc/Makefile.am create mode 100644 lang/qt/doc/Makefile.in create mode 100644 lang/qt/src/AddUserIDJob create mode 100644 lang/qt/src/ChangeExpiryJob create mode 100644 lang/qt/src/ChangeOwnerTrustJob create mode 100644 lang/qt/src/ChangePasswdJob create mode 100644 lang/qt/src/CryptoConfig create mode 100644 lang/qt/src/DataProvider create mode 100644 lang/qt/src/DecryptJob create mode 100644 lang/qt/src/DecryptVerifyJob create mode 100644 lang/qt/src/DefaultKeyGenerationJob create mode 100644 lang/qt/src/DeleteJob create mode 100644 lang/qt/src/DownloadJob create mode 100644 lang/qt/src/EncryptJob create mode 100644 lang/qt/src/ExportJob create mode 100644 lang/qt/src/HierarchicalKeyKistJob create mode 100644 lang/qt/src/ImportFromKeyserverJob create mode 100644 lang/qt/src/ImportJob create mode 100644 lang/qt/src/Job create mode 100644 lang/qt/src/KeyForMailboxJob create mode 100644 lang/qt/src/KeyGenerationJob create mode 100644 lang/qt/src/KeyListJob create mode 100644 lang/qt/src/ListAllKeysJob create mode 100644 lang/qt/src/Makefile.am create mode 100644 lang/qt/src/Makefile.in create mode 100644 lang/qt/src/MultiDeleteJob create mode 100644 lang/qt/src/Protocol create mode 100644 lang/qt/src/QGpgMENewCryptoConfig create mode 100644 lang/qt/src/QGpgmeConfig.cmake.in.in create mode 100644 lang/qt/src/QGpgmeConfigVersion.cmake.in create mode 100644 lang/qt/src/RefreshKeysJob create mode 100644 lang/qt/src/SignEncryptJob create mode 100644 lang/qt/src/SignJob create mode 100644 lang/qt/src/SignKeyJob create mode 100644 lang/qt/src/TofuPolicyJob create mode 100644 lang/qt/src/VerifyDetachedJob create mode 100644 lang/qt/src/VerifyOpaqueJob create mode 100644 lang/qt/src/WKSPublishJob create mode 100644 lang/qt/src/abstractimportjob.h create mode 100644 lang/qt/src/adduseridjob.h create mode 100644 lang/qt/src/changeexpiryjob.h create mode 100644 lang/qt/src/changeownertrustjob.h create mode 100644 lang/qt/src/changepasswdjob.h create mode 100644 lang/qt/src/cryptoconfig.h create mode 100644 lang/qt/src/dataprovider.cpp create mode 100644 lang/qt/src/dataprovider.h create mode 100644 lang/qt/src/decryptjob.h create mode 100644 lang/qt/src/decryptverifyjob.h create mode 100644 lang/qt/src/defaultkeygenerationjob.cpp create mode 100644 lang/qt/src/defaultkeygenerationjob.h create mode 100644 lang/qt/src/deletejob.h create mode 100644 lang/qt/src/downloadjob.h create mode 100644 lang/qt/src/encryptjob.h create mode 100644 lang/qt/src/exportjob.h create mode 100644 lang/qt/src/gpgme_backend_debug.cpp create mode 100644 lang/qt/src/gpgme_backend_debug.h create mode 100644 lang/qt/src/hierarchicalkeylistjob.h create mode 100644 lang/qt/src/importfromkeyserverjob.h create mode 100644 lang/qt/src/importjob.h create mode 100644 lang/qt/src/job.cpp create mode 100644 lang/qt/src/job.h create mode 100644 lang/qt/src/keyformailboxjob.h create mode 100644 lang/qt/src/keygenerationjob.h create mode 100644 lang/qt/src/keylistjob.h create mode 100644 lang/qt/src/listallkeysjob.h create mode 100644 lang/qt/src/multideletejob.h create mode 100644 lang/qt/src/protocol.h create mode 100644 lang/qt/src/protocol_p.h create mode 100644 lang/qt/src/qgpgme_export.h create mode 100644 lang/qt/src/qgpgme_version.h.in create mode 100644 lang/qt/src/qgpgmeadduseridjob.cpp create mode 100644 lang/qt/src/qgpgmeadduseridjob.h create mode 100644 lang/qt/src/qgpgmebackend.cpp create mode 100644 lang/qt/src/qgpgmebackend.h create mode 100644 lang/qt/src/qgpgmechangeexpiryjob.cpp create mode 100644 lang/qt/src/qgpgmechangeexpiryjob.h create mode 100644 lang/qt/src/qgpgmechangeownertrustjob.cpp create mode 100644 lang/qt/src/qgpgmechangeownertrustjob.h create mode 100644 lang/qt/src/qgpgmechangepasswdjob.cpp create mode 100644 lang/qt/src/qgpgmechangepasswdjob.h create mode 100644 lang/qt/src/qgpgmedecryptjob.cpp create mode 100644 lang/qt/src/qgpgmedecryptjob.h create mode 100644 lang/qt/src/qgpgmedecryptverifyjob.cpp create mode 100644 lang/qt/src/qgpgmedecryptverifyjob.h create mode 100644 lang/qt/src/qgpgmedeletejob.cpp create mode 100644 lang/qt/src/qgpgmedeletejob.h create mode 100644 lang/qt/src/qgpgmedownloadjob.cpp create mode 100644 lang/qt/src/qgpgmedownloadjob.h create mode 100644 lang/qt/src/qgpgmeencryptjob.cpp create mode 100644 lang/qt/src/qgpgmeencryptjob.h create mode 100644 lang/qt/src/qgpgmeexportjob.cpp create mode 100644 lang/qt/src/qgpgmeexportjob.h create mode 100644 lang/qt/src/qgpgmeimportfromkeyserverjob.cpp create mode 100644 lang/qt/src/qgpgmeimportfromkeyserverjob.h create mode 100644 lang/qt/src/qgpgmeimportjob.cpp create mode 100644 lang/qt/src/qgpgmeimportjob.h create mode 100644 lang/qt/src/qgpgmekeyformailboxjob.cpp create mode 100644 lang/qt/src/qgpgmekeyformailboxjob.h create mode 100644 lang/qt/src/qgpgmekeygenerationjob.cpp create mode 100644 lang/qt/src/qgpgmekeygenerationjob.h create mode 100644 lang/qt/src/qgpgmekeylistjob.cpp create mode 100644 lang/qt/src/qgpgmekeylistjob.h create mode 100644 lang/qt/src/qgpgmelistallkeysjob.cpp create mode 100644 lang/qt/src/qgpgmelistallkeysjob.h create mode 100644 lang/qt/src/qgpgmenewcryptoconfig.cpp create mode 100644 lang/qt/src/qgpgmenewcryptoconfig.h create mode 100644 lang/qt/src/qgpgmerefreshkeysjob.cpp create mode 100644 lang/qt/src/qgpgmerefreshkeysjob.h create mode 100644 lang/qt/src/qgpgmesecretkeyexportjob.cpp create mode 100644 lang/qt/src/qgpgmesecretkeyexportjob.h create mode 100644 lang/qt/src/qgpgmesignencryptjob.cpp create mode 100644 lang/qt/src/qgpgmesignencryptjob.h create mode 100644 lang/qt/src/qgpgmesignjob.cpp create mode 100644 lang/qt/src/qgpgmesignjob.h create mode 100644 lang/qt/src/qgpgmesignkeyjob.cpp create mode 100644 lang/qt/src/qgpgmesignkeyjob.h create mode 100644 lang/qt/src/qgpgmetofupolicyjob.cpp create mode 100644 lang/qt/src/qgpgmetofupolicyjob.h create mode 100644 lang/qt/src/qgpgmeverifydetachedjob.cpp create mode 100644 lang/qt/src/qgpgmeverifydetachedjob.h create mode 100644 lang/qt/src/qgpgmeverifyopaquejob.cpp create mode 100644 lang/qt/src/qgpgmeverifyopaquejob.h create mode 100644 lang/qt/src/qgpgmewkspublishjob.cpp create mode 100644 lang/qt/src/qgpgmewkspublishjob.h create mode 100644 lang/qt/src/refreshkeysjob.h create mode 100644 lang/qt/src/signencryptjob.h create mode 100644 lang/qt/src/signjob.h create mode 100644 lang/qt/src/signkeyjob.h create mode 100644 lang/qt/src/specialjob.h create mode 100644 lang/qt/src/threadedjobmixin.cpp create mode 100644 lang/qt/src/threadedjobmixin.h create mode 100644 lang/qt/src/tofupolicyjob.h create mode 100644 lang/qt/src/verifydetachedjob.h create mode 100644 lang/qt/src/verifyopaquejob.h create mode 100644 lang/qt/src/wkspublishjob.h create mode 100644 lang/qt/tests/Makefile.am create mode 100644 lang/qt/tests/Makefile.in create mode 100755 lang/qt/tests/initial.test create mode 100644 lang/qt/tests/run-keyformailboxjob.cpp create mode 100644 lang/qt/tests/t-encrypt.cpp create mode 100644 lang/qt/tests/t-keylist.cpp create mode 100644 lang/qt/tests/t-keylocate.cpp create mode 100644 lang/qt/tests/t-ownertrust.cpp create mode 100644 lang/qt/tests/t-support.cpp create mode 100644 lang/qt/tests/t-support.h create mode 100644 lang/qt/tests/t-tofuinfo.cpp create mode 100644 lang/qt/tests/t-wkspublish.cpp create mode 100644 m4/ax_cxx_compile_stdcxx.m4 create mode 100644 m4/ax_pkg_swig.m4 create mode 100644 m4/ax_python_devel.m4 create mode 100644 m4/pkg.m4 create mode 100644 m4/qt.m4 create mode 100644 src/argparse.c create mode 100644 src/argparse.h create mode 100644 src/b64dec.c delete mode 100644 src/kdpipeiodevice.cpp delete mode 100644 src/kdpipeiodevice.h delete mode 100644 src/kdpipeiodevice.moc create mode 100644 src/keysign.c create mode 100644 src/mbox-util.c create mode 100644 src/mbox-util.h delete mode 100644 src/moc_kdpipeiodevice.cpp create mode 100644 src/tofupolicy.c delete mode 100644 src/w32-qt-io.cpp create mode 100644 tests/gpg/t-encrypt-mixed.c create mode 100644 tests/run-decrypt.c create mode 100644 tests/run-encrypt.c create mode 100644 tests/run-genkey.c create mode 100644 tests/run-identify.c create mode 100644 tests/run-keysign.c create mode 100644 tests/run-tofu.c diff --git a/AUTHORS b/AUTHORS index dd4b492..bbf1576 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,5 @@ Package: gpgme -Homepage: http://www.gnupg.org/related_software/gpgme/ +Homepage: https://gnupg.org/related_software/gpgme/ Download: ftp://ftp.gnupg.org/gcrypt/gpgme/ Repository: git://git.gnupg.org/gpgme.git Maintainer: Werner Koch diff --git a/ChangeLog b/ChangeLog index b1a8397..239b3a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,2683 @@ +2016-09-21 Werner Koch + + Release 1.7.0. + * configure.ac: Bump LT vesion to C26/A15/R0. + + python: Create install dir. + * lang/python/Makefile.am (install-exec-local): Create dir. + +2016-09-20 Werner Koch + + tests: Make "make -j distcheck" work in Python. + * lang/python/Makefile.am (SUBDIRS): Make current dir fist. + * lang/python/tests/Makefile.am (xcheck): Depend on pubring-stamp. + (CLEANFILES): Remove private-keys-v1.d/gpg-sample.stamp. + (check-local): Remove. + (initial.py): Remove dependency. + (./pubring-stamp): Depend on conf files and the + private-keys-v1.d/gpg-sample.stamp file. Also replace use of + basename. + + tests: Use --batch for gpg import. + * lang/python/tests/Makefile.am (./pubring-stamp): Use --batch with + GPG to avoid Pinentries during import when using GnuPG >= 2.1. + Replace touch by echo. + * tests/gpg/Makefile.am (./pubring-stamp): Ditto. + + tests: Improve portability. + * lang/qt/tests/Makefile.am (clean-local): Avoid non-portable "--" + * lang/python/Makefile.am (copystamp): Use well defined cp -R instead + of cp -r. + + build: Create swdb file. + * Makefile.am (distcheck-hook): New. + (dist-hook): s/VERSION/PACKAGE_VERSION/ for future compatibility. + +2016-09-20 Justus Winter + + python: Fix detection of Python available versions. + * configure.ac: Test for 'PYTHON_VERSION' as 'AX_PYTHON_DEVEL' sets + 'PYTHON' but clears the former. + + Fixes-commit: 99db3512 + +2016-09-19 Andre Heinecke + + core: Remove moc artifact. + * src/moc_kdpipeiodevice.cpp: Removed. + * src/Makefile.am (EXTRA_DIST): Remove moc_kdpipeiodevice.cpp. + + qt: Improve README. + * lang/qt/README: Add more content. Clearly note license difference. + + cpp: Improve README. + * lang/cpp/README: Add more content, move license to bottom. + + qt: Add debug output for testTofuPolicy. + * lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): Add + debug output. + +2016-09-19 Ben Kibbey + + core: Check for GPG_TTY as well as DISPLAY. + * src/engine-assuan.c (llass_new): Update --ttyname from GPG_TTY. + * src/engine-g13.c (g13_new): Ditto. + * src/engine-gpg.c (gpg_new): Ditto. + * src/engine-uiserver.c (uiserver_new): Ditto. + * src/engine-gpgsm.c (gpgsm_new): Ditto. + +2016-09-16 Andre Heinecke + + qt: Add test for setting tofu policy. + * lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): New. + + qt: Add job for tofupolicy. + * lang/qt/src/job.cpp, lang/qt/src/protocol.h, + lang/qt/src/protocol_p.h: Register job. + * lang/qt/src/qgpgmetofupolicyjob.cpp, + lang/qt/src/qgpgmetofupolicyjob.h, + lang/qt/src/tofupolicyjob.h: New. + * lang/qt/src/Makefile.am: Update accordingly. + + cpp: Add support for gpgme_op_tofu_policy. + * src/context.cpp, src/context.h (setTofuPolicy, setTofuPolicyStart): + New. + + cpp: Declare sizes of tofu-info enums. + * lang/cpp/src/tofuinfo.h (Policy, Validity): Declare sizes. + +2016-09-16 Werner Koch + + cpp: Silence use of deprecated function warning. + * lang/cpp/src/context.cpp (GpgME): Use pragma to silence wardning. + + core: Document the version a function has been deprecated. + * src/gpgme.h.in (_GPGME_DEPRECATED): Change to take versio numbers + for documentation. Change all places. + (_GPGME_DEPRECATED_OUTSIDE_GPGME): Ditto. + * lang/python/gpgme-h-clean.py: Adjust RE. + + core: Map GPGME_STATUS_EOF to the empty string. + * src/status-table.c (_gpgme_status_to_string): Return "" for EOF. + * src/engine-gpg.c (read_status): Ditto. The old code accidently used + GPGME_STATUS_EOF which is the integer 0 and neiteyr NULL nor a string. + +2016-09-16 Justus Winter + Kai Michaelis + + python: Release the GIL during calls into GPGME. + * lang/python/helpers.c (pyme_raise_callback_exception): Re-acquire + the Global Interpreter Lock. + (pyPassphraseCb, pyme_set_passphrase_cb, pyProgressCb, + pyme_set_progress_cb, pyStatusCb, pyme_set_status_cb, + _pyme_interact_cb, pyDataReadCb, pyDataWriteCb, pyDataSeekCb, + pyDataReleaseCb, pyme_data_new_from_cbs, _pyme_assuan_data_cb, + _pyme_assuan_inquire_cb, _pyme_assuan_status_cb): Likewise. + * lang/python/setup.py.in: Make 'gpgme-config' emit the correct + cflags, and SWIG generate code to release the GIL before calling us. + +2016-09-16 Justus Winter + + python: Adapt to 'gpgme_op_interact'. + * lang/python/examples/inter-edit.py: Update example. + * lang/python/gpgme.i (gpgme_edit_cb_t): Turn into + 'gpgme_interact_cb_t'. + * lang/python/helpers.c (_pyme_edit_cb): Turn into + '_pyme_interact_cb_t'. + * lang/python/private.h (_pyme_edit_cb): Likewise. + * lang/python/pyme/constants/__init__.py: Replace numeric status codes + with the keywords. + * lang/python/pyme/constants/status.py: Likewise. + * lang/python/pyme/core.py (Context.interact): New method. + (Context.op_edit): Deprecate, update docstring, implement using + Context.interact. + * lang/python/tests/t-edit.py: Test both interfaces. + +2016-09-16 Werner Koch + + core: Remove stub to try implementing gpg < 2.1 support for createkey. + * src/engine-gpg.c (gpg_createkey_legacy): Remove. + (gpg_genkey): Remove call. + + core: Fix setting og the verification result. + * src/verify.c (parse_new_sig): Proberly handle the RC in an ERRSIG + status. + +2016-09-15 Werner Koch + + core: New function gpgme_op_interact, deprecate gpgme_op_edit. + * src/gpgme.h.in (gpgme_interact_cb_t): New. + (GPGME_INTERACT_CARD): New. + (gpgme_op_interact_start, gpgme_op_interact): New. + * src/libgpgme.vers, src/gpgme.def: Add new functions. + * src/edit.c (op_data_t): Rename fnc to fnc_old and change users. Add + fnc. + (edit_status_handler): Call old or new callback. + (command_handler): Ditto. + (interact_start): New. + (gpgme_op_interact_start, gpgme_op_interact_start): New. + * src/status-table.c (_gpgme_status_to_string): New. + + * tests/gpg/t-edit.c (edit_fnc): Rename to interact_fnc and change + type of STATUS. Use gpgme_io_writen. + (main): s/gpgme_op_edit/gpgme_op_interact/. + + core: Minor change of the gpgme_op_edit semantics. + * src/edit.c (command_handler): Handle special error code. + * src/engine-gpg.c (read_status): Ditto. + * src/engine-gpgsm.c (status_handler): Ditto. + * src/engine-uiserver.c (status_handler): Ditto. + * src/util.h (GPG_ERR_FALSE): Define for older libgpg-error versions. + +2016-09-14 Werner Koch + + core: New function gpgme_op_tofu_policy. + * src/gpgme.h.in (gpgme_op_tofu_policy_start): New function. + (gpgme_op_tofu_policy): New function. + * src/libgpgme.vers, src/gpgme.def: Add new functions. + * src/tofupolicy.c: New. + * src/Makefile.am (main_sources): Add that file. + * src/context.h (ctx_op_data_id_t): Add OPDATA_TOFU_POLICY. + * src/engine.c (_gpgme_engine_op_tofu_policy): New. + * src/engine-backend.h (engine_ops): Add funcptr 'tofu_policy'. + Adjust all engine initializations. + * src/engine-gpg.c (gpg_tofu_policy): New. + (_gpgme_engine_ops_gpg): Register this function. + + * tests/run-tofu.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add it. + + core: Defer implementation of gpgme_op_createkey with gpg < 2.1. + * src/engine-gpg.c (gpg_createkey_legacy): Mark unused variables. + + core: New function gpgme_op_keysign. + * src/gpgme.h.in (gpgme_op_keysign_start, gpgme_op_keysign): New. + (GPGME_KEYSIGN_LOCAL): New. + (GPGME_KEYSIGN_LFSEP): New. + (GPGME_KEYSIGN_NOEXPIRE): New. + * src/context.h (ctx_op_data_id_t): Add OPDATA_KEYSIGN. + * src/keysign.c: New. + * src/Makefile.am (main_sources): Add keysig. + * src/libgpgme.vers, src/gpgme.def: Add gpgme_op_keysign_start. + * src/engine.c (_gpgme_engine_op_keysign): New. + * src/engine-backend.h (engine_ops): Add 'keysign' and adjust all + engine initializers. + * src/engine-gpg.c (_add_arg): Add args PREFIX and ARGLEN and change + callers to set them. + (add_arg_pfx): New. + (add_arg_len): New. + (gpg_keysign): New. + (_gpgme_engine_ops_gpg): Set keysign to gpg_keysign. + * tests/run-keysign.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add run-keysign. + +2016-09-14 Justus Winter + + python: Clarify that we support Python 2.7 too. + * lang/python/README: Use 'Python' instead of 'Python 3'. + * lang/python/pyme/version.py.in: Likewise. + * lang/python/setup.py.in: Add classifier for 2.7, drop 3 only. + + python: Trim imports. + * lang/python/examples/encrypt-to-all.py: Drop unused import of 'os'. + * lang/python/examples/signverify.py: Likewise. + * lang/python/examples/simple.py: Likewise. + * lang/python/examples/verifydetails.py: Likewise. + + python: Improve error handling. + * lang/python/gpgme.i (gpgme_engine_info_t): Improve error handling. + + python: Adapt to TOFU changes. + * lang/python/pyme/results.py (TofuInfo): Drop. + (Signature): The TOFU information moved to the key. + + python: Improve build system integration. + * configure.ac: Try to compile a Python module for each version. + * m4/m4_ax_swig_python.m4: Drop unused file. + +2016-09-14 Werner Koch + + core: New function gpgme_op_revuid. + * src/engine.h (GENKEY_EXTRAFLAG_REVOKE): New. + * src/genkey.c (adduid_start): Rename to addrevuid_start. Add arg + REVOKE and pass it as extraflags. Remove useless ARMOR extraflag. + Adjust callers. + (gpgme_op_revuid_start, gpgme_op_revuid): New. + * src/gpgme.def, src/libgpgme.vers: Add them. + + * tests/run-genkey.c: Add option --revuid. + + core: Change a parameter for the engine's genkey function. + * src/engine.h (GENKEY_EXTRAFLAG_ARMOR): New. + * src/engine-backend.h (engine_ops): Rename USE_ARMOR in genkey to + EXTRAFLAGS. + * src/engine.c (_gpgme_engine_op_genkey): Ditto. + * src/engine-gpg.c (gpg_createkey_from_param): Ditto and test the + flags. + (gpg_createkey_legacy): Ditto. + (gpg_createkey): Ditto. + (gpg_addkey): Ditto. + (gpg_genkey): Ditto. + +2016-09-14 Justus Winter + + python: Build for both Python2 and Python3. + * NEWS: Update. + * configure.ac: Check for multiple Python versions. + * lang/python/Makefile.am: Build and install for both Python versions. + * lang/python/tests/Makefile.am: Test both versions. + * lang/python/tests/run-tests.py: New test runner. + +2016-09-14 Werner Koch + + core: New function gpgme_op_adduid. + * src/genkey.c: Replace most error codes GPG_ERR_INV_VALUE by + GPG_ERR_INV_ARG. + (struct op_data_t): Add field UIDMODE. + (genkey_status_handler): Use UIDMODE. + (adduid_start): New. + (gpgme_op_adduid_start, gpgme_op_adduid): New. + * src/gpgme.def, src/libgpgme.vers: Add them. + * tests/run-genkey.c: Add option --adduid. + + core: New function gpgme_op_createsubkey. + * src/genkey.c (createsubkey_start): New. + (gpgme_op_createsubkey_start, gpgme_op_createsubkey): New. + * src/gpgme.def, src/libgpgme.vers: Add them. + * src/engine-gpg.c (gpg_createkey): Factor some code out to ... + (gpg_add_algo_usage_expire): new. + (gpg_addkey): Implement. + * tests/run-genkey.c: Add option --addkey. + +2016-09-13 Werner Koch + + core: Use const char * where appropriate. + + core: Cast away the common const problem with spawn and argv. + * src/dirinfo.c (read_gpgconf_dirs): Use a cast to assignd to ARGV. + + core: Fix condition-always-true warning in trace macro. + * src/data-compat.c (old_user_read): Cast AMT. + + core: Mark unused function args. + + tests: Mark lots of unused vars and fix const mismatches. + + tests: Use gpgme_io_write in passhrase callbacks. + * tests/gpg/t-support.h (passphrase_cb): Use gpgme_io_write. + * tests/gpgsm/t-support.h (passphrase_cb): Ditto. + * tests/run-support.h (passphrase_cb): Ditto. + + core: Do not pass const char* to functions taking a char*. + + build: Use more compiler warnings. + * configure.ac: Add useful compiler warnings. + + core: New function gpgme_op_create_key. + * src/engine-backend.h (engine_ops): Change prototype of genkey. + * src/engine-gpgsm.c (gpgsm_genkey): Change accordingly. + * src/engine-gpg.c (gpg_genkey): Change it to a dispatcher. + (gpg_createkey_from_param): New for the old functionality. + (gpg_createkey_legacy): New. Stub for now. + (gpg_createkey): New. + (gpg_addkey): New. Stub for now. + (gpg_adduid): New. Stub for now. + * src/engine.c (_gpgme_engine_op_genkey): Add new args. + * src/genkey.c (op_data_t): Add field ERROR_CODE. + (parse_error): New. + (genkey_status_handler): Parse ERROR status line. + (genkey_start): Use NULL/0 for the new args. + (createkey_start): New. + (gpgme_op_createkey_start, gpgme_op_createkey): New. + * src/gpgme.def, src/libgpgme.vers: Add gpgme_op_createkey_start and + gpgme_op_createkey. + * src/gpgme.h.in (_gpgme_op_genkey_result): Add fields PUBKEY and + SECKEY. + (GPGME_CREATE_SIGN): New. + (GPGME_CREATE_ENCR): New. + (GPGME_CREATE_CERT): New. + (GPGME_CREATE_AUTH): New. + (GPGME_CREATE_NOPASSWD): New. + (GPGME_CREATE_SELFSIGNED): New. + (GPGME_CREATE_NOSTORE): New. + (GPGME_CREATE_WANTPUB): New. + (GPGME_CREATE_WANTSEC): New. + (GPGME_CREATE_FORCE): New. + + * tests/run-genkey.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add it. + +2016-09-13 Justus Winter + + python: Handle slight differences between Python 2 and 3. + * lang/python/helpers.c (pyDataWriteCb): Handle Python integers being + returned on Python 2. + (pyDataSeekCb): Likewise. + * lang/python/pyme/core.py (Data.__init__): Fix testing for string + argument. + (Data.new_from_filepart): Likewise. + * lang/python/pyme/util.py (is_a_string): New function. + * lang/python/tests/t-encrypt-large.py (read_cb): Force evaluation of + generator. + * lang/python/tests/t-idiomatic.py: Partly skip test on Python 2. + * lang/python/tests/t-verify.py (check_result): Here, the difference + between 2 and 3 really matters. We cannot change the char * + conversion in Python 2 without breaking all existing applications, and + using bytestrings in Python 3 would be very inconvenient. + + python: Fix types and error handling. + * lang/python/helpers.c (_pyme_edit_cb): Drop the const. + (_pyme_assuan_{data,inquire,status}_cb): Fix error handling. + +2016-09-12 Justus Winter + + python: Avoid Python3-only form of super(). + * lang/python/pyme/core.py (GpgmeWrapper.__repr__): Use more + compatible form of super. + (GpgmeWrapper.__setattr__): Likewise. + (Context.__init__): Likewise. + (Data.__init__): Likewise. + + python: Make type translation compatible with Python 2.7. + * lang/python/gpgme.i: Avoid functions not available in Python 2.7. + * lang/python/helpers.c: Likewise. + + python: Avoid hardcoding the interpreter. + * lang/python/setup.py.in: Avoid hardcoding the interpreter. + + python: Do not rely on subprocess.DEVNULL. + * lang/python/setup.py.in: Do not rely on subprocess.DEVNULL. + + tests: Fix version comparison. + * tests/gpg/t-sig-notation.c: Fix version comparison. + + Fixes-commit: a0263ad2 + + tests: Make signature notation test compatible with older GnuPGs. + * lang/python/tests/t-sig-notation.py: Only check the critical flag + when GnuPG >= 2.1.13 is used. + * tests/gpg/t-sig-notation.c: Likewise. + + Fixes-commit: c88c9ef3 + +2016-09-12 Andre Heinecke + + qt: Fix some includes. + * lang/qt/src/qgpgmekeyformailboxjob.cpp: Explicitly include + QStringList. + * lang/qt/tests/t-support.h, lang/qt/tests/t-support.cpp: Move + includes into impl. Explicitly include QDir. + +2016-09-12 Justus Winter + + qt: Fix tofu test. + * lang/qt/tests/t-tofuinfo.cpp: Adjust member names. + + Fixes-commit: 120b1478 + +2016-09-07 Werner Koch + + core,cpp: Extend the TOFU information. + * src/gpgme.h.in (struct _gpeme_tofu_info): Rename FIRSTSEEN to + SIGNFIRST and LASTSEEN to SIGNLAST. Add ENCRFIST and ENCRLAST. + * src/keylist.c (parse_tfs_record): Parse to ENCRFIRST and ENCRLAST. + * src/verify.c (parse_tofu_stats): Ditto. + * tests/run-keylist.c (main): Adjust and print encrypt stats. + * tests/run-verify.c (print_result): Ditto. + + * lang/cpp/src/tofuinfo.h (TofuInfo): Rename firstSeen to signFirst + and lastSeen to signLast. Add encrCount, encrFirst and encrLast. + * lang/cpp/src/tofuinfo.cpp (encrCount, encrFirst, encrLast): New. + +2016-09-06 Andre Heinecke + + tests: Set passphrase cb in t-encrypt-mixed. + * tests/gpg/t-encrypt-mixed.c (main): Set passphrase cb. + + core: Check for gpg version for loopback mode. + * src/engine-gpg.c (build_argv): Check for version 2.1.0 + before adding pinentry-mode. + + core: Fix passphrase cb for mixed sym encrypt. + * src/encrypt.c (encrypt_start): Handle SYMMETRIC flag. + * src/encrypt-sign.c (encrypt_sign_start): Ditto. + +2016-09-05 Andre Heinecke + + qt: Clarify comment and strings in tofuinfo test. + * lang/qt/tests/t-tofuinfo.cpp (testTofuSignCount) + (testTofuKeyList): Ensure distinct messages. Clarify comment. + + qt: Enable signcount checks in tofuinfo test. + * lang/qt/tests/t-tofuinfo.cpp: Enable checks for signcount. + + cpp: Add convenience update function to a key. + * lang/cpp/src/key.cpp (Key::update): New. + * lang/cpp/src/key.h: Update accordingly. + + cpp: Add ostream operators for key and uid. + * lang/cpp/src/key.cpp (Key, UserID): Add ostream operator. + * lang/cpp/src/key.h: Update accordingly. + + qt: Add missing header redirection. + * lang/qt/src/keyformailboxjob.h, + lang/qt/src/qgpgmekeyformailboxjob.h: Fix includes. + + qt: Include cpp before core directory. + * lang/qt/src/Makefile.am (AM_CPPFLAGS): Include cpp before core. + +2016-08-25 Andre Heinecke + + qt: Fix 2.1 t-support copy. + * lang/qt/src/t-support.cpp (copyKeyring): Fix seckey copy. + + qt: Fix and extend TofuInfo test. + * lang/qt/tests/t-tofuinfo.cpp: Delete executed jobs. + (testTofuKeyList): New. + (testSupported): Activate for 2.1.16 + (signAndVerify): Disable sigcount tests. + + qt: Fix keyring copy in tests. + * lang/qt/test/t-encrypt.cpp, + lang/qt/test/t-tofuinfo.cpp: Assert on copy failure. + * lang/qt/test/t-support.cpp (copyKeyrings): Fix path. + + qt: Add generic flag support for keylistjobs. + * lang/qt/src/keylistjob.h (addMode): New. + * lang/qt/src/qgpgmekeylistjob.h (addMode): New. + * lang/qt/src/qgpgmekeylistjob.cpp (addMode: New. + + qt: Ensure that current src dir is included first. + * lang/qt/src/Makefile.am: Reorder include directives. + + cpp: Add WithTofu Keylist Mode. + * lang/cpp/src/context.cpp: Handle WithTofu. + * lang/cpp/src/global.h (KeyListMode): Add WithTofu. + * lang/cpp/src/util.h (add_to_gpgme_keylist_mode_t): Handle WithTofu. + + qt: Fix tofuinfo test when gpg is gpg2. + * lang/qt/tests/t-support.cpp (QGpgMETest::copyKeyrings): New helper. + * lang/qt/tests/t-support.h: Declare. + * lang/qt/tests/t-encrypt.cpp: use it + * lang/qt/tests/t-tofuinbo.cpp: ditto. + + qt: Remove unused variable in test. + * t-wkspublish.cpp (testWKSPublishCreate): Remove context. + + qt: Add test for wkspublishjob. + * lang/qt/tests/t-wkspublish.cpp: New. + * lang/qt/tests/Makefile.am: Update accordingly. + + qt: Add WKSPublishJob. + * lang/qt/src/Makefile.am: Add new files. + * lang/qt/src/job.cpp: Include moc / subclass stub. + * lang/qt/src/protocol.h: Add virtual for new job. + * lang/qt/src/protocol_p.h: Add job. + * lang/qt/src/wkspublishjob.h: Interface for WKSPublishJob. + * lang/qt/src/qgpgmewkspublishjob.cpp, + lang/qt/src/qgpgmewkspublishjob.h: New. + + Cpp: Change firstSeen / lastSeen return values. + * lang/cpp/src/tofuinfo.cpp, + lang/cpp/src/tofuinfo.h (TofuInfo::firstSeen, TofuInfo::lastSeen): + Change return values to unsigned long and update doc. + + Cpp: Add wrapper for gpgme_get_dirinfo. + * lang/cpp/src/context.cpp (dirInfo): New. + * lang/cpp/src/global.h (dirInfo): New. + + Cpp: Add support for spawn engine. + * lang/cpp/src/context.cpp (Context::spawn, Context::spawnAsync): New. + * lang/cpp/src/context.h: Add prototypes. + (SpawnFlags): New. + * lang/cpp/src/global.h (SpawnEngine): Added. + +2016-08-25 Werner Koch + + core: Add GPGME_KEYLIST_MODE_WITH_TOFU. + * src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_TOFU): New. + * src/engine-gpg.c (gpg_keylist_build_options): Use that. + * src/keylist.c: Include limits.h. + (parse_tfs_record): New. + (keylist_colon_handler): Support TFS record. + * tests/run-keylist.c: Include time.h. + (isotimestr): New. + (main): Add option --tofu. Print TOFU info. + * tests/run-verify.c: Include time.h. + (isotimestr): New. + (print_result): Use isotimestr for TOFU dates. + +2016-08-24 Werner Koch + + core: Adjust for TOFU_STATS change in gnupg 2.1.16. + * src/gpgme.h.in (_gpgme_tofu_info): Change 'firstseen' and 'lastseen' + to a timestamp value. + * src/verify.c (parse_tofu_stats): Do not cap these values at UINT_MAX. + + core: Set the 'encrcount' field in gpgme_tofu_info_t. + * src/verify.c (parse_tofu_stats): Set ENCRCOUNT field. + + cpp: Get rid of AssuanResult due to its deprecation. + * lang/cpp/src/assuanresult.cpp: Remove. + * lang/cpp/src/assuanresult.h: Remove. + * lang/cpp/src/Makefile.am: Remove these files. + * lang/cpp/src/context.cpp: Remove header assuanresult.h + (assuanTransact): Change return type to Error. Use + gpgme_op_assuan_transact_ext. + (startAssuanTransaction): Change return type to Error. + (assuanResult): Remove + * lang/cpp/src/context.h (assuanResult): Adjust for changes. + +2016-08-24 Andre Heinecke + + Qt: Adapt (disabled) tofuinfo test to new API. + * lang/qt/tests/t-tofuinfo.cpp: Switch to UID based API. + + Cpp: Add Key to signature. + * lang/cpp/src/verificationresult.cpp, + lang/cpp/src/verificationresult.h (Signature::key): New. + + Cpp: Use fpr field for primaryFingerprint. + * lang/cpp/src/key.cpp (Key::primaryFingerprint): Return + fpr value if available. + +2016-08-23 Andre Heinecke + + Cpp: Move tofuinfo from signature to userid. + * lang/cpp/src/key.cpp (UserID::tofuInfo): New. + * lang/cpp/src/key.h: Update accordingly. + * lang/cpp/src/tofuinfo.cpp: Remove dropped fields. + * lang/cpp/src/tofuinfo.h: Update accordingly. + * lang/cpp/src/verificationresult.cpp, + lang/cpp/src/verificationresult.h: Remove tofu info. + * lang/qt/tests/t-tofuinfo.cpp: Disable for now. + +2016-08-23 Werner Koch + + core: Put the protocol into a TOFU created key object. + * src/verify.c (parse_tofu_user): Add arg 'protocol' and store it in + the KEY. + (_gpgme_verify_status_handler): Pass protocol. + + core: Change the way TOFU information are represented. + * src/gpgme.h.in (struct _gpgme_signature): Remove field 'tofu'. Add + field 'key'. + (struct _gpgme_key): Add field 'fpr'. + (struct _gpgme_user_id): Add field 'tofu'. + (struct _gpgme_tofu_info): Remove fields 'address' and 'fpr'. + * src/key.c (gpgme_key_unref): Release TOFU and FPR. + * src/keylist.c (keylist_colon_handler): Store the fingerprint of the + first subkey also in KEY. + * src/verify.c (release_tofu_info): Remove. + (release_op_data): Release KEY. + (parse_tofu_user): Rewrite for new data structure. + (parse_tofu_stats): Ditto. + (parse_tofu_stats_long): Ditto. + * tests/run-verify.c (print_result): Ditto. + * tests/run-keylist.c (main): Print more fields. + + core: Extend gpgme_user_id_t with 'address'. + * src/mbox-util.c, src/mbox-util.h: Adjust for use in gpgme. + * src/Makefile.am (main_sources): Add mbox-util. + * src/key.c (_gpgme_key_append_name): Set 'address' field of uid. + (gpgme_key_unref): Free it. + +2016-08-22 Werner Koch + + core: New code for parsing mail addresses. + * src/mbox-util.c: New. + * src/mbox-util.h: New. + + core: Add new items for gpgme_get_dirinfo. + * src/dirinfo.c (WANT_SYSCONFDIR, WANT_LIBEXECDIR, WANT_LIBDIR): New. + (WANT_DATADIR, WANT_LCOALEDIR, WANT_AGENT_SSH_SOCKET): New + (WANT_DIRMNGR_SOCKET): New. + (dirinfo): Add fields 'sysconfdir', 'bindir', 'libexecdir', 'libdir', + 'datadir', 'localedir', 'agent_ssh_socket', and 'dirmngr_socket'. + (parse_output): Set these fields. + (get_gpgconf_item): Return them. + (gpgme_get_dirinfo): Likewise. + + core: Base gpgme_get_dirinfo(uiserver-socket) on the socket dir. + * src/dirinfo.c (dirname_len): New. + (parse_output): Change computation of UISRV_SOCKET. + +2016-08-21 Werner Koch + + core: New commands --lang and --have-lang for gpgme-config. + * configure.ac (GPGME_CONFIG_AVAIL_LANG): New ac_subst. + * src/gpgme-config.in (avail_lang): Add commands --lang and + --have-lang. + +2016-08-18 Andre Heinecke + + core: Remove (now) useless diagnostic. + * src/w32-io.c(_gpgme_io_spawn): Remove spawnhelper not found + diagnostic. + + core: Fail loudly in case w32 spawner not found. + * src/w32-io.c (_gpgme_io_spawn): Show a message box in + case gpgme-w32spawn.exe not found. + +2016-08-17 Andre Heinecke + + Cpp: Fix some pedantic warnings. + * lang/cpp/src/context.cpp, + lang/cpp/src/context.h (Context::getKeysFromRecipients): Remove + ignored / invalid const qualifier. + * lang/cpp/src/result.h: Don't shadow error function in ctor. + +2016-08-16 Werner Koch + + core: New global flag "require-gnupg". + * src/gpgme.c (gpgme_set_global_flag): Add flag. + * src/engine.c (engine_minimal_version): New variable. + (_gpgme_set_engine_minimal_version): New function. + (gpgme_get_engine_info): Check that flag. + + * tests/run-keylist.c (main): New option --require-gnupg. + + core: Simplify setting of dummy versions. + * src/engine.c (_gpgme_engine_info_release): Do not assert but free + FILE_NAME. + (gpgme_get_engine_info): Provide default for VERSION and REQ_VERSION. + Use calloc instead of malloc. + (_gpgme_set_engine_info): Ditto. + * src/engine-assuan.c (llass_get_version): Return NULL. + (llass_get_req_version): Ditto. + * src/engine-spawn.c (engspawn_get_version): Ditto. + (engspawn_get_req_version): Ditto. + * src/engine-uiserver.c (uiserver_get_version): Ditto. + (uiserver_get_req_version): Ditto. + +2016-08-12 Andre Heinecke + + Qt: Add test for progress signal of encryptjob. + * lang/qt/tests/t-encrypt.cpp (testProgress): New. + + Cpp: Provide size-hint for seekable and mem data. + * lang/cpp/src/data.cpp (GpgME::Data::Data): Set size-hint for + mem and DataProvider based Data. + +2016-08-12 Werner Koch + + core: Make use of the "size-hint" in engine-gpg. + * src/engine-gpg.c: Include data.h. + (add_input_size_hint): New. + (gpg_decrypt, gpg_encrypt, gpg_encrypt_sign, gpg_sign) + (gpg_verify): Call new function, + + * tests/run-encrypt.c (status_cb): Print to stderr. + (progress_cb): New.o + (main): Add option --progress. Print full-status lines. Provide a + size for the input data. + + core: Add gpgme_data_set_flag to add more meta data to data objects. + * src/gpgme.h.in (gpgme_data_set_flag): New public function. + * src/data.c (gpgme_data_set_flag): New. + (_gpgme_data_get_size_hint): New. + * src/data.h (strucy gpgme_data): Add field 'size_hint'. + * src/gpgme.def, src/libgpgme.vers: Add new function. + * src/conversion.c (_gpgme_string_to_off): New. + +2016-08-12 Andre Heinecke + + Qt: Fix defaultkeygenerationjob build. + * lang/qt/src/defaultkeygenerationjob.cpp: Include moc. + +2016-08-11 Andre Heinecke + + Qt: Add DefaultKeyGenerationJob. + * lang/qt/src/defaultkeygenerationjob.cpp, + lang/qt/src/defaultkeygenerationjob.h: New. + * lang/qt/src/Makefile.am: Update accordingly. + + Qt: Ensure all public classes are exported. + * src/abstractimportjob.h, + src/cryptoconfig.h, + src/deletejob.h, + src/exportjob.h, + src/importfromkeyserverjob.h, + src/importjob.h, + src/keygenerationjob.h, + src/keylistjob.h, + src/listallkeysjob.h, + src/refreshkeysjob.h, + src/signencryptjob.h, + src/specialjob.h, + src/verifydetachedjob.h: Export classes. + + Qt: Add KeyForMailboxJob. + * lang/qt/src/job.cpp: Include moc and make subclass. + * lang/qt/src/keyformailboxjob.h, + lang/qt/src/qgpgmekeyformailboxjob.cpp, + lang/qt/src/qgpgmekeyformailboxjob.h: New. + * lang/qt/tests/run-keyformailboxjob.cpp: New manual test. + * lang/qt/tests/Makefile.am: Add run-keyformailboxjob. + * lang/qt/src/Makefile.am: Update accordingly. + * lang/qt/src/protocol.h, lang/qt/src/protocol_p.h: Add + keyformailboxjob. + +2016-08-10 Werner Koch + + doc: Get rid of version.texi. + * configure.ac (CC_FOR_BUILD): New. + * doc/mkdefsinc.c: New. Taken from GnuPG and modified for gpgme. + * doc/Makefile.am (EXTRA_DIST): Add defsincdate and mkdefsinc.c + (BUILT_SOURCES): new. + (gpgme.texi): New dependency. + (mkdefsinc, defsincdate, defs.inc): New rules. + (dist-hook): New. + * doc/gpgme.texi: Include defs.inc. Remove version.texi. + + build: Declare all languages for make dist. + * lang/Makefile.am (DIST_SUBDIRS): New. + + core: Do not identify PNG files as PGP signatures. + * src/data-identify.c (next_openpgp_packet): Blacklist PNG files. + +2016-08-10 Andre Heinecke + + Cpp: Handle empty recipients consistently. + * lang/cpp/src/context.cpp (Context::getKeysFromRecipients): + New helper. + (Context::encrypt, Context::startEncryption, Context::signAndEncrypt) + (Context::startCombinedSigningAndEncryption): Use new helper. + * lang/cpp/src/context.h (Context::getKeysFromRecipients): Add + as private helper. + + core: Handle ENCRYPT_SYMMETRIC also for sig & enc. + * src/engine-gpg.c (gpg_encrypt_sign): Handle ENCRYPT_SYMMETRIC + flag. + + Qt: Remove unused variable. + * lang/qt/src/qgpgmerefreshkeysjob.cpp (slotStatus): Remove + unused variable typ. + + Qt: Create TestPassphraseProvider on stack. + * lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-tofuinfo.cpp: Create + TestPassphraseProvider on stack. + + Cpp: Clarify ownership of provider classes. + * lang/cpp/src/context.h: Note that the context does not take + ownership of providers. + +2016-08-10 Justus Winter + + tests: Fix memory leak. + * tests/gpg/t-encrypt-mixed.c (main): Free 'text2'. + +2016-08-10 Andre Heinecke + + core: Ensure err is initalized in gpg_encrypt. + * src/engine-gpg.c (gpg_encrypt): Initialize err. + + Qt: Fix t-keylist moc include. + * lang/qt/tests/t-keylist.cpp: Don't include t-support.moc + +2016-08-09 Andre Heinecke + + Qt: Clean up debug output in tests. + * lang/qt/tests/t-support.cpp: Remove accidentally commited + debug output. + + Qt: Add encryption test and refactor testsuite. + * lang/qt/tests/Makefile.am: Add t-encrypt and t-support. + * lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.c (QGpgMETest): + New. Class to handle common cleanup / init. + * lang/qt/tests/t-keylist.cpp, + lang/qt/tests/t-keylocate.cpp, + lang/qt/tests/t-ownertrust.cpp, + lang/qt/tests/t-tofuinfo.cpp: Inherit QGpgMETest. + * lang/qt/tests/t-encrypt.cpp: New. Test Symetric and Asymectric + encryption. Mixed encryption test is disabled. + + Qt: Add support for EncryptJobs with generic flags. + * lang/qt/src/encryptjob.h, lang/qt/src/signencryptjob.h, + lang/qt/src/qgpgmeencryptjob.h, lang/qt/src/qgpgmeencryptjob.cpp, + lang/qt/src/qgpgmesignencryptjob.cpp, + lang/qt/src/qgpgmeencryptjob.cpp: Add start and exec overloads + that accept generic EncryptFlags. + + Cpp: Add support for all EncryptionFlags. + * lang/cpp/src/context.h (EncryptionFlags): Extend. + * lang/cpp/src/context.cpp (encryptflags2encryptflags): Ditto. + + Cpp: Fix simple symmetric encryption. + * lang/cpp/src/context.cpp (Context::encrypt): If no recipients + are provided encrypt with NULL and not an empty array. + + core: Add support for mixed symmetric and asym enc. + * src/gpgme.h.in (gpgme_encrypt_flags_t): New flag + GPGME_ENCRYPT_SYMMETRIC. + * src/engine-gpg.c (gpg_encrypt): Also add --symmetric if the flag + is given. + * NEWS: Mention new flag. + * tests/run-encrypt.c (show_usage): Extend for --symmetric. + (main): Handle --symmetric. + (main): Set passphrase_cb in loopback mode. + (main): Fix encrypt call if no recipients are given. + * tests/gpg/t-encrypt-mixed.c: New. + * tests/gpg/Makefile.am (c_tests): Add new test. + * doc/gpgme.texi: Document new flag. + +2016-08-08 Werner Koch + + core: Let GPGME_PROTOCOL_ASSUAN pass Assuan comments through. + * src/engine-assuan.c (llass_new): Set ASSUAN_CONVEY_COMMENTS, + +2016-08-08 Andre Heinecke + + Prepend LD_LIBRARY_PATH for python tests. + * lang/python/tests/Makefile.am (TESTS_ENVIRONMENT): Prepend path + instead of setting the value. + +2016-08-05 Justus Winter + + python: Clean up and modernize examples. + * lang/python/examples/Examples.rst: Delete file. + * lang/python/examples/t-edit.py: Likewise. This is actually a test + case and has been moved to 'tests'. + * lang/python/examples/assuan.py: New file. + * lang/python/examples/decryption-filter.py: Likewise. + * lang/python/examples/delkey.py: Modernize. + * lang/python/examples/encrypt-to-all.py: Likewise. + * lang/python/examples/exportimport.py: Likewise. + * lang/python/examples/genkey.py: Likewise. + * lang/python/examples/inter-edit.py: Likewise. + * lang/python/examples/sign.py: Likewise. + * lang/python/examples/signverify.py: Likewise. + * lang/python/examples/simple.py: Likewise. + * lang/python/examples/testCMSgetkey.py: Likewise. + * lang/python/examples/verifydetails.py: Likewise. + +2016-08-04 Werner Koch + + core: Extend gpgme_subkey_t to carry the keygrip. + * src/gpgme.h.in (struct _gpgme_subkey): Add file 'keygrip'. + * src/key.c (gpgme_key_unref): Free KEYGRIP. + * src/keylist.c (keylist_colon_handler): Parse GRP records. + * src/engine-gpg.c (gpg_keylist_build_options): Do not use + --with-fingerprint options for gpg versions >= 2.1.15. + + * tests/run-keylist.c (main): Print subkeys and keygrips. + +2016-08-03 Justus Winter + + python: Add a nicer interface to list keys. + * lang/python/pyme/core.py (Context.keylist): New method. + * lang/python/tests/t-keylist.py: Test new method. + +2016-08-02 Justus Winter + + python: Add a flag identifying in-tree builds. + * lang/python/helpers.c (pyme_in_tree_build): New variable. + * lang/python/helpers.h (pyme_in_tree_build): New declaration. + * lang/python/pyme/version.py.in (in_tree_build): New variable. + * lang/python/setup.py.in: Rework macro handling, set 'IN_TREE_BUILD' + as appropriate. + + python: Fix build system integration. + * lang/python/Makefile.am: Be more careful when cleaning the build + directory, we must not delete the generated file 'pyme/version.py'. + + doc: Document the Assuan protocol. + * doc/gpgme.texi: Document the Assuan protocol. + + GnuPG-bug-id: 2407 + +2016-07-28 Justus Winter + + python: Fix out-of-tree build. + * lang/python/MANIFEST.in: Add 'private.h'. + + Fixes-commit: 3d4dc3f0 + + python: Improve error handling. + * lang/python/pyme/core.py (Context.protocol): Check that the engine + is usable before setting the protocol. + (Context._errorcheck): Add missing functions. + + src: Fix dummy engine versions. + Previously, 'gpgme_engine_check_version' failed for these protocols + because the version parser failed to parse the dummy versions. + + * src/engine-assuan.c (llass_get_version): Use a version triple that + the parser can understand. + (llass_get_req_version): Likewise. + * src/engine-spawn.c (engspawn_get_version): Likewise. + (engspawn_get_req_version): Likewise. + * src/engine-uiserver.c (uiserver_get_version): Likewise. + (uiserver_get_req_version): Likewise. + + python: Drop superfluous imports and trim public interface. + * lang/python/pyme/__init__.py: Avoid leaking low-level 'gpgme', make + sure the main module looks nice and tidy, appease pyflakes. + * lang/python/pyme/errors.py: Appease pyflakes. + * lang/python/pyme/util.py: Avoid leaking low-level 'gpgme' into the + module namespace. + * lang/python/pyme/version.py.in: Likewise. + * lang/python/tests/t-keylist.py: Drop superfluous imports. + * lang/python/tests/t-sig-notation.py: Likewise. + * lang/python/tests/t-sign.py: Likewise. + * lang/python/tests/t-signers.py: Likewise. + + python: Rename compiled SWIG module. + Avoid the name pygpgme, as this is the name of another popular Python + binding for GPGME. + + This commit renames the compiled Python module produced by SWIG. + + * lang/python/Makefile.am: Rename the compiled Python module. + * lang/python/gpgme.i: Likewise. + * lang/python/pyme/core.py: Likewise. + * lang/python/pyme/errors.py: Likewise. + * lang/python/pyme/util.py: Likewise. + * lang/python/pyme/version.py.in: Likewise. + * lang/python/setup.py.in: Likewise. + + python: Rename exported functions. + Avoid the name pygpgme, as this is the name of another popular Python + binding for GPGME. + + This commit renames all functions that are exported to the Python + world. + + * lang/python/helpers.c: Rename all exported functions. + * lang/python/helpers.h: Likewise. + * lang/python/pyme/core.py: Likewise. + + python: Rename private functions. + Avoid the name pygpgme, as this is the name of another popular Python + binding for GPGME. + + This commit renames all functions that are not exported to the Python + world. + + * lang/python/gpgme.i: Rename all private functions. + * lang/python/helpers.c: Likewise. + * lang/python/helpers.h: Likewise. + * lang/python/private.h: Likewise. Also move the SWIG runtime helper + prototypes here. + + python: Support the Assuan engine. + * lang/python/gpgme.i: Add typemaps for the Assuan protocol callbacks. + * lang/python/helpers.c (_pyme_assuan_{data,inquire,status}_cb): New + functions. + * lang/python/private.h (_pyme_assuan_{data,inquire,status}_cb): New + prototypes. + * lang/python/pyme/core.py (Context.assuan_transact): New method. + * lang/python/pyme/util.py (percent_escape): New function. + * lang/python/tests/Makefile.am (py_tests): Add new test. + * lang/python/tests/t-protocol-assuan.py: New file. + + python: Improve engine information handling. + * lang/python/gpgme.i (gpgme_engine_info_t): Wrap engine infos. + * lang/python/pyme/core.py (Context.engine_info): New property. + (Context.{g,s}et_engine_info): Improve docstrings. + * lang/python/pyme/results.py (EngineInfo): New class. + + python: Add accessors for the protocol. + * lang/python/pyme/core.py (Context.__init__): Add 'protocol' + parameter. + (Context.protocol): New accessors. + + python: Expose less functions to the Python world. + * lang/python/Makefile.am (EXTRA_DIST, COPY_FILES): Add new file. + * lang/python/gpgme.i: Include new file and add comments. + * lang/python/helpers.c: Include new file. + * lang/python/helpers.h: Move functions we do not need to expose... + * lang/python/private.h: ... here. + +2016-07-19 Ben Kibbey + + Fix including nil bytes in keylist output. + * src/gpgme-tool.c (cmd_keylist,gt_result): use strlen(). + +2016-07-15 Justus Winter + + python: Make GPGME's version easily accessible. + * lang/python/pyme/version.py.in (gpgme_versionstr): New variable. + + python: Add an idiomatic interface. + * configure.ac: Bump required Python version. + * lang/python/pyme/__init__.py: Update docstring. Import Context and + Data. + * lang/python/pyme/core.py (Context.encrypt): New function. + (Context.decrypt): Likewise. + (Context.sign): Likewise. + (Context.verify): Likewise. + * lang/python/pyme/errors.py: Add new errors. + * lang/python/pyme/util.py (process_constants): Rework and return the + inserted keys. + * lang/python/tests/Makefile.am (EXTRA_DIST): Add new keys. + * lang/python/tests/encrypt-only.asc: New file. + * lang/python/tests/sign-only.asc: Likewise. + * lang/python/tests/initial.py: Mark key 'Alpha' as trusted, import + new keys. + * lang/python/tests/support.py: Add fingerprints of known keys. + (in_srcdir): New function. + (print_data): Handle bytes too. + (mark_key_trusted): New function. + * lang/python/tests/t-decrypt-verify.py: Adjust test. Test idiomatic + interface. + * lang/python/tests/t-decrypt.py: Test idiomatic interface. + * 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-idiomatic.py: Simplify. + * lang/python/tests/t-keylist.py: Adjust to newly trusted key. + * lang/python/tests/t-sign.py: Likewise. Test idiomatic interface. + * lang/python/tests/t-signers.py: Likewise. + * lang/python/tests/t-verify.py: Likewise. + +2016-07-14 Andre Heinecke + + Qt: Disable keylocate test for gnupg < 2.0.10. + * lang/qt/tests/t-keylocate.cpp: Disable test for gnupg < 2.0.10 + + Cpp: Add EngineInfo::Version class. + * lang/cpp/src/engineinfo.cpp (EngineInfo::engineVersion): New. + * lang/cpp/src/engineinfo.h (EngineInfo::engineVersion): Declare. + (EngineInfo::Version): Small helper to work with versions. + + Qt: Fix usage of ignore-invalid-option in tests. + * Makefile.am (pubring-stamp): Fix config. + + Qt: Fix tests if gpg2 is gpg. + * lang/qt/tests/Makefile.am (pubring-stamp): Loopback and provide + passphrase on command line when importing. + +2016-07-14 Justus Winter + + python: Fix test. + * lang/python/tests/t-keylist.py: Do not assume key alpha is trusted + yet. + +2016-07-13 Werner Koch + + build: Update config.{guess,sub} to {2016-05-15,2016-06-20}. + * build-aux/config.guess: Update. + * build-aux/config.sub: Update. + + core: New GPGME_DATA_ENCODING_MIME. + * src/gpgme.h.in (GPGME_DATA_ENCODING_MIME): New. + * src/data.c (gpgme_data_set_encoding): Adjust check. + * src/engine-gpg.c (have_gpg_version): New. + (gpg_encrypt, gpg_encrypt_sign): Pass flag '--mimemode'. + (gpg_sign): Ditto. + + * lang/cpp/src/data.h (GpgME): Add MimeEncoding. + * lang/cpp/src/data.cpp (encoding, setEncoding): Support MimeEncoding. + + * src/gpgme-tool.c (server_data_encoding): Add flag --mime. + + core: Pass the engine's version string to the engine's new function. + * src/engine-backend.h (engine_ops): Add arg 'version' to NEW. + * src/engine-assuan.c (llass_new): Add dummy arg 'version'. + * src/engine-g13.c (g13_new): Ditto. + * src/engine-gpgconf.c (gpgconf_new): Ditto. + * src/engine-gpgsm.c (gpgsm_new): Ditto. + * src/engine-spawn.c (engspawn_new): Ditto. + * src/engine-uiserver.c (uiserver_new): Ditto. + * src/engine.c (_gpgme_engine_new): Pass version string to the new + function. + * src/engine-gpg.c (struct engine_gpg): Add field 'version'. + (gpg_new): Add arg 'version'. + (gpg_release): Free VERSION. + +2016-07-13 Andre Heinecke + + Cpp: Add feature enum for new identify. + * lang/cpp/src/context.cpp (supported_features2): Add + BinaryAndFineGrainedIdentify + * lang/cpp/src/global.h (Feature2): ditto. + +2016-07-12 Justus Winter + + python: Port more tests. + * lang/python/pyme/core.py (Context.op_keylist_all): Add missing + 'op_keylist_end'. + (Context.op_trustlist_all): Fix function. Add missing + 'op_trustlist_end'. + * lang/python/tests/Makefile.am (pytests): Add new files. + * lang/python/tests/t-import.py: New file. + * lang/python/tests/t-keylist.py: Likewise. + * lang/python/tests/t-trustlist.py: Check alternate interface. + + python: Improve python packaging. + * lang/python/Makefile.am: Sign source releases, and upload them. + * lang/python/setup.py.in: Add categories. + +2016-07-12 Andre Heinecke + + m4: Don't set fpic for qt on windows. + * m4/qt.m4 (FIND_QT): Do not set fpic for windows. + + m4: Use LIBS instead of LDFLAGS for Qt libs. + * m4/qt.m4: Modify LIBS instead of LDFLAGS for link test. + + Bump version to 1.7.0. + * configure.ac(mym4_version_minor), + (mym4_version_micro): Next release will be 1.7.0 + + Qt: Install CamelCase forward includes. + * lang/qt/src/Makefile.am (camelcase_headers): New. Create and install + CamelCase headers. + + Qt: Export VerifyDetachedJob. + * lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Export it. + + Qt/Cpp: Add version headers. + * lang/cpp/src/gpgmepp_version.h.in, + lang/qt/src/qgpgme_version.h.in: New. Version information. + * lang/qt/src/Makefile.am, lang/cpp/src/Makefile.am: Add them. + * configure.ac: Configure them. + + Qt/Cpp: Add license blurb to export headers. + * lang/cpp/src/gpgmepp_export.h, + lang/qt/src/qgpgme_export.h: Add license blurb. + +2016-07-11 Justus Winter + + python: Fix distcheck. + * lang/python/Makefile.am (EXTRA_DIST): Add missing files. + +2016-07-11 Andre Heinecke + + m4: Add compile / link check for qt. + * m4/qt.m4 (FIND_QT): Check if a qt application can be compiled and + linked. + +2016-07-11 Justus Winter + + python: Enable out-of-tree build of pyme bindings. + * lang/python/MANIFEST.in: Update manifest template. + * lang/python/Makefile.am: Copy more files, move generation of files + to Python build script, add 'sdist' target to build a Python source + distribution. + * lang/python/gpgme-h-clean.py: Add code to build 'errors.i'. + * lang/python/setup.py.in: Generate files, enable out-of-tree builds. + + python: Do not depend on access to internal data structures. + * lang/python/gpgme.i (gpgme_data_t): Rework so that it works without + access to the definition of 'struct gpgme_data'. + * lang/python/helpers.c (object_to_gpgme_data_t): Add assertion. + + python: Make result wrapping backwards compatible. + * lang/python/pyme/results.py (Result.__init__): Skip missing fields. + +2016-07-11 Andre Heinecke + + Qt: Fix memleaks in tests. + * lang/qt/tests/t-keylist.cpp(cleanupTestCase): Ensure that + posted events are handled for autodeletion. + (testSingleKeylistSync): delete job. + * lang/qt/tests/t-ownertrust.cpp(cleanupTestCase): Ditto + * lang/qt/tests/t-ownertrust.cpp(testChangeOwnerTrust): Delete + keylistjobs. + * lang/qt/tests/t-keylocate.cpp(cleanupTestCase): Ditto + + Qt: Add some general Protocol documentation. + * lang/qt/src/protocol.h (Protocol): Add doc. + + Qt: Disable t-tofuinfo tests. + * lang/qt/tests/t-tofuinfo.cpp: Disable tests. + +2016-07-08 Justus Winter + + src: Fix error handling. + * src/encrypt.c (encrypt_status_handler): Fix error handling, || + conflates errors. + + python: Fix raising stashed exceptions. + Fixes an issue with newer versions of Python. + + * lang/python/helpers.c (pygpgme_raise_callback_exception): Be more + careful when restoring the exception. + +2016-07-07 Justus Winter + + python: Fix distcheck. + * lang/python/INSTALL: Drop obsolete file. + * lang/python/Makefile.am (EXTRA_DIST): Add missing files. + (CLEANFILES): Remove generated files. + (clean-local): Fix permissions of copied files. + * lang/python/tests/Makefile.am (TESTS): Use our own setup and + teardown scripts. + (EXTRA_DIST): Add missing files. + * lang/python/tests/final.py: New file. + * lang/python/tests/initial.py: Likewise. + + qt: Fix distcheck. + * lang/qt/src/Makefile.am (qgpgme_headers): Add missing file. + (CLEANFILES): Add generated file. + * lang/qt/tests/Makefile.am (clean-local): Remove private keys. + + cpp: Fix distcheck. + * lang/cpp/src/Makefile.am (CLEANFILES): Remove generated file. + +2016-07-06 Andre Heinecke + + Qt: Add test for publicKeyAlgorithmAsString. + * lang/qt/tests/t-keylist.cpp (testPubkeyAlgoAsString): New. + + Cpp: Expose gpgme_pubkey_algo_name. + * lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithmAsString): New + static variant. + * lang/cpp/src/key.h: Declare function. Clarify comment about name + mismatch. + + Qt: Add check for pubkeyAlgo in t-keylist. + * lang/qt/tests/t-keylist.cpp (testSingleKeyListSync): Check + pubkeyAlgo. + + Cpp: Add PubkeyAlgo enum. + * lang/cpp/src/key.h (Subkey::PubkeyAlgo): New enum. + (Subkey::publicKeyAlgorithm): Change return type. + * lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithm): Use enum. + + Qt: Fix include order when buildin test. + * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Include cpp before + gpgme src directory. + + Revert "Qt: More robust lookup of Cpp's context.h" + * lang/qt/src/threadedjobmixin.h: Revert using full path + for context.h + +2016-07-05 Andre Heinecke + + Qt: Fix test build with Qt < 5.4.0. + * lang/qt/tests/t-keylist.cpp, + lang/qt/tests/t-keylocate.cpp, + lang/qt/tests/t-ownertrust.cpp: Use old style SIGNAl syntax for + QSignalSpy + + Qt: More robust lookup of Cpp's context.h. + * lang/qt/src/threadedjobmixin.h: When building qgpgme look for + context.h in the full cpp subdirectory. + + w32: Fallback to 2.1 reg key for gpgconf search. + * src/w32-util.c (_gpgme_get_gpgconf_path): Fallback to 2.1 installer + registry key. + +2016-07-04 Andre Heinecke + + Doc: Document pinentry mode. + * doc/gpgme.texi (Passphrase Callback): Document as context + attribute. + (gpgme_set_passphrase_cb): Note that this requires LOOPBACK mode + with GnuPG 2.1. + + Qt: Add testTofuSignCount. + * src/lang/qt/tests/t-tofuinfo.cpp(testTofuSignCount): New. + (initTestCase): Set gpg-agent loopback pinentry config. + (signAndVerify): Helper for tofuTestSignCount. + + Qt: Add test passphrase provider. + * lang/qt/tests/t-support.h (TestPassphraseProvider): New. + * lang/qt/tests/Makefile.am (t_tofuinfo_SOURCES): Add t-support.h + + Cpp: Add support for TOFU_CONFLICT sigsum. + * lang/cpp/src/verificationresult.cpp (GpgME::Signature::Summary): + Handle TOFU_CONFLICT. + * lang/cpp/src/verificationresult.h (Summary): Add TofuConflict. + + Cpp: Add support for pinentry_mode. + * lang/cpp/src/context.cpp (Context::pinentryMode): Return mode. + (Context::setPinentryMode): Set mode. + * lang/cpp/src/context.h (PinentryMode): Add enum. + +2016-07-01 Andre Heinecke + + Qt: Add test for TofuInfo. + * lang/qt/tests/t-tofuinfo.cpp: New. + * lang/qt/tests/Makefile.am: Update accordingly. + + Cpp: Add TofuInfo to signatures. + * lang/cpp/src/tofuinfo.cpp, lang/cpp/src/tofuinfo.h: New class. + * lang/cpp/src/verificationresult.cpp (Signature::tofuInfo): New. + (VerificationResult::Private): Handle tofu info. + (GpgME::operator<<(std::ostream &os, const Signature &sig)): Include + TofuInfo in dump. + * lang/cpp/src/verificationresult.h (Signature::tofuInfo): New. + * lang/cpp/src/Makefile.am (main_sources, gpgmepp_headers): Add + new files. + * configure.ac (LIBGPGMEPP_LT_REVISION): Bump for new API. + + core: Clarify documentation of tofu_stats address. + * src/gpgme.h.in: Mention that Address is not always in addr-spec. + + core: Fix identify for armored detached sigs. + * src/data-identify.c (basic_detection): Return signature for + signature. + +2016-06-27 Andre Heinecke + + Cpp: Expose new data_identify values. + * lang/cpp/src/data.cpp (GpgME::Data::type): Handle PGP Encrypted + and Signature. + * lang/cpp/src/data.h: Add values accordingly. + + Cpp: Do not treat KEYEXPIRED as error. + * lang/cpp/src/editinteractor.cpp (status_to_error): No error + for KEYEXPIRED. + +2016-06-24 Andre Heinecke + + tests: Add new test tool run-decrypt. + * tests/run-decrypt.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add run-decrypt. + +2016-06-23 Werner Koch + + core: Add closer inspection of "PGP MESSAGE". + * src/data-identify.c (inspect_pgp_message): New. + (basic_detection): Un-const arg DATA. Call inspect_pgp_message. + + core: Add a base 64 decoder. + * src/b64dec.c: New. Taken from gnupg. Prefix function names with + _gpgme_ and change to use standard C malloc functions. + * src/util.h.h (struct b64state): New. + * src/Makefile.am (main_sources): Add file. + +2016-06-22 Werner Koch + + core: Detect compressed signed OpenPGP data. + * src/data-identify.c (next_openpgp_packet): Allow partial encoding. + (pgp_binary_detection): Handle compressed packets. + +2016-06-21 Werner Koch + + tests: Add new test tool run-identify. + * src/gpgme-tool.c (gt_identify): Add new strings. + * tests/run-identify.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add run-identify. + + core: Enhance gpgme_data_identify to detect binary PGP messages. + * src/gpgme.h.in (GPGME_DATA_TYPE_PGP_ENCRYPTED): New. + (GPGME_DATA_TYPE_PGP_SIGNATURE): New. + * src/data-identify.c: Add enum for OpenPGP packet types. + (buf32_to_ulong): New. + (next_openpgp_packet): New. Based on the gnupg/kbx/keybox-openpgp.c + implementation and relicensed to LGPL by g10 Code. + (pgp_binary_detection): New. + (basic_detection): Call pgp_binary_detection instead of returning + unknown. + +2016-06-16 Justus Winter + + python: Improve autmatically generated docstrings. + * lang/python/gpgme.i: Add comment. + * lang/python/pyme/core.py (__getattr__): Rewrite automatically + generated doctrings for the wrapper methods. + + python: Make result objects more robust. + Results returned by the GPGME are fragile, i.e. they are only valid + until the next operation is performed in the context. + + We cannot arbitrarily constrain the lifetime of Python objects, we + therefore create deep copies of the results. + + * lang/python/gpgme.i (gpgme_tofu_info_t): Turn these into a list. + (gpgme_*_result_t): Create deep copies of these objects. + * lang/python/helpers.c (pygpgme_wrap_fragile_result): New function. + * lang/python/helpers.h (pygpgme_wrap_fragile_result): New prototype. + * lang/python/pyme/results.py: New file. + + python: Avoid creating SWIG proxy classes. + * lang/python/Makefile.am (gpgme_wrap.c): Use '-builtin' to make SWIG + generate builtin types for c types. + * lang/python/gpgme.i (pygpgme_wrap_gpgme_data_t): Adapt slightly. + + python: Simplify wrapping glue. + * lang/python/pyme/core.py: Rename '_getctype' to '_ctype' and turn it + into a string. Likewise rename '_getnameprepend' to '_cprefix'. + * lang/python/helpers.c: Adapt accordingly. + + python: Rework callbacks. + Simplify how the lifetime of callback arguments is managed. + + * lang/python/gpgme.i (gpgme_edit_cb_t): Check arguments. + (PyObject_p_p, void_p_p): Drop rather dangerous interface. + (pygpgme_unwrap_gpgme_ctx_t): New function. + * lang/python/helpers.c (pygpgme_clear_generic_cb): Drop dangerous + function. + (pyPassphraseCb): Assert contract. + (pygpgme_set_passphrase_cb): Use Python's calling convention so that + we can raise exceptions. Hand in 'self', get the wrapped object, and + simply store the hook data as attribute of the wrapper object. + (pyProgressCb, pygpgme_set_progress_cb): Likewise. + (pygpgme_set_status_cb): Likewise. + (pygpgme_data_new_from_cbs): Likewise. + * lang/python/helpers.h (pygpgme_clear_generic_cb): Drop prototype. + (pygpgme_set_passphrase_cb): Update prototype. + (pygpgme_set_progress_cb): Likewise. + (pygpgme_set_status_cb): Likewise. + (pygpgme_data_new_from_cbs): Likewise. + (pygpgme_unwrap_gpgme_ctx_t): New prottotype. + * lang/python/pyme/core.py (Context, Data): Update callsites. + + python: Wrap objects implementing the buffer protocol. + * lang/python/Makefile.am: Add the toplevel source directory to CFLAGS + when compiling the bindings so that we can use private header files. + * lang/python/gpgme.i (gpgme_data_t): Rework the object wrapping. Do + not create a Python wrapper object, merely a gpgme_data_t object, and + keep references to buffer objects, if any. If necessary, update the + buffer after the function call. + (pygpgme_wrap_gpgme_data_t): New function. + * lang/python/helpers.c (object_to_gpgme_data_t): Rework object + wrapping. Also wrap objects implementing the buffer protocol. + * lang/python/helpers.h (object_to_gpgme_data_t): Update prototype. + (pygpgme_wrap_gpgme_data_t): New prototype. + * lang/python/tests/t-idiomatic.py: Demonstrate this. + + python: Add properties to wrapped object. + * lang/python/pyme/core.py (GpgmeWrapper.__repr__): Saner + representation. + (GpgmeWrapper.__str__): Construct a nicer human readable string. + (GpgmeWrapper._boolean_properties): New field. + (GpgmeWrapper.__wrap_boolean_property): New function. + (GpgmeWrapper.__getattr__): Wrap functions using properties. + (GpgmeWrapper.__setattr__): New method. Likewise wrap functions. + (Context.signers): New property. + (Context.pinentry_mode): Likewise. + (Context._boolean_properties): List boolean properties. + (Context.__init__): Add keyword arguments for properties and apply + them. + + python: Improve the documentation. + * lang/python/Makefile.am: Copy the README file. + * lang/python/README: Rename, convert to org, and update. + * lang/python/pyme/__init__.py: Move license out of the docstring, + update docstring. + * lang/python/pyme/core.py: Add and update docstrings. + + python: Get version information from the build system. + * configure.ac: Generate 'setup.py' and 'version.py'. + * lang/python/Makefile.am: Use generated setup script. + * lang/python/pyme/version.py: Turn it into a template, and get + version information from the build system. Also drop some variables. + * lang/python/setup.py: Likewise. This way we can avoid importing the + version module, which is frowned upon and actually caused a problem. + + python: Fix exception leak. + * lang/python/helpers.c (pygpgme_stash_callback_exception): Fix leak. + + python: Fix license. + Other parts of the build system are also LGPLed. + + * lang/python/Makefile.am: Fix license. + +2016-06-14 Werner Koch + + core: Make sure FD_SET is not used with an out of range fd. + * src/posix-io.c (_gpgme_io_select): Check for FD out of range. + +2016-06-08 Justus Winter + + python: Improve error handling. + * lang/python/helpers.c (pyPassphraseCb): Handle write errors. + (pyEditCb): Likewise. + + python: Add function to raise exceptions from c. + * lang/python/helpers.c (pygpgme_raise_exception): New function. + + python: Fix stripping deprecated functionality. + * lang/python/Makefile.am (gpgme.h): Add script as input. + * lang/python/gpgme-h-clean.py (deprec_func): Also match struct + members. + (line_break): Fix matching on struct members. + + python: Fix type. + * lang/python/gpgme.i: Use correct Python type for size. + + python: Implement the context manager protocol. + * lang/python/pyme/core.py (Context.__del__): Make function + idemptotent. + (Context.{__enter__,__exit__}): Implement the context manager + protocol. + (Data.__del__): Make function idemptotent, drop debug print. + (Data.{__enter__,__exit__}): Implement the context manager + protocol. + * lang/python/tests/t-idiomatic.py: Demonstrate this. + +2016-06-07 Justus Winter + + python: Fix error handling. + * lang/python/gpgme.i: Fix freeing an uninitialized pointer in the + error handling of generated wrapper functions by explicitly storing + the pointer in a local variable which can be initialized. + +2016-06-06 Justus Winter + + python: Wrap file-like objects on demand. + * lang/python/gpgme.i (gpgme_data_t): Use new function to create + wrapper objects if necessary, and deallocate them after the function + call. + * lang/python/helpers.c (object_to_gpgme_data_t): New function. + * lang/python/helpers.h (object_to_gpgme_data_t): New prototype. + * lang/python/tests/Makefile.am (pytests): Add new test. + * lang/python/tests/t-idiomatic.py: New file. + + python: Move helper function. + * lang/python/gpgme.i (object_to_gpgme_t): Move... + * lang/python/helpers.c: ... here. + * lang/python/helpers.h (object_to_gpgme_t): New prototype. + + python: Fix error handling. + * lang/python/gpgme.i (object_to_gpgme_t): Properly propagate + exceptions. + + python: Initialize GPGME for the user. + * lang/python/pyme/core.py: Call 'check_version' and explain why. + * lang/python/tests/support.py (init_gpgme): Drop call here. + +2016-06-01 Justus Winter + + python: Fix test suite with GnuPG prior to 2.1.12. + * lang/python/tests/Makefile.am (gpg-agent.conf): Use + 'allow-loopback-pinentry'. + + python: Make Python detection more robust. + Previously, missing Python development packages made configure fail + instead of merely disabling the bindings. + + * configure.ac: Check for 'PYTHON_VERSION'. + * m4/ax_python_devel.m4: Make test non-fatal. + + python: Improve build system integration, fix warnings. + * lang/python/Makefile.am: Pass CFLAGS to python build system. + * lang/python/helpers.c (pyPassphraseCb): Use correct type for length. + (pygpgme_data_new_from_cbs): Drop unused variable. + +2016-06-01 Andre Heinecke + + Cpp: Use whitelist for status messages. + * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): + Use whitelist instead of blacklist. + + Qt: Fix debug output in t-ownertrust. + * lang/qt/tests/t-ownertrust.cpp (testChangeOwnerTrust): Remove + general debug of trust level. Add debug output for error. + +2016-06-01 Justus Winter + + tests: Fix notation tests. + * lang/python/tests/t-sig-notation.py (check_result): Check critical + flag. + * tests/gpg/t-sig-notation.c (check_result): Likewise. + + Fixes-commit: 1cacd7d0 + +2016-06-01 Werner Koch + + core: Set notation flags for verify. + * src/gpgme.h.in (GPGME_STATUS_NOTATION_FLAGS): New. + * src/status-table.c (status_table): Add new status. + * src/verify.c (parse_notation): Handle flags. Also fix NOTATION_DATA + in case gpg would not percent-escape spaces. + (_gpgme_verify_status_handler): Handle flags. + * tests/run-verify.c (print_result): Print notaion data. + +2016-05-31 Tobias Mueller + + python: use GPG_ERROR_CONFIG variable. + instead of calling gpg-error-config. + This is useful when configuring with --with-gpgerror-prefix + because then GPG_ERROR_CONFIG contains the correct + /path/to/bin/gpg-error-config whereas calling gpg-error-config + directly would look in the user's PATH (and not in the prefix + where gpg-error-config was installed). + +2016-05-31 Justus Winter + + python: Port more tests. + * lang/python/gpgme.i: Hide length fields of notations. + * lang/python/tests/Makefile.am (pytests): Add new tests. + * lang/python/tests/t-decrypt-verify.py: New file. + * lang/python/tests/t-sig-notation.py: Likewise. + * lang/python/tests/t-verify.py: Likewise. + +2016-05-27 Werner Koch + + Speedup closing of fds before exec. + * src/posix-io.c [__linux__]: Include dirent.h. + (get_max_fds) [__linux__]: Try to figure out the highest used fd. + +2016-05-27 Justus Winter + + python: Port more tests. + * lang/python/pyme/core.py (Data._error_check): Add + 'gpgme_data_get_file_name' to the list of functions not returning an + error code. + * lang/python/tests/Makefile.am (pytests): Add new tests. + * lang/python/tests/support.py (verbose): New variable. + * lang/python/tests/t-data.py: Test setting and getting the filename. + * lang/python/tests/t-encrypt-large.py: New file. + * lang/python/tests/t-file-name.py: Likewise. + * lang/python/tests/t-trustlist.py: Likewise. + + python: Implement data callbacks. + * lang/python/gpgme.i (object_to_gpgme_t): Set exception on error. + * lang/python/helpers.c (pyDataReadCb): New function. + (pyDataWriteCb): Likewise. + (pyDataSeekCb): Likewise. + (pyDataReleaseCb): Likewise. + (pygpgme_data_new_from_cbs): Likewise. + * lang/python/helpers.h (pygpgme_data_new_from_cbs): New prototype. + * lang/python/pyme/core.py (Data.__init__): Fix docstring, fix read + callbacks. + (Data.__del__): Fix read callbacks. + (Data._free_readcb): Drop function. + (Data._free_datacbs): New function. + (Data.new_from_cbs): Fix setting the callbacks. + (Data.write): Raise stashed exceptions. + (Data.read): Likewise. + * lang/python/tests/t-callbacks.py: Test new functionality. + * lang/python/tests/t-data.py: Likewise. + + python: Fix object deallocation. + Handing a reference to the wrapper object created a non-trivial + circular reference that Pythons garbage collector is unable to break. + Explicitly break it by using a weak reference. + + * lang/python/helpers.c (pygpgme_stash_callback_exception): Retrieve + object from weak reference. + * lang/python/pyme/core.py (Context.__del__): Free status callback. + (Context.set_passphrase_cb): Use a weak reference. + (Context.set_progress_cb): Likewise. + (Context.set_status_cb): Likewise. + (Context.op_edit): Likewise. + + Improve comments. + * src/gpgme.h.in (gpgme_data_seek_cb_t, gpgme_data_seek): Clarify that + these functions return the new offset. + (gpgme_data_release_cb_t): Fix name of parameter. + + python: Fix reading data from existing files. + * lang/python/pyme/core.py (Data.__init__): Add 'copy' kwargument, and + pass it to functions supporting it. PEP8 fix. + (Data.new_from_fd): PEP8 fix. + (Data.new_from_file): Give a more helpful error message if copy is + False. PEP8 fix. + (Data.new_from_fd): Hand the file descriptor to + 'gpgme_data_new_from_fd', not a stream. Fix docstring. + * lang/python/tests/t-data.py: Add tests for this. + +2016-05-25 Justus Winter + + src: Fix trace string. + * src/data-compat.c (gpgme_data_new_from_file): Fix trace string. + +2016-05-24 Justus Winter + + python: Improve and test Context.wait. + * lang/python/pyme/core.py (Context.wait): Improve docstring. As the + context passed to 'gpgme_wait' is never NULL, it is pointless to look + at the returned context. Always raise exceptions. + * lang/python/tests/Makefile.am (pytests): Add new test. + * lang/python/tests/t-wait.py: New file. + + python: Make all GnuPG errors available. + * lang/python/Makefile.am (errors.i): Generate file. + * lang/python/gpgme.i: Include generated file. + * lang/python/pyme/errors.py: Pull in all errors and error sources. + + python: Move the base wrapper class. + * python/lang/pyme/util.py (GpgmeWrapper): Move... + * python/lang/pyme/core.py: ... here. + + python: Support status callbacks. + * lang/python/helpers.c (pyStatusCb): New function. + (pygpgme_set_status_cb): Likewise. + * lang/python/helpers.h (pygpgme_set_status_cb): New prototype. + * lang/python/pyme/core.py (Context.__init__): Initialize + 'last_statuscb'. + (Context._free_statuscb): New function. + (Context.set_status_cb): Likewise. + * lang/python/tests/t-callbacks.py: Test status callbacks. + + python: Improve docstring. + * lang/python/pyme/core.py (Context.set_progress_cb): Improve + docstring. + +2016-05-24 Andre Heinecke + + Qt: Fix test build with clang. + * lang/qt/tests/Makefile.am (LDADD): Explicitly add -lstdc++ + + Cpp: Set -std=c++11 also if CXXCPP is already set. + * m4/ax_cxx_compile_stdxx.m4 (AX_CXX_COMPILE_STDCXX): Set CXXCPP if + neccessary. + +2016-05-24 Justus Winter + + python: Improve support for edit callbacks. + * lang/python/helpers.c (pyEditCb): Stash exceptions. + * lang/python/pyme/core.py (Context.op_edit): Hand in 'self'. + * lang/python/tests/Makefile.am (py_tests): Add new test. + * lang/python/tests/t-callbacks.py: Test edit callbacks. + * lang/python/tests/t-edit.py: New file. + +2016-05-23 Justus Winter + + python: Fix hook. + * lang/python/helpers.c (pyProgressCb): Fix getting hook data. + * lang/python/tests/t-callbacks.py: Show that this works. + + python: Move edit callback function. + * lang/python/gpgme.i (pyEditCb): Move... + * lang/python/helpers.c: ... here. + * lang/python/helpers.h (pyEditCb): New prototype. + + python: Port more tests. + * lang/python/tests/Makefile.am (TESTS_ENVIRONMENT): Set + LD_LIBRARY_PATH. + (pytests): Add new tests. + * lang/python/tests/t-callbacks.py: Trim imports. + * lang/python/tests/t-encrypt-sign.py: New file. + * lang/python/tests/t-export.py: Likewise. + * lang/python/tests/t-signers.py: Likewise. + + python: Translate list of strings. + * lang/python/gpgme.i: Add typemap translating list of strings. + +2016-05-21 Werner Koch + + api: Return Tofu info for signatures. + * src/gpgme.h.in (gpgme_tofu_policy_t): New. + (gpgme_status_code_t): Add status codes for TOFU. + (struct _gpgme_tofu_info, gpgme_tofu_info_t): New. + (struct _gpgme_signature): Add field 'tofu'. + * src/status-table.c (status_table): Add new codes. + * src/verify.c: Include limits.h. + (release_tofu_info): New. + (release_op_data): Call that. + (parse_tofu_user): New. + (parse_tofu_stats): New. + (parse_tofu_stats_long): New. + (_gpgme_verify_status_handler): Handle TOFU status lines. + + * tests/run-verify.c (print_description): New. + (print_result): print tofu info. + + api: Add new context flag "raw-description". + * src/context.h (struct gpgme_context): Add field raw_description. + * src/gpgme.c (gpgme_set_ctx_flag): New flag. + + core: New functions to help parsing of status lines. + * src/conversion.c (_gpgme_split_fields): New. + (_gpgme_strtoul_field): New. + +2016-05-20 Andre Heinecke + + Qt: Add test for changeownertrust. + * lang/qt/tests/t-ownertrust.cpp: New test. + * lang/qt/tests/Makefile.am: Add test. + + Cpp: Ignore STATUS_KEY_CONSIDERED when editing. + * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): + Handle GPGME_STATUS_KEY_CONSIDERED. + +2016-05-19 Werner Koch + + api: Add new function gpgme_set_ctx_flag. + * src/gpgme.h.in (gpgme_set_ctx_flag): New prototype. + * src/gpgme.c (gpgme_set_ctx_flag): New. + * src/gpgme.def, src/libgpgme.vers: Add new function. + * src/context.h (struct gpgme_context): Add FULL_STATUS. + * src/decrypt.c (_gpgme_decrypt_status_handler): Do not call the + status callback if FULL_STATUS is set. + * src/genkey.c (genkey_status_handler): Ditto. + * src/passphrase.c (_gpgme_passphrase_status_handler): Ditto. + * src/sign.c (_gpgme_sign_status_handler): Ditto. + + * src/engine-backend.h (struct engine_ops): Add SET_STATUS_CB and add + adjust all definitions of that variable. + * src/engine.c (_gpgme_engine_set_status_cb): New. + * src/op-support.c (_gpgme_op_reset): Call this function. + + * src/engine-gpg.c (struct engine_gpg): Add fields MON_CB and + MON_CB_VALUE. + (gpg_set_status_cb): New. + (_gpgme_engine_ops_gpg): Register that function. + (read_status): Call the monitor callback. + + * src/engine-gpgsm.c (struct engine_gpgsm): Add fields MON_CB and + MON_CB_VALUE. + (_gpgme_engine_ops_gpgsm): Register that function. + (gpgsm_assuan_simple_command): Change first arg to be an engine + context and adjust call callers. Call the monitor callback. + + * src/engine-uiserver.c (struct engine_uiserver): Add fields MON_CB + and MON_CB_VALUE. + (_gpgme_engine_ops_uiserver): Register that function. + (uiserver_assuan_simple_command): Change first arg to be an engine + context and adjust call callers. Call the monitor callback. + + * tests/run-verify.c (status_cb): New. + (print_result): Print algo names. + (main): Add option --status. + + api: Remove arbitrary restriction from gpgme_op_verify. + * src/verify.c (verify_start): Do not return GPG_ERR_INV_VALUES when + when SIGNED_TEXT is not given. + +2016-05-19 Justus Winter + + python: Improve progress callbacks. + * lang/python/helpers.c (pyProgressCb): Stash python errors, convert + 'what' to Unicode object. + * lang/python/pyme/core.py (Context.set_progress_cb): Hand in 'self'. + * lang/python/tests/t-callbacks.py: Test progress callbacks. + + python: Robust exception handling in callbacks. + * lang/python/helpers.c (pygpgme_stash_callback_exception): New + function. + (pygpgme_raise_callback_exception): Likewise. + (pyPassphraseCb): Stash python errors. + * lang/python/helpers.h (pygpgme_raise_callback_exception): New + prototype. + * lang/python/pyme/core.py ({Context,Data}.__init__): Move common + initialization to superclass. + (Context.set_progress_cb): Hand in 'self'. + * lang/python/pyme/util.py (GpgmeWrapper.__init__): New function. + (GpgmeWrapper.__getattr__): Raise stashed exceptions. + * lang/python/tests/Makefile.am (py_tests): Add new test. + * lang/python/tests/t-callbacks.py: New file. + +2016-05-19 Andre Heinecke + + Qt: Check for graphviz and set HAVE_DOT correctly. + * configure.ac: Check for graphviz and define HAVE_DOT. + * lang/qt/doc/Doxyfile.in (HAVE_DOT): Use variable. + +2016-05-19 Justus Winter + + python: Add more tests. + * lang/python/tests/Makefile.am (py_tests): Add new tests. + * lang/python/tests/support.py (print_data): New function. + * lang/python/tests/t-decrypt.py: Use new function. + * lang/python/tests/t-encrypt.py: Likewise. + * lang/python/tests/t-sign.py: New file. + * lang/python/tests/t-encrypt-sym.py: Likewise. + + python: More type conversion fixes. + * lang/python/helpers.c (pyPassphraseCb): Cope with 'uid_hint' being + NULL, convert it to an Unicode object, and cope with the callback + returning both Unicode and bytes objects. + + python: Fix import. + * lang/python/helpers.c (pygpgme_exception_init): Make module import + relative. + +2016-05-19 Andre Heinecke + + Qt: Fix compilation of unit tests. + * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Add -DBUILDING_QGPGME. + +2016-05-18 Justus Winter + + python: Various fixes. + * configure.ac: Fix SWIG detection, bump required Python version. + * lang/python/Makefile.am: Portability fix. + +2016-05-18 Andre Heinecke + + Fix typo in compatibility declaration. + * src/op-support.c (GPG_ERR_SUBKEYS_EXP_REV): Change to + GPG_ERR_SUBKEYS_EXP_OR_REV. + +2016-05-17 Werner Koch + + tests: New maintenance helper run-encrypt. + * tests/run-encrypt.c: New. + + Return dedicated error code for all subkeys expired or revoked. + * src/gpgme.h.in (GPGME_STATUS_KEY_CONSIDERED): New. + (GPGME_SIGSUM_TOFU_CONFLICT): New. + * src/status-table.c (KEY_CONSIDERED): New. + * src/op-support.c (_gpgme_parse_inv_recp): Add argc KC_FPR and + KC_FLAGS. Use calloc. Detect all expired or revoked subkeys. + (_gpgme_parse_key_considered): New. + * src/sign.c (op_data_t): Add fields KC_FPR and KC_FLAGS. + (release_op_data): Free KC_FPR. + (_gpgme_sign_status_handler): Handle STATUS_KEY_CONSIDERED. + * src/encrypt.c (op_data_t): Add fields KC_FPR and KC_FLAGS. + (release_op_data): Free KC_FPR. + (_gpgme_encrypt_status_handler): Handle STATUS_KEY_CONSIDERED. + +2016-05-17 Andre Heinecke + + Qt / Cpp: Port auto_ptr to unique_ptr. + * lang/cpp/src/context.cpp, + lang/cpp/src/context.h, + lang/cpp/src/context_p.h (Context::createForEngine), + (Context::edit, Context::startEditing), + (Context::takeLastEditInteractor, Context::cardEdit), + (Context::startCardEditing, Context::takeLastCardEditInteractor), + (Context::assuanTransact, Context::startAssuanTransaction), + (Context::takeLastAssuanTransaction): Port to unique_ptr. + * lang/qt/src/qgpgmeadduseridjob.cpp, + lang/qt/src/qgpgmechangeexpiryjob.cpp, + lang/qt/src/qgpgmechangeownertrustjob.cpp, + lang/qt/src/qgpgmechangepasswdjob.cpp, + lang/qt/src/qgpgmesignkeyjob.cpp: Update accordingly. + +2016-05-17 Justus Winter + + build: Add python autoconf macro. + * m4/ax_python_devel.m4: New file. + + python: Clean up examples. + * lang/python/examples/delkey.py: Clean up example. + * lang/python/examples/encrypt-to-all.py: Likewise. + * lang/python/examples/genkey.py: Likewise. + * lang/python/examples/inter-edit.py: Likewise. + * lang/python/examples/sign.py: Likewise. + * lang/python/examples/signverify.py: Likewise. + * lang/python/examples/simple.py: Likewise. + * lang/python/examples/t-edit.py: Likewise. + * lang/python/examples/verifydetails.py: Likewise. + * lang/python/pyme/__init__.py: Likewise. + + python: Import GPGMEError. + * pyme/core.py: Import GPGMEError. + + Fixes c5d118b2. + + python: Port more tests. + * lang/python/Makefile.am: Add bits from the c test suite. + * lang/python/support.py: New file. + * lang/python/t-decrypt.py: Likewise. + * lang/python/t-encrypt.py: Likewise. + +2016-05-13 Andre Heinecke + + Qt: Add keyLocateJob and test for it. + * configure.ac (LIBQGPGME_LT_REVISION): Bump. + * lang/qt/src/protocol.h (locateKeysJob): Add Job. + * lang/qt/src/protocol_p.h (locateKeysJob): Implement. + * lang/qt/tests/Makefile.am: Add t-keylocate. + * lang/qt/tests/t-keylocate.cpp: New. + + Qt: Add missing copyright header in test. + * lang/qt/tests/t-keylist.cpp: Add copyright header. + +2016-05-12 Justus Winter + + python: Share generated methods between objects. + * lang/python/pyme/util.py (GpgmeWrapper.__getattr__): Monkey-patch + the class. + * lang/python/tests/t-wrapper.py: Demonstrate the sharing. + + python: Raise exceptions on write errors. + * lang/python/pyme/core.py (Data.write): Handle errors. + * lang/python/pyme/errors.py (GPGMEError.fromSyserror): New function. + + python: Fix writing to data buffers. + * lang/python/gpgme.i: Add typemap for buffers. + * lang/python/pyme/core.py (Data.write): Fix function. + * lang/python/tests/Makefile.am: Add new test. + * lang/python/tests/t-data.py: New file. + + python: Add a test suite. + * configure.ac: Add new Makefile. + * lang/python/Makefile.am: Add subdirectory. + * lang/python/tests/Makefile.am: New file. + * lang/python/tests/t-wrapper.py: Likewise. + + python: Cache generated wrapper functions. + * lang/python/util.py (GpgmeWrap.__getattr__): Cache generated wrapper + functions. + + python: Fix function invocation. + * lang/python/pyme/core.py (Data.new_from_fd): Fix function + invocation. + + python: Fix name of exception, make slot methods explicit. + * lang/python/pyme/util.py (GpgmeWrapper._getctype): Fix exception, + add docstring. + (GpgmeWrapper._getnameprepend): New function. + (GpgmeWrapper._errorcheck): Likewise. + + python: Handle interpreter shutdown. + * lang/python/pyme/core.py: Avoid races at interpreter shutdown. This + silences the most annoying occurrences, however this problem also + affects the SWIG generated code, which might indicate that the real + problem is somewhere else. If so, this change can be easily reverted. + + python: Make test case more robust. + * lang/python/examples/t-edit.py: Check if key is found. + + python: Fix type translation. + * lang/python/gpgme.i: Adjust to Python3's string type being + 'Unicode', not 'bytes'. Fix type checking. + * lang/python/core.py (Data.write): Add docstring mentioning the + expected type of parameter 'buffer'. + (Data.read): Adjust read loop. Also, use a saner chunk size, and join + all chunks at the end instead of adding them. + * lang/python/examples/simple.py: Adjust example. + +2016-05-11 Andre Heinecke + + Cpp: Ensure gpgme.h is taken from current build. + * lang/cpp/src/Makefile.am (AM_CPPFLAGS): Add gpgme.h location. + +2016-05-11 Justus Winter + + python: Fix simple example. + * lang/python/examples/simple.py: Flush stdout, encode name as + UTF-8 before passing it to GPGME. + + python: Integrate into the build system. + * configure.ac: Make Python bindings configurable, add new Makefile. + * lang/python/Makefile.am: New file. + * lang/python/setup.py: Integrate into the build system. + * m4/ax_pkg_swig.m4: New file from the autoconf archive. + * m4/m4_ax_swig_python.m4: Likewise. + +2016-05-10 Andre Heinecke + + Qt / Cpp: Fix make dist. + * lang/cpp/src/Makefile.am (EXTRA_DIST): Fix typo. + (private_gpgmepp_headers): New. Private headers. + (libgpgmepp_la_SOURCES): Add private headers. + * lang/qt/src/Makefile.am (t_keylist_SOURCES): Remove non existent + header. + +2016-05-10 Justus Winter + + python: PEP8 fixes. + Cherry picked from 0267c151. + +2016-05-10 Andre Heinecke + + Qt: Make Protocol class public API. + * lang/qt/src/Makefile.am (qgpgme_headers): Add protocol.h + (private_qgpgme_headers): Add protocol_p.h + * lang/qt/src/protocol.h: New. From QGpgMEBackend. + * lang/qt/src/protocol_p.h: New. From QGpgMEBackend. + * lang/qt/src/qgpgmebackend.h, + lang/qt/src/qgpgmebackend.cpp (Protocol): Removed. + + Qt: Make doxygen quieter. + * lang/qt/doc/Doxyfile.in: Quiet and no undocumented warnings. + + Qt: Only install public headers. + * lang/qt/src/Makefile.am: Do not install all headers. + + Qt: Add test for async keylisting. + * src/lang/qt/tests/t-keylist.cpp(KeyListTest::testKeyListAsync): New. + +2016-05-10 Werner Koch + + Allow cc to detect missing cases in a switch. + * src/delete.c (delete_status_handler): Remove default case from a + switch so that cc can check the use of all enum values. + +2016-05-06 Andre Heinecke + + Use common error message style for qt lang checks. + * configure.ac: Use common error highliting for qt lang options. + + Qt: Fix license mentioned in README. + * lang/qt/README: License is GPLv2+ and not LGPL. + + Add maybe mode for langs and default to it. + * configure.ac (languages): Warn and disable langs for which + requirements are not met. + + Cpp: Handle PINENTRY_LAUNCHED status line. + * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): + Add GPGME_STATUS_PINENTRY_LAUNCHED. + +2016-04-12 Andre Heinecke + + Cpp: Add support for pubkey_algo_name. + * lang/cpp/src/key.cpp (Subkey::algoName): New. + * lang/cpp/src/key.h: Declare. + + Cpp: Add support for gpgme_data_identify. + * lang/cpp/src/data.cpp (Data::type): New. + * lang/cpp/src/data.h (Data::Type): New enum mapping. + + Fix configuration without Qt language. + * configure.ac: Define HAVE_DOXYGEN also if qt should not be built. + +2016-04-11 Andre Heinecke + + Qt/Cpp: Bump so version to 6. + * configure.ac (LIBGPGMEPP_LT_CURRENT, LIBQGPGME_LT_CURRENT): Bump. + + Qt / Cpp: Mention coding style in READMES. + * src/lang/cpp/README, src/lang/qt/README: Add hacking note. + + Qt: Add doc generation with doxygen. + * configure.ac: Look for doxygen if qt is built. + Configure new files. + * lang/qt/doc/Doxyfile.in: New. + * lang/qt/doc/Makefile.am: New. + * lang/qt/README: Update. + + Qt: Fix unit test by adding initial.test dep. + * lang/qt/tests/t-keylist.cpp: Verify that GNUPGHOME is set. + * lang/qt/tests/initial.test: New dummy test. + * lang/qt/tests/Makefile.am: Add dependency to initial.test + + Qt: Remove remaining boost usage. + * lang/qt/src/dataprovider.h, + lang/qt/src/decryptjob.h, + lang/qt/src/decryptverifyjob.h, + lang/qt/src/encryptjob.h, + lang/qt/src/qgpgmeadduseridjob.cpp, + lang/qt/src/qgpgmechangeexpiryjob.cpp, + lang/qt/src/qgpgmechangeownertrustjob.cpp, + lang/qt/src/qgpgmechangepasswdjob.cpp, + lang/qt/src/qgpgmedecryptjob.cpp, + lang/qt/src/qgpgmedecryptverifyjob.cpp, + lang/qt/src/qgpgmedeletejob.cpp, + lang/qt/src/qgpgmedownloadjob.cpp, + lang/qt/src/qgpgmeencryptjob.cpp, + lang/qt/src/qgpgmeexportjob.cpp, + lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, + lang/qt/src/qgpgmeimportjob.cpp, + lang/qt/src/qgpgmekeygenerationjob.cpp, + lang/qt/src/qgpgmekeylistjob.cpp, + lang/qt/src/qgpgmenewcryptoconfig.cpp, + lang/qt/src/qgpgmenewcryptoconfig.h, + lang/qt/src/qgpgmesignencryptjob.cpp, + lang/qt/src/qgpgmesignjob.cpp, + lang/qt/src/qgpgmesignkeyjob.cpp, + lang/qt/src/qgpgmeverifydetachedjob.cpp, + lang/qt/src/qgpgmeverifyopaquejob.cpp, + lang/qt/src/signencryptjob.h, + lang/qt/src/signjob.h, + lang/qt/src/threadedjobmixin.cpp, + lang/qt/src/threadedjobmixin.h, + lang/qt/src/verifydetachedjob.h, + lang/qt/src/verifyopaquejob.h: Remove boost usage. + + Qt: Remove predicates.h and stl_util.h. + * src/lang/qt/predicates.h, src/lang/qt/stl_util.h: Removed. + + Qt: Remove usage of stl_util.h and predicates.h. + * src/lang/qt/qgpgmelistallkeysjob.cpp: Use comperators from + gpgmepp instead of detail. Remove boost usage. + + Cpp: Add string comparators for keys. + * lang/cpp/src/global.h (GPGMEPP_MAKE_STRCMP): New. + (_gpgmepp_strcmp): NULL save wrapper around std::strcmp. + * lang/cpp/src/key.h: Add comparators for various attributes. + + Cpp: Remove last usages of boost. + * lang/cpp/src/configuration.cpp: Use std::remove_pointer. + (Configuration::operator<<): std::for_each. + * lang/cpp/src/context.cpp: Delete manually instead of scoped ptr. + * lang/cpp/src/scdgetinfoassuantransaction.cpp: Use static_assert. + (to_reader_list): Tokenize with getline. + +2016-04-04 Andre Heinecke + + Add pthread in gpgmepp config. + * lang/cpp/src/GpgmeppConfig.cmake.in.in: Add pthread. + +2016-04-03 Andre Heinecke + + Cpp / Qt: Reduce boost usage (memory and tuple) + * cpp/src/assuanresult.h, + cpp/src/configuration.cpp, + cpp/src/configuration.h, + cpp/src/data.h, + cpp/src/decryptionresult.h, + cpp/src/defaultassuantransaction.cpp, + cpp/src/encryptionresult.cpp, + cpp/src/encryptionresult.h, + cpp/src/engineinfo.h, + cpp/src/gpgagentgetinfoassuantransaction.cpp, + cpp/src/gpgsignkeyeditinteractor.cpp, + cpp/src/importresult.cpp, + cpp/src/importresult.h, + cpp/src/key.h, + cpp/src/keygenerationresult.h, + cpp/src/keylistresult.h, + cpp/src/notation.h, + cpp/src/signingresult.cpp, + cpp/src/signingresult.h, + cpp/src/verificationresult.cpp, + cpp/src/verificationresult.h, + cpp/src/vfsmountresult.h, + qt/src/dataprovider.cpp, + qt/src/dataprovider.h, + qt/src/decryptjob.h, + qt/src/decryptverifyjob.h, + qt/src/downloadjob.h, + qt/src/encryptjob.h, + qt/src/qgpgmeadduseridjob.cpp, + qt/src/qgpgmechangeexpiryjob.cpp, + qt/src/qgpgmechangeownertrustjob.cpp, + qt/src/qgpgmechangepasswdjob.cpp, + qt/src/qgpgmedecryptjob.cpp, + qt/src/qgpgmedecryptjob.h, + qt/src/qgpgmedecryptverifyjob.cpp, + qt/src/qgpgmedecryptverifyjob.h, + qt/src/qgpgmedeletejob.cpp, + qt/src/qgpgmedownloadjob.cpp, + qt/src/qgpgmedownloadjob.h, + qt/src/qgpgmeencryptjob.cpp, + qt/src/qgpgmeencryptjob.h, + qt/src/qgpgmeexportjob.cpp, + qt/src/qgpgmeexportjob.h, + qt/src/qgpgmeimportfromkeyserverjob.cpp, + qt/src/qgpgmeimportfromkeyserverjob.h, + qt/src/qgpgmeimportjob.cpp, + qt/src/qgpgmeimportjob.h, + qt/src/qgpgmekeygenerationjob.cpp, + qt/src/qgpgmekeygenerationjob.h, + qt/src/qgpgmekeylistjob.cpp, + qt/src/qgpgmekeylistjob.h, + qt/src/qgpgmelistallkeysjob.cpp, + qt/src/qgpgmelistallkeysjob.h, + qt/src/qgpgmenewcryptoconfig.cpp, + qt/src/qgpgmenewcryptoconfig.h, + qt/src/qgpgmesignencryptjob.cpp, + qt/src/qgpgmesignencryptjob.h, + qt/src/qgpgmesignjob.cpp, + qt/src/qgpgmesignjob.h, + qt/src/qgpgmesignkeyjob.cpp, + qt/src/qgpgmeverifydetachedjob.cpp, + qt/src/qgpgmeverifydetachedjob.h, + qt/src/qgpgmeverifyopaquejob.cpp, + qt/src/qgpgmeverifyopaquejob.h, + qt/src/signencryptjob.h, + qt/src/signjob.h, + qt/src/threadedjobmixin.h, + qt/src/verifydetachedjob.h, + qt/src/verifyopaquejob.h: Reduce boost usage. + + Cpp: Require c++ 11 if cpp binding requested. + * configure.ac: Call ax_cxx_compile_stdcxx + * m4/ax_cxx_compile_stdcxx.m4 + + Qt: Add static factor methods for protocol. + * lang/qt/src/qgpgmebackend.cpp (QGpgME::openpgp, QGpgME::smime): New. + * lang/qt/src/qgpgmebackend.h: Declare. + * lang/qt/tests/t-keylist.cpp (KeyListTest::testSingleKeyListSync): + Use new functions. + + Qt: Add a unit test for qgpgme. + * configure.ac: Configure test Makefile. + * m4/qt.m4: Look up Qt5Test flags. + * lang/qt/tests/t-keylist.cpp: New. Simple keylist check. + * lang/qt/tests/Makefile.am: New. General test framework. + + Qt: Add missing MOC includes. + * qgpgmeadduseridjob.cpp, + qgpgmechangeexpiryjob.cpp, + qgpgmechangeownertrustjob.cpp, + qgpgmechangepasswdjob.cpp, + qgpgmedecryptjob.cpp, + qgpgmedecryptverifyjob.cpp, + qgpgmedeletejob.cpp, + qgpgmedownloadjob.cpp, + qgpgmeencryptjob.cpp, + qgpgmeexportjob.cpp, + qgpgmeimportfromkeyserverjob.cpp, + qgpgmeimportjob.cpp, + qgpgmekeygenerationjob.cpp, + qgpgmekeylistjob.cpp, + qgpgmelistallkeysjob.cpp, + qgpgmerefreshkeysjob.cpp, + qgpgmesecretkeyexportjob.cpp, + qgpgmesignencryptjob.cpp, + qgpgmesignjob.cpp, + qgpgmesignkeyjob.cpp, + qgpgmeverifydetachedjob.cpp, + qgpgmeverifyopaquejob.cpp: Add missing MOC includes. + + Qt: Declare pure virtuals as such. + * lang/qt/src/qgpgmebackend.h (Protocol): Make all functions + pure virtual. + + Qt: Don't declare showErrorDialog anymore. + * cpp/qt/src/job.h: Remove showErrorDialog. + + Qt: Only use GpgME based config class. + * lang/qt/src/qgpgmecryptoconfig.cpp, + lang/qt/src/qgpgmecryptoconfig.h: Removed. + * lang/qt/src/qgpgmebackend.cpp: Return newcryptoconfig. + +2016-04-02 Andre Heinecke + + Add additional include path in config files. + * lang/cpp/src/GpgmeppConfig.cmake.in.in + lang/qt/src/QGpgmeConfig.cmake.in.in: Include directory above headers. + + Qt: Fix library name in nodist variable. + * lang/qt/Makefile.am (nodist_qgpgme_SOURCES): Change to real name. + + Add missing files to QGpgME. + * lang/qt/src/gpgme_backend_debug.cpp, + lang/qt/src/gpgme_backend_debug.h, + lang/qt/src/predicates.h, + lang/qt/src/stl_util.h: New. + + Add QGpgME code from libkleo. + * lang/qt/src/Makefile.am, + lang/qt/src/abstractimportjob.h, + lang/qt/src/adduseridjob.h, + lang/qt/src/changeexpiryjob.h, + lang/qt/src/changeownertrustjob.h, + lang/qt/src/changepasswdjob.h, + lang/qt/src/cryptoconfig.h, + lang/qt/src/decryptjob.h, + lang/qt/src/decryptverifyjob.h, + lang/qt/src/deletejob.h, + lang/qt/src/downloadjob.h, + lang/qt/src/encryptjob.h, + lang/qt/src/exportjob.h, + lang/qt/src/hierarchicalkeylistjob.h, + lang/qt/src/importfromkeyserverjob.h, + lang/qt/src/importjob.h, + lang/qt/src/job.cpp, + lang/qt/src/job.h, + lang/qt/src/keygenerationjob.h, + lang/qt/src/keylistjob.h, + lang/qt/src/listallkeysjob.h, + lang/qt/src/multideletejob.h, + lang/qt/src/qgpgmeadduseridjob.cpp, + lang/qt/src/qgpgmeadduseridjob.h, + lang/qt/src/qgpgmebackend.cpp, + lang/qt/src/qgpgmebackend.h, + lang/qt/src/qgpgmechangeexpiryjob.cpp, + lang/qt/src/qgpgmechangeexpiryjob.h, + lang/qt/src/qgpgmechangeownertrustjob.cpp, + lang/qt/src/qgpgmechangeownertrustjob.h, + lang/qt/src/qgpgmechangepasswdjob.cpp, + lang/qt/src/qgpgmechangepasswdjob.h, + lang/qt/src/qgpgmecryptoconfig.cpp, + lang/qt/src/qgpgmecryptoconfig.h, + lang/qt/src/qgpgmedecryptjob.cpp, + lang/qt/src/qgpgmedecryptjob.h, + lang/qt/src/qgpgmedecryptverifyjob.cpp, + lang/qt/src/qgpgmedecryptverifyjob.h, + lang/qt/src/qgpgmedeletejob.cpp, + lang/qt/src/qgpgmedeletejob.h, + lang/qt/src/qgpgmedownloadjob.cpp, + lang/qt/src/qgpgmedownloadjob.h, + lang/qt/src/qgpgmeencryptjob.cpp, + lang/qt/src/qgpgmeencryptjob.h, + lang/qt/src/qgpgmeexportjob.cpp, + lang/qt/src/qgpgmeexportjob.h, + lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, + lang/qt/src/qgpgmeimportfromkeyserverjob.h, + lang/qt/src/qgpgmeimportjob.cpp, + lang/qt/src/qgpgmeimportjob.h, + lang/qt/src/qgpgmekeygenerationjob.cpp, + lang/qt/src/qgpgmekeygenerationjob.h, + lang/qt/src/qgpgmekeylistjob.cpp, + lang/qt/src/qgpgmekeylistjob.h, + lang/qt/src/qgpgmelistallkeysjob.cpp, + lang/qt/src/qgpgmelistallkeysjob.h, + lang/qt/src/qgpgmenewcryptoconfig.cpp, + lang/qt/src/qgpgmenewcryptoconfig.h, + lang/qt/src/qgpgmerefreshkeysjob.cpp, + lang/qt/src/qgpgmerefreshkeysjob.h, + lang/qt/src/qgpgmesecretkeyexportjob.cpp, + lang/qt/src/qgpgmesecretkeyexportjob.h, + lang/qt/src/qgpgmesignencryptjob.cpp, + lang/qt/src/qgpgmesignencryptjob.h, + lang/qt/src/qgpgmesignjob.cpp, + lang/qt/src/qgpgmesignjob.h, + lang/qt/src/qgpgmesignkeyjob.cpp, + lang/qt/src/qgpgmesignkeyjob.h, + lang/qt/src/qgpgmeverifydetachedjob.cpp, + lang/qt/src/qgpgmeverifydetachedjob.h, + lang/qt/src/qgpgmeverifyopaquejob.cpp, + lang/qt/src/qgpgmeverifyopaquejob.h, + lang/qt/src/refreshkeysjob.h, + lang/qt/src/signencryptjob.h, + lang/qt/src/signjob.h, + lang/qt/src/signkeyjob.h, + lang/qt/src/specialjob.h, + lang/qt/src/threadedjobmixin.cpp, + lang/qt/src/threadedjobmixin.h, + lang/qt/src/verifydetachedjob.h, + lang/qt/src/verifyopaquejob.h: New. + * lang/qt/src/Makefile.am: + +2016-03-08 Andre Heinecke + + Add qgpgme as qt language binding. + * configure.ac: Add version defines. Check for qt if neccessary. + * lang/README: Mention qt + * lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove comment. Find qgpgme. + * lang/qt/src/Makefile.am: New. Build qgpgme. + * lang/qt/README, + lang/qt/src/Makefile.am, + lang/qt/src/QGpgmeConfig.cmake.in.in, + lang/qt/src/QGpgmeConfigVersion.cmake.in, + lang/qt/src/dataprovider.cpp, + lang/qt/src/dataprovider.h, + lang/qt/src/qgpgme_export.h, + m4/qt.m4: New. + * lang/cpp/src/GpgmeppConfig.cmake.in.in, + lang/cpp/src/Makefile.am: Fix generated config file. + + Remove obsolete w32-qt code. + * configure.ac (w32-qt): Remove option and Qt checks. + * src/Makefile.am: Remove BUILD_W32_QT handling. + * src/kdpipeiodevice.cpp, + src/kdpipeiodevice.h, + src/kdpipeiodevice.moc, + src/w32-qt-io.cpp: Removed. + +2016-03-02 Andre Heinecke + + Add version info for gpgmepp. + * lang/cpp/src/Makefile.am (libgpgmepp_la_LDFLAGS): Add version info. + + Add cmake configuration files. + * configure.ac: Add libgpgmepp version. Configure cmake files. + * lang/cpp/src/Makefile.am: Add targets for cmake files. + (EXTRA_DIST): Add cmake files. + + Fix export header and windows export macros. + * lang/cpp/src/gpgme_export.h: Fix variable name. Add Windows ifdefs. + + Add header installation. + * lang/cpp/src/Makefile.am: Add headers as deps and install them. + (AM_CPPFLAGS): Add BUILDING_GPGMEPP to be used in export macros. + + Add enable-languages build option. + * acinclude.m4 (LIST_MEMBER): New macro. + * configure.ac (enable-languages): New option. Add info output. + * lang/Makefile.am: Only add enabled language subdirs. + +2016-02-22 Andre Heinecke + + Add README for gpgmepp. + * lang/README: Note down cpp. + * cpp/README: Add README based on original repo version. + + Add buildsystem for Gpgmepp. + * configure.ac: Configure Makefiles. + * lang/Makefile.am: Add cpp subdir + * lang/cpp/Makefile.am: New. Add src subdir. + * lang/cpp/src/Makefile.am: New. Basic buildsystem. + + Remove feature check ifdefs. + * lang/cpp/src/assuanresult.cpp, + lang/cpp/src/callbacks.cpp, + lang/cpp/src/configuration.cpp, + lang/cpp/src/context.cpp, + lang/cpp/src/context_glib.cpp, + lang/cpp/src/context_qt.cpp, + lang/cpp/src/context_vanilla.cpp, + lang/cpp/src/data.cpp, + lang/cpp/src/decryptionresult.cpp, + lang/cpp/src/defaultassuantransaction.cpp, + lang/cpp/src/editinteractor.cpp, + lang/cpp/src/encryptionresult.cpp, + lang/cpp/src/engineinfo.cpp, + lang/cpp/src/eventloopinteractor.cpp, + lang/cpp/src/global.h, + lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, + lang/cpp/src/importresult.cpp, + lang/cpp/src/interfaces/assuantransaction.h, + lang/cpp/src/key.cpp, + lang/cpp/src/keygenerationresult.cpp, + lang/cpp/src/keylistresult.cpp, + lang/cpp/src/scdgetinfoassuantransaction.cpp, + lang/cpp/src/signingresult.cpp, + lang/cpp/src/trustitem.cpp, + lang/cpp/src/util.h, + lang/cpp/src/verificationresult.cpp, + lang/cpp/src/vfsmountresult.cpp: Remove feature checks. + + Initial checkin of gpgmepp sources. + Based on git.kde.org/pim/gpgmepp rev. 0e3ebc02 + + * lang/cpp/src/assuanresult.cpp, + lang/cpp/src/assuanresult.h, + lang/cpp/src/callbacks.cpp, + lang/cpp/src/callbacks.h, + lang/cpp/src/configuration.cpp, + lang/cpp/src/configuration.h, + lang/cpp/src/context.cpp, + lang/cpp/src/context.h, + lang/cpp/src/context_glib.cpp, + lang/cpp/src/context_p.h, + lang/cpp/src/context_qt.cpp, + lang/cpp/src/context_vanilla.cpp, + lang/cpp/src/data.cpp, + lang/cpp/src/data.h, + lang/cpp/src/data_p.h, + lang/cpp/src/decryptionresult.cpp, + lang/cpp/src/decryptionresult.h, + lang/cpp/src/defaultassuantransaction.cpp, + lang/cpp/src/defaultassuantransaction.h, + lang/cpp/src/editinteractor.cpp, + lang/cpp/src/editinteractor.h, + lang/cpp/src/encryptionresult.cpp, + lang/cpp/src/encryptionresult.h, + lang/cpp/src/engineinfo.cpp, + lang/cpp/src/engineinfo.h, + lang/cpp/src/error.h, + lang/cpp/src/eventloopinteractor.cpp, + lang/cpp/src/eventloopinteractor.h, + lang/cpp/src/exception.cpp, + lang/cpp/src/exception.h, + lang/cpp/src/global.h, + lang/cpp/src/gpgadduserideditinteractor.cpp, + lang/cpp/src/gpgadduserideditinteractor.h, + lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, + lang/cpp/src/gpgagentgetinfoassuantransaction.h, + lang/cpp/src/gpgmefw.h, + lang/cpp/src/gpgmepp_export.h, + lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp, + lang/cpp/src/gpgsetexpirytimeeditinteractor.h, + lang/cpp/src/gpgsetownertrusteditinteractor.cpp, + lang/cpp/src/gpgsetownertrusteditinteractor.h, + lang/cpp/src/gpgsignkeyeditinteractor.cpp, + lang/cpp/src/gpgsignkeyeditinteractor.h, + lang/cpp/src/importresult.cpp, + lang/cpp/src/importresult.h, + lang/cpp/src/key.cpp, + lang/cpp/src/key.h, + lang/cpp/src/keygenerationresult.cpp, + lang/cpp/src/keygenerationresult.h, + lang/cpp/src/keylistresult.cpp, + lang/cpp/src/keylistresult.h, + lang/cpp/src/notation.h, + lang/cpp/src/result.h, + lang/cpp/src/result_p.h, + lang/cpp/src/scdgetinfoassuantransaction.cpp, + lang/cpp/src/scdgetinfoassuantransaction.h, + lang/cpp/src/signingresult.cpp, + lang/cpp/src/signingresult.h, + lang/cpp/src/trustitem.cpp, + lang/cpp/src/trustitem.h, + lang/cpp/src/util.h, + lang/cpp/src/verificationresult.cpp, + lang/cpp/src/verificationresult.h, + lang/cpp/src/vfsmountresult.cpp, + lang/cpp/src/vfsmountresult.h, + lang/cpp/src/interfaces/assuantransaction.h, + lang/cpp/src/interfaces/dataprovider.h, + lang/cpp/src/interfaces/passphraseprovider.h, + lang/cpp/src/interfaces/progressprovider.h: New. + +2016-01-15 Werner Koch + + Fix possible _SC_OPEN_MAX max problem on AIX. + * src/posix-io.c [HAVE_STDINT_H]: Include stdint.h. + (get_max_fds): Limit returned value for too high values. + +2015-12-09 Werner Koch + + w32: Avoid conflict with Mingw-w64 version 4.0.4-1. + * src/w32-util.c (mkstemp): Rename to my_mkstemp. Change caller. + +2015-12-04 Daiki Ueno + + Return on user cancellation of delete operation. + * src/delete.c (delete_status_handler): Return on ERROR status, if the + error location is set to "delete_key.secret" and the code is either + CANCELED or FULLY_CANCELED, which indicates a situation that the user + selected "No" on the confirmation dialog. + + doc: Fix minor errors. + * doc/gpgme.texi: Fix errors and typos in the cancellation and + gpgme_import_result_t documentation. + +2015-10-29 Ben Kibbey + + Make use of user passphrase handler during passwd. + * src/passwd.c (passwd_start): set engine passphrase command handler. + +2015-10-28 Werner Koch + + w32: Add extra diagnostic about possible missing gpgme-w32spawn.exe. + * src/w32-io.c (_gpgme_io_spawn): Add a new diagnostic. + + w32: Improve locating gpgconf on 64 bit systems. + * src/w32-util.c (find_program_at_standard_place): Fallback to + CSIDL_PROGRAM_FILESX86. + + w32: Add new global flag "w32-inst-dir". + * src/gpgme.c (gpgme_set_global_flag): Add flag "w32-inst-dir"; + * src/posix-util.c (_gpgme_set_override_inst_dir): New stub. + * src/w32-util.c (override_inst_dir): New var. + (_gpgme_get_inst_dir): Return this var is set. + (_gpgme_set_override_inst_dir): New. + +2015-10-16 NIIBE Yutaka + + cleanup: Fix type mismatch around gpgme_error_t. + * src/data-compat.c (gpgme_error_to_errno): Use gpg_err_code + to get error code from gpgme_error_t. + * src/gpgme.c (gpgme_new): Don't use gpgme_error. + +2015-08-31 Werner Koch + + gpgme-tool: Switch to argparse.c for option parsing. + * src/argparse.c, src/argparse.h: New. Taken from current gnupg. + * src/Makefile.am (gpgme_tool_SOURCES): New. + * src/gpgme-tool.c: Remove all argp.h stuff. + (my_strusage): New. + (main): Change to use argparse. + +2015-08-30 Werner Koch + + Add gpgme_pubkey_algo_string. + * src/gpgme.h.in (GPGME_PK_EDDSA): New. + (gpgme_pubkey_algo_string): New. + * src/conversion.c (_gpgme_map_pk_algo): Add new algo. + * src/gpgme.c (gpgme_pubkey_algo_string): New. + (gpgme_pubkey_algo_name): Reformat. + 2015-08-26 Werner Koch Release 1.6.0. @@ -135,6 +2815,18 @@ * src/engine-gpg.c (gpg_decrypt, gpg_delete, gpg_passwd): Check return value of start(). +2015-08-02 Ben McGinnes + + More GTK2 removal. + * Missed a couple of files, these 2 go for the same reason as the + previous 3. + + Removed GUI examples. + * GUI examples written with pygtk, which has not been ported to Python + 3 and won't be as it is for GTK2 and GNOME is moving to GTK3. + * New GUI examples may be required in future using any of several GUI + frameworks (e.g. wxPython, PyQt, PySide, PyGObject, etc.). + 2015-07-31 Andre Heinecke Add offline mode support for CMS keylisting. @@ -210,6 +2902,85 @@ * src/engine-gpg.c (gpg_keylist_preprocess): Increment SRC for a backslash. +2015-05-16 Ben McGinnes + + Python 3 port of PyME. + * Port of PyME 0.9.0 for Python 2 to Python 3 along with most of the + example scripts. + * Intended to be developed in parallel with the original Python 2 + version until such time as a rewrite of GPGME leads to developing an + IO API in Python 3 from scratch. + * Python 3 PyME and API maintainer has entered, stage left with current + GPG key ID 0x321E4E2373590E5D, primary fingerprint is "DB47 24E6 FA42 + 86C9 2B4E 55C4 321E 4E23 7359 0E5D" and signing subkey fingerprint is + "B7F0 FE75 9387 430D D0C5 8BDB 7FF2 D371 35C7 553C" for future + reference with git commit signatures. + + Explaining why not all scripts work. + * Some of them cannot be properly tested on OS X, especially with GTK in + the mix (it works on OS X, but is unlikely to be as easily accessible + as Cocoa or Qt). + * Most major functions are showcased and do work, albeit sometimes with + false positives of error messages, at least on OS X. + + Byte encoding. + * More string updates. + * verifydetails.py still fails, but as Bernhard is still contactable, it + might be worth him checking on it instead. + + No change, note added to explain why. + + Strings vs. Bytes. + * CLI input must be byte encoded. + + More byte changes and passphrase changes. + * exportimport works, but will still segfault for an as yet unknown + reason. + * genkey produces a traceback error, but does create the key as + intended. + * matched passphrase in signverify. + + More bytes good. + * Another string to byte change. + + Updated encrypt-to-all. + * Changed plaintext string to byte literal. + * Nested key selection in a try/except statement in case of + UnicodeEncodeError instances. + * Tested successfully on over 9,000 keys. + + Passphrase update. + * Changed example passphrase to something that meets the current minimum + requirements. + + example email. + * changed joe@foo.bar to joe@example.org as it is only a matter of time + before ICANN actually creates bar as a gTLD, if they haven't already. + + Updated string and key data. + * Text changed to byte literals. + * Changed key type to RSA/RSA. + * Changed expiry to the future (2020). + +2015-05-08 Ben McGinnes + + String type. + * the plain text string must be bytes and not unicode. + * Expect most of the example code to have similar issues at present. + +2015-05-05 Ben McGinnes + + Python 3 port of PyME. + * The entirety of the Python 3 port of PyME up to commit + 2145348ec54c6027f2ea20f695de0277e2871405 + * The old commit log has been saved as + lang/py3-pyme/docs/old-commits.log + * Can be viewed as a normal (separate) git repository at + https://github.com/adversary-org/pyme3 + * Utilising the submodule feature of git was deliberately skipped on + humanitarian grounds (in order to prevent pain and suffering on the + part of anyone having to manage this repository). + 2015-04-13 Werner Koch Release 1.5.4. diff --git a/Makefile.am b/Makefile.am index cb22a91..72b8ee9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,9 +39,23 @@ SUBDIRS = src ${tests} doc lang # to be used for patch's Prereq: feature. dist-hook: gen-ChangeLog @set -e; \ - sed -e 's/@pkg_version@/$(VERSION)/g' \ + sed -e 's/@pkg_version@/$(PACKAGE_VERSION)/g' \ $(top_srcdir)/gpgme.spec.in > $(distdir)/gpgme.spec - echo "$(VERSION)" > $(distdir)/VERSION + echo "$(PACKAGE_VERSION)" > $(distdir)/VERSION + +distcheck-hook: + set -e; ( \ + pref="#+macro: gpgme_" ;\ + reldate="$$(date -u +%Y-%m-%d)" ;\ + echo "$${pref}ver $(PACKAGE_VERSION)" ;\ + echo "$${pref}date $${reldate}" ;\ + list='$(DIST_ARCHIVES)'; for i in $$list; do \ + case "$$i" in *.tar.bz2) \ + echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\ + echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\ + echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\ + esac;\ + done ) | tee $(distdir).swdb gen_start_date = 2011-12-01T00:00:00 diff --git a/Makefile.in b/Makefile.in index d469e6a..20f5005 100644 --- a/Makefile.in +++ b/Makefile.in @@ -101,7 +101,8 @@ 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 \ + $(top_srcdir)/lang/python/pyme/version.py.in 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 \ @@ -113,12 +114,16 @@ DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(top_srcdir)/build-aux/ltmain.sh \ $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glib-2.0.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnupg-ttyname.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4/ax_pkg_swig.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnupg-ttyname.m4 \ $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libassuan.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -126,7 +131,7 @@ 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_CLEAN_FILES = +CONFIG_CLEAN_FILES = lang/python/pyme/version.py CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -241,6 +246,7 @@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -252,12 +258,14 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLED_LANGUAGES = @ENABLED_LANGUAGES@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ @@ -268,15 +276,23 @@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GPGME_CONFIG_API_VERSION = @GPGME_CONFIG_API_VERSION@ +GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ +GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ +GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ +GPGME_QT_LIBS = @GPGME_QT_LIBS@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@ GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@ +GRAPHVIZ = @GRAPHVIZ@ GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ +HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -287,10 +303,16 @@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBGPGMEPP_LT_AGE = @LIBGPGMEPP_LT_AGE@ +LIBGPGMEPP_LT_CURRENT = @LIBGPGMEPP_LT_CURRENT@ +LIBGPGMEPP_LT_REVISION = @LIBGPGMEPP_LT_REVISION@ LIBGPGME_LT_AGE = @LIBGPGME_LT_AGE@ LIBGPGME_LT_CURRENT = @LIBGPGME_LT_CURRENT@ LIBGPGME_LT_REVISION = @LIBGPGME_LT_REVISION@ LIBOBJS = @LIBOBJS@ +LIBQGPGME_LT_AGE = @LIBQGPGME_LT_AGE@ +LIBQGPGME_LT_CURRENT = @LIBQGPGME_LT_CURRENT@ +LIBQGPGME_LT_REVISION = @LIBQGPGME_LT_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -300,6 +322,8 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ NEED__FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -316,14 +340,27 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -QT4_CORE_CFLAGS = @QT4_CORE_CFLAGS@ -QT4_CORE_LIBS = @QT4_CORE_LIBS@ +PYTHON = @PYTHON@ +PYTHONS = @PYTHONS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_VERSIONS = @PYTHON_VERSIONS@ +QTCHOOSER = @QTCHOOSER@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_LIB = @SWIG_LIB@ SYSROOT = @SYSROOT@ VERSION = @VERSION@ VERSION_NUMBER = @VERSION_NUMBER@ @@ -372,9 +409,13 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -445,6 +486,8 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 +lang/python/pyme/version.py: $(top_builddir)/config.status $(top_srcdir)/lang/python/pyme/version.py.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -693,6 +736,7 @@ distcheck: dist 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 \ @@ -880,9 +924,23 @@ uninstall-am: # to be used for patch's Prereq: feature. dist-hook: gen-ChangeLog @set -e; \ - sed -e 's/@pkg_version@/$(VERSION)/g' \ + sed -e 's/@pkg_version@/$(PACKAGE_VERSION)/g' \ $(top_srcdir)/gpgme.spec.in > $(distdir)/gpgme.spec - echo "$(VERSION)" > $(distdir)/VERSION + echo "$(PACKAGE_VERSION)" > $(distdir)/VERSION + +distcheck-hook: + set -e; ( \ + pref="#+macro: gpgme_" ;\ + reldate="$$(date -u +%Y-%m-%d)" ;\ + echo "$${pref}ver $(PACKAGE_VERSION)" ;\ + echo "$${pref}date $${reldate}" ;\ + list='$(DIST_ARCHIVES)'; for i in $$list; do \ + case "$$i" in *.tar.bz2) \ + echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\ + echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\ + echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\ + esac;\ + done ) | tee $(distdir).swdb .PHONY: gen-ChangeLog gen-ChangeLog: if test -d $(top_srcdir)/.git; then \ diff --git a/NEWS b/NEWS index 8518dae..e4966e8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,108 @@ +Noteworthy changes in version 1.7.0 (2016-09-21) [C26/A15/R0] +------------------------------------------------ + + * New language bindings for Python 2 and 3. + + * New language Bindings for C++ and the Qt-Framework API. + + * New functions gpgme_op_createkey and gpgme_op_createsubkey to make + key creation easier (requires GnuPG 2.1). + + * New functions gpgme_op_adduid and gpgme_op_revuid to make user id + management easier (requires GnuPG 2.1). + + * New function gpgme_op_keysign to make key signing easier (requires + GnuPG 2.1). + + * New function gpgme_op_interact to replace the now deprecated + functions gpgme_op_edit and gpgme_op_card_edit. + + * New function gpgme_pubkey_algo_string to convert a public key + algorithm into a GnuPG 2.1 style string. + + * Support for GnuPG 2.1's TOFU trust model. + + * Notation flags are now correctly set on verify. + + * New global flag "require-gnupg" to set a minimal gnupg version. + + * More supported items in gpgme_get_dirinfo. + + * New function gpgme_data_set_flag and flag "size-hint". + + * New function gpgme_set_ctx_flag and flags "full-status" and + "raw-description". + + * Improved gpgme_data_identify to distinguish more file types. + + * New flag GPGME_ENCRYPT_SYMMETRIC for gpgme_op_encrypt to allow + mixed public key and symmetric encryption. + + * New field KEYGRIP in gpgme_subkey_t. New fields FPR in gpgme_key_t. + + * New flag GPGME_DATA_ENCODING_MIME to declare that the encrypted or + signed data is a valid MIME part. This is to support future GnuPG + versions. + + * Interface changes relative to the 1.6.0 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + gpgme_pubkey_algo_string NEW. + GPGME_PK_EDDSA NEW. + gpgme_set_ctx_flag NEW. + gpgme_data_set_flag NEW. + gpgme_op_createkey NEW. + gpgme_op_createkey_start NEW. + gpgme_op_createsubkey NEW. + gpgme_op_createsubkey_start NEW. + gpgme_op_adduid_start NEW. + gpgme_op_adduid NEW. + gpgme_op_revuid_start NEW. + gpgme_op_revuid NEW. + gpgme_op_keysign_start NEW. + gpgme_op_keysign NEW. + gpgme_op_tofu_policy_start NEW. + gpgme_op_tofu_policy NEW. + gpgme_op_interact_start NEW. + gpgme_op_interact NEW. + gpgme_interact_cb_t NEW. + gpgme_op_edit_start DEPRECATED. + gpgme_op_edit DEPRECATED. + gpgme_op_card_edit_start DEPRECATED. + gpgme_op_card_edit DEPRECATED. + gpgme_edit_cb_t DEPRECATED. + gpgme_status_code_t DEPRECATED. + gpgme_genkey_result_t EXTENDED: New fields pubkey and seckey. + gpgme_signature_t EXTENDED: New field key. + gpgme_key_t EXTENDED: New field fpr. + gpgme_subkey_t EXTENDED: New field keygrip. + gpgme_user_id_t EXTENDED: New field tofu. + gpgme_tofu_policy_t NEW. + gpgme_tofu_info_t NEW. + GPGME_STATUS_KEY_CONSIDERED NEW. + GPGME_STATUS_TOFU_USER NEW. + GPGME_STATUS_TOFU_STATS NEW. + GPGME_STATUS_TOFU_STATS_LONG NEW. + GPGME_STATUS_NOTATION_FLAGS NEW. + GPGME_KEYLIST_MODE_WITH_TOFU NEW. + GPGME_DATA_TYPE_PGP_ENCRYPTED NEW. + GPGME_DATA_TYPE_PGP_SIGNATURE NEW. + GPGME_DATA_ENCODING_MIME NEW. + GPGME_ENCRYPT_SYMMETRIC NEW. + GPGME_CREATE_SIGN NEW. + GPGME_CREATE_ENCR NEW. + GPGME_CREATE_CERT NEW. + GPGME_CREATE_AUTH NEW. + GPGME_CREATE_NOPASSWD NEW. + GPGME_CREATE_SELFSIGNED NEW. + GPGME_CREATE_NOSTORE NEW. + GPGME_CREATE_WANTPUB NEW. + GPGME_CREATE_WANTSEC NEW. + GPGME_CREATE_FORCE NEW. + GPGME_KEYSIGN_LOCAL NEW. + GPGME_KEYSIGN_LFSEP NEW. + GPGME_INTERACT_CARD NEW. + + Noteworthy changes in version 1.6.0 (2015-08-26) [C25/A14/R0] ------------------------------------------------ diff --git a/README b/README index 6da94e5..90f2e39 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ - GPGME - GnuPG Made Easy - --------------------------- + GPGME - GnuPG Made Easy + --------------------------- - Copyright 2004, 2006, 2010, 2012, 2013, 2014, 2015 g10 Code GmbH + Copyright 2001-2016 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 @@ -22,12 +22,12 @@ to public key crypto engines like GnuPG or GpgSM easier for applications. GPGME provides a high-level crypto API for encryption, decryption, signing, signature verification and key management. +GPGME comes with language bindings for Common Lisp, C++, QT, Python2 +and Python 3. + GPGME uses GnuPG and GpgSM as its backends to support OpenPGP and the Cryptographic Message Syntax (CMS). -GPGME runs best on GNU/Linux or *BSD systems. Other Unices may -require small portability fixes, please send us your patches. - See the files COPYING, COPYING.LESSER, and each file for copyright and warranty information. The file AUTHORS has a list of authors and useful web and mail addresses. @@ -70,18 +70,32 @@ a) If you have a trusted Version of GnuPG installed, you can simply check indeed a a signature of gpgme-x.y.z.tar.gz. The key used to create this signature is either of: - "pub 2048R/4F25E3B6 2011-01-12 Werner Koch (dist sig)" - "pub 1024D/87978569 1999-05-13 - Marcus Brinkmann - Marcus Brinkmann " + 2048R/4F25E3B6 2011-01-12 [expires: 2019-12-31] + Key fingerprint = D869 2123 C406 5DEA 5E0F 3AB5 249B 39D2 4F25 E3B6 + Werner Koch (dist sig) + + rsa2048/E0856959 2014-10-29 [expires: 2019-12-31] + Key fingerprint = 46CC 7308 65BB 5C78 EBAB ADCF 0437 6F3E E085 6959 + David Shaw (GnuPG Release Signing Key) + + rsa2048/33BD3F06 2014-10-29 [expires: 2016-10-28] + Key fingerprint = 031E C253 6E58 0D8E A286 A9F2 2071 B08A 33BD 3F06 + NIIBE Yutaka (GnuPG Release Key) + + rsa2048/7EFD60D9 2014-10-19 [expires: 2020-12-31] + Key fingerprint = D238 EA65 D64C 67ED 4C30 73F2 8A86 1B1C 7EFD 60D9 + Werner Koch (Release Signing Key) - If you do not have this key, you can get it from any keyserver. You - have to make sure that this is really the key and not a faked one. - You can do this by comparing the output of: + You may retrieve these files from the keyservers using this command - $ gpg --fingerprint 0x4F25E3B6 + gpg --recv-keys 249B39D24F25E3B6 04376F3EE0856959 \ + 2071B08A33BD3F06 8A861B1C7EFD60D9 - with the fingerprint published elsewhere. + The keys are also available at https://gnupg.org/signature_key.html + and in released GnuPG tarballs in the file g10/distsigkey.gpg . + You have to make sure that these are really the desired keys and + not faked one. You should do this by comparing the fingerprints + with the fingerprints published elsewhere. b) If you don't have any of the above programs, you have to verify the SHA1 checksum: @@ -101,7 +115,7 @@ Documentation For information how to use the library you can read the info manual, which is also a reference book, in the doc/ directory. The programs -in the tests/gpg/ directory may also prove useful. +in the tests/ directory may also prove useful. Please subscribe to the gnupg-devel@gnupg.org mailing list if you want to do serious work. diff --git a/VERSION b/VERSION index dc1e644..bd8bf88 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.0 +1.7.0 diff --git a/acinclude.m4 b/acinclude.m4 index cdfe6e4..575e526 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -58,3 +58,19 @@ AC_DEFUN([GNUPG_CHECK_VA_COPY], AC_MSG_RESULT($gnupg_cv_must_copy_va_byval) fi ]) + +dnl LIST_MEMBER() +dnl Check wether an element ist contained in a list. Set `found' to +dnl `1' if the element is found in the list, to `0' otherwise. +AC_DEFUN([LIST_MEMBER], +[ +name=$1 +list=$2 +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done +]) diff --git a/aclocal.m4 b/aclocal.m4 index 149aed2..16ee295 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -108,6 +108,43 @@ AC_DEFUN([AM_AUX_DIR_EXPAND], am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) +# AM_COND_IF -*- Autoconf -*- + +# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_COND_IF +# _AM_COND_ELSE +# _AM_COND_ENDIF +# -------------- +# These macros are only used for tracing. +m4_define([_AM_COND_IF]) +m4_define([_AM_COND_ELSE]) +m4_define([_AM_COND_ENDIF]) + +# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) +# --------------------------------------- +# If the shell condition COND is true, execute IF-TRUE, otherwise execute +# IF-FALSE. Allow automake to learn about conditional instantiating macros +# (the AC_CONFIG_FOOS). +AC_DEFUN([AM_COND_IF], +[m4_ifndef([_AM_COND_VALUE_$1], + [m4_fatal([$0: no such condition "$1"])])dnl +_AM_COND_IF([$1])dnl +if test -z "$$1_TRUE"; then : + m4_n([$2])[]dnl +m4_ifval([$3], +[_AM_COND_ELSE([$1])dnl +else + $3 +])dnl +_AM_COND_ENDIF([$1])dnl +fi[]dnl +]) + # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. @@ -845,6 +882,241 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# --------------------------------------------------------------------------- +# Adds support for distributing Python modules and packages. To +# install modules, copy them to $(pythondir), using the python_PYTHON +# automake variable. To install a package with the same name as the +# automake package, install to $(pkgpythondir), or use the +# pkgpython_PYTHON automake variable. +# +# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as +# locations to install python extension modules (shared libraries). +# Another macro is required to find the appropriate flags to compile +# extension modules. +# +# If your package is configured with a different prefix to python, +# users will have to add the install directory to the PYTHONPATH +# environment variable, or create a .pth file (see the python +# documentation for details). +# +# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will +# cause an error if the version of python installed on the system +# doesn't meet the requirement. MINIMUM-VERSION should consist of +# numbers and dots only. +AC_DEFUN([AM_PATH_PYTHON], + [ + dnl Find a Python interpreter. Python versions prior to 2.0 are not + dnl supported. (2.0 was released on October 16, 2000). + m4_define_default([_AM_PYTHON_INTERPRETER_LIST], +[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl + python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) + + m4_if([$1],[],[ + dnl No version check is needed. + # Find any Python interpreter. + if test -z "$PYTHON"; then + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + fi + am_display_PYTHON=python + ], [ + dnl A version check is needed. + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + AC_MSG_CHECKING([whether $PYTHON version is >= $1]) + AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Python interpreter is too old])]) + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + AC_CACHE_CHECK([for a Python interpreter with version >= $1], + [am_cv_pathless_PYTHON],[ + for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + test "$am_cv_pathless_PYTHON" = none && break + AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) + done]) + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + ]) + + if test "$PYTHON" = :; then + dnl Run any user-specified action, or abort. + m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) + else + + dnl Query Python for its version number. Getting [:3] seems to be + dnl the best way to do this; it's what "site.py" does in the standard + dnl library. + + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], + [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl Use the values of $prefix and $exec_prefix for the corresponding + dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made + dnl distinct variables so they can be overridden if need be. However, + dnl general consensus is that you shouldn't need this ability. + + AC_SUBST([PYTHON_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) + + dnl At times (like when building shared libraries) you may want + dnl to know which OS platform Python thinks this is. + + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) + AC_SUBST([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" + + dnl Set up 4 directories: + + dnl pythondir -- where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON script directory], + [am_cv_python_pythondir], + [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 + ]) + AC_SUBST([pythondir], [$am_cv_python_pythondir]) + + dnl pkgpythondir -- $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) + + dnl pyexecdir -- directory for installing python extension modules + dnl (shared libraries) + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], + [am_cv_python_pyexecdir], + [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 + ]) + AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) + + dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) + + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) + + dnl Run any user-specified action. + $2 + fi + +]) + + +# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# --------------------------------------------------------------------------- +# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. +# Run ACTION-IF-FALSE otherwise. +# This test uses sys.hexversion instead of the string equivalent (first +# word of sys.version), in order to cope with versions such as 2.2c1. +# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). +AC_DEFUN([AM_PYTHON_CHECK_VERSION], + [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, '$2'.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)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) + # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -1183,6 +1455,9 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ax_cxx_compile_stdcxx.m4]) +m4_include([m4/ax_pkg_swig.m4]) +m4_include([m4/ax_python_devel.m4]) m4_include([m4/glib-2.0.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/gnupg-ttyname.m4]) @@ -1193,4 +1468,6 @@ m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) +m4_include([m4/pkg.m4]) +m4_include([m4/qt.m4]) m4_include([acinclude.m4]) diff --git a/autogen.sh b/autogen.sh index 471193c..24da40c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -347,7 +347,7 @@ if [ -d .git ]; then [ -z "${SILENT}" ] && cat <. @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -168,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -197,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -207,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -223,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -235,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -251,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -359,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -393,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -618,13 +642,13 @@ EOF sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -663,11 +687,11 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -680,12 +704,12 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -790,14 +814,14 @@ EOF echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -879,7 +903,7 @@ EOF exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix @@ -902,7 +926,7 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) @@ -933,6 +957,9 @@ EOF crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -945,6 +972,9 @@ EOF ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -1021,7 +1051,7 @@ EOF echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} @@ -1100,7 +1130,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1249,6 +1279,9 @@ EOF SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1262,9 +1295,9 @@ EOF UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in @@ -1286,7 +1319,7 @@ EOF exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1317,7 +1350,7 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1359,7 +1392,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1370,23 +1403,25 @@ EOF x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp diff --git a/build-aux/config.sub b/build-aux/config.sub index 6d2e94c..9feb73b 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2016-06-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ timestamp='2015-01-01' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,8 +53,7 @@ timestamp='2015-01-01' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -68,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -117,7 +116,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -255,11 +254,12 @@ case $basic_machine in | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ + | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ @@ -305,7 +305,7 @@ case $basic_machine in | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -376,12 +376,13 @@ case $basic_machine in | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ @@ -428,12 +429,13 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -518,6 +520,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -638,6 +643,14 @@ case $basic_machine in basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -1373,18 +1386,18 @@ case $os in | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ @@ -1393,7 +1406,8 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1525,6 +1539,8 @@ case $os in ;; -nacl*) ;; + -ios) + ;; -none) ;; *) diff --git a/config.h.in b/config.h.in index 2bbae90..505fe26 100644 --- a/config.h.in +++ b/config.h.in @@ -27,6 +27,9 @@ /* Define if ttyname_r is does not work with small buffers */ #undef HAVE_BROKEN_TTYNAME_R +/* 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 @@ -74,6 +77,9 @@ /* Define if we have pthread. */ #undef HAVE_PTHREAD +/* If available, contains the Python version number currently in use. */ +#undef HAVE_PYTHON + /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV @@ -281,5 +287,5 @@ #define GPG_ERR_ENABLE_ERRNO_MACROS 1 #define CRIGHTBLURB "Copyright (C) 2000 Werner Koch\n" \ - "Copyright (C) 2001--2015 g10 Code GmbH\n" + "Copyright (C) 2001--2016 g10 Code GmbH\n" diff --git a/configure b/configure index cf0c337..bcfe006 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gpgme 1.6.0. +# Generated by GNU Autoconf 2.69 for gpgme 1.7.0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gpgme' PACKAGE_TARNAME='gpgme' -PACKAGE_VERSION='1.6.0' -PACKAGE_STRING='gpgme 1.6.0' +PACKAGE_VERSION='1.7.0' +PACKAGE_STRING='gpgme 1.7.0' PACKAGE_BUGREPORT='http://bugs.gnupg.org' PACKAGE_URL='' @@ -639,6 +639,7 @@ emacs_local_vars_end emacs_local_vars_read_only emacs_local_vars_begin LTLIBOBJS +GPGME_CONFIG_AVAIL_LANG GPGME_CONFIG_HOST GPGME_CONFIG_CFLAGS GPGME_CONFIG_LIBS @@ -672,10 +673,40 @@ RUN_GPGCONF_TESTS_TRUE BUILD_TIMESTAMP BUILD_FILEVERSION BUILD_REVISION +ENABLED_LANGUAGES +PYTHON_VERSIONS +PYTHONS +PYTHON_EXTRA_LDFLAGS +PYTHON_EXTRA_LIBS +PYTHON_SITE_PKG +PYTHON_LDFLAGS +PYTHON_CPPFLAGS +pkgpyexecdir +pyexecdir +pkgpythondir +pythondir +PYTHON_PLATFORM +PYTHON_EXEC_PREFIX +PYTHON_PREFIX +PYTHON_VERSION +PYTHON +SWIG_LIB +SWIG +HAVE_DOT +HAVE_DOXYGEN_FALSE +HAVE_DOXYGEN_TRUE +GRAPHVIZ +DOXYGEN +QTCHOOSER +MOC2 +MOC +GPGME_QTTEST_LIBS +GPGME_QTTEST_CFLAGS +GPGME_QT_LIBS +GPGME_QT_CFLAGS +HAVE_CXX11 HAVE_PTHREAD_FALSE HAVE_PTHREAD_TRUE -BUILD_W32_QT_FALSE -BUILD_W32_QT_TRUE BUILD_W32_GLIB_FALSE BUILD_W32_GLIB_TRUE HAVE_ANDROID_SYSTEM_FALSE @@ -688,8 +719,6 @@ HAVE_W32_SYSTEM_FALSE HAVE_W32_SYSTEM_TRUE HAVE_DOSISH_SYSTEM_FALSE HAVE_DOSISH_SYSTEM_TRUE -QT4_CORE_LIBS -QT4_CORE_CFLAGS GLIB_MKENUMS GOBJECT_QUERY GLIB_GENMARSHAL @@ -720,7 +749,14 @@ LIBTOOL OBJDUMP DLLTOOL AS +CC_FOR_BUILD VERSION_NUMBER +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 @@ -843,8 +879,8 @@ with_sysroot enable_libtool_lock enable_glibtest enable_w32_glib -enable_w32_qt enable_fixed_path +enable_languages enable_build_timestamp enable_gpgconf_test enable_gpg_test @@ -869,7 +905,15 @@ CPP CXX CXXFLAGS CCC -CXXCPP' +CC_FOR_BUILD +CXXCPP +PKG_CONFIG +GPGME_QT_CFLAGS +GPGME_QT_LIBS +GPGME_QTTEST_CFLAGS +GPGME_QTTEST_LIBS +PYTHON +PYTHON_VERSION' # Initialize some variables set by options. @@ -1410,7 +1454,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.6.0 to adapt to many kinds of systems. +\`configure' configures gpgme 1.7.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1480,7 +1524,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gpgme 1.6.0:";; + short | recursive ) echo "Configuration of gpgme 1.7.0:";; esac cat <<\_ACEOF @@ -1504,9 +1548,10 @@ Optional Features: --disable-libtool-lock avoid locking (might break parallel builds) --disable-glibtest do not try to compile and run a test GLIB program --enable-w32-glib build GPGME Glib for W32 - --enable-w32-qt build GPGME Qt for W32 --enable-fixed-path=PATH locate binaries only via this PATH + --enable-languages=languages + enable only specific language bindings --enable-build-timestamp set an explicit build timestamp for reproducibility. (default is the current time in ISO-8601 format) @@ -1543,7 +1588,23 @@ Some influential environment variables: CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags + CC_FOR_BUILD + build system C compiler CXXCPP C++ preprocessor + PKG_CONFIG path to pkg-config utility + GPGME_QT_CFLAGS + C compiler flags for GPGME_QT, overriding pkg-config + GPGME_QT_LIBS + linker flags for GPGME_QT, overriding pkg-config + GPGME_QTTEST_CFLAGS + C compiler flags for GPGME_QTTEST, overriding pkg-config + GPGME_QTTEST_LIBS + linker flags for GPGME_QTTEST, overriding pkg-config + PYTHON the Python interpreter + PYTHON_VERSION + The installed Python version to use, for example '2.3'. This + string will be appended to the Python interpreter canonical + name. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1611,7 +1672,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gpgme configure 1.6.0 +gpgme configure 1.7.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2441,7 +2502,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.6.0, which was +It was created by gpgme $as_me 1.7.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2804,12 +2865,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBGPGME_LT_CURRENT=25 +LIBGPGME_LT_CURRENT=26 # Subtract 2 from this value if you want to make the LFS transition an # ABI break. [Note to self: Remove this comment with the next regular break.] -LIBGPGME_LT_AGE=14 +LIBGPGME_LT_AGE=15 LIBGPGME_LT_REVISION=0 +LIBGPGMEPP_LT_CURRENT=6 +LIBGPGMEPP_LT_AGE=0 +LIBGPGMEPP_LT_REVISION=1 + +LIBQGPGME_LT_CURRENT=6 +LIBQGPGME_LT_AGE=0 +LIBQGPGME_LT_REVISION=1 + # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 ############################################## @@ -3341,7 +3410,7 @@ fi # Define the identity of the package. PACKAGE='gpgme' - VERSION='1.6.0' + VERSION='1.7.0' cat >>confdefs.h <<_ACEOF @@ -6236,6 +6305,12 @@ test -n "$GITLOG_TO_CHANGELOG" || GITLOG_TO_CHANGELOG="gitlog-to-changelog" + + + + + + cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF @@ -6245,7 +6320,25 @@ cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF -VERSION_NUMBER=0x010600 +VERSION_NUMBER=0x010700 + + +# We need to compile and run a program on the build machine. A +# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in +# the AC archive is broken for autoconf 2.57. Given that there is no +# newer version of that macro, we assume that it is also broken for +# autoconf 2.61 and thus we use a simple but usually sufficient +# approach. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cc for build" >&5 +$as_echo_n "checking for cc for build... " >&6; } +if test "$cross_compiling" = "yes"; then + CC_FOR_BUILD="${CC_FOR_BUILD-cc}" +else + CC_FOR_BUILD="${CC_FOR_BUILD-$CC}" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 +$as_echo "$CC_FOR_BUILD" >&6; } + # Don't default to build static libs. @@ -17099,6 +17192,8 @@ have_w32_system=no have_w64_system=no build_w32_glib=no build_w32_qt=no +available_languages="cl cpp python python2 python3 qt" +default_languages="cl cpp python qt" case "${host}" in x86_64-*mingw32*) have_w64_system=yes @@ -17403,22 +17498,9 @@ if test "${enable_w32_glib+set}" = set; then : enableval=$enable_w32_glib; build_w32_glib=$enableval fi - - # Check disabled, because the qt-dev packages in gpg4win do - # not provide any support for cross compilation. - # PKG_CHECK_MODULES(QT4_CORE, QtCore) - - # Use it like this: - # ./configure --enable-w32-qt QT4_CORE_CFLAGS="..." QT4_CORE_LIBS="..." - - - # Check whether --enable-w32-qt was given. -if test "${enable_w32_qt+set}" = set; then : - enableval=$enable_w32_qt; build_w32_qt=$enableval -fi - - ;; + ;; *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : @@ -17551,14 +17633,6 @@ else BUILD_W32_GLIB_FALSE= fi - if test "$build_w32_qt" = yes; then - BUILD_W32_QT_TRUE= - BUILD_W32_QT_FALSE='#' -else - BUILD_W32_QT_TRUE='#' - BUILD_W32_QT_FALSE= -fi - if test "$have_pthread" = "yes"; then HAVE_PTHREAD_TRUE= @@ -17586,226 +17660,3193 @@ _ACEOF fi -# -# Provide information about the build. -# -BUILD_REVISION="107bff7" +# Note: You need to declare all possible langauges also in +# lang/Makefile.am's DIST_SUBDIRS. +# Check whether --enable-languages was given. +if test "${enable_languages+set}" = set; then : + enableval=$enable_languages; enabled_languages=`echo $enableval | \ + tr ',:' ' ' | tr 'A-Z' 'a-z' | \ + sed 's/c++/cpp/'` +else + enabled_languages="maybe" +fi +if test "x$enabled_languages" = "x" \ + -o "$enabled_languages" = "no"; then + enabled_languages= +fi -cat >>confdefs.h <<_ACEOF -#define BUILD_REVISION "$BUILD_REVISION" -_ACEOF +# If languages are explicitly set missing requirements +# for the languages are treated as errors otherwise +# there will be a warning. +explicit_languages=1 +if test "x$enabled_languages" = "xmaybe"; then + explicit_languages=0 + enabled_languages="$default_languages" +fi +for language in $enabled_languages; do -BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` -BUILD_FILEVERSION="${BUILD_FILEVERSION}4219" +name=$language +list=$available_languages +found=0 +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done -# 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 "$found" = "0"; then + as_fn_error $? "unsupported language binding specified" "$LINENO" 5 + fi +done + + + +# Enable C++ 11 if cpp language is requested + +name="cpp" +list=$enabled_languages +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + +if test "$found" = "1"; then + ax_cxx_compile_cxx11_required=false + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ac_success=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 +$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } +if ${ax_cv_cxx_compile_cxx11+:} false; then : + $as_echo_n "(cached) " >&6 else - BUILD_TIMESTAMP="" -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. -cat >>confdefs.h <<_ACEOF -#define BUILD_TIMESTAMP "$BUILD_TIMESTAMP" -_ACEOF +#ifndef __cplusplus +#error "This is not a C++ compiler" +#elif __cplusplus < 201103L -# -# Options to disable some regression tests -# -run_gpgconf_test="yes" -# Check whether --enable-gpgconf-test was given. -if test "${enable_gpgconf_test+set}" = set; then : - enableval=$enable_gpgconf_test; run_gpgconf_test=$enableval -fi +#error "This is not a C++11 compiler" - if test "$run_gpgconf_test" = "yes"; then - RUN_GPGCONF_TESTS_TRUE= - RUN_GPGCONF_TESTS_FALSE='#' -else - RUN_GPGCONF_TESTS_TRUE='#' - RUN_GPGCONF_TESTS_FALSE= -fi +#else +namespace cxx11 +{ -run_gpg_test="yes" -# Check whether --enable-gpg-test was given. -if test "${enable_gpg_test+set}" = set; then : - enableval=$enable_gpg_test; run_gpg_test=$enableval -fi + namespace test_static_assert + { - if test "$run_gpg_test" = "yes"; then - RUN_GPG_TESTS_TRUE= - RUN_GPG_TESTS_FALSE='#' -else - RUN_GPG_TESTS_TRUE='#' - RUN_GPG_TESTS_FALSE= -fi + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + } -run_gpgsm_test="yes" -# Check whether --enable-gpgsm-test was given. -if test "${enable_gpgsm_test+set}" = set; then : - enableval=$enable_gpgsm_test; run_gpgsm_test=$enableval -fi + namespace test_final_override + { - if test "$run_gpgsm_test" = "yes"; then - RUN_GPGSM_TESTS_TRUE= - RUN_GPGSM_TESTS_FALSE='#' -else - RUN_GPGSM_TESTS_TRUE='#' - RUN_GPGSM_TESTS_FALSE= -fi + struct Base + { + virtual void f() {} + }; + struct Derived : public Base + { + virtual void f() override {} + }; -run_g13_test="yes" -# Check whether --enable-g13-test was given. -if test "${enable_g13_test+set}" = set; then : - enableval=$enable_g13_test; run_g13_test=$enableval -fi + } - if test "$run_g13_test" = "yes"; then - RUN_G13_TESTS_TRUE= - RUN_G13_TESTS_FALSE='#' -else - RUN_G13_TESTS_TRUE='#' - RUN_G13_TESTS_FALSE= -fi + namespace test_double_right_angle_brackets + { + template < typename T > + struct check {}; + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; -# Checks for header files. + } + namespace test_decltype + { + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + } -fi + namespace test_type_deduction + { -done + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + template < typename T > + struct is_same + { + static const bool value = true; + }; + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + } + namespace test_noexcept + { + int f() { return 0; } + int g() noexcept { return 0; } + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + } + namespace test_constexpr + { + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + } + namespace test_rvalue_references + { + template < int N > + struct answer + { + static constexpr int value = N; + }; + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + } + namespace test_uniform_initialization + { -# Type checks. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif + struct test + { + static const int zero {}; + static const int one {1}; + }; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } + } -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac + namespace test_lambdas + { -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 -$as_echo_n "checking size of unsigned int... " >&6; } -if ${ac_cv_sizeof_unsigned_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default"; then : + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } -else - if test "$ac_cv_type_unsigned_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned_int=0 - fi -fi + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5 -$as_echo "$ac_cv_sizeof_unsigned_int" >&6; } + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + } + namespace test_variadic_templates + { -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int -_ACEOF + template + struct sum; + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi + template <> + struct sum<> + { + static constexpr auto value = 0; + }; -if test "$enable_largefile" != no; then + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + + + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ax_cv_cxx_compile_cxx11=yes +else + ax_cv_cxx_compile_cxx11=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 +$as_echo "$ax_cv_cxx_compile_cxx11" >&6; } + if test x$ax_cv_cxx_compile_cxx11 = xyes; then + ac_success=yes + fi + + + + if test x$ac_success = xno; then + for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do + cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 +$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } +if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_CXX="$CXX" + CXX="$CXX $switch" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} + }; + + struct Derived : public Base + { + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + + + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval $cachevar=yes +else + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXX="$ac_save_CXX" +fi +eval ac_res=\$$cachevar + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + CXXCPP="$CXXCPP $switch" + ac_success=yes + break + fi + done + fi + 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 + + if test x$ax_cxx_compile_cxx11_required = xtrue; then + if test x$ac_success = xno; then + as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 + fi + fi + if test x$ac_success = xno; then + HAVE_CXX11=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 +$as_echo "$as_me: No compiler with C++11 support was found" >&6;} + else + HAVE_CXX11=1 + +$as_echo "#define HAVE_CXX11 1" >>confdefs.h + + fi + + + if test "$HAVE_CXX11" != "1"; then + if test "$explicit_languages" = "1"; then + as_fn_error $? " +*** +*** A compiler with c++11 support is required for the c++ binding. +***" "$LINENO" 5 + else + enabled_languages=$(echo $enabled_languages | sed 's/cpp//') + enabled_languages=$(echo $enabled_languages | sed 's/qt//') + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** +*** No c++11 support detected. C++ and Qt bindings will be disabled. +***" >&5 +$as_echo "$as_me: WARNING: +*** +*** No c++11 support detected. C++ and Qt bindings will be disabled. +***" >&2;} + fi + fi +fi + +# Check that if qt is enabled cpp also is enabled + +name="qt" +list=$enabled_languages +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + +if test "$found" = "1"; then + # We need to ensure that in the langauge order qt comes after cpp + # so we remove qt first and explicitly add it as last list member. + enabled_languages=$(echo $enabled_languages | sed 's/qt//') + +name="cpp" +list=$enabled_languages +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + + if test "$found" = "0"; then + as_fn_error $? " +*** +*** Qt language binding depends on cpp binding. +***" "$LINENO" 5 + fi + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-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_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_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_PKG_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 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-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_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_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_PKG_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_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + 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 + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; } + PKG_CONFIG="" + fi + +fi + + have_qt5_libs="no"; + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPGME_QT" >&5 +$as_echo_n "checking for GPGME_QT... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GPGME_QT_CFLAGS"; then + pkg_cv_GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GPGME_QT_CFLAGS=`$PKG_CONFIG --cflags "Qt5Core >= 5.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GPGME_QT_LIBS"; then + pkg_cv_GPGME_QT_LIBS="$GPGME_QT_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GPGME_QT_LIBS=`$PKG_CONFIG --libs "Qt5Core >= 5.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GPGME_QT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "Qt5Core >= 5.0.0"` + else + GPGME_QT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5Core >= 5.0.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GPGME_QT_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_qt5_libs="no" +elif test $pkg_failed = untried; then + have_qt5_libs="no" +else + GPGME_QT_CFLAGS=$pkg_cv_GPGME_QT_CFLAGS + GPGME_QT_LIBS=$pkg_cv_GPGME_QT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_qt5_libs="yes" +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPGME_QTTEST" >&5 +$as_echo_n "checking for GPGME_QTTEST... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GPGME_QTTEST_CFLAGS"; then + pkg_cv_GPGME_QTTEST_CFLAGS="$GPGME_QTTEST_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Test >= 5.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Test >= 5.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GPGME_QTTEST_CFLAGS=`$PKG_CONFIG --cflags "Qt5Test >= 5.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GPGME_QTTEST_LIBS"; then + pkg_cv_GPGME_QTTEST_LIBS="$GPGME_QTTEST_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Test >= 5.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Test >= 5.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GPGME_QTTEST_LIBS=`$PKG_CONFIG --libs "Qt5Test >= 5.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GPGME_QTTEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "Qt5Test >= 5.0.0"` + else + GPGME_QTTEST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5Test >= 5.0.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GPGME_QTTEST_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_qt5test_libs="no" +elif test $pkg_failed = untried; then + have_qt5test_libs="no" +else + GPGME_QTTEST_CFLAGS=$pkg_cv_GPGME_QTTEST_CFLAGS + GPGME_QTTEST_LIBS=$pkg_cv_GPGME_QTTEST_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_qt5test_libs="yes" +fi + + if ! test "$have_w32_system" = yes; then + if "$PKG_CONFIG" --variable qt_config Qt5Core | grep -q "reduce_relocations"; then + GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS -fpic" + fi + fi + if test "$have_qt5_libs" = "yes"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}moc", so it can be a program name with args. +set dummy ${ac_tool_prefix}moc; 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_prog_MOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MOC"; then + ac_cv_prog_MOC="$MOC" # Let the user override the test. +else +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_prog_MOC="${ac_tool_prefix}moc" + $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 + +fi +fi +MOC=$ac_cv_prog_MOC +if test -n "$MOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5 +$as_echo "$MOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MOC"; then + ac_ct_MOC=$MOC + # Extract the first word of "moc", so it can be a program name with args. +set dummy moc; 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_prog_ac_ct_MOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MOC"; then + ac_cv_prog_ac_ct_MOC="$ac_ct_MOC" # Let the user override the test. +else +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_prog_ac_ct_MOC="moc" + $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 + +fi +fi +ac_ct_MOC=$ac_cv_prog_ac_ct_MOC +if test -n "$ac_ct_MOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MOC" >&5 +$as_echo "$ac_ct_MOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MOC" = x; then + MOC="" + 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 + MOC=$ac_ct_MOC + fi +else + MOC="$ac_cv_prog_MOC" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking moc version" >&5 +$as_echo_n "checking moc version... " >&6; } + mocversion=`$MOC -v 2>&1` + mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"` + if test x"$mocversiongrep" != x"$mocversion"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + # moc was not the qt5 one, try with moc-qt5 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}moc-qt5", so it can be a program name with args. +set dummy ${ac_tool_prefix}moc-qt5; 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_prog_MOC2+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MOC2"; then + ac_cv_prog_MOC2="$MOC2" # Let the user override the test. +else +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_prog_MOC2="${ac_tool_prefix}moc-qt5" + $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 + +fi +fi +MOC2=$ac_cv_prog_MOC2 +if test -n "$MOC2"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC2" >&5 +$as_echo "$MOC2" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MOC2"; then + ac_ct_MOC2=$MOC2 + # Extract the first word of "moc-qt5", so it can be a program name with args. +set dummy moc-qt5; 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_prog_ac_ct_MOC2+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MOC2"; then + ac_cv_prog_ac_ct_MOC2="$ac_ct_MOC2" # Let the user override the test. +else +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_prog_ac_ct_MOC2="moc-qt5" + $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 + +fi +fi +ac_ct_MOC2=$ac_cv_prog_ac_ct_MOC2 +if test -n "$ac_ct_MOC2"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MOC2" >&5 +$as_echo "$ac_ct_MOC2" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MOC2" = x; then + MOC2="" + 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 + MOC2=$ac_ct_MOC2 + fi +else + MOC2="$ac_cv_prog_MOC2" +fi + + mocversion=`$MOC2 -v 2>&1` + mocversiongrep=`echo $mocversion | grep "Qt 5\|moc-qt5 5\|moc 5"` + if test x"$mocversiongrep" != x"$mocversion"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}qtchooser", so it can be a program name with args. +set dummy ${ac_tool_prefix}qtchooser; 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_prog_QTCHOOSER+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$QTCHOOSER"; then + ac_cv_prog_QTCHOOSER="$QTCHOOSER" # Let the user override the test. +else +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_prog_QTCHOOSER="${ac_tool_prefix}qtchooser" + $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 + +fi +fi +QTCHOOSER=$ac_cv_prog_QTCHOOSER +if test -n "$QTCHOOSER"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QTCHOOSER" >&5 +$as_echo "$QTCHOOSER" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_QTCHOOSER"; then + ac_ct_QTCHOOSER=$QTCHOOSER + # Extract the first word of "qtchooser", so it can be a program name with args. +set dummy qtchooser; 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_prog_ac_ct_QTCHOOSER+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_QTCHOOSER"; then + ac_cv_prog_ac_ct_QTCHOOSER="$ac_ct_QTCHOOSER" # Let the user override the test. +else +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_prog_ac_ct_QTCHOOSER="qtchooser" + $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 + +fi +fi +ac_ct_QTCHOOSER=$ac_cv_prog_ac_ct_QTCHOOSER +if test -n "$ac_ct_QTCHOOSER"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_QTCHOOSER" >&5 +$as_echo "$ac_ct_QTCHOOSER" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_QTCHOOSER" = x; then + QTCHOOSER="" + 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 + QTCHOOSER=$ac_ct_QTCHOOSER + fi +else + QTCHOOSER="$ac_cv_prog_QTCHOOSER" +fi + + qt5tooldir=`QT_SELECT=qt5 qtchooser -print-env | grep QTTOOLDIR | cut -d '=' -f 2 | cut -d \" -f 2` + mocversion=`$qt5tooldir/moc -v 2>&1` + mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"` + if test x"$mocversiongrep" != x"$mocversion"; then + # no valid moc found + have_qt5_libs="no"; + else + MOC=$qt5tooldir/moc + fi + else + MOC=$MOC2 + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mocversion" >&5 +$as_echo "$mocversion" >&6; } + OLDCPPFLAGS=$CPPFLAGS + CPPFLAGS=$GPGME_QT_CFLAGS + OLDLIBS=$LIBS + LIBS=$GPGME_QT_LIBS + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple qt program can be built" >&5 +$as_echo_n "checking whether a simple qt program can be built... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main (int argc, char **argv) { + QCoreApplication app(argc, argv); + app.exec(); + } +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + have_qt5_libs='yes' +else + have_qt5_libs='no' +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_qt5_libs" >&5 +$as_echo "$have_qt5_libs" >&6; } + 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 + + CPPFLAGS=$OLDCPPFLAGS + LIBS=$OLDLIBS + fi + + if test "$have_qt5_libs" != "yes"; then + if test "$explicit_languages" = "1"; then + as_fn_error $? " +*** +*** Qt5 (Qt5Core) is required for Qt binding. +***" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** +*** Qt5 (Qt5Core) not found Qt Binding will be disabled. +***" >&5 +$as_echo "$as_me: WARNING: +*** +*** Qt5 (Qt5Core) not found Qt Binding will be disabled. +***" >&2;} + fi + else + enabled_languages=`echo $enabled_languages qt` + + for ac_prog in doxygen +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_DOXYGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DOXYGEN"; then + ac_cv_prog_DOXYGEN="$DOXYGEN" # Let the user override the test. +else +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_prog_DOXYGEN="$ac_prog" + $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 + +fi +fi +DOXYGEN=$ac_cv_prog_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DOXYGEN" && break +done + + if test -z "$DOXYGEN"; + # This is not highlighted becase 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 + for ac_prog in dot +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_GRAPHVIZ+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GRAPHVIZ"; then + ac_cv_prog_GRAPHVIZ="$GRAPHVIZ" # Let the user override the test. +else +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_prog_GRAPHVIZ="$ac_prog" + $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 + +fi +fi +GRAPHVIZ=$ac_cv_prog_GRAPHVIZ +if test -n "$GRAPHVIZ"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRAPHVIZ" >&5 +$as_echo "$GRAPHVIZ" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$GRAPHVIZ" && break +done + + if test -z "$GRAPHVIZ"; + then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Graphviz not found - Qt binding doc will not have diagrams." >&5 +$as_echo "$as_me: WARNING: Graphviz not found - Qt binding doc will not have diagrams." >&2;} + fi + fi +fi + if test -n "$DOXYGEN"; then + HAVE_DOXYGEN_TRUE= + HAVE_DOXYGEN_FALSE='#' +else + HAVE_DOXYGEN_TRUE='#' + HAVE_DOXYGEN_FALSE= +fi + +if test -n "$GRAPHVIZ"; then + HAVE_DOT="YES" +else + HAVE_DOT="NO" +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 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + +found_py=$found +if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then + + # Ubuntu has swig 2.0 as /usr/bin/swig2.0 + for ac_prog in swig swig2.0 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_SWIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $SWIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SWIG="$SWIG" # 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_SWIG="$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 +SWIG=$ac_cv_path_SWIG +if test -n "$SWIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 +$as_echo "$SWIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$SWIG" && break +done + + if test -z "$SWIG" ; then + : + elif test -n "" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5 +$as_echo_n "checking SWIG version... " >&6; } + swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5 +$as_echo "$swig_version" >&6; } + if test -n "$swig_version" ; then + # Calculate the required version number components + required= + required_major=`echo $required | sed 's/[^0-9].*//'` + if test -z "$required_major" ; then + required_major=0 + fi + required=`echo $required | sed 's/[0-9]*[^0-9]//'` + required_minor=`echo $required | sed 's/[^0-9].*//'` + if test -z "$required_minor" ; then + required_minor=0 + fi + required=`echo $required | sed 's/[0-9]*[^0-9]//'` + required_patch=`echo $required | sed 's/[^0-9].*//'` + if test -z "$required_patch" ; then + required_patch=0 + fi + # Calculate the available version number components + available=$swig_version + available_major=`echo $available | sed 's/[^0-9].*//'` + if test -z "$available_major" ; then + available_major=0 + fi + available=`echo $available | sed 's/[0-9]*[^0-9]//'` + available_minor=`echo $available | sed 's/[^0-9].*//'` + if test -z "$available_minor" ; then + available_minor=0 + fi + available=`echo $available | sed 's/[0-9]*[^0-9]//'` + available_patch=`echo $available | sed 's/[^0-9].*//'` + if test -z "$available_patch" ; then + available_patch=0 + fi + # Convert the version tuple into a single number for easier comparison. + # Using base 100 should be safe since SWIG internally uses BCD values + # to encode its version number. + required_swig_vernum=`expr $required_major \* 10000 \ + \+ $required_minor \* 100 \+ $required_patch` + available_swig_vernum=`expr $available_major \* 10000 \ + \+ $available_minor \* 100 \+ $available_patch` + + if test $available_swig_vernum -lt $required_swig_vernum; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= is required. You have $swig_version." >&5 +$as_echo "$as_me: WARNING: SWIG version >= is required. You have $swig_version." >&2;} + SWIG='' + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5 +$as_echo_n "checking for SWIG library... " >&6; } + SWIG_LIB=`$SWIG -swiglib` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5 +$as_echo "$SWIG_LIB" >&6; } + + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5 +$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;} + SWIG='' + + fi + fi + + + if test -z "$SWIG"; then + if test "$explicit_languages" = "1"; then + as_fn_error $? " +*** +*** You need SWIG to build the Python bindings. +***" "$LINENO" 5 + else + enabled_languages=$(echo $enabled_languages | sed 's/python//') + fi + else + # Reset all the stuff, just to be sure. + 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 -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 >= 2.7" >&5 +$as_echo_n "checking whether $PYTHON version is >= 2.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, '2.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 >= 2.7" >&5 +$as_echo_n "checking for a Python interpreter with version >= 2.7... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 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, '2.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 + as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 + 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 + + + + fi + + + + # + # 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<>confdefs.h <<_ACEOF +#define HAVE_PYTHON "$ac_python_version" +_ACEOF + + + # First, the library directory: + ac_python_libdir=`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 + + 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 + + + + + + + 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.4" >&5 +$as_echo_n "checking whether $PYTHON version is >= 3.4... " >&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.4'.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.4" >&5 +$as_echo_n "checking for a Python interpreter with version >= 3.4... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 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.4'.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 + as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 + 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 + + + + fi + + + + # + # 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<>confdefs.h <<_ACEOF +#define HAVE_PYTHON "$ac_python_version" +_ACEOF + + + # First, the library directory: + ac_python_libdir=`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 + + if test "$PYTHON_VERSIONS"; then + enabled_languages_v=$(echo $enabled_languages | sed "s/python\([23]\)\?/python ($PYTHON_VERSIONS)/") + enabled_languages=$(echo $enabled_languages | sed "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 + + PYTHON_VERSIONS=$PYTHON_VERSIONS + + fi +fi + +ENABLED_LANGUAGES=$enabled_languages + + +# +# Provide information about the build. +# +BUILD_REVISION="e7ab753" + + +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}59307" + + +# 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 + + + +cat >>confdefs.h <<_ACEOF +#define BUILD_TIMESTAMP "$BUILD_TIMESTAMP" +_ACEOF + + + +# +# Options to disable some regression tests +# +run_gpgconf_test="yes" +# Check whether --enable-gpgconf-test was given. +if test "${enable_gpgconf_test+set}" = set; then : + enableval=$enable_gpgconf_test; run_gpgconf_test=$enableval +fi + + if test "$run_gpgconf_test" = "yes"; then + RUN_GPGCONF_TESTS_TRUE= + RUN_GPGCONF_TESTS_FALSE='#' +else + RUN_GPGCONF_TESTS_TRUE='#' + RUN_GPGCONF_TESTS_FALSE= +fi + + +run_gpg_test="yes" +# Check whether --enable-gpg-test was given. +if test "${enable_gpg_test+set}" = set; then : + enableval=$enable_gpg_test; run_gpg_test=$enableval +fi + + if test "$run_gpg_test" = "yes"; then + RUN_GPG_TESTS_TRUE= + RUN_GPG_TESTS_FALSE='#' +else + RUN_GPG_TESTS_TRUE='#' + RUN_GPG_TESTS_FALSE= +fi + + +run_gpgsm_test="yes" +# Check whether --enable-gpgsm-test was given. +if test "${enable_gpgsm_test+set}" = set; then : + enableval=$enable_gpgsm_test; run_gpgsm_test=$enableval +fi + + if test "$run_gpgsm_test" = "yes"; then + RUN_GPGSM_TESTS_TRUE= + RUN_GPGSM_TESTS_FALSE='#' +else + RUN_GPGSM_TESTS_TRUE='#' + RUN_GPGSM_TESTS_FALSE= +fi + + +run_g13_test="yes" +# Check whether --enable-g13-test was given. +if test "${enable_g13_test+set}" = set; then : + enableval=$enable_g13_test; run_g13_test=$enableval +fi + + if test "$run_g13_test" = "yes"; then + RUN_G13_TESTS_TRUE= + RUN_G13_TESTS_FALSE='#' +else + RUN_G13_TESTS_TRUE='#' + RUN_G13_TESTS_FALSE= +fi + + + +# Checks for header files. + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + +# Type checks. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 +$as_echo_n "checking size of unsigned int... " >&6; } +if ${ac_cv_sizeof_unsigned_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_unsigned_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (unsigned int) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_unsigned_int=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5 +$as_echo "$ac_cv_sizeof_unsigned_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int +_ACEOF + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18090,6 +21131,71 @@ 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" + + # 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 +$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 +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + _gcc_wopt=yes +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 "$_gcc_wopt" >&6; } + 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 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wpointer-arith" >&5 +$as_echo_n "checking if gcc supports -Wpointer-arith... " >&6; } + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wpointer-arith" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + _gcc_wopt=yes +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 "$_gcc_wopt" >&6; } + CFLAGS=$_gcc_cflags_save; + if test x"$_gcc_wopt" = xyes ; then + CFLAGS="$CFLAGS -Wpointer-arith" + fi + fi if test "$have_w32_system" = yes; then CFLAGS="$CFLAGS -mms-bitfields" fi @@ -19163,6 +22269,8 @@ fi GPGME_CONFIG_LIBS="-lgpgme" GPGME_CONFIG_CFLAGS="" GPGME_CONFIG_HOST="$host" +GPGME_CONFIG_AVAIL_LANG="$enabled_languages" + @@ -19200,7 +22308,6 @@ emacs_local_vars_read_only='buffer-read-only: t' emacs_local_vars_end='End:' - # Last check. die=no if test "$have_gpg_error" = "no"; then @@ -19254,8 +22361,34 @@ ac_config_files="$ac_config_files Makefile src/Makefile tests/Makefile tests/gpg 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/src/GpgmeppConfig.cmake.in" + +ac_config_files="$ac_config_files lang/cpp/src/GpgmeppConfigVersion.cmake" + +ac_config_files="$ac_config_files lang/cpp/src/gpgmepp_version.h" + +ac_config_files="$ac_config_files lang/qt/Makefile lang/qt/src/Makefile" + +ac_config_files="$ac_config_files lang/qt/src/QGpgmeConfig.cmake.in" + +ac_config_files="$ac_config_files lang/qt/src/QGpgmeConfigVersion.cmake" + +ac_config_files="$ac_config_files lang/qt/tests/Makefile" + +ac_config_files="$ac_config_files lang/qt/src/qgpgme_version.h" + ac_config_files="$ac_config_files lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd" +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/qt/doc/Makefile" + +ac_config_files="$ac_config_files lang/python/Makefile lang/python/setup.py lang/python/pyme/version.py lang/python/tests/Makefile" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -19429,14 +22562,14 @@ if test -z "${BUILD_W32_GLIB_TRUE}" && test -z "${BUILD_W32_GLIB_FALSE}"; then as_fn_error $? "conditional \"BUILD_W32_GLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${BUILD_W32_QT_TRUE}" && test -z "${BUILD_W32_QT_FALSE}"; then - as_fn_error $? "conditional \"BUILD_W32_QT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_PTHREAD_TRUE}" && test -z "${HAVE_PTHREAD_FALSE}"; then as_fn_error $? "conditional \"HAVE_PTHREAD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${RUN_GPGCONF_TESTS_TRUE}" && test -z "${RUN_GPGCONF_TESTS_FALSE}"; then as_fn_error $? "conditional \"RUN_GPGCONF_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -19858,7 +22991,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.6.0, which was +This file was extended by gpgme $as_me 1.7.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19924,7 +23057,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gpgme config.status 1.6.0 +gpgme config.status 1.7.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20529,9 +23662,26 @@ do "src/versioninfo.rc") CONFIG_FILES="$CONFIG_FILES src/versioninfo.rc" ;; "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/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" ;; + "lang/cpp/src/gpgmepp_version.h") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/gpgmepp_version.h" ;; + "lang/qt/Makefile") CONFIG_FILES="$CONFIG_FILES lang/qt/Makefile" ;; + "lang/qt/src/Makefile") CONFIG_FILES="$CONFIG_FILES lang/qt/src/Makefile" ;; + "lang/qt/src/QGpgmeConfig.cmake.in") CONFIG_FILES="$CONFIG_FILES lang/qt/src/QGpgmeConfig.cmake.in" ;; + "lang/qt/src/QGpgmeConfigVersion.cmake") CONFIG_FILES="$CONFIG_FILES lang/qt/src/QGpgmeConfigVersion.cmake" ;; + "lang/qt/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lang/qt/tests/Makefile" ;; + "lang/qt/src/qgpgme_version.h") CONFIG_FILES="$CONFIG_FILES lang/qt/src/qgpgme_version.h" ;; "lang/Makefile") CONFIG_FILES="$CONFIG_FILES lang/Makefile" ;; "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/qt/doc/Makefile") CONFIG_FILES="$CONFIG_FILES lang/qt/doc/Makefile" ;; + "lang/python/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/Makefile" ;; + "lang/python/setup.py") CONFIG_FILES="$CONFIG_FILES lang/python/setup.py" ;; + "lang/python/pyme/version.py") CONFIG_FILES="$CONFIG_FILES lang/python/pyme/version.py" ;; + "lang/python/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/tests/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -22216,12 +25366,14 @@ fi echo " GPGME v${VERSION} has been configured as follows: - Revision: 107bff7 (4219) - Platform: $host + Revision: e7ab753 (59307) + Platform: $host + + UI Server: $uiserver + FD Passing: $use_descriptor_passing + GPGME Pthread: $have_pthread - UI Server: $uiserver - FD Passing: $use_descriptor_passing - GPGME Pthread: $have_pthread + Language bindings: ${enabled_languages_v:-$enabled_languages} " if test "x${gpg_config_script_warn}" != x; then cat <defsincdate ; \ + if test -e $(top_srcdir)/.git; then \ + (cd $(srcdir) && git log -1 --format='%ct' -- \ + $(info_TEXINFOS) $(gpgme_TEXINFOS) 2>/dev/null) >>defsincdate; \ + fi + +defs.inc: defsincdate Makefile mkdefsinc + incd="`test -f defsincdate || echo '$(srcdir)/'`defsincdate"; \ + ./mkdefsinc -C $(srcdir) --date "`cat $$incd 2>/dev/null`" \ + $(info_TEXINFOS) $(gpgme_TEXINFOS) >$@ + + online: gpgme.html gpgme.pdf set -e; \ echo "Uploading current manuals to www.gnupg.org ..."; \ diff --git a/doc/Makefile.in b/doc/Makefile.in index fc1301b..90fa2b8 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -99,16 +99,18 @@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/build-aux/mkinstalldirs $(gpgme_TEXINFOS) \ - $(top_srcdir)/build-aux/mdate-sh $(srcdir)/version.texi \ - $(srcdir)/stamp-vti $(top_srcdir)/build-aux/texinfo.tex \ - mdate-sh texinfo.tex + $(top_srcdir)/build-aux/texinfo.tex mdate-sh texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glib-2.0.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnupg-ttyname.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4/ax_pkg_swig.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnupg-ttyname.m4 \ $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libassuan.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -220,6 +222,7 @@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -231,12 +234,14 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLED_LANGUAGES = @ENABLED_LANGUAGES@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ @@ -247,15 +252,23 @@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GPGME_CONFIG_API_VERSION = @GPGME_CONFIG_API_VERSION@ +GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ +GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ +GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ +GPGME_QT_LIBS = @GPGME_QT_LIBS@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@ GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@ +GRAPHVIZ = @GRAPHVIZ@ GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ +HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -266,10 +279,16 @@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBGPGMEPP_LT_AGE = @LIBGPGMEPP_LT_AGE@ +LIBGPGMEPP_LT_CURRENT = @LIBGPGMEPP_LT_CURRENT@ +LIBGPGMEPP_LT_REVISION = @LIBGPGMEPP_LT_REVISION@ LIBGPGME_LT_AGE = @LIBGPGME_LT_AGE@ LIBGPGME_LT_CURRENT = @LIBGPGME_LT_CURRENT@ LIBGPGME_LT_REVISION = @LIBGPGME_LT_REVISION@ LIBOBJS = @LIBOBJS@ +LIBQGPGME_LT_AGE = @LIBQGPGME_LT_AGE@ +LIBQGPGME_LT_CURRENT = @LIBQGPGME_LT_CURRENT@ +LIBQGPGME_LT_REVISION = @LIBQGPGME_LT_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -279,6 +298,8 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ NEED__FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -295,14 +316,27 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -QT4_CORE_CFLAGS = @QT4_CORE_CFLAGS@ -QT4_CORE_LIBS = @QT4_CORE_LIBS@ +PYTHON = @PYTHON@ +PYTHONS = @PYTHONS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_VERSIONS = @PYTHON_VERSIONS@ +QTCHOOSER = @QTCHOOSER@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_LIB = @SWIG_LIB@ SYSROOT = @SYSROOT@ VERSION = @VERSION@ VERSION_NUMBER = @VERSION_NUMBER@ @@ -351,9 +385,13 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -363,10 +401,15 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DISTCLEANFILES = gpgme.tmp -EXTRA_DIST = module-overview.sk HACKING DCO ChangeLog-2011 +CLEANFILES = mkdefsinc defs.inc +EXTRA_DIST = module-overview.sk HACKING DCO ChangeLog-2011 \ + mkdefsinc.c defsincdate + +BUILT_SOURCES = defsincdate defs.inc info_TEXINFOS = gpgme.texi gpgme_TEXINFOS = uiserver.texi lesser.texi gpl.texi -all: all-am +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi @@ -450,29 +493,10 @@ clean-libtool: else \ rm -rf $(@:.html=.htp); exit 1; \ fi -$(srcdir)/gpgme.info: gpgme.texi $(srcdir)/version.texi $(gpgme_TEXINFOS) -gpgme.dvi: gpgme.texi $(srcdir)/version.texi $(gpgme_TEXINFOS) -gpgme.pdf: gpgme.texi $(srcdir)/version.texi $(gpgme_TEXINFOS) -gpgme.html: gpgme.texi $(srcdir)/version.texi $(gpgme_TEXINFOS) -$(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti -$(srcdir)/stamp-vti: gpgme.texi $(top_srcdir)/configure - @(dir=.; test -f ./gpgme.texi || dir=$(srcdir); \ - set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/gpgme.texi`; \ - echo "@set UPDATED $$1 $$2 $$3"; \ - echo "@set UPDATED-MONTH $$2 $$3"; \ - echo "@set EDITION $(VERSION)"; \ - echo "@set VERSION $(VERSION)") > vti.tmp - @cmp -s vti.tmp $(srcdir)/version.texi \ - || (echo "Updating $(srcdir)/version.texi"; \ - cp vti.tmp $(srcdir)/version.texi) - -@rm -f vti.tmp - @cp $(srcdir)/version.texi $@ - -mostlyclean-vti: - -rm -f vti.tmp - -maintainer-clean-vti: -@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi +$(srcdir)/gpgme.info: gpgme.texi $(gpgme_TEXINFOS) +gpgme.dvi: gpgme.texi $(gpgme_TEXINFOS) +gpgme.pdf: gpgme.texi $(gpgme_TEXINFOS) +gpgme.html: gpgme.texi $(gpgme_TEXINFOS) .dvi.ps: $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) $(AM_V_texinfo) -o $@ $< @@ -605,15 +629,17 @@ distdir: $(DISTFILES) done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-info + dist-info dist-hook check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(INFO_DEPS) installdirs: for dir in "$(DESTDIR)$(infodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -635,6 +661,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -644,6 +671,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am @@ -786,12 +814,12 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ - maintainer-clean-generic maintainer-clean-vti + maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ - mostlyclean-libtool mostlyclean-vti + mostlyclean-libtool pdf: pdf-am @@ -804,25 +832,44 @@ ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am -.MAKE: install-am install-strip +.MAKE: all check install install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ - clean-libtool cscopelist-am ctags-am dist-info distclean \ - distclean-generic distclean-libtool distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-aminfo maintainer-clean-generic \ - maintainer-clean-vti mostlyclean mostlyclean-aminfo \ - mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \ + clean-libtool cscopelist-am ctags-am dist-hook dist-info \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ + mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am +gpgme.texi : defs.inc + +mkdefsinc: mkdefsinc.c Makefile ../config.h + $(CC_FOR_BUILD) -I. -I.. -I$(srcdir) $(AM_CPPFLAGS) \ + -o $@ $(srcdir)/mkdefsinc.c + +dist-hook: defsincdate + +defsincdate: $(gpgme_TEXINFOS) + : >defsincdate ; \ + if test -e $(top_srcdir)/.git; then \ + (cd $(srcdir) && git log -1 --format='%ct' -- \ + $(info_TEXINFOS) $(gpgme_TEXINFOS) 2>/dev/null) >>defsincdate; \ + fi + +defs.inc: defsincdate Makefile mkdefsinc + incd="`test -f defsincdate || echo '$(srcdir)/'`defsincdate"; \ + ./mkdefsinc -C $(srcdir) --date "`cat $$incd 2>/dev/null`" \ + $(info_TEXINFOS) $(gpgme_TEXINFOS) >$@ + online: gpgme.html gpgme.pdf set -e; \ echo "Uploading current manuals to www.gnupg.org ..."; \ diff --git a/doc/defsincdate b/doc/defsincdate new file mode 100644 index 0000000..0df13bf --- /dev/null +++ b/doc/defsincdate @@ -0,0 +1 @@ +1440576360 diff --git a/doc/gpgme.info b/doc/gpgme.info index 793c20b..2702f0a 100644 --- a/doc/gpgme.info +++ b/doc/gpgme.info @@ -1,7 +1,6 @@ This is gpgme.info, produced by makeinfo version 5.2 from gpgme.texi. -Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, -2014 g10 Code GmbH. +Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -20,11 +19,10 @@ END-INFO-DIR-ENTRY This file documents the GPGME library. - This is Edition 1.6.0, last updated 26 August 2015, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.6.0. + This is Edition 1.7.0-beta361, last updated 26 August 2015, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.7.0-beta361. - Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, -2013, 2014 g10 Code GmbH. + Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -39,123 +37,128 @@ Public License for more details.  Indirect: -gpgme.info-1: 1738 -gpgme.info-2: 302237 +gpgme.info-1: 1686 +gpgme.info-2: 304664  Tag Table: (Indirect) -Node: Top1738 -Node: Introduction8990 -Node: Getting Started9780 -Node: Features10905 -Node: Overview12061 -Node: Preparation13170 -Node: Header14167 -Node: Building the Source14914 -Node: Largefile Support (LFS)17087 -Node: Using Automake22501 -Node: Using Libtool24947 -Node: Library Version Check25309 -Node: Signal Handling30403 -Node: Multi Threading31673 -Ref: Multi Threading-Footnote-133907 -Node: Protocols and Engines34330 -Node: Engine Version Check36819 -Node: Engine Information38445 -Node: Engine Configuration42305 -Node: OpenPGP43589 -Node: Cryptographic Message Syntax43929 -Node: Algorithms44227 -Ref: Algorithms-Footnote-144706 -Node: Public Key Algorithms44834 -Node: Hash Algorithms46811 -Node: Error Handling48001 -Node: Error Values49875 -Node: Error Sources55078 -Node: Error Codes57518 -Node: Error Strings62309 -Node: Exchanging Data64116 -Node: Creating Data Buffers65982 -Node: Memory Based Data Buffers66498 -Node: File Based Data Buffers69931 -Node: Callback Based Data Buffers72133 -Node: Destroying Data Buffers77820 -Node: Manipulating Data Buffers79211 -Node: Data Buffer I/O Operations79703 -Node: Data Buffer Meta-Data82430 -Node: Data Buffer Convenience85898 -Node: Contexts87875 -Node: Creating Contexts89061 -Node: Destroying Contexts89908 -Node: Result Management90247 -Node: Context Attributes91676 -Node: Protocol Selection92582 -Node: Crypto Engine93614 -Node: ASCII Armor95457 -Node: Text Mode96081 -Node: Offline Mode97015 -Node: Included Certificates98095 -Node: Key Listing Mode99516 -Node: Passphrase Callback103390 -Node: Progress Meter Callback106602 -Node: Status Message Callback108585 -Node: Locale110305 -Node: Key Management111864 -Node: Listing Keys122757 -Node: Information About Keys130183 -Node: Key Signatures138514 -Node: Manipulating Keys142650 -Node: Generating Keys143510 -Node: Exporting Keys148234 -Node: Importing Keys154934 -Ref: Importing Keys-Footnote-1162371 -Node: Deleting Keys162499 -Node: Changing Passphrases163944 -Node: Advanced Key Editing165233 -Node: Trust Item Management168415 -Node: Listing Trust Items169527 -Node: Information About Trust Items171893 -Node: Manipulating Trust Items173822 -Node: Crypto Operations174801 -Node: Decrypt176065 -Node: Verify179935 -Node: Decrypt and Verify198312 -Node: Sign200380 -Node: Selecting Signers200944 -Node: Creating a Signature202116 -Node: Signature Notation Data206886 -Node: Encrypt209114 -Node: Encrypting a Plaintext209470 -Node: Miscellaneous216144 -Node: Running other Programs216432 -Node: Run Control218456 -Node: Waiting For Completion219200 -Node: Using External Event Loops221318 -Node: I/O Callback Interface223290 -Node: Registering I/O Callbacks228528 -Node: I/O Callback Example230566 -Node: I/O Callback Example GTK+236783 -Node: I/O Callback Example GDK238572 -Node: I/O Callback Example Qt240214 -Node: Cancellation242502 -Node: UI Server Protocol244795 -Ref: UI Server Protocol-Footnote-1246230 -Node: UI Server Encrypt246349 -Node: UI Server Sign251494 -Node: UI Server Decrypt253847 -Node: UI Server Verify255313 -Node: UI Server Set Input Files258885 -Node: UI Server Sign/Encrypt Files259955 -Node: UI Server Verify/Decrypt Files261763 -Node: UI Server Import/Export Keys263639 -Node: UI Server Checksum Files264701 -Node: Miscellaneous UI Server Commands266917 -Ref: command SENDER268848 -Node: Debugging270550 -Node: Library Copying272294 -Node: Copying302237 -Node: Concept Index339983 -Node: Function and Data Index354540 +Node: Top1686 +Node: Introduction9093 +Node: Getting Started9883 +Node: Features11344 +Node: Overview12656 +Node: Preparation13765 +Node: Header14762 +Node: Building the Source15509 +Node: Largefile Support (LFS)17919 +Node: Using Automake23333 +Node: Using Libtool25779 +Node: Library Version Check26141 +Node: Signal Handling32153 +Node: Multi Threading33423 +Ref: Multi Threading-Footnote-135657 +Node: Protocols and Engines36080 +Node: Engine Version Check38725 +Node: Engine Information41142 +Node: Engine Configuration45002 +Node: OpenPGP46286 +Node: Cryptographic Message Syntax46626 +Node: Assuan46939 +Node: Algorithms47313 +Ref: Algorithms-Footnote-147792 +Node: Public Key Algorithms47920 +Node: Hash Algorithms50407 +Node: Error Handling51597 +Node: Error Values53471 +Node: Error Sources58674 +Node: Error Codes61114 +Node: Error Strings65905 +Node: Exchanging Data67712 +Node: Creating Data Buffers69578 +Node: Memory Based Data Buffers70094 +Node: File Based Data Buffers73527 +Node: Callback Based Data Buffers75729 +Node: Destroying Data Buffers79920 +Node: Manipulating Data Buffers81408 +Node: Data Buffer I/O Operations81900 +Node: Data Buffer Meta-Data84273 +Node: Data Buffer Convenience88639 +Node: Contexts90616 +Node: Creating Contexts91802 +Node: Destroying Contexts92649 +Node: Result Management92988 +Node: Context Attributes94417 +Node: Protocol Selection95385 +Node: Crypto Engine96417 +Node: ASCII Armor98260 +Node: Text Mode98884 +Node: Offline Mode99818 +Node: Pinentry Mode100890 +Node: Included Certificates102575 +Node: Key Listing Mode103997 +Node: Passphrase Callback108089 +Node: Progress Meter Callback111474 +Node: Status Message Callback113459 +Node: Locale116077 +Node: Key Management117636 +Node: Key objects118864 +Node: Listing Keys129864 +Node: Information About Keys137310 +Node: Manipulating Keys138618 +Node: Generating Keys139188 +Node: Signing Keys154662 +Node: Exporting Keys158260 +Node: Importing Keys164953 +Ref: Importing Keys-Footnote-1171858 +Node: Deleting Keys171986 +Node: Changing Passphrases173431 +Node: Changing TOFU Data174720 +Node: Advanced Key Editing176771 +Node: Trust Item Management179420 +Node: Listing Trust Items180456 +Node: Manipulating Trust Items182817 +Node: Crypto Operations183460 +Node: Decrypt184724 +Node: Verify188594 +Node: Decrypt and Verify200554 +Node: Sign202622 +Node: Selecting Signers203186 +Node: Creating a Signature204573 +Node: Signature Notation Data209343 +Node: Encrypt211571 +Node: Encrypting a Plaintext211927 +Node: Miscellaneous218890 +Node: Running other Programs219236 +Node: Using the Assuan protocol221312 +Node: Run Control224005 +Node: Waiting For Completion224749 +Node: Using External Event Loops226867 +Node: I/O Callback Interface228839 +Node: Registering I/O Callbacks234077 +Node: I/O Callback Example236115 +Node: I/O Callback Example GTK+242332 +Node: I/O Callback Example GDK244121 +Node: I/O Callback Example Qt245763 +Node: Cancellation248051 +Node: UI Server Protocol250315 +Ref: UI Server Protocol-Footnote-1251750 +Node: UI Server Encrypt251869 +Node: UI Server Sign257014 +Node: UI Server Decrypt259367 +Node: UI Server Verify260833 +Node: UI Server Set Input Files264405 +Node: UI Server Sign/Encrypt Files265475 +Node: UI Server Verify/Decrypt Files267283 +Node: UI Server Import/Export Keys269159 +Node: UI Server Checksum Files270221 +Node: Miscellaneous UI Server Commands272437 +Ref: command SENDER274368 +Node: Debugging276070 +Node: Deprecated Functions277819 +Node: Library Copying304664 +Node: Copying332880 +Node: Concept Index370626 +Node: Function and Data Index385186  End Tag Table diff --git a/doc/gpgme.info-1 b/doc/gpgme.info-1 index 26184d8..839678b 100644 --- a/doc/gpgme.info-1 +++ b/doc/gpgme.info-1 @@ -1,7 +1,6 @@ This is gpgme.info, produced by makeinfo version 5.2 from gpgme.texi. -Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, -2014 g10 Code GmbH. +Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -20,11 +19,10 @@ END-INFO-DIR-ENTRY This file documents the GPGME library. - This is Edition 1.6.0, last updated 26 August 2015, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.6.0. + This is Edition 1.7.0-beta361, last updated 26 August 2015, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.7.0-beta361. - Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, -2013, 2014 g10 Code GmbH. + Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -43,8 +41,9 @@ File: gpgme.info, Node: Top, Next: Introduction, Up: (dir) Main Menu ********* -This is Edition 1.6.0, last updated 26 August 2015, of ‘The ‘GnuPG Made -Easy’ Reference Manual’, for Version 1.6.0 of the GPGME library. +This is Edition 1.7.0-beta361, last updated 26 August 2015, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.7.0-beta361 of the +GPGME library. * Menu: @@ -60,6 +59,7 @@ Appendices * UI Server Protocol:: The GnuPG UI Server Protocol. * Debugging:: How to solve problems. +* Deprecated Functions:: Documentation of deprecated functions. * Library Copying:: The GNU Lesser General Public License says how you can copy and share ‘GnuPG Made Easy’. @@ -156,21 +156,22 @@ Context Attributes Key Management +* Key objects:: Description of the key structures. * Listing Keys:: Browsing the list of available keys. * Information About Keys:: Requesting detailed information about keys. -* Key Signatures:: Listing the signatures on a key. * Manipulating Keys:: Operations on keys. * Generating Keys:: Creating new key pairs. +* Signing Keys:: Adding key signatures to public keys. * Exporting Keys:: Retrieving key data from the key ring. * Importing Keys:: Adding keys to the key ring. * Deleting Keys:: Removing keys from the key ring. * Changing Passphrases:: Change the passphrase of a key. +* Changing TOFU Data:: Changing data pertaining to TOFU. * Advanced Key Editing:: Advanced key edit operation. Trust Item Management * Listing Trust Items:: Browsing the list of available trust items. -* Information About Trust Items:: Requesting information about trust items. * Manipulating Trust Items:: Operations on trust items. Crypto Operations @@ -256,6 +257,12 @@ library. Experienced programmers might want to start looking at the examples at the end of the manual, and then only read up those parts of the interface which are unclear. + The documentation for the language bindings is currently not included +in this manual. Those languages bindings follow the general programming +model of GPGME but may provide some extra high level abstraction on top +of the GPGME style API. For now please see the README files in the +‘lang/’ directory of the source distribution. +  File: gpgme.info, Node: Features, Next: Overview, Prev: Getting Started, Up: Introduction @@ -284,6 +291,10 @@ it’s easy GPGME has been added to a program, it is easy to add support for other crypto protocols once GPGME backends provide them. +it’s language friendly + GPGME comes with languages bindings for several common programming + languages: Common Lisp, C++, Python 2, and Python 3. +  File: gpgme.info, Node: Overview, Prev: Features, Up: Introduction @@ -401,6 +412,15 @@ must specify the ‘--thread’ option before any other option to select the thread package you want to link with. Supported thread packages are ‘--thread=pth’ and ‘--thread=pthread’. + If you need to detect the installed language bindings you can use +list them using: + + gpgme-config --print-lang + + or test for the availability using + + gpgme-config --have-lang=python && echo 'Bindings for Pythons available' +  File: gpgme.info, Node: Largefile Support (LFS), Next: Using Automake, Prev: Building the Source, Up: Preparation @@ -616,12 +636,12 @@ File: gpgme.info, Node: Library Version Check, Next: Signal Handling, Prev: U called as early as possible — even before ‘gpgme_check_version’. The features are identified by the following values for NAME: - ‘"debug"’ + ‘debug’ To enable debugging use the string “debug” for NAME and VALUE identical to the value used with the environment variable ‘GPGME_DEBUG’. - ‘"disable-gpgconf"’ + ‘disable-gpgconf’ Using this feature with any VALUE disables the detection of the gpgconf program and thus forces GPGME to fallback into the simple OpenPGP only mode. It may be used to force the use of @@ -629,8 +649,8 @@ File: gpgme.info, Node: Library Version Check, Next: Signal Handling, Prev: U Note that in general the use of ‘gpgme_set_engine_info’ is a better way to select a specific engine version. - ‘"gpgconf-name"’ - ‘"gpg-name"’ + ‘gpgconf-name’ + ‘gpg-name’ Set the name of the gpgconf respective gpg binary. The defaults are ‘GNU/GnuPG/gpgconf’ and ‘GNU/GnuPG/gpg’. Under Unix the leading directory part is ignored. Under Windows the @@ -638,6 +658,23 @@ File: gpgme.info, Node: Library Version Check, Next: Signal Handling, Prev: U directory; the ‘.exe’ suffix is added by GPGME. Use forward slashed even under Windows. + ‘require-gnupg’ + Set the mimimum version of the required GnuPG engine. If that + version is not met, GPGME fails early instead of trying to use + the existant version. The given version must be a string with + major, minor, and micro number. Example: "2.1.0". + + ‘w32-inst-dir’ + On Windows GPGME needs to know its installation directory to + find its spawn helper. This is in general no problem because + a DLL has this information. Some applications however link + statically to GPGME and thus GPGME can only figure out the + installation directory of this application which may be wrong + in certain cases. By supplying an installation directory as + value to this flag, GPGME will assume that that directory is + the installation directory. This flag has no effect on + non-Windows platforms. + This function returns ‘0’ on success. In contrast to other functions the non-zero return value on failure does not convey any error code. For setting “debug” the only possible error cause is @@ -775,10 +812,13 @@ further interfaces. ‘GPGME_PROTOCOL_CMS’ This specifies the Cryptographic Message Syntax. - ‘GPGME_PROTOCOL_ASSUAN’ + ‘GPGME_PROTOCOL_GPGCONF’ Under development. Please ask on for help. + ‘GPGME_PROTOCOL_ASSUAN’ + This specifies the raw Assuan protocol. + ‘GPGME_PROTOCOL_G13’ Under development. Please ask on for help. @@ -809,6 +849,7 @@ further interfaces. * Engine Configuration:: Changing the engine configuration. * OpenPGP:: Support for the OpenPGP protocol. * Cryptographic Message Syntax:: Support for the CMS. +* Assuan:: Support for the raw Assuan protocol.  File: gpgme.info, Node: Engine Version Check, Next: Engine Information, Up: Protocols and Engines @@ -826,9 +867,36 @@ File: gpgme.info, Node: Engine Version Check, Next: Engine Information, Up: P ‘homedir’ Return the default home directory. + ‘sysconfdir’ + Return the name of the system configuration directory + + ‘bindir’ + Return the name of the directory with GnuPG program files. + + ‘libdir’ + Return the name of the directory with GnuPG related library + files. + + ‘libexecdir’ + Return the name of the directory with GnuPG helper program + files. + + ‘datadir’ + Return the name of the directory with GnuPG shared data. + + ‘localedir’ + Return the name of the directory with GnuPG locale data. + ‘agent-socket’ Return the name of the socket to connect to the gpg-agent. + ‘agent-ssh-socket’ + Return the name of the socket to connect to the ssh-agent + component of gpg-agent. + + ‘dirmngr-socket’ + Return the name of the socket to connect to the dirmngr. + ‘uiserver-socket’ Return the name of the socket to connect to the user interface server. @@ -989,7 +1057,7 @@ first protocol that was supported by GPGME. The OpenPGP protocol is specified by ‘GPGME_PROTOCOL_OpenPGP’.  -File: gpgme.info, Node: Cryptographic Message Syntax, Prev: OpenPGP, Up: Protocols and Engines +File: gpgme.info, Node: Cryptographic Message Syntax, Next: Assuan, Prev: OpenPGP, Up: Protocols and Engines 3.5 Cryptographic Message Syntax ================================ @@ -999,6 +1067,18 @@ CMS is implemented by GpgSM, the S/MIME implementation for GnuPG. The CMS protocol is specified by ‘GPGME_PROTOCOL_CMS’.  +File: gpgme.info, Node: Assuan, Prev: Cryptographic Message Syntax, Up: Protocols and Engines + +3.6 Assuan +========== + +Assuan is the RPC library used by the various GnuPG components. The +Assuan protocol allows one to talk to arbitrary Assuan servers using +GPGME. *Note Using the Assuan protocol::. + + The ASSUAN protocol is specified by ‘GPGME_PROTOCOL_ASSUAN’. + + File: gpgme.info, Node: Algorithms, Next: Error Handling, Prev: Protocols and Engines, Up: Top 4 Algorithms @@ -1065,6 +1145,9 @@ verification of signatures. This value indicates ECDH, the Eliptic Curve Diffie-Hellmann encryption algorithm as defined by RFC-6637. + ‘GPGME_PK_EDDSA’ + This value indicates the EdDSA algorithm. + -- Function: const char * gpgme_pubkey_algo_name (gpgme_pubkey_algo_t ALGO) The function ‘gpgme_pubkey_algo_name’ returns a pointer to a @@ -1074,6 +1157,13 @@ verification of signatures. If ALGO is not a valid public key algorithm, ‘NULL’ is returned. + -- Function: char * gpgme_pubkey_algo_string (gpgme_subkey_t KEY) + The function ‘gpgme_pubkey_algo_string’ is a convenience function + to build and return an algorithm string in the same way GnuPG does + (e.g. “rsa2048” or “ed25519”). The caller must free the result + using ‘gpgme_free’. On error (e.g. invalid argument or memory + exhausted), the function returns NULL and sets ‘ERRNO’. +  File: gpgme.info, Node: Hash Algorithms, Prev: Public Key Algorithms, Up: Algorithms @@ -1764,33 +1854,6 @@ yourself and create a data object from these callback functions. object was successfully created, and ‘GPG_ERR_ENOMEM’ if not enough memory is available. - The following interface is deprecated and only provided for backward -compatibility. Don’t use it. It will be removed in a future version of -GPGME. - - -- Function: gpgme_error_t gpgme_data_new_with_read_cb - (gpgme_data_t *DH, int (*READFUNC) (void *HOOK, char *BUFFER, - size_t COUNT, size_t *NREAD), void *HOOK_VALUE) - The function ‘gpgme_data_new_with_read_cb’ creates a new - ‘gpgme_data_t’ object and uses the callback function READFUNC to - retrieve the data on demand. As the callback function can supply - the data in any way it wants, this is the most flexible data type - GPGME provides. However, it can not be used to write data. - - The callback function receives HOOK_VALUE as its first argument - whenever it is invoked. It should return up to COUNT bytes in - BUFFER, and return the number of bytes actually read in NREAD. It - may return ‘0’ in NREAD if no data is currently available. To - indicate ‘EOF’ the function should return with an error code of - ‘-1’ and set NREAD to ‘0’. The callback function may support to - reset its internal read pointer if it is invoked with BUFFER and - NREAD being ‘NULL’ and COUNT being ‘0’. - - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the data - object was successfully created, ‘GPG_ERR_INV_VALUE’ if DH or - READFUNC is not a valid pointer, and ‘GPG_ERR_ENOMEM’ if not enough - memory is available. -  File: gpgme.info, Node: Destroying Data Buffers, Next: Manipulating Data Buffers, Prev: Creating Data Buffers, Up: Exchanging Data @@ -1818,9 +1881,10 @@ File: gpgme.info, Node: Destroying Data Buffers, Next: Manipulating Data Buffe -- Function: void gpgme_free (void *BUFFER) The function ‘gpgme_free’ releases the memory returned by - ‘gpgme_data_release_and_get_mem’. It should be used instead of the - system libraries ‘free’ function in case different allocators are - used in a single program. + ‘gpgme_data_release_and_get_mem’ and ‘gpgme_pubkey_algo_string’. + It should be used instead of the system libraries ‘free’ function + in case different allocators are used by a program. This is often + the case if gpgme is used under Windows as a DLL.  File: gpgme.info, Node: Manipulating Data Buffers, Prev: Destroying Data Buffers, Up: Exchanging Data @@ -1894,15 +1958,6 @@ File: gpgme.info, Node: Data Buffer I/O Operations, Next: Data Buffer Meta-Dat If the function fails, -1 is returned and ERRNO is set. - The following function is deprecated and should not be used. It will -be removed in a future version of GPGME. - - -- Function: gpgme_error_t gpgme_data_rewind (gpgme_data_t DH) - The function ‘gpgme_data_rewind’ is equivalent to: - - return (gpgme_data_seek (dh, 0, SEEK_SET) == -1) - ? gpgme_error_from_errno (errno) : 0; -  File: gpgme.info, Node: Data Buffer Meta-Data, Next: Data Buffer Convenience, Prev: Data Buffer I/O Operations, Up: Manipulating Data Buffers @@ -1956,6 +2011,9 @@ File: gpgme.info, Node: Data Buffer Meta-Data, Next: Data Buffer Convenience, This specifies that the data is encoded in an armored form as used by OpenPGP and PEM. + ‘GPGME_DATA_ENCODING_MIME’ + This specifies that the data is encoded as a MIME part. + ‘GPGME_DATA_ENCODING_URL’ The data is a list of linefeed delimited URLs. This is only useful with ‘gpgme_op_import’. @@ -1980,6 +2038,24 @@ File: gpgme.info, Node: Data Buffer Meta-Data, Next: Data Buffer Convenience, The function ‘gpgme_data_set_encoding’ changes the encoding of the data object with the handle DH to ENC. + -- Function: gpgme_error_t gpgme_data_set_flag (gpgme_data_t DH, + const char *NAME, const char *VALUE) + + Some minor properties of the data object can be controlled with + flags set by this function. The properties are identified by the + following values for NAME: + + ‘size-hint’ + The value is a decimal number with the length gpgme shall + assume for this data object. This is useful if the data is + provided by callbacks or via file descriptors but the + applications knows the total size of the data. If this is set + the OpenPGP engine may use this to decide on buffer allocation + strategies and to provide a total value for its progress + information. + + This function returns ‘0’ on success. +  File: gpgme.info, Node: Data Buffer Convenience, Prev: Data Buffer Meta-Data, Up: Manipulating Data Buffers @@ -2126,6 +2202,7 @@ File: gpgme.info, Node: Context Attributes, Next: Key Management, Prev: Resul * ASCII Armor:: Requesting ASCII armored output. * Text Mode:: Choosing canonical text mode. * Offline Mode:: Choosing offline mode. +* Pinentry Mode:: Choosing the pinentry mode. * Included Certificates:: Including a number of certificates. * Key Listing Mode:: Selecting key listing mode. * Passphrase Callback:: Getting the passphrase from the user. @@ -2244,7 +2321,7 @@ File: gpgme.info, Node: Text Mode, Next: Offline Mode, Prev: ASCII Armor, Up is enabled, and ‘0’ if it is not, or if CTX is not a valid pointer.  -File: gpgme.info, Node: Offline Mode, Next: Included Certificates, Prev: Text Mode, Up: Context Attributes +File: gpgme.info, Node: Offline Mode, Next: Pinentry Mode, Prev: Text Mode, Up: Context Attributes 7.4.5 Offline Mode ------------------ @@ -2271,9 +2348,54 @@ File: gpgme.info, Node: Offline Mode, Next: Included Certificates, Prev: Text enabled, and ‘0’ if it is not, or if CTX is not a valid pointer.  -File: gpgme.info, Node: Included Certificates, Next: Key Listing Mode, Prev: Offline Mode, Up: Context Attributes +File: gpgme.info, Node: Pinentry Mode, Next: Included Certificates, Prev: Offline Mode, Up: Context Attributes + +7.4.6 Pinentry Mode +------------------- + + -- Function: gpgme_error_t gpgme_set_pinentry_mode (gpgme_ctx_t CTX, + gpgme_pinentry_mode_t MODE) The function ‘gpgme_set_pinentry_mode’ + specifies the pinentry mode to be used. + + For GnuPG >= 2.1 this option is required to be set to + ‘GPGME_PINENTRY_MODE_LOOPBACK’ to enable the passphrase callback + mechanism in GPGME through ‘gpgme_set_passphrase_cb’. + + -- Function: gpgme_pinentry_mode_t gpgme_get_pinentry_mode + (gpgme_ctx_t CTX) + The function ‘gpgme_get_pinenty_mode’ returns the mode set for the + context. + + -- Data type: enum gpgme_pinentry_mode_t + The ‘gpgme_minentry_mode_t’ type specifies the set of possible + pinentry modes that are supported by GPGME if GnuPG >= 2.1 is used. + The following modes are supported: + + ‘GPGME_PINENTRY_MODE_DEFAULT’ + Use the default of the agent, which is ask. + + ‘GPGME_PINENTRY_MODE_ASK’ + Force the use of the Pinentry. + + ‘GPGME_PINENTRY_MODE_CANCEL’ + Emulate use of Pinentry’s cancel button. + + ‘GPGME_PINENTRY_MODE_ERROR’ + Return a Pinentry error ‘No Pinentry’. + + ‘GPGME_PINENTRY_MODE_LOOPBACK’ + Redirect Pinentry queries to the caller. This enables the use + of ‘gpgme_set_passphrase_cb’ whis pinentry queries redirected + to gpgme. + + Note: This mode requires ‘allow-loopback-pinentry’ to be + enabled in the ‘gpg-agent.conf’ or an agent started with that + option. + + +File: gpgme.info, Node: Included Certificates, Next: Key Listing Mode, Prev: Pinentry Mode, Up: Context Attributes -7.4.6 Included Certificates +7.4.7 Included Certificates --------------------------- -- Function: void gpgme_set_include_certs (gpgme_ctx_t CTX, @@ -2311,7 +2433,7 @@ File: gpgme.info, Node: Included Certificates, Next: Key Listing Mode, Prev:  File: gpgme.info, Node: Key Listing Mode, Next: Passphrase Callback, Prev: Included Certificates, Up: Context Attributes -7.4.7 Key Listing Mode +7.4.8 Key Listing Mode ---------------------- -- Function: gpgme_error_t gpgme_set_keylist_mode (gpgme_ctx_t CTX, @@ -2343,6 +2465,11 @@ File: gpgme.info, Node: Key Listing Mode, Next: Passphrase Callback, Prev: In in the listed keys. This only works if ‘GPGME_KEYLIST_MODE_SIGS’ is also enabled. + ‘GPGME_KEYLIST_MODE_WITH_TOFU’ + The ‘GPGME_KEYLIST_MODE_WITH_TOFU’ symbol specifies that + information pertaining to the TOFU trust model should be + included in the listed keys. + ‘GPGME_KEYLIST_MODE_WITH_SECRET’ The ‘GPGME_KEYLIST_MODE_WITH_SECRET’ returns information about the presence of a corresponding secret key in a public key @@ -2389,7 +2516,7 @@ File: gpgme.info, Node: Key Listing Mode, Next: Passphrase Callback, Prev: In  File: gpgme.info, Node: Passphrase Callback, Next: Progress Meter Callback, Prev: Key Listing Mode, Up: Context Attributes -7.4.8 Passphrase Callback +7.4.9 Passphrase Callback ------------------------- -- Data type: gpgme_error_t (*gpgme_passphrase_cb_t)(void *HOOK, const @@ -2437,6 +2564,10 @@ File: gpgme.info, Node: Passphrase Callback, Next: Progress Meter Callback, P even support an external passphrase callback at all, in this case the error code ‘GPG_ERR_NOT_SUPPORTED’ is returned. + For GnuPG >= 2.1 the pinentry mode has to be set to + ‘GPGME_PINENTRY_MODE_LOOPBACK’ to enable the passphrase callback. + See ‘gpgme_set_pinentry_mode’. + The user can disable the use of a passphrase callback function by calling ‘gpgme_set_passphrase_cb’ with PASSFUNC being ‘NULL’. @@ -2454,8 +2585,8 @@ File: gpgme.info, Node: Passphrase Callback, Next: Progress Meter Callback, P  File: gpgme.info, Node: Progress Meter Callback, Next: Status Message Callback, Prev: Passphrase Callback, Up: Context Attributes -7.4.9 Progress Meter Callback ------------------------------ +7.4.10 Progress Meter Callback +------------------------------ -- Data type: void (*gpgme_progress_cb_t)(void *HOOK, const char *WHAT, int TYPE, int CURRENT, int TOTAL) @@ -2496,7 +2627,7 @@ File: gpgme.info, Node: Progress Meter Callback, Next: Status Message Callback  File: gpgme.info, Node: Status Message Callback, Next: Locale, Prev: Progress Meter Callback, Up: Context Attributes -7.4.10 Status Message Callback +7.4.11 Status Message Callback ------------------------------ -- Data type: gpgme_error_t (*gpgme_status_cb_t)(void *HOOK, const char @@ -2530,10 +2661,31 @@ 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. + -- Function: gpgme_error_t gpgme_set_ctx_flag (gpgme_ctx_t CTX, + const char *NAME, const char *VALUE) + + Some minor properties of the context can be controlled with flags + set by this function. The properties are identified by the + following values for NAME: + + ‘"full-status"’ + Using a VALUE of "1" the status callback set by + gpgme_set_status_cb returns all status lines with the + exception of PROGRESS lines. With the default of "0" the + status callback is only called in certain situations. + + ‘"raw-description"’ + Setting the VALUE to "1" returns human readable strings in a + raw format. For example the non breaking space characters + ("~") will not be removed from the ‘description’ field of the + ‘gpgme_tofu_info_t’ object. + + This function returns ‘0’ on success. +  File: gpgme.info, Node: Locale, Prev: Status Message Callback, Up: Context Attributes -7.4.11 Locale +7.4.12 Locale ------------- A locale setting can be associated with a context. This locale is @@ -2578,13 +2730,123 @@ are specified. This is always done by specifying the respective keys that should be used for the operation. The following section describes how such keys can be selected and manipulated. +* Menu: + +* Key objects:: Description of the key structures. +* Listing Keys:: Browsing the list of available keys. +* Information About Keys:: Requesting detailed information about keys. +* Manipulating Keys:: Operations on keys. +* Generating Keys:: Creating new key pairs. +* Signing Keys:: Adding key signatures to public keys. +* Exporting Keys:: Retrieving key data from the key ring. +* Importing Keys:: Adding keys to the key ring. +* Deleting Keys:: Removing keys from the key ring. +* Changing Passphrases:: Change the passphrase of a key. +* Changing TOFU Data:: Changing data pertaining to TOFU. +* Advanced Key Editing:: Advanced key edit operation. + + +File: gpgme.info, Node: Key objects, Next: Listing Keys, Up: Key Management + +7.5.1 Key objects +----------------- + +The keys are represented in GPGME by structures which may only be read +by the application but never be allocated or changed. They are valid as +long as the key object itself is valid. + + -- Data type: gpgme_key_t + + The ‘gpgme_key_t’ type is a pointer to a key object. It has the + following members: + + ‘gpgme_keylist_mode_t keylist_mode’ + The keylist mode that was active when the key was retrieved. + + ‘unsigned int revoked : 1’ + This is true if the key is revoked. + + ‘unsigned int expired : 1’ + This is true if the key is expired. + + ‘unsigned int disabled : 1’ + This is true if the key is disabled. + + ‘unsigned int invalid : 1’ + This is true if the key is invalid. This might have several + reasons, for a example for the S/MIME backend, it will be set + during key listings if the key could not be validated due to + missing certificates or unmatched policies. + + ‘unsigned int can_encrypt : 1’ + This is true if the key (ie one of its subkeys) can be used + for encryption. + + ‘unsigned int can_sign : 1’ + This is true if the key (ie one of its subkeys) can be used to + create data signatures. + + ‘unsigned int can_certify : 1’ + This is true if the key (ie one of its subkeys) can be used to + create key certificates. + + ‘unsigned int can_authenticate : 1’ + This is true if the key (ie one of its subkeys) can be used + for authentication. + + ‘unsigned int is_qualified : 1’ + This is true if the key can be used for qualified signatures + according to local government regulations. + + ‘unsigned int secret : 1’ + This is true if the key is a secret key. Note, that this will + always be true even if the corresponding subkey flag may be + false (offline/stub keys). This is only set if a listing of + secret keys has been requested or if + ‘GPGME_KEYLIST_MODE_WITH_SECRET’ is active. + + ‘gpgme_protocol_t protocol’ + This is the protocol supported by this key. + + ‘char *issuer_serial’ + If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the issuer + serial. + + ‘char *issuer_name’ + If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the issuer + name. + + ‘char *chain_id’ + If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the chain + ID, which can be used to built the certificate chain. + + ‘gpgme_validity_t owner_trust’ + If ‘protocol’ is ‘GPGME_PROTOCOL_OpenPGP’, then this is the + owner trust. + + ‘gpgme_subkey_t subkeys’ + This is a linked list with the subkeys of the key. The first + subkey in the list is the primary key and usually available. + + ‘gpgme_user_id_t uids’ + This is a linked list with the user IDs of the key. The first + user ID in the list is the main (or primary) user ID. + + ‘char *fpr’ + This field gives the fingerprint of the primary key. Note + that this is a copy of the fingerprint of the first subkey. + For an incomplete key (for example from a verification result) + a subkey may be missing but this field may be set + nevertheless. + -- Data type: gpgme_subkey_t - The ‘gpgme_subkey_t’ type is a pointer to a subkey structure. Sub - keys are one component of a ‘gpgme_key_t’ object. In fact, subkeys - are those parts that contains the real information about the - individual cryptographic keys that belong to the same key object. - One ‘gpgme_key_t’ can contain several subkeys. The first subkey in - the linked list is also called the primary key. + + The ‘gpgme_subkey_t’ type is a pointer to a subkey structure. + Subkeys are one component of a ‘gpgme_key_t’ object. In fact, + subkeys are those parts that contains the real information about + the individual cryptographic keys that belong to the same key + object. One ‘gpgme_key_t’ can contain several subkeys. The first + subkey in the linked list is also called the primary key. The subkey structure has the following members: @@ -2642,6 +2904,10 @@ how such keys can be selected and manipulated. This is the fingerprint of the subkey in hexadecimal digits, if available. + ‘char *keygrip’ + The keygrip of the subkey in hex digit form or ‘NULL’ if not + availabale. + ‘long int timestamp’ This is the creation timestamp of the subkey. This is -1 if the timestamp is invalid, and 0 if it is not available. @@ -2657,12 +2923,59 @@ how such keys can be selected and manipulated. The serial number of a smart card holding this key or ‘NULL’. ‘char *curve’ - For ECC algoritms the name of the curve. + For ECC algorithms the name of the curve. + + -- Data type: gpgme_user_id_t + + A user ID is a component of a ‘gpgme_key_t’ object. One key can + have many user IDs. The first one in the list is the main (or + primary) user ID. + + The user ID structure has the following members. + + ‘gpgme_user_id_t next’ + This is a pointer to the next user ID structure in the linked + list, or ‘NULL’ if this is the last element. + + ‘unsigned int revoked : 1’ + This is true if the user ID is revoked. + + ‘unsigned int invalid : 1’ + This is true if the user ID is invalid. + + ‘gpgme_validity_t validity’ + This specifies the validity of the user ID. + + ‘char *uid’ + This is the user ID string. + + ‘char *name’ + This is the name component of ‘uid’, if available. + + ‘char *comment’ + This is the comment component of ‘uid’, if available. + + ‘char *email’ + This is the email component of ‘uid’, if available. + + ‘char *address;’ + The mail address (addr-spec from RFC-5322) of the user ID + string. This is general the same as the ‘email’ part of this + structure but might be slightly different. If no mail address + is available ‘NULL’ is stored. + + ‘gpgme_tofu_info_t tofu’ + If not ‘NULL’ information from the TOFU database pertaining to + this user id. + + ‘gpgme_key_sig_t signatures’ + This is a linked list with the signatures on this user ID. -- Data type: gpgme_key_sig_t + The ‘gpgme_key_sig_t’ type is a pointer to a key signature structure. Key signatures are one component of a ‘gpgme_key_t’ - object, and validate user IDs on the key. + object, and validate user IDs on the key in the OpenPGP protocol. The signatures on a key are only available if the key was retrieved via a listing operation with the ‘GPGME_KEYLIST_MODE_SIGS’ mode @@ -2732,154 +3045,30 @@ how such keys can be selected and manipulated. ‘gpgme_sig_notation_t notations’ This is a linked list with the notation data and policy URLs. - -- Data type: gpgme_user_id_t - A user ID is a component of a ‘gpgme_key_t’ object. One key can - have many user IDs. The first one in the list is the main (or - primary) user ID. + +File: gpgme.info, Node: Listing Keys, Next: Information About Keys, Prev: Key objects, Up: Key Management - The user ID structure has the following members. +7.5.2 Listing Keys +------------------ - ‘gpgme_user_id_t next’ - This is a pointer to the next user ID structure in the linked - list, or ‘NULL’ if this is the last element. + -- Function: gpgme_error_t gpgme_op_keylist_start (gpgme_ctx_t CTX, + const char *PATTERN, int SECRET_ONLY) + The function ‘gpgme_op_keylist_start’ initiates a key listing + operation inside the context CTX. It sets everything up so that + subsequent invocations of ‘gpgme_op_keylist_next’ return the keys + in the list. - ‘unsigned int revoked : 1’ - This is true if the user ID is revoked. + If PATTERN is ‘NULL’, all available keys are returned. Otherwise, + PATTERN contains an engine specific expression that is used to + limit the list to all keys matching the pattern. Note that the + total length of the pattern is restricted to an engine-specific + maximum (a couple of hundred characters are usually accepted). The + pattern should be used to restrict the search to a certain common + name or user, not to list many specific keys at once by listing + their fingerprints or key IDs. - ‘unsigned int invalid : 1’ - This is true if the user ID is invalid. - - ‘gpgme_validity_t validity’ - This specifies the validity of the user ID. - - ‘char *uid’ - This is the user ID string. - - ‘char *name’ - This is the name component of ‘uid’, if available. - - ‘char *comment’ - This is the comment component of ‘uid’, if available. - - ‘char *email’ - This is the email component of ‘uid’, if available. - - ‘gpgme_key_sig_t signatures’ - This is a linked list with the signatures on this user ID. - - -- Data type: gpgme_key_t - The ‘gpgme_key_t’ type is a pointer to a key object. It has the - following members: - - ‘gpgme_keylist_mode_t keylist_mode’ - The keylist mode that was active when the key was retrieved. - - ‘unsigned int revoked : 1’ - This is true if the key is revoked. - - ‘unsigned int expired : 1’ - This is true if the key is expired. - - ‘unsigned int disabled : 1’ - This is true if the key is disabled. - - ‘unsigned int invalid : 1’ - This is true if the key is invalid. This might have several - reasons, for a example for the S/MIME backend, it will be set - in during key listsing if the key could not be validated due - to a missing certificates or unmatched policies. - - ‘unsigned int can_encrypt : 1’ - This is true if the key (ie one of its subkeys) can be used - for encryption. - - ‘unsigned int can_sign : 1’ - This is true if the key (ie one of its subkeys) can be used to - create data signatures. - - ‘unsigned int can_certify : 1’ - This is true if the key (ie one of its subkeys) can be used to - create key certificates. - - ‘unsigned int can_authenticate : 1’ - This is true if the key (ie one of its subkeys) can be used - for authentication. - - ‘unsigned int is_qualified : 1’ - This is true if the key can be used for qualified signatures - according to local government regulations. - - ‘unsigned int secret : 1’ - This is true if the key is a secret key. Note, that this will - always be true even if the corresponding subkey flag may be - false (offline/stub keys). This is only set if a listing of - secret keys has been requested or if - ‘GPGME_KEYLIST_MODE_WITH_SECRET’ is active. - - ‘gpgme_protocol_t protocol’ - This is the protocol supported by this key. - - ‘char *issuer_serial’ - If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the issuer - serial. - - ‘char *issuer_name’ - If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the issuer - name. - - ‘char *chain_id’ - If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the chain - ID, which can be used to built the certificate chain. - - ‘gpgme_validity_t owner_trust’ - If ‘protocol’ is ‘GPGME_PROTOCOL_OpenPGP’, then this is the - owner trust. - - ‘gpgme_subkey_t subkeys’ - This is a linked list with the subkeys of the key. The first - subkey in the list is the primary key and usually available. - - ‘gpgme_user_id_t uids’ - This is a linked list with the user IDs of the key. The first - user ID in the list is the main (or primary) user ID. - -* Menu: - -* Listing Keys:: Browsing the list of available keys. -* Information About Keys:: Requesting detailed information about keys. -* Key Signatures:: Listing the signatures on a key. -* Manipulating Keys:: Operations on keys. -* Generating Keys:: Creating new key pairs. -* Exporting Keys:: Retrieving key data from the key ring. -* Importing Keys:: Adding keys to the key ring. -* Deleting Keys:: Removing keys from the key ring. -* Changing Passphrases:: Change the passphrase of a key. -* Advanced Key Editing:: Advanced key edit operation. - - -File: gpgme.info, Node: Listing Keys, Next: Information About Keys, Up: Key Management - -7.5.1 Listing Keys ------------------- - - -- Function: gpgme_error_t gpgme_op_keylist_start (gpgme_ctx_t CTX, - const char *PATTERN, int SECRET_ONLY) - The function ‘gpgme_op_keylist_start’ initiates a key listing - operation inside the context CTX. It sets everything up so that - subsequent invocations of ‘gpgme_op_keylist_next’ return the keys - in the list. - - If PATTERN is ‘NULL’, all available keys are returned. Otherwise, - PATTERN contains an engine specific expression that is used to - limit the list to all keys matching the pattern. Note that the - total length of the pattern is restricted to an engine-specific - maximum (a couple of hundred characters are usually accepted). The - pattern should be used to restrict the search to a certain common - name or user, not to list many specific keys at once by listing - their fingerprints or key IDs. - - If SECRET_ONLY is not ‘0’, the list is restricted to secret keys - only. + If SECRET_ONLY is not ‘0’, the list is restricted to secret keys + only. The context will be busy until either all keys are received (and ‘gpgme_op_keylist_next’ returns ‘GPG_ERR_EOF’), or @@ -3020,9 +3209,9 @@ the following function can be used to retrieve a single key. operation there was not enough memory available.  -File: gpgme.info, Node: Information About Keys, Next: Key Signatures, Prev: Listing Keys, Up: Key Management +File: gpgme.info, Node: Information About Keys, Next: Manipulating Keys, Prev: Listing Keys, Up: Key Management -7.5.2 Information About Keys +7.5.3 Information About Keys ---------------------------- Please see the beginning of this section for more information about @@ -3056,350 +3245,289 @@ Please see the beginning of this section for more information about The user ID is ultimately valid. The string representation of this validity is “u”. - The following interfaces are deprecated and only provided for -backward compatibility. Don’t use them. They will be removed in a -future version of GPGME. - - -- Data type: gpgme_attr_t - The ‘gpgme_attr_t’ type is used to specify a key or trust item - attribute. The following attributes are defined: + +File: gpgme.info, Node: Manipulating Keys, Next: Generating Keys, Prev: Information About Keys, Up: Key Management - ‘GPGME_ATTR_KEYID’ - This is the key ID of a sub key. It is representable as a - string. +7.5.4 Manipulating Keys +----------------------- - For trust items, the trust item refers to the key with this - ID. + -- Function: void gpgme_key_ref (gpgme_key_t KEY) + The function ‘gpgme_key_ref’ acquires an additional reference for + the key KEY. - ‘GPGME_ATTR_FPR’ - This is the fingerprint of a sub key. It is representable as - a string. + -- Function: void gpgme_key_unref (gpgme_key_t KEY) + The function ‘gpgme_key_unref’ releases a reference for the key + KEY. If this was the last reference, the key will be destroyed and + all resources associated to it will be released. - ‘GPGME_ATTR_ALGO’ - This is the crypto algorithm for which the sub key can be - used. It is representable as a string and as a number. The - numbers correspond to the ‘enum gcry_pk_algos’ values in the - gcrypt library. + +File: gpgme.info, Node: Generating Keys, Next: Signing Keys, Prev: Manipulating Keys, Up: Key Management - ‘GPGME_ATTR_LEN’ - This is the key length of a sub key. It is representable as a - number. +7.5.5 Generating Keys +--------------------- - ‘GPGME_ATTR_CREATED’ - This is the timestamp at creation time of a sub key. It is - representable as a number. +GPGME provides a set of functions to create public key pairs. Most of +these functions require the use of GnuPG 2.1 and later; for older GnuPG +versions the ‘gpgme_op_genkey’ function can be used. Existing code +which wants to update to the new functions or new code which shall +supports older GnuPG versions may try the new functions first and +provide a fallback to the old function if the error code +‘GPG_ERR_NOT_SUPPORTED’ is received. + + -- Function: gpgme_error_t gpgme_op_createkey (gpgme_ctx_t CTX, + const char *USERID, const char *ALGO, unsigned long RESERVED, + unsigned long EXPIRES, gpgme_key_t EXTRAKEY, + unsigned int FLAGS); + + The function ‘gpgme_op_createkey’ generates a new key for the + procotol active in the context CTX. As of now this function does + only work for OpenPGP and requires at least version 2.1.13 of + 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 + 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. + + ALGO specifies the algorithm for the new key (actually a keypair of + public and private key). For a list of supported algorithms, see + the GnuPG manual. If ALGO is ‘NULL’ or the string "default", the + key is generated using the default algorithm of the engine. If the + string "future-default" is used the engine may use an algorithm + which is planned to be the default in a future release of the + engine; however existing implementation of the protocol may not be + able to already handle such future algorithms. For the OpenPGP + protocol, the specification of a default algorithm, without + requesting a non-default usage via FLAGS, triggers the creation of + a primary key plus a secondary key (subkey). + + RESERVED must be set to zero. + + EXPIRES can be set to the number of seconds since Epoch of the + desired expiration date in UTC for the new key. Using 0 does not + set an expiration date. Note that this parameter takes an unsigned + long value and not a ‘time_t’ to avoid problems on systems which + use a signed 32 bit ‘time_t’. Note further that the OpenPGP + protocol uses 32 bit values for timestamps and thus can only encode + dates up to the year 2106. + + EXTRAKEY is currently not used and must be set to ‘NULL’. A future + version of GPGME may use this parameter to create X.509 keys. + + FLAGS can be set to the bit-wise OR of the following flags: + + ‘GPGME_CREATE_SIGN’ + ‘GPGME_CREATE_ENCR’ + ‘GPGME_CREATE_CERT’ + ‘GPGME_CREATE_AUTH’ + Do not create the key with the default capabilities (key + usage) of the requested algorithm but use those explicitly + given by these flags: “signing”, “encryption”, + “certification”, or “authentication”. The allowed + combinations depend on the algorithm. + + If any of these flags are set and a default algorithm has been + selected only one key is created in the case of the OpenPGP + protocol. + + ‘GPGME_CREATE_NOPASSWD’ + Request generation of the key without password protection. + + ‘GPGME_CREATE_SELFSIGNED’ + For an X.509 key do not create a CSR but a self-signed + certificate. This has not yet been implemented. + + ‘GPGME_CREATE_NOSTORE’ + Do not store the created key in the local key database. This + has not yet been implemented. + + ‘GPGME_CREATE_WANTPUB’ + ‘GPGME_CREATE_WANTSEC’ + Return the public or secret key as part of the result + structure. This has not yet been implemented. + + ‘GPGME_CREATE_FORCE’ + The engine does not allow the creation of a key with a user ID + already existing in the local key database. This flag can be + used to override this check. + + After the operation completed successfully, information about the + created key can be retrieved with ‘gpgme_op_genkey_result’. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. + + -- Function: gpgme_error_t gpgme_op_createkey_start (gpgme_ctx_t CTX, + const char *USERID, const char *ALGO, unsigned long RESERVED, + unsigned long EXPIRES, gpgme_key_t EXTRAKEY, + unsigned int FLAGS); + + The function ‘gpgme_op_createkey_start’ initiates a + ‘gpgme_op_createkey’ operation; see there for details. It must be + completed by calling ‘gpgme_wait’ on the context. *Note Waiting + For Completion::. + + -- Function: gpgme_error_t gpgme_op_createsubkey (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *ALGO, unsigned long RESERVED, + unsigned long EXPIRES, unsigned int FLAGS); + + The function ‘gpgme_op_createsubkey’ creates and adds a new subkey + to the primary OpenPGP key given by KEY. The only allowed protocol + in CTX is ‘GPGME_PROTOCOL_OPENPGP’. Subkeys (aka secondary keys) + are a concept in the OpenPGP protocol to bind several keys to a + primary key. As of now this function requires at least version + 2.1.13 of GnuPG. + + KEY specifies the key to operate on. + + ALGO specifies the algorithm for the new subkey. For a list of + supported algorithms, see the GnuPG manual. If ALGO is ‘NULL’ or + the string "default", the subkey is generated using the default + algorithm for an encryption subkey of the engine. If the string + "future-default" is used the engine may use an encryption algorithm + which is planned to be the default in a future release of the + engine; however existing implementation of the protocol may not be + able to already handle such future algorithms. + + RESERVED must be set to zero. + + EXPIRES can be set to the number of seconds since Epoch of the + desired expiration date in UTC for the new subkey. Using 0 does + not set an expiration date. Note that this parameter takes an + unsigned long value and not a ‘time_t’ to avoid problems on systems + which use a signed 32 bit ‘time_t’. Note further that the OpenPGP + protocol uses 32 bit values for timestamps and thus can only encode + dates up to the year 2106. + + FLAGS takes the same values as described above for + ‘gpgme_op_createkey’. + + After the operation completed successfully, information about the + created key can be retrieved with ‘gpgme_op_genkey_result’. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. + + -- Function: gpgme_error_t gpgme_op_createsubkey_start + (gpgme_ctx_t CTX, gpgme_key_t KEY, const char *ALGO, + unsigned long RESERVED, unsigned long EXPIRES, + unsigned int FLAGS); + + The function ‘gpgme_op_createsubkey_start’ initiates a + ‘gpgme_op_createsubkey’ operation; see there for details. It must + be completed by calling ‘gpgme_wait’ on the context. *Note Waiting + For Completion::. + + -- Function: gpgme_error_t gpgme_op_adduid (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned int FLAGS); + + The function ‘gpgme_op_adduid’ adds a new user ID to the OpenPGP + key given by KEY. Adding additional user IDs after key creation is + a feature of the OpenPGP protocol and thus the protocol for the + context CTX must be set to OpenPGP. As of now this function + requires at least version 2.1.13 of GnuPG. + + KEY specifies the key to operate on. + + 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. + + FLAGS are currently not used and must be set to zero. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. + + -- Function: gpgme_error_t gpgme_op_adduid_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned int FLAGS); + + The function ‘gpgme_op_adduid_start’ initiates a ‘gpgme_op_adduid’ + operation; see there for details. It must be completed by calling + ‘gpgme_wait’ on the context. *Note Waiting For Completion::. - ‘GPGME_ATTR_EXPIRE’ - This is the expiration time of a sub key. It is representable - as a number. + -- Function: gpgme_error_t gpgme_op_revuid (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned int FLAGS); - ‘GPGME_ATTR_OTRUST’ - XXX FIXME (also for trust items) + The function ‘gpgme_op_revuid’ revokes a user ID from the OpenPGP + key given by KEY. Revoking user IDs after key creation is a + feature of the OpenPGP protocol and thus the protocol for the + context CTX must be set to OpenPGP. As of now this function + requires at least version 2.1.13 of GnuPG. - ‘GPGME_ATTR_USERID’ - This is a user ID. There can be more than one user IDs in a - GPGME_KEY_T object. The first one (with index 0) is the - primary user ID. The user ID is representable as a number. + KEY specifies the key to operate on. - For trust items, this is the user ID associated with this - trust item. + USERID is the user ID to be revoked from the key. The user ID must + be given verbatim because the engine does an exact and case + sensitive match. Thus the ‘uid’ field from the user ID object + (‘gpgme_user_id_t’) is to be used. This is a required parameter. - ‘GPGME_ATTR_NAME’ - This is the name belonging to a user ID. It is representable - as a string. + FLAGS are currently not used and must be set to zero. - ‘GPGME_ATTR_EMAIL’ - This is the email address belonging to a user ID. It is - representable as a string. + Note that the engine won’t allow to revoke the last valid user ID. + To change a user ID is better to first add the new user ID, then + revoke the old one, and finally publish the key. - ‘GPGME_ATTR_COMMENT’ - This is the comment belonging to a user ID. It is - representable as a string. + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. - ‘GPGME_ATTR_VALIDITY’ - This is the validity belonging to a user ID. It is - representable as a string and as a number. See below for a - list of available validities. + -- Function: gpgme_error_t gpgme_op_revuid_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned int FLAGS); - For trust items, this is the validity that is associated with - this trust item. + The function ‘gpgme_op_revuid_start’ initiates a ‘gpgme_op_revuid’ + operation; see there for details. It must be completed by calling + ‘gpgme_wait’ on the context. *Note Waiting For Completion::. - ‘GPGME_ATTR_UID_REVOKED’ - This specifies if a user ID is revoked. It is representable - as a number, and is ‘1’ if the user ID is revoked, and ‘0’ - otherwise. + -- Function: gpgme_error_t gpgme_op_genkey (gpgme_ctx_t CTX, + const char *PARMS, gpgme_data_t PUBLIC, gpgme_data_t SECRET) - ‘GPGME_ATTR_UID_INVALID’ - This specifies if a user ID is invalid. It is representable - as a number, and is ‘1’ if the user ID is invalid, and ‘0’ - otherwise. + The function ‘gpgme_op_genkey’ generates a new key pair in the + context CTX. The meaning of PUBLIC and SECRET depends on the + crypto backend. - ‘GPGME_ATTR_LEVEL’ - This is the trust level of a trust item. + GPG does not support PUBLIC and SECRET, they should be ‘NULL’. + GnuPG will generate a key pair and add it to the standard key ring. + The fingerprint of the generated key is available with + ‘gpgme_op_genkey_result’. - ‘GPGME_ATTR_TYPE’ - This returns information about the type of key. For the - string function this will eother be "PGP" or "X.509". The - integer function returns 0 for PGP and 1 for X.509. It is - also used for the type of a trust item. + GpgSM requires PUBLIC to be a writable data object. GpgSM will + generate a secret key (which will be stored by ‘gpg-agent’, and + return a certificate request in PUBLIC, which then needs to be + signed by the certification authority and imported before it can be + used. GpgSM does not make the fingerprint available. - ‘GPGME_ATTR_IS_SECRET’ - This specifies if the key is a secret key. It is - representable as a number, and is ‘1’ if the key is revoked, - and ‘0’ otherwise. + The argument PARMS specifies parameters for the key in an XML + string. The details about the format of PARMS are specific to the + crypto engine used by CTX. Here is an example for GnuPG as the + crypto engine (all parameters of OpenPGP key generation are + documented in the GPG manual): - ‘GPGME_ATTR_KEY_REVOKED’ - This specifies if a sub key is revoked. It is representable - as a number, and is ‘1’ if the key is revoked, and ‘0’ - otherwise. + + Key-Type: default + Subkey-Type: default + Name-Real: Joe Tester + Name-Comment: with stupid passphrase + Name-Email: joe@foo.bar + Expire-Date: 0 + Passphrase: abc + - ‘GPGME_ATTR_KEY_INVALID’ - This specifies if a sub key is invalid. It is representable - as a number, and is ‘1’ if the key is invalid, and ‘0’ - otherwise. + Here is an example for GpgSM as the crypto engine (all parameters + of OpenPGP key generation are documented in the GPGSM manual): - ‘GPGME_ATTR_KEY_EXPIRED’ - This specifies if a sub key is expired. It is representable - as a number, and is ‘1’ if the key is expired, and ‘0’ - otherwise. - - ‘GPGME_ATTR_KEY_DISABLED’ - This specifies if a sub key is disabled. It is representable - as a number, and is ‘1’ if the key is disabled, and ‘0’ - otherwise. - - ‘GPGME_ATTR_KEY_CAPS’ - This is a description of the capabilities of a sub key. It is - representable as a string. The string contains the letter “e” - if the key can be used for encryption, “s” if the key can be - used for signatures, and “c” if the key can be used for - certifications. - - ‘GPGME_ATTR_CAN_ENCRYPT’ - This specifies if a sub key can be used for encryption. It is - representable as a number, and is ‘1’ if the sub key can be - used for encryption, and ‘0’ otherwise. - - ‘GPGME_ATTR_CAN_SIGN’ - This specifies if a sub key can be used to create data - signatures. It is representable as a number, and is ‘1’ if - the sub key can be used for signatures, and ‘0’ otherwise. - - ‘GPGME_ATTR_CAN_CERTIFY’ - This specifies if a sub key can be used to create key - certificates. It is representable as a number, and is ‘1’ if - the sub key can be used for certifications, and ‘0’ otherwise. - - ‘GPGME_ATTR_SERIAL’ - The X.509 issuer serial attribute of the key. It is - representable as a string. - - ‘GPGME_ATTR_ISSUE’ - The X.509 issuer name attribute of the key. It is - representable as a string. - - ‘GPGME_ATTR_CHAINID’ - The X.509 chain ID can be used to build the certification - chain. It is representable as a string. - - -- Function: const char * gpgme_key_get_string_attr (gpgme_key_t KEY, - gpgme_attr_t WHAT, const void *RESERVED, int IDX) - The function ‘gpgme_key_get_string_attr’ returns the value of the - string-representable attribute WHAT of key KEY. If the attribute - is an attribute of a sub key or an user ID, IDX specifies the sub - key or user ID of which the attribute value is returned. The - argument RESERVED is reserved for later use and should be ‘NULL’. - - The string returned is only valid as long as the key is valid. - - The function returns ‘0’ if an attribute can’t be returned as a - string, KEY is not a valid pointer, IDX out of range, or RESERVED - not ‘NULL’. - - -- Function: unsigned long gpgme_key_get_ulong_attr (gpgme_key_t KEY, - gpgme_attr_t WHAT, const void *RESERVED, int IDX) - The function ‘gpgme_key_get_ulong_attr’ returns the value of the - number-representable attribute WHAT of key KEY. If the attribute - is an attribute of a sub key or an user ID, IDX specifies the sub - key or user ID of which the attribute value is returned. The - argument RESERVED is reserved for later use and should be ‘NULL’. - - The function returns ‘0’ if the attribute can’t be returned as a - number, KEY is not a valid pointer, IDX out of range, or RESERVED - not ‘NULL’. - - -File: gpgme.info, Node: Key Signatures, Next: Manipulating Keys, Prev: Information About Keys, Up: Key Management - -7.5.3 Key Signatures --------------------- - -The following interfaces are deprecated and only provided for backward -compatibility. Don’t use them. They will be removed in a future -version of GPGME. - - The signatures on a key are only available if the key was retrieved -via a listing operation with the ‘GPGME_KEYLIST_MODE_SIGS’ mode enabled, -because it is expensive to retrieve all signatures of a key. - - So, before using the below interfaces to retrieve the signatures on a -key, you have to make sure that the key was listed with signatures -enabled. One convenient, but blocking, way to do this is to use the -function ‘gpgme_get_key’. - - -- Data type: gpgme_attr_t - The ‘gpgme_attr_t’ type is used to specify a key signature - attribute. The following attributes are defined: - - ‘GPGME_ATTR_KEYID’ - This is the key ID of the key which was used for the - signature. It is representable as a string. - - ‘GPGME_ATTR_ALGO’ - This is the crypto algorithm used to create the signature. It - is representable as a string and as a number. The numbers - correspond to the ‘enum gcry_pk_algos’ values in the gcrypt - library. - - ‘GPGME_ATTR_CREATED’ - This is the timestamp at creation time of the signature. It - is representable as a number. - - ‘GPGME_ATTR_EXPIRE’ - This is the expiration time of the signature. It is - representable as a number. - - ‘GPGME_ATTR_USERID’ - This is the user ID associated with the signing key. The user - ID is representable as a number. - - ‘GPGME_ATTR_NAME’ - This is the name belonging to a user ID. It is representable - as a string. - - ‘GPGME_ATTR_EMAIL’ - This is the email address belonging to a user ID. It is - representable as a string. - - ‘GPGME_ATTR_COMMENT’ - This is the comment belonging to a user ID. It is - representable as a string. - - ‘GPGME_ATTR_KEY_REVOKED’ - This specifies if a key signature is a revocation signature. - It is representable as a number, and is ‘1’ if the key is - revoked, and ‘0’ otherwise. - - ‘GPGME_ATTR_SIG_CLASS’ - This specifies the signature class of a key signature. It is - representable as a number. The meaning is specific to the - crypto engine. - - ‘GPGME_ATTR_SIG_CLASS’ - This specifies the signature class of a key signature. It is - representable as a number. The meaning is specific to the - crypto engine. - - ‘GPGME_ATTR_SIG_STATUS’ - This is the same value as returned by ‘gpgme_get_sig_status’. - - -- Function: const char * gpgme_key_sig_get_string_attr - (gpgme_key_t KEY, int UID_IDX, gpgme_attr_t WHAT, - const void *RESERVED, int IDX) - The function ‘gpgme_key_sig_get_string_attr’ returns the value of - the string-representable attribute WHAT of the signature IDX on the - user ID UID_IDX in the key KEY. The argument RESERVED is reserved - for later use and should be ‘NULL’. - - The string returned is only valid as long as the key is valid. - - The function returns ‘0’ if an attribute can’t be returned as a - string, KEY is not a valid pointer, UID_IDX or IDX out of range, or - RESERVED not ‘NULL’. - - -- Function: unsigned long gpgme_key_sig_get_ulong_attr - (gpgme_key_t KEY, int UID_IDX, gpgme_attr_t WHAT, - const void *RESERVED, int IDX) - The function ‘gpgme_key_sig_get_ulong_attr’ returns the value of - the number-representable attribute WHAT of the signature IDX on the - user ID UID_IDX in the key KEY. The argument RESERVED is reserved - for later use and should be ‘NULL’. - - The function returns ‘0’ if an attribute can’t be returned as a - string, KEY is not a valid pointer, UID_IDX or IDX out of range, or - RESERVED not ‘NULL’. - - -File: gpgme.info, Node: Manipulating Keys, Next: Generating Keys, Prev: Key Signatures, Up: Key Management - -7.5.4 Manipulating Keys ------------------------ - - -- Function: void gpgme_key_ref (gpgme_key_t KEY) - The function ‘gpgme_key_ref’ acquires an additional reference for - the key KEY. - - -- Function: void gpgme_key_unref (gpgme_key_t KEY) - The function ‘gpgme_key_unref’ releases a reference for the key - KEY. If this was the last reference, the key will be destroyed and - all resources associated to it will be released. - - The following interface is deprecated and only provided for backward -compatibility. Don’t use it. It will be removed in a future version of -GPGME. - - -- Function: void gpgme_key_release (gpgme_key_t KEY) - The function ‘gpgme_key_release’ is equivalent to - ‘gpgme_key_unref’. - - -File: gpgme.info, Node: Generating Keys, Next: Exporting Keys, Prev: Manipulating Keys, Up: Key Management - -7.5.5 Generating Keys ---------------------- - - -- Function: gpgme_error_t gpgme_op_genkey (gpgme_ctx_t CTX, - const char *PARMS, gpgme_data_t PUBLIC, gpgme_data_t SECRET) - The function ‘gpgme_op_genkey’ generates a new key pair in the - context CTX. The meaning of PUBLIC and SECRET depends on the - crypto backend. - - GnuPG does not support PUBLIC and SECRET, they should be ‘NULL’. - GnuPG will generate a key pair and add it to the standard key ring. - The fingerprint of the generated key is available with - ‘gpgme_op_genkey_result’. - - GpgSM requires PUBLIC to be a writable data object. GpgSM will - generate a secret key (which will be stored by ‘gpg-agent’, and - return a certificate request in PUBLIC, which then needs to be - signed by the certification authority and imported before it can be - used. GpgSM does not make the fingerprint available. - - The argument PARMS specifies parameters for the key in an XML - string. The details about the format of PARMS are specific to the - crypto engine used by CTX. Here is an example for GnuPG as the - crypto engine (all parameters of OpenPGP key generation are - documented in the GPG manual): - - - Key-Type: default - Subkey-Type: default - Name-Real: Joe Tester - Name-Comment: with stupid passphrase - Name-Email: joe@foo.bar - Expire-Date: 0 - Passphrase: abc - - - Here is an example for GpgSM as the crypto engine (all parameters - of OpenPGP key generation are documented in the GPGSM manual): - - - Key-Type: RSA - Key-Length: 1024 - Name-DN: C=de,O=g10 code,OU=Testlab,CN=Joe 2 Tester - Name-Email: joe@foo.bar - + + Key-Type: RSA + Key-Length: 1024 + Name-DN: C=de,O=g10 code,OU=Testlab,CN=Joe 2 Tester + Name-Email: joe@foo.bar + Strings should be given in UTF-8 encoding. The only format supported for now is “internal”. The content of the @@ -3417,6 +3545,7 @@ File: gpgme.info, Node: Generating Keys, Next: Exporting Keys, Prev: Manipula -- Function: gpgme_error_t gpgme_op_genkey_start (gpgme_ctx_t CTX, const char *PARMS, gpgme_data_t PUBLIC, gpgme_data_t SECRET) + The function ‘gpgme_op_genkey_start’ initiates a ‘gpgme_op_genkey’ operation. It can be completed by calling ‘gpgme_wait’ on the context. *Note Waiting For Completion::. @@ -3427,6 +3556,7 @@ File: gpgme.info, Node: Generating Keys, Next: Exporting Keys, Prev: Manipula PUBLIC or SECRET is not ‘NULL’. -- Data type: gpgme_genkey_result_t + This is a pointer to a structure used to store the result of a ‘gpgme_op_genkey’ operation. After successfully generating a key, you can retrieve the pointer to the result with @@ -3434,21 +3564,33 @@ File: gpgme.info, Node: Generating Keys, Next: Exporting Keys, Prev: Manipula members: ‘unsigned int primary : 1’ - This is a flag that is set to 1 if a primary key was created - and to 0 if not. + This flag is set to 1 if a primary key was created and to 0 if + not. ‘unsigned int sub : 1’ - This is a flag that is set to 1 if a subkey was created and to - 0 if not. + This flag is set to 1 if a subkey was created and to 0 if not. + + ‘unsigned int uid : 1’ + This flag is set to 1 if a user ID was created and to 0 if + not. ‘char *fpr’ This is the fingerprint of the key that was created. If both - a primary and a sub key were generated, the fingerprint of the + a primary and a subkey were generated, the fingerprint of the primary key will be returned. If the crypto engine does not provide the fingerprint, ‘fpr’ will be a null pointer. + ‘gpgme_data_t pubkey’ + This will eventually be used to return the public key. It is + currently not used. + + ‘gpgme_data_t seckey’ + This will eventually be used to return the secret key. It is + currently not used. + -- Function: gpgme_genkey_result_t gpgme_op_genkey_result (gpgme_ctx_t CTX) + The function ‘gpgme_op_genkey_result’ returns a ‘gpgme_genkey_result_t’ pointer to a structure holding the result of a ‘gpgme_op_genkey’ operation. The pointer is only valid if the @@ -3458,9 +3600,86 @@ File: gpgme.info, Node: Generating Keys, Next: Exporting Keys, Prev: Manipula operation is started on the context.  -File: gpgme.info, Node: Exporting Keys, Next: Importing Keys, Prev: Generating Keys, Up: Key Management +File: gpgme.info, Node: Signing Keys, Next: Exporting Keys, Prev: Generating Keys, Up: Key Management + +7.5.6 Signing Keys +------------------ + +Key signatures are a unique concept of the OpenPGP protocol. They can +be used to certify the validity of a key and are used to create the +Web-of-Trust (WoT). Instead of using the ‘gpgme_op_interact’ function +along with a finite state machine, GPGME provides a convenient function +to create key signatures when using modern GnuPG versions. + + -- Function: gpgme_error_t gpgme_op_keysign (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned long EXPIRES, + unsigned int FLAGS); + + The function ‘gpgme_op_keysign’ adds a new key signature to the + public key KEY. This function requires at least version 2.1.12 of + GnuPG. + + CTX is the usual context which describes the protocol to use (which + must be OpenPGP) and has also the list of signer keys to be used + for the signature. The common case is to use the default key for + signing other keys. If another key or more than one key shall be + used for a key signature, ‘gpgme_signers_add’ can be used. *Note + Selecting Signers::. + + KEY specifies the key to operate on. + + USERID selects the user ID or user IDs to be signed. If USERID is + set to ‘NULL’ all valid user IDs are signed. The user ID must be + given verbatim because the engine does an exact and case sensitive + match. Thus the ‘uid’ field from the user ID object + (‘gpgme_user_id_t’) is to be used. To select more than one user ID + put them all into one string separated by linefeeds characters + (‘\n’) and set the flag ‘GPGME_KEYSIGN_LFSEP’. + + EXPIRES can be set to the number of seconds since Epoch of the + desired expiration date in UTC for the new signature. The common + case is to use 0 to not set an expiration date. However, if the + configuration of the engine defines a default expiration for key + signatures, that is still used unless the flag + ‘GPGME_KEYSIGN_NOEXPIRE’ is used. Note that this parameter takes + an unsigned long value and not a ‘time_t’ to avoid problems on + systems which use a signed 32 bit ‘time_t’. Note further that the + OpenPGP protocol uses 32 bit values for timestamps and thus can + only encode dates up to the year 2106. + + FLAGS can be set to the bit-wise OR of the following flags: + + ‘GPGME_KEYSIGN_LOCAL’ + Instead of creating an exportable key signature, create a key + signature which is is marked as non-exportable. + + ‘GPGME_KEYSIGN_LFSEP’ + Although linefeeds are uncommon in user IDs this flag is + required to explicitly declare that USERID may contain several + linefeed separated user IDs. + + ‘GPGME_KEYSIGN_NOEXPIRE’ + Force the creation of a key signature without an expiration + date. This overrides EXPIRE and any local configuration of + the engine. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. + + -- Function: gpgme_error_t gpgme_op_keysign_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned long EXPIRES, + unsigned int FLAGS); + + The function ‘gpgme_op_keysign_start’ initiates a + ‘gpgme_op_keysign’ operation; see there for details. It must be + completed by calling ‘gpgme_wait’ on the context. *Note Waiting + For Completion::. + + +File: gpgme.info, Node: Exporting Keys, Next: Importing Keys, Prev: Signing Keys, Up: Key Management -7.5.6 Exporting Keys +7.5.7 Exporting Keys -------------------- Exporting keys means the same as running ‘gpg’ with the command @@ -3568,10 +3787,10 @@ or-ed together. specified for KEYDATA. The keys to export are taken form the ‘NULL’ terminated array KEYS. - Only keys of the the currently selected protocol of CTX which do - have a fingerprint set are considered for export. Other keys - specified by the KEYS are ignored. In particular OpenPGP keys - retrieved via an external key listing are not included. + Only keys of the currently selected protocol of CTX which do have a + fingerprint set are considered for export. Other keys specified by + the KEYS are ignored. In particular OpenPGP keys retrieved via an + external key listing are not included. MODE is usually 0; other values are described above. @@ -3597,7 +3816,7 @@ or-ed together.  File: gpgme.info, Node: Importing Keys, Next: Deleting Keys, Prev: Exporting Keys, Up: Key Management -7.5.7 Importing Keys +7.5.8 Importing Keys -------------------- Importing keys means the same as running ‘gpg’ with the command @@ -3639,11 +3858,10 @@ Importing keys means the same as running ‘gpg’ with the command which have been retrieved from an external source (i.e. using ‘GPGME_KEYLIST_MODE_EXTERN’). (1) - Only keys of the the currently selected protocol of CTX are - considered for import. Other keys specified by the KEYS are - ignored. As of now all considered keys must have been retrieved - using the same method, that is the used key listing mode must be - identical. + Only keys of the currently selected protocol of CTX are considered + for import. Other keys specified by the KEYS are ignored. As of + now all considered keys must have been retrieved using the same + method, that is the used key listing mode must be identical. After the operation completed successfully, the result can be retrieved with ‘gpgme_op_import_result’. @@ -3720,34 +3938,34 @@ Importing keys means the same as running ‘gpg’ with the command ‘int imported’ The total number of imported keys. - ‘imported_rsa’ + ‘int imported_rsa’ The number of imported RSA keys. - ‘unchanged’ + ‘int unchanged’ The number of unchanged keys. - ‘new_user_ids’ + ‘int new_user_ids’ The number of new user IDs. - ‘new_sub_keys’ + ‘int new_sub_keys’ The number of new sub keys. - ‘new_signatures’ + ‘int new_signatures’ The number of new signatures. - ‘new_revocations’ + ‘int new_revocations’ The number of new revocations. - ‘secret_read’ + ‘int secret_read’ The total number of secret keys read. - ‘secret_imported’ + ‘int secret_imported’ The number of imported secret keys. - ‘secret_unchanged’ + ‘int secret_unchanged’ The number of unchanged secret keys. - ‘not_imported’ + ‘int not_imported’ The number of keys not imported. ‘gpgme_import_status_t imports’ @@ -3764,21 +3982,6 @@ Importing keys means the same as running ‘gpg’ with the command successfully. The returned pointer is only valid until the next operation is started on the context. - The following interface is deprecated and only provided for backward -compatibility. Don’t use it. It will be removed in a future version of -GPGME. - - -- Function: gpgme_error_t gpgme_op_import_ext (gpgme_ctx_t CTX, - gpgme_data_t KEYDATA, int *NR) - The function ‘gpgme_op_import_ext’ is equivalent to: - - gpgme_error_t err = gpgme_op_import (ctx, keydata); - if (!err) - { - gpgme_import_result_t result = gpgme_op_import_result (ctx); - *nr = result->considered; - } - ---------- Footnotes ---------- (1) Thus it is a replacement for the usual workaround of exporting @@ -3787,7 +3990,7 @@ and then importing a key to make an X.509 key permanent.  File: gpgme.info, Node: Deleting Keys, Next: Changing Passphrases, Prev: Importing Keys, Up: Key Management -7.5.8 Deleting Keys +7.5.9 Deleting Keys ------------------- -- Function: gpgme_error_t gpgme_op_delete (gpgme_ctx_t CTX, @@ -3815,10 +4018,10 @@ File: gpgme.info, Node: Deleting Keys, Next: Changing Passphrases, Prev: Impo or KEY is not a valid pointer.  -File: gpgme.info, Node: Changing Passphrases, Next: Advanced Key Editing, Prev: Deleting Keys, Up: Key Management +File: gpgme.info, Node: Changing Passphrases, Next: Changing TOFU Data, Prev: Deleting Keys, Up: Key Management -7.5.9 Changing Passphrases --------------------------- +7.5.10 Changing Passphrases +--------------------------- -- Function: gpgme_error_t gpgme_op_passwd (gpgme_ctx_t CTX, const gpgme_key_t KEY, unsigned int FLAGS) @@ -3845,69 +4048,109 @@ File: gpgme.info, Node: Changing Passphrases, Next: Advanced Key Editing, Pre oepration could not be started.  -File: gpgme.info, Node: Advanced Key Editing, Prev: Changing Passphrases, Up: Key Management +File: gpgme.info, Node: Changing TOFU Data, Next: Advanced Key Editing, Prev: Changing Passphrases, Up: Key Management -7.5.10 Advanced Key Editing ---------------------------- +7.5.11 Changing TOFU Data +------------------------- - -- Data type: gpgme_error_t (*gpgme_edit_cb_t) (void *HANDLE, - gpgme_status_code_t STATUS, const char *ARGS, int FD) - The ‘gpgme_edit_cb_t’ type is the type of functions which GPGME - calls if it a key edit operation is on-going. The status code - STATUS and the argument line ARGS are passed through by GPGME from - the crypto engine. The file descriptor FD is -1 for normal status - messages. If STATUS indicates a command rather than a status - message, the response to the command should be written to FD. The - HANDLE is provided by the user at start of operation. +The OpenPGP engine features a Trust-On-First-Use (TOFU) key validation +model. For resolving clonflics it is necessary to declare the policy +for a key. See the GnuPG manual for details on the TOFU implementation. - The function should return ‘GPG_ERR_NO_ERROR’ or an error value. + -- Data type: enum gpgme_tofu_policy_t + The ‘gpgme_tofu_policy_t’ type specifies the set of possible policy + values that are supported by GPGME: - -- Function: gpgme_error_t gpgme_op_edit (gpgme_ctx_t CTX, - gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, - gpgme_data_t OUT) - The function ‘gpgme_op_edit’ processes the key KEY interactively, - using the edit callback function FNC with the handle HANDLE. The - callback is invoked for every status and command request from the - crypto engine. The output of the crypto engine is written to the - data object OUT. + ‘GPGME_TOFU_POLICY_AUTO’ + Set the policy to “auto”. + ‘GPGME_TOFU_POLICY_GOOD’ + Set the policy to “goog”. + ‘GPGME_TOFU_POLICY_BAD’ + Set the policy to “bad”. + ‘GPGME_TOFU_POLICY_ASK’ + Set the policy to “ask”. + ‘GPGME_TOFU_POLICY_UNKNOWN’ + Set the policy to “unknown”. + + To change the policy for a key the following functions can be used: + + -- Function: gpgme_error_t gpgme_op_tofu_policy (gpgme_ctx_t CTX, + const gpgme_key_t KEY, gpgme_tofu_policy_t POLICY) + + The function ‘gpgme_op_tofu_policy’ changes the TOFU policy of KEY. + The valid values for POLICY are listed above. As of now this + function does only work for OpenPGP and requires at least version + 2.1.10 of GnuPG. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. + + -- Function: gpgme_error_t gpgme_op_tofu_policy_start (gpgme_ctx_t CTX, + const gpgme_key_t KEY, gpgme_tofu_policy_t POLICY) + + The function ‘gpgme_op_tofu_policy_start’ initiates a + ‘gpgme_op_tofu_policy’ operation. It can be completed by calling + ‘gpgme_wait’ on the context. *Note Waiting For Completion::. + + The function returns ‘0’ if the operation was started successfully, + and an error code if one of the arguments is not valid or the + oepration could not be started. + + +File: gpgme.info, Node: Advanced Key Editing, Prev: Changing TOFU Data, Up: Key Management + +7.5.12 Advanced Key Editing +--------------------------- + + -- Data type: gpgme_error_t (*gpgme_interact_cb_t) (void *HANDLE, + const char *STATUS, const char *ARGS, int FD) + The ‘gpgme_interact_cb_t’ type is the type of functions which GPGME + calls if it a key interact operation is on-going. The status + keyword STATUS and the argument line ARGS are passed through by + GPGME from the crypto engine. An empty string represents EOF. The + file descriptor FD is -1 for normal status messages. If STATUS + indicates a command rather than a status message, the response to + the command should be written to FD. The HANDLE is provided by the + user at start of operation. + + The function should return ‘GPG_ERR_FALSE’ if it did not handle the + status code, ‘0’ for success, or any other error value. + + -- Function: gpgme_error_t gpgme_op_interact (gpgme_ctx_t CTX, + gpgme_key_t KEY, unsigned int FLAGS, gpgme_interact_cb_t FNC, + void *HANDLE, gpgme_data_t OUT) + The function ‘gpgme_op_interact’ processes the key KEY + interactively, using the interact callback function FNC with the + handle HANDLE. The callback is invoked for every status and + command request from the crypto engine. The output of the crypto + engine is written to the data object OUT. Note that the protocol between the callback function and the crypto engine is specific to the crypto engine and no further support in implementing this protocol correctly is provided by GPGME. - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the edit - operation completes successfully, ‘GPG_ERR_INV_VALUE’ if CTX or KEY - is not a valid pointer, and any error returned by the crypto engine - or the edit callback handler. - - -- Function: gpgme_error_t gpgme_op_edit_start (gpgme_ctx_t CTX, - gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, - gpgme_data_t OUT) - The function ‘gpgme_op_edit_start’ initiates a ‘gpgme_op_edit’ - operation. It can be completed by calling ‘gpgme_wait’ on the - context. *Note Waiting For Completion::. + FLAGS modifies the behaviour of the function; the only defined bit + value is: - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the - operation was started successfully, and ‘GPG_ERR_INV_VALUE’ if CTX - or KEY is not a valid pointer. + ‘GPGME_INTERACT_CARD’ + This is used for smartcard based keys and uses gpg’s + ‘--card-edit’ command. - -- Function: gpgme_error_t gpgme_op_card_edit (gpgme_ctx_t CTX, - gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, - gpgme_data_t OUT) - The function ‘gpgme_op_card_edit’ is analogous to ‘gpgme_op_edit’, - but should be used to process the smart card corresponding to the - key KEY. + The function returns ‘0’ if the edit operation completes + successfully, ‘GPG_ERR_INV_VALUE’ if CTX or KEY is not a valid + pointer, and any error returned by the crypto engine or the edit + callback handler. - -- Function: gpgme_error_t gpgme_op_card_edit_start (gpgme_ctx_t CTX, - gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, - gpgme_data_t OUT) - The function ‘gpgme_op_card_edit_start’ initiates a - ‘gpgme_op_card_edit’ operation. It can be completed by calling + -- Function: gpgme_error_t gpgme_op_interact_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, unsigned int FLAGS, gpgme_interact_cb_t FNC, + void *HANDLE, gpgme_data_t OUT) + The function ‘gpgme_op_interact_start’ initiates a + ‘gpgme_op_interact’ operation. It can be completed by calling ‘gpgme_wait’ on the context. *Note Waiting For Completion::. - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the - operation was started successfully, and ‘GPG_ERR_INV_VALUE’ if CTX - or KEY is not a valid pointer. + The function returns ‘0’ if the operation was started successfully, + and ‘GPG_ERR_INV_VALUE’ if CTX or KEY is not a valid pointer.  File: gpgme.info, Node: Trust Item Management, Next: Crypto Operations, Prev: Key Management, Up: Contexts @@ -3944,11 +4187,10 @@ File: gpgme.info, Node: Trust Item Management, Next: Crypto Operations, Prev: * Menu: * Listing Trust Items:: Browsing the list of available trust items. -* Information About Trust Items:: Requesting information about trust items. * Manipulating Trust Items:: Operations on trust items.  -File: gpgme.info, Node: Listing Trust Items, Next: Information About Trust Items, Up: Trust Item Management +File: gpgme.info, Node: Listing Trust Items, Next: Manipulating Trust Items, Up: Trust Item Management 7.6.1 Listing Trust Items ------------------------- @@ -4000,51 +4242,9 @@ File: gpgme.info, Node: Listing Trust Items, Next: Information About Trust Ite the operation there was not enough memory available.  -File: gpgme.info, Node: Information About Trust Items, Next: Manipulating Trust Items, Prev: Listing Trust Items, Up: Trust Item Management - -7.6.2 Information About Trust Items ------------------------------------ - -The following interfaces are deprecated and only provided for backward -compatibility. Don’t use them. They will be removed in a future -version of GPGME. - - Trust items have attributes which can be queried using the interfaces -below. The attribute identifiers are shared with those for key -attributes. *Note Information About Keys::. - - -- Function: const char * gpgme_trust_item_get_string_attr - (gpgme_trust_item_t ITEM, gpgme_attr_t WHAT, - const void *RESERVED, int IDX) - The function ‘gpgme_trust_item_get_string_attr’ returns the value - of the string-representable attribute WHAT of trust item ITEM. The - arguments IDX and RESERVED are reserved for later use and should be - ‘0’ and ‘NULL’ respectively. - - The string returned is only valid as long as the key is valid. - - The function returns ‘0’ if an attribute can’t be returned as a - string, KEY is not a valid pointer, IDX out of range, or RESERVED - not ‘NULL’. - - -- Function: int gpgme_trust_item_get_int_attr - (gpgme_trust_item_t ITEM, gpgme_attr_t WHAT, - const void *RESERVED, int IDX) - The function ‘gpgme_trust_item_get_int_attr’ returns the value of - the number-representable attribute WHAT of trust item ITEM. If the - attribute occurs more than once in the trust item, the index is - specified by IDX. However, currently no such attribute exists, so - IDX should be ‘0’. The argument RESERVED is reserved for later use - and should be ‘NULL’. - - The function returns ‘0’ if the attribute can’t be returned as a - number, KEY is not a valid pointer, IDX out of range, or RESERVED - not ‘NULL’. - - -File: gpgme.info, Node: Manipulating Trust Items, Prev: Information About Trust Items, Up: Trust Item Management +File: gpgme.info, Node: Manipulating Trust Items, Prev: Listing Trust Items, Up: Trust Item Management -7.6.3 Manipulating Trust Items +7.6.2 Manipulating Trust Items ------------------------------ -- Function: void gpgme_trust_item_ref (gpgme_trust_item_t ITEM) @@ -4057,14 +4257,6 @@ File: gpgme.info, Node: Manipulating Trust Items, Prev: Information About Trus will be destroyed and all resources associated to it will be released. - The following interface is deprecated and only provided for backward -compatibility. Don’t use it. It will be removed in a future version of -GPGME. - - -- Function: void gpgme_trust_item_release (gpgme_trust_item_t ITEM) - The function ‘gpgme_trust_item_release’ is an alias for - ‘gpgme_trust_item_unref’. -  File: gpgme.info, Node: Crypto Operations, Next: Miscellaneous, Prev: Trust Item Management, Up: Contexts @@ -4426,6 +4618,12 @@ File: gpgme.info, Node: Verify, Next: Decrypt and Verify, Prev: Decrypt, Up: ‘char *pka_address’ The mailbox from the PKA information or ‘NULL’. + ‘gpgme_key_t key’ + An object describing the key used to create the signature. + This key object may be incomplete in that it only conveys + information availabale directly with a signature. It may also + be ‘NULL’ if such information is not readily available. + -- Data type: gpgme_verify_result_t This is a pointer to a structure used to store the result of a ‘gpgme_op_verify’ operation. After verifying a signature, you can @@ -4454,317 +4652,99 @@ File: gpgme.info, Node: Verify, Next: Decrypt and Verify, Prev: Decrypt, Up: counts as successful in this context). The returned pointer is only valid until the next operation is started on the context. - The following interfaces are deprecated and only provided for -backward compatibility. Don’t use them. They will be removed in a -future version of GPGME. + +File: gpgme.info, Node: Decrypt and Verify, Next: Sign, Prev: Verify, Up: Crypto Operations - -- Data type: enum gpgme_sig_stat_t - The ‘gpgme_sig_stat_t’ type holds the result of a signature check, - or the combined result of all signatures. The following results - are possible: +7.7.3 Decrypt and Verify +------------------------ - ‘GPGME_SIG_STAT_NONE’ - This status should not occur in normal operation. + -- Function: gpgme_error_t gpgme_op_decrypt_verify (gpgme_ctx_t CTX, + gpgme_data_t CIPHER, gpgme_data_t PLAIN) + The function ‘gpgme_op_decrypt_verify’ decrypts the ciphertext in + the data object CIPHER and stores it into the data object PLAIN. + If CIPHER contains signatures, they will be verified. - ‘GPGME_SIG_STAT_GOOD’ - This status indicates that the signature is valid. For the - combined result this status means that all signatures are - valid. + After the operation completed, ‘gpgme_op_decrypt_result’ and + ‘gpgme_op_verify_result’ can be used to retrieve more information + about the signatures. - ‘GPGME_SIG_STAT_GOOD_EXP’ - This status indicates that the signature is valid but expired. - For the combined result this status means that all signatures - are valid and expired. + If the error code ‘GPG_ERR_NO_DATA’ is returned, CIPHER does not + contain any data to decrypt. However, it might still be signed. + The information about detected signatures is available with + ‘gpgme_op_verify_result’ in this case. - ‘GPGME_SIG_STAT_GOOD_EXPKEY’ - This status indicates that the signature is valid but the key - used to verify the signature has expired. For the combined - result this status means that all signatures are valid and all - keys are expired. + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the + ciphertext could be decrypted successfully, ‘GPG_ERR_INV_VALUE’ if + CTX, CIPHER or PLAIN is not a valid pointer, ‘GPG_ERR_NO_DATA’ if + CIPHER does not contain any data to decrypt, + ‘GPG_ERR_DECRYPT_FAILED’ if CIPHER is not a valid cipher text, + ‘GPG_ERR_BAD_PASSPHRASE’ if the passphrase for the secret key could + not be retrieved, and passes through any errors that are reported + by the crypto engine support routines. - ‘GPGME_SIG_STAT_BAD’ - This status indicates that the signature is invalid. For the - combined result this status means that all signatures are - invalid. + -- Function: gpgme_error_t gpgme_op_decrypt_verify (gpgme_ctx_t CTX, + gpgme_data_t CIPHER, gpgme_data_t PLAIN) + The function ‘gpgme_op_decrypt_verify_start’ initiates a + ‘gpgme_op_decrypt_verify’ operation. It can be completed by + calling ‘gpgme_wait’ on the context. *Note Waiting For + Completion::. - ‘GPGME_SIG_STAT_NOKEY’ - This status indicates that the signature could not be verified - due to a missing key. For the combined result this status - means that all signatures could not be checked due to missing - keys. + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the + operation could be started successfully, ‘GPG_ERR_INV_VALUE’ if + CTX, CIPHER, PLAIN or R_STAT is not a valid pointer, and + ‘GPG_ERR_NO_DATA’ if CIPHER does not contain any data to decrypt. - ‘GPGME_SIG_STAT_NOSIG’ - This status indicates that the signature data provided was not - a real signature. + +File: gpgme.info, Node: Sign, Next: Encrypt, Prev: Decrypt and Verify, Up: Crypto Operations - ‘GPGME_SIG_STAT_ERROR’ - This status indicates that there was some other error which - prevented the signature verification. +7.7.4 Sign +---------- - ‘GPGME_SIG_STAT_DIFF’ - For the combined result this status means that at least two - signatures have a different status. You can get each key’s - status with ‘gpgme_get_sig_status’. +A signature can contain signatures by one or more keys. The set of keys +used to create a signatures is contained in a context, and is applied to +all following signing operations in this context (until the set is +changed). - -- Function: const char * gpgme_get_sig_status (gpgme_ctx_t CTX, - int IDX, gpgme_sig_stat_t *R_STAT, time_t *R_CREATED) - The function ‘gpgme_get_sig_status’ is equivalent to: +* Menu: - gpgme_verify_result_t result; - gpgme_signature_t sig; +* Selecting Signers:: How to choose the keys to sign with. +* Creating a Signature:: How to create a signature. +* Signature Notation Data:: How to add notation data to a signature. - result = gpgme_op_verify_result (ctx); - sig = result->signatures; + +File: gpgme.info, Node: Selecting Signers, Next: Creating a Signature, Up: Sign - while (sig && idx) - { - sig = sig->next; - idx--; - } - if (!sig || idx) - return NULL; +7.7.4.1 Selecting Signers +......................... - if (r_stat) - { - switch (gpg_err_code (sig->status)) - { - case GPG_ERR_NO_ERROR: - *r_stat = GPGME_SIG_STAT_GOOD; - break; +The key or the keys used to create a signature are stored in the +context. The following functions can be used to manipulate this list. +If no signer has been set into the context a default key is used for +signing. - case GPG_ERR_BAD_SIGNATURE: - *r_stat = GPGME_SIG_STAT_BAD; - break; + -- Function: void gpgme_signers_clear (gpgme_ctx_t CTX) + The function ‘gpgme_signers_clear’ releases a reference for each + key on the signers list and removes the list of signers from the + context CTX. - case GPG_ERR_NO_PUBKEY: - *r_stat = GPGME_SIG_STAT_NOKEY; - break; + Every context starts with an empty list. - case GPG_ERR_NO_DATA: - *r_stat = GPGME_SIG_STAT_NOSIG; - break; + -- Function: gpgme_error_t gpgme_signers_add (gpgme_ctx_t CTX, + const gpgme_key_t KEY) + The function ‘gpgme_signers_add’ adds the key KEY to the list of + signers in the context CTX. - case GPG_ERR_SIG_EXPIRED: - *r_stat = GPGME_SIG_STAT_GOOD_EXP; - break; + Calling this function acquires an additional reference for the key. - case GPG_ERR_KEY_EXPIRED: - *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY; - break; + -- Function: unsigned int gpgme_signers_count (const gpgme_ctx_t CTX) + The function ‘gpgme_signers_count’ returns the number of signer + keys in the context CTX. - default: - *r_stat = GPGME_SIG_STAT_ERROR; - break; - } - } - if (r_created) - *r_created = sig->timestamp; - return sig->fpr; - - -- Function: const char * gpgme_get_sig_string_attr (gpgme_ctx_t CTX, - int IDX, gpgme_attr_t WHAT, int WHATIDX) - The function ‘gpgme_get_sig_string_attr’ is equivalent to: - - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - { - sig = sig->next; - idx--; - } - if (!sig || idx) - return NULL; - - switch (what) - { - case GPGME_ATTR_FPR: - return sig->fpr; - - case GPGME_ATTR_ERRTOK: - if (whatidx == 1) - return sig->wrong_key_usage ? "Wrong_Key_Usage" : ""; - else - return ""; - default: - break; - } - - return NULL; - - -- Function: const char * gpgme_get_sig_ulong_attr (gpgme_ctx_t CTX, - int IDX, gpgme_attr_t WAHT, int WHATIDX) - The function ‘gpgme_get_sig_ulong_attr’ is equivalent to: - - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - { - sig = sig->next; - idx--; - } - if (!sig || idx) - return 0; - - switch (what) - { - case GPGME_ATTR_CREATED: - return sig->timestamp; - - case GPGME_ATTR_EXPIRE: - return sig->exp_timestamp; - - case GPGME_ATTR_VALIDITY: - return (unsigned long) sig->validity; - - case GPGME_ATTR_SIG_STATUS: - switch (sig->status) - { - case GPG_ERR_NO_ERROR: - return GPGME_SIG_STAT_GOOD; - - case GPG_ERR_BAD_SIGNATURE: - return GPGME_SIG_STAT_BAD; - - case GPG_ERR_NO_PUBKEY: - return GPGME_SIG_STAT_NOKEY; - - case GPG_ERR_NO_DATA: - return GPGME_SIG_STAT_NOSIG; - - case GPG_ERR_SIG_EXPIRED: - return GPGME_SIG_STAT_GOOD_EXP; - - case GPG_ERR_KEY_EXPIRED: - return GPGME_SIG_STAT_GOOD_EXPKEY; - - default: - return GPGME_SIG_STAT_ERROR; - } - - case GPGME_ATTR_SIG_SUMMARY: - return sig->summary; - - default: - break; - } - return 0; - - -- Function: const char * gpgme_get_sig_key (gpgme_ctx_t CTX, int IDX, - gpgme_key_t *R_KEY) - The function ‘gpgme_get_sig_key’ is equivalent to: - - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - { - sig = sig->next; - idx--; - } - if (!sig || idx) - return gpg_error (GPG_ERR_EOF); - - return gpgme_get_key (ctx, sig->fpr, r_key, 0); - - -File: gpgme.info, Node: Decrypt and Verify, Next: Sign, Prev: Verify, Up: Crypto Operations - -7.7.3 Decrypt and Verify ------------------------- - - -- Function: gpgme_error_t gpgme_op_decrypt_verify (gpgme_ctx_t CTX, - gpgme_data_t CIPHER, gpgme_data_t PLAIN) - The function ‘gpgme_op_decrypt_verify’ decrypts the ciphertext in - the data object CIPHER and stores it into the data object PLAIN. - If CIPHER contains signatures, they will be verified. - - After the operation completed, ‘gpgme_op_decrypt_result’ and - ‘gpgme_op_verify_result’ can be used to retrieve more information - about the signatures. - - If the error code ‘GPG_ERR_NO_DATA’ is returned, CIPHER does not - contain any data to decrypt. However, it might still be signed. - The information about detected signatures is available with - ‘gpgme_op_verify_result’ in this case. - - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the - ciphertext could be decrypted successfully, ‘GPG_ERR_INV_VALUE’ if - CTX, CIPHER or PLAIN is not a valid pointer, ‘GPG_ERR_NO_DATA’ if - CIPHER does not contain any data to decrypt, - ‘GPG_ERR_DECRYPT_FAILED’ if CIPHER is not a valid cipher text, - ‘GPG_ERR_BAD_PASSPHRASE’ if the passphrase for the secret key could - not be retrieved, and passes through any errors that are reported - by the crypto engine support routines. - - -- Function: gpgme_error_t gpgme_op_decrypt_verify (gpgme_ctx_t CTX, - gpgme_data_t CIPHER, gpgme_data_t PLAIN) - The function ‘gpgme_op_decrypt_verify_start’ initiates a - ‘gpgme_op_decrypt_verify’ operation. It can be completed by - calling ‘gpgme_wait’ on the context. *Note Waiting For - Completion::. - - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the - operation could be started successfully, ‘GPG_ERR_INV_VALUE’ if - CTX, CIPHER, PLAIN or R_STAT is not a valid pointer, and - ‘GPG_ERR_NO_DATA’ if CIPHER does not contain any data to decrypt. - - -File: gpgme.info, Node: Sign, Next: Encrypt, Prev: Decrypt and Verify, Up: Crypto Operations - -7.7.4 Sign ----------- - -A signature can contain signatures by one or more keys. The set of keys -used to create a signatures is contained in a context, and is applied to -all following signing operations in this context (until the set is -changed). - -* Menu: - -* Selecting Signers:: How to choose the keys to sign with. -* Creating a Signature:: How to create a signature. -* Signature Notation Data:: How to add notation data to a signature. - - -File: gpgme.info, Node: Selecting Signers, Next: Creating a Signature, Up: Sign - -7.7.4.1 Selecting Signers -......................... - - -- Function: void gpgme_signers_clear (gpgme_ctx_t CTX) - The function ‘gpgme_signers_clear’ releases a reference for each - key on the signers list and removes the list of signers from the - context CTX. - - Every context starts with an empty list. - - -- Function: gpgme_error_t gpgme_signers_add (gpgme_ctx_t CTX, - const gpgme_key_t KEY) - The function ‘gpgme_signers_add’ adds the key KEY to the list of - signers in the context CTX. - - Calling this function acquires an additional reference for the key. - - -- Function: unsigned int gpgme_signers_count (const gpgme_ctx_t CTX) - The function ‘gpgme_signers_count’ returns the number of signer - keys in the context CTX. - - -- Function: gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t CTX, - int SEQ) - The function ‘gpgme_signers_enum’ returns the SEQth key in the list - of signers in the context CTX. An additional reference is acquired - for the user. + -- Function: gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t CTX, + int SEQ) + The function ‘gpgme_signers_enum’ returns the SEQth key in the list + of signers in the context CTX. An additional reference is acquired + for the user. If SEQ is out of range, ‘NULL’ is returned. @@ -4990,6 +4970,12 @@ File: gpgme.info, Node: Encrypting a Plaintext, Up: Encrypt ‘PREP_ENCRYPT’ command). With the ‘GPGME_ENCRYPT_EXPECT_SIGN’ symbol the UI Server is advised to also expect a sign command. + ‘GPGME_ENCRYPT_SYMMETRIC’ + The ‘GPGME_ENCRYPT_SYMMETRIC’ symbol specifies that the output + should be additionally encrypted symmetically even if + recipients are provided. This feature is only supported for + 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 @@ -5082,9 +5068,10 @@ Here are some support functions which are sometimes useful. * Menu: * Running other Programs:: Running other Programs +* Using the Assuan protocol:: Using the Assuan protocol  -File: gpgme.info, Node: Running other Programs, Up: Miscellaneous +File: gpgme.info, Node: Running other Programs, Next: Using the Assuan protocol, Up: Miscellaneous 7.8.1 Running other Programs ---------------------------- @@ -5096,10 +5083,10 @@ cryptographic features. It may for example be used to run tools which are part of the GnuPG system but are not directly accessible with the GPGME API. - -- Function: gpgme_error_t gpgme_op_spawn - (gpgme_ctx_t CTX, const char *FILE, const char *ARGV[], - gpgme_data_t DATAIN, gpgme_data_t DATAOUT, gpgme_data_t DATAERR, - unsigned int FLAGS) + -- Function: gpgme_error_t gpgme_op_spawn (gpgme_ctx_t CTX, + const char *FILE, const char *ARGV[], gpgme_data_t DATAIN, + gpgme_data_t DATAOUT, gpgme_data_t DATAERR, + unsigned int FLAGS) The function ‘gpgme_op_spawn’ runs the program FILE with the arguments taken from the NULL terminated array ARGV. If no @@ -5121,14 +5108,78 @@ GPGME API. Under Windows this flag allows the called program to put itself into the foreground. - -- Function: gpgme_error_t gpgme_op_spawn_start - (gpgme_ctx_t CTX, const char *FILE, const char *ARGV[], - gpgme_data_t DATAIN, gpgme_data_t DATAOUT, gpgme_data_t DATAERR, - unsigned int FLAGS) + -- Function: gpgme_error_t gpgme_op_spawn_start (gpgme_ctx_t CTX, + const char *FILE, const char *ARGV[], gpgme_data_t DATAIN, + gpgme_data_t DATAOUT, gpgme_data_t DATAERR, + unsigned int FLAGS) This is the asynchronous variant of ‘gpgme_op_spawn’.  +File: gpgme.info, Node: Using the Assuan protocol, Prev: Running other Programs, Up: Miscellaneous + +7.8.2 Using the Assuan protocol +------------------------------- + +The Assuan protocol can be used to talk to arbitrary Assuan servers. By +default it is connected to the GnuPG agent, but it may be connected to +arbitrary servers by using ‘gpgme_ctx_set_engine_info’, passing the +location of the servers socket as FILE_NAME argument, and an empty +string as HOME_DIR argument. + + The Assuan protocol functions use three kinds of callbacks to +transfer data: + + -- Data type: gpgme_error_t (*gpgme_assuan_data_cb_t) (void *OPAQUE, + const void *DATA, size_t DATALEN) + + This callback receives any data sent by the server. OPAQUE is the + pointer passed to ‘gpgme_op_assuan_transact_start’, DATA of length + DATALEN refers to the data sent. + + -- Data type: gpgme_error_t (*gpgme_assuan_inquire_cb_t) (void *OPAQUE, + const char *NAME, const char *ARGS, gpgme_data_t *R_DATA) + + This callback is used to provide additional data to the Assuan + server. OPAQUE is the pointer passed to + ‘gpgme_op_assuan_transact_start’, NAME and ARGS specify what kind + of data the server requested, and R_DATA is used to return the + actual data. + + Note: Returning data is currently not implemented in GPGME. + + -- Data type: gpgme_error_t (*gpgme_assuan_status_cb_t) (void *OPAQUE, + const char *STATUS, const char *ARGS) + + This callback receives any status lines sent by the server. OPAQUE + is the pointer passed to ‘gpgme_op_assuan_transact_start’, STATUS + and ARGS denote the status update sent. + + -- Function: gpgme_error_t gpgme_op_assuan_transact_start + (gpgme_ctx_t CTX, const char *COMMAND, + gpgme_assuan_data_cb_t DATA_CB, void * DATA_CB_VALUE, + gpgme_assuan_inquire_cb_t INQUIRE_CB, void * INQUIRE_CB_VALUE, + gpgme_assuan_status_cb_t STATUS_CB, void * STATUS_CB_VALUE) + + Send the Assuan COMMAND and return results via the callbacks. Any + callback may be ‘NULL’. The result of the operation may be + retrieved using ‘gpgme_wait_ext’. + + Asynchronous variant. + + -- Function: gpgme_error_t gpgme_op_assuan_transact_ext + (gpgme_ctx_t CTX, const char *COMMAND, + gpgme_assuan_data_cb_t DATA_CB, void * DATA_CB_VALUE, + gpgme_assuan_inquire_cb_t INQUIRE_CB, void * INQUIRE_CB_VALUE, + gpgme_assuan_status_cb_t STATUS_CB, void * STATUS_CB_VALUE, + gpgme_error_t *OP_ERR) + + Send the Assuan COMMAND and return results via the callbacks. The + result of the operation is returned in OP_ERR. + + Synchronous variant. + + File: gpgme.info, Node: Run Control, Prev: Miscellaneous, Up: Contexts 7.9 Run Control @@ -5807,18 +5858,17 @@ I/O occurs in the target context). in the context CTX. This only works if you use the global event loop or your own event loop. - If you use the global event loop, you must not call ‘gpgme_wait’ or - ‘gpgme_wait’ during cancellation. After successful cancellation, - you can call ‘gpgme_wait’ (optionally waiting on CTX), and the - context CTX will appear as if it had finished with the error code - ‘GPG_ERR_CANCEL’. + If you use the global event loop, you must not call ‘gpgme_wait’ + during cancellation. After successful cancellation, you can call + ‘gpgme_wait’ (optionally waiting on CTX), and the context CTX will + appear as if it had finished with the error code ‘GPG_ERR_CANCEL’. - If you use your an external event loop, you must ensure that no I/O + If you use an external event loop, you must ensure that no I/O callbacks are invoked for this context (for example by halting the event loop). On successful cancellation, all registered I/O callbacks for this context will be unregistered, and a ‘GPGME_EVENT_DONE’ event with the error code ‘GPG_ERR_CANCEL’ will - be signaled. + be signalled. The function returns an error code if the cancellation failed (in this case the state of CTX is not modified). @@ -6388,7 +6438,7 @@ associate operations the server MAY support the command: the last command. A ‘RESET’ undoes the effect of this command.  -File: gpgme.info, Node: Debugging, Next: Library Copying, Prev: UI Server Protocol, Up: Top +File: gpgme.info, Node: Debugging, Next: Deprecated Functions, Prev: UI Server Protocol, Up: Top Appendix B How to solve problems ******************************** @@ -6424,526 +6474,647 @@ application. If you are asked to send a log file, make sure that you run your tests only with play data.  -File: gpgme.info, Node: Library Copying, Next: Copying, Prev: Debugging, Up: Top - -GNU Lesser General Public License -********************************* - - Version 2.1, February 1999 - - Copyright © 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - [This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence the - version number 2.1.] - -Preamble -======== - -The licenses for most software are designed to take away your freedom to -share and change it. By contrast, the GNU General Public Licenses are -intended to guarantee your freedom to share and change free software—to -make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software—typically libraries—of the Free Software -Foundation and other authors who decide to use it. You can use it too, -but we suggest you first think carefully about whether this license or -the ordinary General Public License is the better strategy to use in any -particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of it -in new free programs; and that you are informed that you can do these -things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling it. -And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that there -is no warranty for the free library. Also, if the library is modified -by someone else and passed on, the recipients should know that what they -have is not the original version, so that the original author’s -reputation will not be affected by problems that might be introduced by -others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that any -patent license obtained for a version of the library must be consistent -with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and is -quite different from the ordinary General Public License. We use this -license for certain libraries in order to permit linking those libraries -into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the entire -combination fits its criteria of freedom. The Lesser General Public -License permits more lax criteria for linking other code with the -library. - - We call this license the "Lesser" General Public License because it -does _Less_ to protect the user’s freedom than the ordinary General -Public License. It also provides other free software developers Less of -an advantage over competing non-free programs. These disadvantages are -the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free library -does the same job as widely used non-free libraries. In this case, -there is little to gain by limiting the free library to free software -only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of free -software. For example, permission to use the GNU C Library in non-free -programs enables many more people to use the whole GNU operating system, -as well as its variant, the GNU/Linux operating system. - - Although the Lesser General Public License is Less protective of the -users’ freedom, it does ensure that the user of a program that is linked -with the Library has the freedom and the wherewithal to run that program -using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -“work based on the library” and a “work that uses the library”. The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other - program which contains a notice placed by the copyright holder or - other authorized party saying it may be distributed under the terms - of this Lesser General Public License (also called “this License”). - Each licensee is addressed as “you”. - - A “library” means a collection of software functions and/or data - prepared so as to be conveniently linked with application programs - (which use some of those functions and data) to form executables. - - The “Library”, below, refers to any such software library or work - which has been distributed under these terms. A “work based on the - Library” means either the Library or any derivative work under - copyright law: that is to say, a work containing the Library or a - portion of it, either verbatim or with modifications and/or - translated straightforwardly into another language. (Hereinafter, - translation is included without limitation in the term - “modification”.) - - “Source code” for a work means the preferred form of the work for - making modifications to it. For a library, complete source code - means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to - control compilation and installation of the library. - - Activities other than copying, distribution and modification are - not covered by this License; they are outside its scope. The act - of running a program using the Library is not restricted, and - output from such a program is covered only if its contents - constitute a work based on the Library (independent of the use of - the Library in a tool for writing it). Whether that is true - depends on what the Library does and what the program that uses the - Library does. - - 1. You may copy and distribute verbatim copies of the Library’s - complete source code as you receive it, in any medium, provided - that you conspicuously and appropriately publish on each copy an - appropriate copyright notice and disclaimer of warranty; keep - intact all the notices that refer to this License and to the - absence of any warranty; and distribute a copy of this License - along with the Library. - - You may charge a fee for the physical act of transferring a copy, - and you may at your option offer warranty protection in exchange - for a fee. - - 2. You may modify your copy or copies of the Library or any portion of - it, thus forming a work based on the Library, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a. The modified work must itself be a software library. - - b. You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c. You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d. If a facility in the modified Library refers to a function or - a table of data to be supplied by an application program that - uses the facility, other than as an argument passed when the - facility is invoked, then you must make a good faith effort to - ensure that, in the event an application does not supply such - function or table, the facility still operates, and performs - whatever part of its purpose remains meaningful. - - (For example, a function in a library to compute square roots - has a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function - must be optional: if the application does not supply it, the - square root function must still compute square roots.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the - Library, and can be reasonably considered independent and separate - works in themselves, then this License, and its terms, do not apply - to those sections when you distribute them as separate works. But - when you distribute the same sections as part of a whole which is a - work based on the Library, the distribution of the whole must be on - the terms of this License, whose permissions for other licensees - extend to the entire whole, and thus to each and every part - regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or - contest your rights to work written entirely by you; rather, the - intent is to exercise the right to control the distribution of - derivative or collective works based on the Library. - - In addition, mere aggregation of another work not based on the - Library with the Library (or with a work based on the Library) on a - volume of a storage or distribution medium does not bring the other - work under the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public - License instead of this License to a given copy of the Library. To - do this, you must alter all the notices that refer to this License, - so that they refer to the ordinary GNU General Public License, - version 2, instead of to this License. (If a newer version than - version 2 of the ordinary GNU General Public License has appeared, - then you can specify that version instead if you wish.) Do not - make any other change in these notices. - - Once this change is made in a given copy, it is irreversible for - that copy, so the ordinary GNU General Public License applies to - all subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of the - Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or derivative - of it, under Section 2) in object code or executable form under the - terms of Sections 1 and 2 above provided that you accompany it with - the complete corresponding machine-readable source code, which must - be distributed under the terms of Sections 1 and 2 above on a - medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy - from a designated place, then offering equivalent access to copy - the source code from the same place satisfies the requirement to - distribute the source code, even though third parties are not - compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the - Library, but is designed to work with the Library by being compiled - or linked with it, is called a “work that uses the Library”. Such - a work, in isolation, is not a derivative work of the Library, and - therefore falls outside the scope of this License. - - However, linking a “work that uses the Library” with the Library - creates an executable that is a derivative of the Library (because - it contains portions of the Library), rather than a “work that uses - the library”. The executable is therefore covered by this License. - Section 6 states terms for distribution of such executables. - - When a “work that uses the Library” uses material from a header - file that is part of the Library, the object code for the work may - be a derivative work of the Library even though the source code is - not. Whether this is true is especially significant if the work - can be linked without the Library, or if the work is itself a - library. The threshold for this to be true is not precisely - defined by law. - - If such an object file uses only numerical parameters, data - structure layouts and accessors, and small macros and small inline - functions (ten lines or less in length), then the use of the object - file is unrestricted, regardless of whether it is legally a - derivative work. (Executables containing this object code plus - portions of the Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may - distribute the object code for the work under the terms of Section - 6. Any executables containing that work also fall under Section 6, - whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or link - a “work that uses the Library” with the Library to produce a work - containing portions of the Library, and distribute that work under - terms of your choice, provided that the terms permit modification - of the work for the customer’s own use and reverse engineering for - debugging such modifications. - - You must give prominent notice with each copy of the work that the - Library is used in it and that the Library and its use are covered - by this License. You must supply a copy of this License. If the - work during execution displays copyright notices, you must include - the copyright notice for the Library among them, as well as a - reference directing the user to the copy of this License. Also, - you must do one of these things: - - a. Accompany the work with the complete corresponding - machine-readable source code for the Library including - whatever changes were used in the work (which must be - distributed under Sections 1 and 2 above); and, if the work is - an executable linked with the Library, with the complete - machine-readable “work that uses the Library”, as object code - and/or source code, so that the user can modify the Library - and then relink to produce a modified executable containing - the modified Library. (It is understood that the user who - changes the contents of definitions files in the Library will - not necessarily be able to recompile the application to use - the modified definitions.) - - b. Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run - time a copy of the library already present on the user’s - computer system, rather than copying library functions into - the executable, and (2) will operate properly with a modified - version of the library, if the user installs one, as long as - the modified version is interface-compatible with the version - that the work was made with. - - c. Accompany the work with a written offer, valid for at least - three years, to give the same user the materials specified in - Subsection 6a, above, for a charge no more than the cost of - performing this distribution. - - d. If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the - above specified materials from the same place. - - e. Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the “work that uses the - Library” must include any data and utility programs needed for - reproducing the executable from it. However, as a special - exception, the materials to be distributed need not include - anything that is normally distributed (in either source or binary - form) with the major components (compiler, kernel, and so on) of - the operating system on which the executable runs, unless that - component itself accompanies the executable. - - It may happen that this requirement contradicts the license - restrictions of other proprietary libraries that do not normally - accompany the operating system. Such a contradiction means you - cannot use both them and the Library together in an executable that - you distribute. - - 7. You may place library facilities that are a work based on the - Library side-by-side in a single library together with other - library facilities not covered by this License, and distribute such - a combined library, provided that the separate distribution of the - work based on the Library and of the other library facilities is - otherwise permitted, and provided that you do these two things: - - a. Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b. Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same - work. - - 8. You may not copy, modify, sublicense, link with, or distribute the - Library except as expressly provided under this License. Any - attempt otherwise to copy, modify, sublicense, link with, or - distribute the Library is void, and will automatically terminate - your rights under this License. However, parties who have received - copies, or rights, from you under this License will not have their - licenses terminated so long as such parties remain in full - compliance. - - 9. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify - or distribute the Library or its derivative works. These actions - are prohibited by law if you do not accept this License. - Therefore, by modifying or distributing the Library (or any work - based on the Library), you indicate your acceptance of this License - to do so, and all its terms and conditions for copying, - distributing or modifying the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the - Library), the recipient automatically receives a license from the - original licensor to copy, distribute, link with or modify the - Library subject to these terms and conditions. You may not impose - any further restrictions on the recipients’ exercise of the rights - granted herein. You are not responsible for enforcing compliance - by third parties with this License. - - 11. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent - issues), conditions are imposed on you (whether by court order, - agreement or otherwise) that contradict the conditions of this - License, they do not excuse you from the conditions of this - License. If you cannot distribute so as to satisfy simultaneously - your obligations under this License and any other pertinent - obligations, then as a consequence you may not distribute the - Library at all. For example, if a patent license would not permit - royalty-free redistribution of the Library by all those who receive - copies directly or indirectly through you, then the only way you - could satisfy both it and this License would be to refrain entirely - from distribution of the Library. - - If any portion of this section is held invalid or unenforceable - under any particular circumstance, the balance of the section is - intended to apply, and the section as a whole is intended to apply - in other circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of - any such claims; this section has the sole purpose of protecting - the integrity of the free software distribution system which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is - willing to distribute software through any other system and a - licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed - to be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in - certain countries either by patents or by copyrighted interfaces, - the original copyright holder who places the Library under this - License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only - in or among countries not thus excluded. In such case, this - License incorporates the limitation as if written in the body of - this License. - - 13. The Free Software Foundation may publish revised and/or new - versions of the Lesser General Public License from time to time. - Such new versions will be similar in spirit to the present version, - but may differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the - Library specifies a version number of this License which applies to - it and “any later version”, you have the option of following the - terms and conditions either of that version or of any later version - published by the Free Software Foundation. If the Library does not - specify a license version number, you may choose any version ever - published by the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free - programs whose distribution conditions are incompatible with these, - write to the author to ask for permission. For software which is - copyrighted by the Free Software Foundation, write to the Free - Software Foundation; we sometimes make exceptions for this. Our - decision will be guided by the two goals of preserving the free - status of all derivatives of our free software and of promoting the - sharing and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE - LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS - AND/OR OTHER PARTIES PROVIDE THE LIBRARY “AS IS” WITHOUT WARRANTY - OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND - PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE - DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR - OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY - MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE - LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, - INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF - DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU - OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY - OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Libraries -============================================== +File: gpgme.info, Node: Deprecated Functions, Next: Library Copying, Prev: Debugging, Up: Top -If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of -the ordinary General Public License). +Appendix C Deprecated Functions +******************************* - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should have -at least the “copyright” line and a pointer to where the full notice is -found. +For backward compatibility GPGME has a number of functions, data types +and constants which are deprecated and should not be used anymore. We +document here those which are really old to help understanding old code +and to allow migration to their modern counterparts. - ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. - Copyright (C) YEAR NAME OF AUTHOR + *Warning:* These interfaces will be removed in a future version of +GPGME. - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or (at - your option) any later version. + -- Function: void gpgme_key_release (gpgme_key_t KEY) + The function ‘gpgme_key_release’ is equivalent to + ‘gpgme_key_unref’. - This library 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. + -- Function: void gpgme_trust_item_release (gpgme_trust_item_t ITEM) + The function ‘gpgme_trust_item_release’ is an alias for + ‘gpgme_trust_item_unref’. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, - USA. + -- Function: gpgme_error_t gpgme_op_import_ext (gpgme_ctx_t CTX, + gpgme_data_t KEYDATA, int *NR) + The function ‘gpgme_op_import_ext’ is equivalent to: - Also add information on how to contact you by electronic and paper -mail. + gpgme_error_t err = gpgme_op_import (ctx, keydata); + if (!err) + { + gpgme_import_result_t result = gpgme_op_import_result (ctx); + *nr = result->considered; + } - You should also get your employer (if you work as a programmer) or -your school, if any, to sign a “copyright disclaimer” for the library, -if necessary. Here is a sample; alter the names: + -- Data type: gpgme_error_t (*gpgme_edit_cb_t) (void *HANDLE, + gpgme_status_code_t STATUS, const char *ARGS, int FD) + The ‘gpgme_edit_cb_t’ type is the type of functions which GPGME + calls if it a key edit operation is on-going. The status code + STATUS and the argument line ARGS are passed through by GPGME from + the crypto engine. The file descriptor FD is -1 for normal status + messages. If STATUS indicates a command rather than a status + message, the response to the command should be written to FD. The + HANDLE is provided by the user at start of operation. - Yoyodyne, Inc., hereby disclaims all copyright interest in the library - `Frob' (a library for tweaking knobs) written by James Random Hacker. + The function should return ‘GPG_ERR_FALSE’ if it did not handle the + status code, ‘0’ for success, or any other error value. - SIGNATURE OF TY COON, 1 April 1990 - Ty Coon, President of Vice + -- Function: gpgme_error_t gpgme_op_edit (gpgme_ctx_t CTX, + gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, + gpgme_data_t OUT) + Note: This function is deprecated, please use ‘gpgme_op_interact’ + instead. - That’s all there is to it! + The function ‘gpgme_op_edit’ processes the key KEY interactively, + using the edit callback function FNC with the handle HANDLE. The + callback is invoked for every status and command request from the + crypto engine. The output of the crypto engine is written to the + data object OUT. + + Note that the protocol between the callback function and the crypto + engine is specific to the crypto engine and no further support in + implementing this protocol correctly is provided by GPGME. + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the edit + operation completes successfully, ‘GPG_ERR_INV_VALUE’ if CTX or KEY + is not a valid pointer, and any error returned by the crypto engine + or the edit callback handler. + + -- Function: gpgme_error_t gpgme_op_edit_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, + gpgme_data_t OUT) + Note: This function is deprecated, please use + ‘gpgme_op_interact_start’ instead. + + The function ‘gpgme_op_edit_start’ initiates a ‘gpgme_op_edit’ + operation. It can be completed by calling ‘gpgme_wait’ on the + context. *Note Waiting For Completion::. + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the + operation was started successfully, and ‘GPG_ERR_INV_VALUE’ if CTX + or KEY is not a valid pointer. + + -- Function: gpgme_error_t gpgme_op_card_edit (gpgme_ctx_t CTX, + gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, + gpgme_data_t OUT) + Note: This function is deprecated, please use ‘gpgme_op_interact’ + with the flag ‘GPGME_INTERACT_CARD’ instead. + + The function ‘gpgme_op_card_edit’ is analogous to ‘gpgme_op_edit’, + but should be used to process the smart card corresponding to the + key KEY. + + -- Function: gpgme_error_t gpgme_op_card_edit_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, + gpgme_data_t OUT) + Note: This function is deprecated, please use + ‘gpgme_op_interact_start’ with the flag ‘GPGME_INTERACT_CARD’ + instead. + + The function ‘gpgme_op_card_edit_start’ initiates a + ‘gpgme_op_card_edit’ operation. It can be completed by calling + ‘gpgme_wait’ on the context. *Note Waiting For Completion::. + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the + operation was started successfully, and ‘GPG_ERR_INV_VALUE’ if CTX + or KEY is not a valid pointer. + + -- Function: gpgme_error_t gpgme_data_new_with_read_cb + (gpgme_data_t *DH, int (*READFUNC) (void *HOOK, char *BUFFER, + size_t COUNT, size_t *NREAD), void *HOOK_VALUE) + The function ‘gpgme_data_new_with_read_cb’ creates a new + ‘gpgme_data_t’ object and uses the callback function READFUNC to + retrieve the data on demand. As the callback function can supply + the data in any way it wants, this is the most flexible data type + GPGME provides. However, it can not be used to write data. + + The callback function receives HOOK_VALUE as its first argument + whenever it is invoked. It should return up to COUNT bytes in + BUFFER, and return the number of bytes actually read in NREAD. It + may return ‘0’ in NREAD if no data is currently available. To + indicate ‘EOF’ the function should return with an error code of + ‘-1’ and set NREAD to ‘0’. The callback function may support to + reset its internal read pointer if it is invoked with BUFFER and + NREAD being ‘NULL’ and COUNT being ‘0’. + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the data + object was successfully created, ‘GPG_ERR_INV_VALUE’ if DH or + READFUNC is not a valid pointer, and ‘GPG_ERR_ENOMEM’ if not enough + memory is available. + + -- Function: gpgme_error_t gpgme_data_rewind (gpgme_data_t DH) + The function ‘gpgme_data_rewind’ is equivalent to: + + return (gpgme_data_seek (dh, 0, SEEK_SET) == -1) + ? gpgme_error_from_errno (errno) : 0; + + -- Data type: gpgme_attr_t + The ‘gpgme_attr_t’ type is used to specify a key or trust item + attribute. The following attributes are defined: + + ‘GPGME_ATTR_KEYID’ + This is the key ID of a sub key. It is representable as a + string. + + For trust items, the trust item refers to the key with this + ID. + + ‘GPGME_ATTR_FPR’ + This is the fingerprint of a sub key. It is representable as + a string. + + ‘GPGME_ATTR_ALGO’ + This is the crypto algorithm for which the sub key can be + used. It is representable as a string and as a number. The + numbers correspond to the ‘enum gcry_pk_algos’ values in the + gcrypt library. + + ‘GPGME_ATTR_LEN’ + This is the key length of a sub key. It is representable as a + number. + + ‘GPGME_ATTR_CREATED’ + This is the timestamp at creation time of a sub key. It is + representable as a number. + + ‘GPGME_ATTR_EXPIRE’ + This is the expiration time of a sub key. It is representable + as a number. + + ‘GPGME_ATTR_OTRUST’ + XXX FIXME (also for trust items) + + ‘GPGME_ATTR_USERID’ + This is a user ID. There can be more than one user IDs in a + GPGME_KEY_T object. The first one (with index 0) is the + primary user ID. The user ID is representable as a number. + + For trust items, this is the user ID associated with this + trust item. + + ‘GPGME_ATTR_NAME’ + This is the name belonging to a user ID. It is representable + as a string. + + ‘GPGME_ATTR_EMAIL’ + This is the email address belonging to a user ID. It is + representable as a string. + + ‘GPGME_ATTR_COMMENT’ + This is the comment belonging to a user ID. It is + representable as a string. + + ‘GPGME_ATTR_VALIDITY’ + This is the validity belonging to a user ID. It is + representable as a string and as a number. See below for a + list of available validities. + + For trust items, this is the validity that is associated with + this trust item. + + ‘GPGME_ATTR_UID_REVOKED’ + This specifies if a user ID is revoked. It is representable + as a number, and is ‘1’ if the user ID is revoked, and ‘0’ + otherwise. + + ‘GPGME_ATTR_UID_INVALID’ + This specifies if a user ID is invalid. It is representable + as a number, and is ‘1’ if the user ID is invalid, and ‘0’ + otherwise. + + ‘GPGME_ATTR_LEVEL’ + This is the trust level of a trust item. + + ‘GPGME_ATTR_TYPE’ + This returns information about the type of key. For the + string function this will eother be "PGP" or "X.509". The + integer function returns 0 for PGP and 1 for X.509. It is + also used for the type of a trust item. + + ‘GPGME_ATTR_IS_SECRET’ + This specifies if the key is a secret key. It is + representable as a number, and is ‘1’ if the key is revoked, + and ‘0’ otherwise. + + ‘GPGME_ATTR_KEY_REVOKED’ + This specifies if a sub key is revoked. It is representable + as a number, and is ‘1’ if the key is revoked, and ‘0’ + otherwise. + + ‘GPGME_ATTR_KEY_INVALID’ + This specifies if a sub key is invalid. It is representable + as a number, and is ‘1’ if the key is invalid, and ‘0’ + otherwise. + + ‘GPGME_ATTR_KEY_EXPIRED’ + This specifies if a sub key is expired. It is representable + as a number, and is ‘1’ if the key is expired, and ‘0’ + otherwise. + + ‘GPGME_ATTR_KEY_DISABLED’ + This specifies if a sub key is disabled. It is representable + as a number, and is ‘1’ if the key is disabled, and ‘0’ + otherwise. + + ‘GPGME_ATTR_KEY_CAPS’ + This is a description of the capabilities of a sub key. It is + representable as a string. The string contains the letter “e” + if the key can be used for encryption, “s” if the key can be + used for signatures, and “c” if the key can be used for + certifications. + + ‘GPGME_ATTR_CAN_ENCRYPT’ + This specifies if a sub key can be used for encryption. It is + representable as a number, and is ‘1’ if the sub key can be + used for encryption, and ‘0’ otherwise. + + ‘GPGME_ATTR_CAN_SIGN’ + This specifies if a sub key can be used to create data + signatures. It is representable as a number, and is ‘1’ if + the sub key can be used for signatures, and ‘0’ otherwise. + + ‘GPGME_ATTR_CAN_CERTIFY’ + This specifies if a sub key can be used to create key + certificates. It is representable as a number, and is ‘1’ if + the sub key can be used for certifications, and ‘0’ otherwise. + + ‘GPGME_ATTR_SERIAL’ + The X.509 issuer serial attribute of the key. It is + representable as a string. + + ‘GPGME_ATTR_ISSUE’ + The X.509 issuer name attribute of the key. It is + representable as a string. + + ‘GPGME_ATTR_CHAINID’ + The X.509 chain ID can be used to build the certification + chain. It is representable as a string. + + -- Function: const char * gpgme_key_get_string_attr (gpgme_key_t KEY, + gpgme_attr_t WHAT, const void *RESERVED, int IDX) + The function ‘gpgme_key_get_string_attr’ returns the value of the + string-representable attribute WHAT of key KEY. If the attribute + is an attribute of a sub key or an user ID, IDX specifies the sub + key or user ID of which the attribute value is returned. The + argument RESERVED is reserved for later use and should be ‘NULL’. + + The string returned is only valid as long as the key is valid. + + The function returns ‘0’ if an attribute can’t be returned as a + string, KEY is not a valid pointer, IDX out of range, or RESERVED + not ‘NULL’. + + -- Function: unsigned long gpgme_key_get_ulong_attr (gpgme_key_t KEY, + gpgme_attr_t WHAT, const void *RESERVED, int IDX) + The function ‘gpgme_key_get_ulong_attr’ returns the value of the + number-representable attribute WHAT of key KEY. If the attribute + is an attribute of a sub key or an user ID, IDX specifies the sub + key or user ID of which the attribute value is returned. The + argument RESERVED is reserved for later use and should be ‘NULL’. + + The function returns ‘0’ if the attribute can’t be returned as a + number, KEY is not a valid pointer, IDX out of range, or RESERVED + not ‘NULL’. + + The signatures on a key are only available if the key was retrieved +via a listing operation with the ‘GPGME_KEYLIST_MODE_SIGS’ mode enabled, +because it is expensive to retrieve all signatures of a key. + + So, before using the below interfaces to retrieve the signatures on a +key, you have to make sure that the key was listed with signatures +enabled. One convenient, but blocking, way to do this is to use the +function ‘gpgme_get_key’. + + -- Data type: gpgme_attr_t + The ‘gpgme_attr_t’ type is used to specify a key signature + attribute. The following attributes are defined: + + ‘GPGME_ATTR_KEYID’ + This is the key ID of the key which was used for the + signature. It is representable as a string. + + ‘GPGME_ATTR_ALGO’ + This is the crypto algorithm used to create the signature. It + is representable as a string and as a number. The numbers + correspond to the ‘enum gcry_pk_algos’ values in the gcrypt + library. + + ‘GPGME_ATTR_CREATED’ + This is the timestamp at creation time of the signature. It + is representable as a number. + + ‘GPGME_ATTR_EXPIRE’ + This is the expiration time of the signature. It is + representable as a number. + + ‘GPGME_ATTR_USERID’ + This is the user ID associated with the signing key. The user + ID is representable as a number. + + ‘GPGME_ATTR_NAME’ + This is the name belonging to a user ID. It is representable + as a string. + + ‘GPGME_ATTR_EMAIL’ + This is the email address belonging to a user ID. It is + representable as a string. + + ‘GPGME_ATTR_COMMENT’ + This is the comment belonging to a user ID. It is + representable as a string. + + ‘GPGME_ATTR_KEY_REVOKED’ + This specifies if a key signature is a revocation signature. + It is representable as a number, and is ‘1’ if the key is + revoked, and ‘0’ otherwise. + + ‘GPGME_ATTR_SIG_CLASS’ + This specifies the signature class of a key signature. It is + representable as a number. The meaning is specific to the + crypto engine. + + ‘GPGME_ATTR_SIG_CLASS’ + This specifies the signature class of a key signature. It is + representable as a number. The meaning is specific to the + crypto engine. + + ‘GPGME_ATTR_SIG_STATUS’ + This is the same value as returned by ‘gpgme_get_sig_status’. + + -- Function: const char * gpgme_key_sig_get_string_attr + (gpgme_key_t KEY, int UID_IDX, gpgme_attr_t WHAT, + const void *RESERVED, int IDX) + The function ‘gpgme_key_sig_get_string_attr’ returns the value of + the string-representable attribute WHAT of the signature IDX on the + user ID UID_IDX in the key KEY. The argument RESERVED is reserved + for later use and should be ‘NULL’. + + The string returned is only valid as long as the key is valid. + + The function returns ‘0’ if an attribute can’t be returned as a + string, KEY is not a valid pointer, UID_IDX or IDX out of range, or + RESERVED not ‘NULL’. + + -- Function: unsigned long gpgme_key_sig_get_ulong_attr + (gpgme_key_t KEY, int UID_IDX, gpgme_attr_t WHAT, + const void *RESERVED, int IDX) + The function ‘gpgme_key_sig_get_ulong_attr’ returns the value of + the number-representable attribute WHAT of the signature IDX on the + user ID UID_IDX in the key KEY. The argument RESERVED is reserved + for later use and should be ‘NULL’. + + The function returns ‘0’ if an attribute can’t be returned as a + string, KEY is not a valid pointer, UID_IDX or IDX out of range, or + RESERVED not ‘NULL’. + + Trust items have attributes which can be queried using the interfaces +below. The attribute identifiers are shared with those for key +attributes. *Note Information About Keys::. + + -- Function: const char * gpgme_trust_item_get_string_attr + (gpgme_trust_item_t ITEM, gpgme_attr_t WHAT, + const void *RESERVED, int IDX) + The function ‘gpgme_trust_item_get_string_attr’ returns the value + of the string-representable attribute WHAT of trust item ITEM. The + arguments IDX and RESERVED are reserved for later use and should be + ‘0’ and ‘NULL’ respectively. + + The string returned is only valid as long as the key is valid. + + The function returns ‘0’ if an attribute can’t be returned as a + string, KEY is not a valid pointer, IDX out of range, or RESERVED + not ‘NULL’. + + -- Function: int gpgme_trust_item_get_int_attr + (gpgme_trust_item_t ITEM, gpgme_attr_t WHAT, + const void *RESERVED, int IDX) + The function ‘gpgme_trust_item_get_int_attr’ returns the value of + the number-representable attribute WHAT of trust item ITEM. If the + attribute occurs more than once in the trust item, the index is + specified by IDX. However, currently no such attribute exists, so + IDX should be ‘0’. The argument RESERVED is reserved for later use + and should be ‘NULL’. + + The function returns ‘0’ if the attribute can’t be returned as a + number, KEY is not a valid pointer, IDX out of range, or RESERVED + not ‘NULL’. + + -- Data type: enum gpgme_sig_stat_t + The ‘gpgme_sig_stat_t’ type holds the result of a signature check, + or the combined result of all signatures. The following results + are possible: + + ‘GPGME_SIG_STAT_NONE’ + This status should not occur in normal operation. + + ‘GPGME_SIG_STAT_GOOD’ + This status indicates that the signature is valid. For the + combined result this status means that all signatures are + valid. + + ‘GPGME_SIG_STAT_GOOD_EXP’ + This status indicates that the signature is valid but expired. + For the combined result this status means that all signatures + are valid and expired. + + ‘GPGME_SIG_STAT_GOOD_EXPKEY’ + This status indicates that the signature is valid but the key + used to verify the signature has expired. For the combined + result this status means that all signatures are valid and all + keys are expired. + + ‘GPGME_SIG_STAT_BAD’ + This status indicates that the signature is invalid. For the + combined result this status means that all signatures are + invalid. + + ‘GPGME_SIG_STAT_NOKEY’ + This status indicates that the signature could not be verified + due to a missing key. For the combined result this status + means that all signatures could not be checked due to missing + keys. + + ‘GPGME_SIG_STAT_NOSIG’ + This status indicates that the signature data provided was not + a real signature. + + ‘GPGME_SIG_STAT_ERROR’ + This status indicates that there was some other error which + prevented the signature verification. + + ‘GPGME_SIG_STAT_DIFF’ + For the combined result this status means that at least two + signatures have a different status. You can get each key’s + status with ‘gpgme_get_sig_status’. + + -- Function: const char * gpgme_get_sig_status (gpgme_ctx_t CTX, + int IDX, gpgme_sig_stat_t *R_STAT, time_t *R_CREATED) + The function ‘gpgme_get_sig_status’ is equivalent to: + + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + { + sig = sig->next; + idx--; + } + if (!sig || idx) + return NULL; + + if (r_stat) + { + switch (gpg_err_code (sig->status)) + { + case GPG_ERR_NO_ERROR: + *r_stat = GPGME_SIG_STAT_GOOD; + break; + + case GPG_ERR_BAD_SIGNATURE: + *r_stat = GPGME_SIG_STAT_BAD; + break; + + case GPG_ERR_NO_PUBKEY: + *r_stat = GPGME_SIG_STAT_NOKEY; + break; + + case GPG_ERR_NO_DATA: + *r_stat = GPGME_SIG_STAT_NOSIG; + break; + + case GPG_ERR_SIG_EXPIRED: + *r_stat = GPGME_SIG_STAT_GOOD_EXP; + break; + + case GPG_ERR_KEY_EXPIRED: + *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY; + break; + + default: + *r_stat = GPGME_SIG_STAT_ERROR; + break; + } + } + if (r_created) + *r_created = sig->timestamp; + return sig->fpr; + + -- Function: const char * gpgme_get_sig_string_attr (gpgme_ctx_t CTX, + int IDX, gpgme_attr_t WHAT, int WHATIDX) + The function ‘gpgme_get_sig_string_attr’ is equivalent to: + + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + { + sig = sig->next; + idx--; + } + if (!sig || idx) + return NULL; + + switch (what) + { + case GPGME_ATTR_FPR: + return sig->fpr; + + case GPGME_ATTR_ERRTOK: + if (whatidx == 1) + return sig->wrong_key_usage ? "Wrong_Key_Usage" : ""; + else + return ""; + default: + break; + } + + return NULL; + + -- Function: const char * gpgme_get_sig_ulong_attr (gpgme_ctx_t CTX, + int IDX, gpgme_attr_t WAHT, int WHATIDX) + The function ‘gpgme_get_sig_ulong_attr’ is equivalent to: + + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + { + sig = sig->next; + idx--; + } + if (!sig || idx) + return 0; + + switch (what) + { + case GPGME_ATTR_CREATED: + return sig->timestamp; + + case GPGME_ATTR_EXPIRE: + return sig->exp_timestamp; + + case GPGME_ATTR_VALIDITY: + return (unsigned long) sig->validity; + + case GPGME_ATTR_SIG_STATUS: + switch (sig->status) + { + case GPG_ERR_NO_ERROR: + return GPGME_SIG_STAT_GOOD; + + case GPG_ERR_BAD_SIGNATURE: + return GPGME_SIG_STAT_BAD; + + case GPG_ERR_NO_PUBKEY: + return GPGME_SIG_STAT_NOKEY; + + case GPG_ERR_NO_DATA: + return GPGME_SIG_STAT_NOSIG; + + case GPG_ERR_SIG_EXPIRED: + return GPGME_SIG_STAT_GOOD_EXP; + + case GPG_ERR_KEY_EXPIRED: + return GPGME_SIG_STAT_GOOD_EXPKEY; + + default: + return GPGME_SIG_STAT_ERROR; + } + + case GPGME_ATTR_SIG_SUMMARY: + return sig->summary; + + default: + break; + } + return 0; + + -- Function: const char * gpgme_get_sig_key (gpgme_ctx_t CTX, int IDX, + gpgme_key_t *R_KEY) + The function ‘gpgme_get_sig_key’ is equivalent to: + + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + { + sig = sig->next; + idx--; + } + if (!sig || idx) + return gpg_error (GPG_ERR_EOF); + + return gpgme_get_key (ctx, sig->fpr, r_key, 0); diff --git a/doc/gpgme.info-2 b/doc/gpgme.info-2 index 8c01702..1fdd935 100644 --- a/doc/gpgme.info-2 +++ b/doc/gpgme.info-2 @@ -1,7 +1,6 @@ This is gpgme.info, produced by makeinfo version 5.2 from gpgme.texi. -Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, -2014 g10 Code GmbH. +Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -20,11 +19,10 @@ END-INFO-DIR-ENTRY This file documents the GPGME library. - This is Edition 1.6.0, last updated 26 August 2015, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.6.0. + This is Edition 1.7.0-beta361, last updated 26 August 2015, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.7.0-beta361. - Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, -2013, 2014 g10 Code GmbH. + Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -38,6 +36,530 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.  +File: gpgme.info, Node: Library Copying, Next: Copying, Prev: Deprecated Functions, Up: Top + +GNU Lesser General Public License +********************************* + + Version 2.1, February 1999 + + Copyright © 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence the + version number 2.1.] + +Preamble +======== + +The licenses for most software are designed to take away your freedom to +share and change it. By contrast, the GNU General Public Licenses are +intended to guarantee your freedom to share and change free software—to +make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software—typically libraries—of the Free Software +Foundation and other authors who decide to use it. You can use it too, +but we suggest you first think carefully about whether this license or +the ordinary General Public License is the better strategy to use in any +particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of it +in new free programs; and that you are informed that you can do these +things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling it. +And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that there +is no warranty for the free library. Also, if the library is modified +by someone else and passed on, the recipients should know that what they +have is not the original version, so that the original author’s +reputation will not be affected by problems that might be introduced by +others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that any +patent license obtained for a version of the library must be consistent +with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and is +quite different from the ordinary General Public License. We use this +license for certain libraries in order to permit linking those libraries +into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the entire +combination fits its criteria of freedom. The Lesser General Public +License permits more lax criteria for linking other code with the +library. + + We call this license the "Lesser" General Public License because it +does _Less_ to protect the user’s freedom than the ordinary General +Public License. It also provides other free software developers Less of +an advantage over competing non-free programs. These disadvantages are +the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free library +does the same job as widely used non-free libraries. In this case, +there is little to gain by limiting the free library to free software +only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of free +software. For example, permission to use the GNU C Library in non-free +programs enables many more people to use the whole GNU operating system, +as well as its variant, the GNU/Linux operating system. + + Although the Lesser General Public License is Less protective of the +users’ freedom, it does ensure that the user of a program that is linked +with the Library has the freedom and the wherewithal to run that program +using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +“work based on the library” and a “work that uses the library”. The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other + program which contains a notice placed by the copyright holder or + other authorized party saying it may be distributed under the terms + of this Lesser General Public License (also called “this License”). + Each licensee is addressed as “you”. + + A “library” means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables. + + The “Library”, below, refers to any such software library or work + which has been distributed under these terms. A “work based on the + Library” means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or + translated straightforwardly into another language. (Hereinafter, + translation is included without limitation in the term + “modification”.) + + “Source code” for a work means the preferred form of the work for + making modifications to it. For a library, complete source code + means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to + control compilation and installation of the library. + + Activities other than copying, distribution and modification are + not covered by this License; they are outside its scope. The act + of running a program using the Library is not restricted, and + output from such a program is covered only if its contents + constitute a work based on the Library (independent of the use of + the Library in a tool for writing it). Whether that is true + depends on what the Library does and what the program that uses the + Library does. + + 1. You may copy and distribute verbatim copies of the Library’s + complete source code as you receive it, in any medium, provided + that you conspicuously and appropriately publish on each copy an + appropriate copyright notice and disclaimer of warranty; keep + intact all the notices that refer to this License and to the + absence of any warranty; and distribute a copy of this License + along with the Library. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange + for a fee. + + 2. You may modify your copy or copies of the Library or any portion of + it, thus forming a work based on the Library, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a. The modified work must itself be a software library. + + b. You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c. You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d. If a facility in the modified Library refers to a function or + a table of data to be supplied by an application program that + uses the facility, other than as an argument passed when the + facility is invoked, then you must make a good faith effort to + ensure that, in the event an application does not supply such + function or table, the facility still operates, and performs + whatever part of its purpose remains meaningful. + + (For example, a function in a library to compute square roots + has a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function + must be optional: if the application does not supply it, the + square root function must still compute square roots.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the + Library, and can be reasonably considered independent and separate + works in themselves, then this License, and its terms, do not apply + to those sections when you distribute them as separate works. But + when you distribute the same sections as part of a whole which is a + work based on the Library, the distribution of the whole must be on + the terms of this License, whose permissions for other licensees + extend to the entire whole, and thus to each and every part + regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Library. + + In addition, mere aggregation of another work not based on the + Library with the Library (or with a work based on the Library) on a + volume of a storage or distribution medium does not bring the other + work under the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public + License instead of this License to a given copy of the Library. To + do this, you must alter all the notices that refer to this License, + so that they refer to the ordinary GNU General Public License, + version 2, instead of to this License. (If a newer version than + version 2 of the ordinary GNU General Public License has appeared, + then you can specify that version instead if you wish.) Do not + make any other change in these notices. + + Once this change is made in a given copy, it is irreversible for + that copy, so the ordinary GNU General Public License applies to + all subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of the + Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or derivative + of it, under Section 2) in object code or executable form under the + terms of Sections 1 and 2 above provided that you accompany it with + the complete corresponding machine-readable source code, which must + be distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy + the source code from the same place satisfies the requirement to + distribute the source code, even though third parties are not + compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the + Library, but is designed to work with the Library by being compiled + or linked with it, is called a “work that uses the Library”. Such + a work, in isolation, is not a derivative work of the Library, and + therefore falls outside the scope of this License. + + However, linking a “work that uses the Library” with the Library + creates an executable that is a derivative of the Library (because + it contains portions of the Library), rather than a “work that uses + the library”. The executable is therefore covered by this License. + Section 6 states terms for distribution of such executables. + + When a “work that uses the Library” uses material from a header + file that is part of the Library, the object code for the work may + be a derivative work of the Library even though the source code is + not. Whether this is true is especially significant if the work + can be linked without the Library, or if the work is itself a + library. The threshold for this to be true is not precisely + defined by law. + + If such an object file uses only numerical parameters, data + structure layouts and accessors, and small macros and small inline + functions (ten lines or less in length), then the use of the object + file is unrestricted, regardless of whether it is legally a + derivative work. (Executables containing this object code plus + portions of the Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section + 6. Any executables containing that work also fall under Section 6, + whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or link + a “work that uses the Library” with the Library to produce a work + containing portions of the Library, and distribute that work under + terms of your choice, provided that the terms permit modification + of the work for the customer’s own use and reverse engineering for + debugging such modifications. + + You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered + by this License. You must supply a copy of this License. If the + work during execution displays copyright notices, you must include + the copyright notice for the Library among them, as well as a + reference directing the user to the copy of this License. Also, + you must do one of these things: + + a. Accompany the work with the complete corresponding + machine-readable source code for the Library including + whatever changes were used in the work (which must be + distributed under Sections 1 and 2 above); and, if the work is + an executable linked with the Library, with the complete + machine-readable “work that uses the Library”, as object code + and/or source code, so that the user can modify the Library + and then relink to produce a modified executable containing + the modified Library. (It is understood that the user who + changes the contents of definitions files in the Library will + not necessarily be able to recompile the application to use + the modified definitions.) + + b. Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run + time a copy of the library already present on the user’s + computer system, rather than copying library functions into + the executable, and (2) will operate properly with a modified + version of the library, if the user installs one, as long as + the modified version is interface-compatible with the version + that the work was made with. + + c. Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d. If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the + above specified materials from the same place. + + e. Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the “work that uses the + Library” must include any data and utility programs needed for + reproducing the executable from it. However, as a special + exception, the materials to be distributed need not include + anything that is normally distributed (in either source or binary + form) with the major components (compiler, kernel, and so on) of + the operating system on which the executable runs, unless that + component itself accompanies the executable. + + It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you + cannot use both them and the Library together in an executable that + you distribute. + + 7. You may place library facilities that are a work based on the + Library side-by-side in a single library together with other + library facilities not covered by this License, and distribute such + a combined library, provided that the separate distribution of the + work based on the Library and of the other library facilities is + otherwise permitted, and provided that you do these two things: + + a. Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b. Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same + work. + + 8. You may not copy, modify, sublicense, link with, or distribute the + Library except as expressly provided under this License. Any + attempt otherwise to copy, modify, sublicense, link with, or + distribute the Library is void, and will automatically terminate + your rights under this License. However, parties who have received + copies, or rights, from you under this License will not have their + licenses terminated so long as such parties remain in full + compliance. + + 9. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify + or distribute the Library or its derivative works. These actions + are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Library (or any work + based on the Library), you indicate your acceptance of this License + to do so, and all its terms and conditions for copying, + distributing or modifying the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the + Library), the recipient automatically receives a license from the + original licensor to copy, distribute, link with or modify the + Library subject to these terms and conditions. You may not impose + any further restrictions on the recipients’ exercise of the rights + granted herein. You are not responsible for enforcing compliance + by third parties with this License. + + 11. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent + issues), conditions are imposed on you (whether by court order, + agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this + License. If you cannot distribute so as to satisfy simultaneously + your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the + Library at all. For example, if a patent license would not permit + royalty-free redistribution of the Library by all those who receive + copies directly or indirectly through you, then the only way you + could satisfy both it and this License would be to refrain entirely + from distribution of the Library. + + If any portion of this section is held invalid or unenforceable + under any particular circumstance, the balance of the section is + intended to apply, and the section as a whole is intended to apply + in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of + any such claims; this section has the sole purpose of protecting + the integrity of the free software distribution system which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is + willing to distribute software through any other system and a + licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed + to be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in + certain countries either by patents or by copyrighted interfaces, + the original copyright holder who places the Library under this + License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only + in or among countries not thus excluded. In such case, this + License incorporates the limitation as if written in the body of + this License. + + 13. The Free Software Foundation may publish revised and/or new + versions of the Lesser General Public License from time to time. + Such new versions will be similar in spirit to the present version, + but may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Library specifies a version number of this License which applies to + it and “any later version”, you have the option of following the + terms and conditions either of that version or of any later version + published by the Free Software Foundation. If the Library does not + specify a license version number, you may choose any version ever + published by the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free + programs whose distribution conditions are incompatible with these, + write to the author to ask for permission. For software which is + copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free + status of all derivatives of our free software and of promoting the + sharing and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE + LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS + AND/OR OTHER PARTIES PROVIDE THE LIBRARY “AS IS” WITHOUT WARRANTY + OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE + DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR + OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY + OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Libraries +============================================== + +If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of +the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should have +at least the “copyright” line and a pointer to where the full notice is +found. + + ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. + Copyright (C) YEAR NAME OF AUTHOR + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at + your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, + USA. + + Also add information on how to contact you by electronic and paper +mail. + + You should also get your employer (if you work as a programmer) or +your school, if any, to sign a “copyright disclaimer” for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the library + `Frob' (a library for tweaking knobs) written by James Random Hacker. + + SIGNATURE OF TY COON, 1 April 1990 + Ty Coon, President of Vice + + That’s all there is to it! + + File: gpgme.info, Node: Copying, Next: Concept Index, Prev: Library Copying, Up: Top GNU General Public License @@ -767,10 +1289,9 @@ Concept Index * algorithms, public key: Public Key Algorithms. (line 6) * armor mode: ASCII Armor. (line 6) * ASCII armor: ASCII Armor. (line 6) +* ASSUAN: Assuan. (line 6) * attributes, of a key: Information About Keys. (line 6) -* attributes, of a trust item: Information About Trust Items. - (line 6) * autoconf: Using Automake. (line 6) * automake: Using Automake. (line 6) * backend: Protocols and Engines. (line 6) @@ -794,6 +1315,7 @@ Concept Index * context, creation: Creating Contexts. (line 6) * context, destruction: Destroying Contexts. (line 6) * context, offline mode: Offline Mode. (line 6) +* context, pinentry mode: Pinentry Mode. (line 6) * context, result of operation: Result Management. (line 6) * context, selecting protocol: Protocol Selection. (line 6) * context, text mode: Text Mode. (line 6) @@ -836,8 +1358,10 @@ Concept Index * debug: Debugging. (line 6) * decryption: Decrypt. (line 6) * decryption and verification: Decrypt and Verify. (line 6) +* deprecated: Deprecated Functions. (line 6) * encryption: Encrypt. (line 6) * engine: Protocols and Engines. (line 6) +* engine, ASSUAN: Assuan. (line 6) * engine, configuration of: Engine Configuration. (line 6) * engine, configuration per context: Crypto Engine. (line 6) * engine, GnuPG: OpenPGP. (line 6) @@ -890,7 +1414,7 @@ Concept Index * key, information about: Information About Keys. (line 6) * key, manipulation: Manipulating Keys. (line 6) -* key, signatures: Key Signatures. (line 6) +* key, signing: Signing Keys. (line 6) * largefile support: Largefile Support (LFS). (line 6) * LFS: Largefile Support (LFS). @@ -909,11 +1433,13 @@ Concept Index * OpenPGP: OpenPGP. (line 6) * passphrase callback: Passphrase Callback. (line 6) * passphrase, change: Changing Passphrases. (line 6) +* pinentry mode: Pinentry Mode. (line 6) * policy URL: Signature Notation Data. (line 6) * progress meter callback: Progress Meter Callback. (line 6) * protocol: Protocols and Engines. (line 6) +* protocol, ASSUAN: Assuan. (line 6) * protocol, CMS: Cryptographic Message Syntax. (line 6) * protocol, GnuPG: OpenPGP. (line 6) @@ -936,7 +1462,6 @@ Concept Index * signature, creation: Sign. (line 6) * signature, selecting signers: Selecting Signers. (line 6) * signature, verification: Verify. (line 6) -* signatures, on a key: Key Signatures. (line 6) * signers, selecting: Selecting Signers. (line 6) * status message callback: Status Message Callback. (line 6) @@ -944,16 +1469,13 @@ Concept Index * thread-safeness: Multi Threading. (line 6) * trust item: Trust Item Management. (line 6) * trust item list: Listing Trust Items. (line 6) -* trust item, attributes: Information About Trust Items. - (line 6) -* trust item, information about: Information About Trust Items. - (line 6) * trust item, manipulation: Manipulating Trust Items. (line 6) * type of data: Data Buffer Convenience. (line 6) * UI server: UI Server Protocol. (line 6) * user interface server: UI Server Protocol. (line 6) +* validity, TOFU: Changing TOFU Data. (line 6) * verification: Verify. (line 6) * verification and decryption: Decrypt and Verify. (line 6) * version check, of the engines: Engine Version Check. (line 6) @@ -994,22 +1516,26 @@ Function and Data Index * enum gpgme_event_io_t: I/O Callback Interface. (line 58) * enum gpgme_hash_algo_t: Hash Algorithms. (line 9) +* enum gpgme_pinentry_mode_t: Pinentry Mode. (line 19) * enum gpgme_protocol_t: Protocols and Engines. (line 16) * enum gpgme_pubkey_algo_t: Public Key Algorithms. (line 9) * enum gpgme_sig_mode_t: Creating a Signature. (line 6) -* enum gpgme_sig_stat_t: Verify. (line 273) +* enum gpgme_sig_stat_t: Deprecated Functions. + (line 427) +* enum gpgme_tofu_policy_t: Changing TOFU Data. (line 10) * FILE: UI Server Set Input Files. (line 9) * GETINFO: Miscellaneous UI Server Commands. (line 9) -* gpgme_attr_t: Information About Keys. - (line 41) -* gpgme_attr_t <1>: Key Signatures. (line 19) +* gpgme_attr_t: Deprecated Functions. + (line 136) +* gpgme_attr_t <1>: Deprecated Functions. + (line 313) * gpgme_cancel: Cancellation. (line 16) -* gpgme_cancel_async: Cancellation. (line 37) +* gpgme_cancel_async: Cancellation. (line 36) * gpgme_check_version: Library Version Check. (line 6) * gpgme_ctx_get_engine_info: Crypto Engine. (line 12) @@ -1018,7 +1544,7 @@ Function and Data Index * gpgme_data_encoding_t: Data Buffer Meta-Data. (line 28) * gpgme_data_get_encoding: Data Buffer Meta-Data. - (line 66) + (line 69) * gpgme_data_get_file_name: Data Buffer Meta-Data. (line 6) * gpgme_data_identify: Data Buffer Convenience. @@ -1037,8 +1563,8 @@ Function and Data Index (line 22) * gpgme_data_new_from_stream: File Based Data Buffers. (line 29) -* gpgme_data_new_with_read_cb: Callback Based Data Buffers. - (line 98) +* gpgme_data_new_with_read_cb: Deprecated Functions. + (line 107) * gpgme_data_read: Data Buffer I/O Operations. (line 6) * gpgme_data_read_cb_t: Callback Based Data Buffers. @@ -1049,16 +1575,18 @@ Function and Data Index (line 11) * gpgme_data_release_cb_t: Callback Based Data Buffers. (line 56) -* gpgme_data_rewind: Data Buffer I/O Operations. - (line 60) +* gpgme_data_rewind: Deprecated Functions. + (line 130) * gpgme_data_seek: Data Buffer I/O Operations. (line 25) * gpgme_data_seek_cb_t: Callback Based Data Buffers. (line 47) * gpgme_data_set_encoding: Data Buffer Meta-Data. - (line 72) + (line 75) * gpgme_data_set_file_name: Data Buffer Meta-Data. (line 16) +* gpgme_data_set_flag: Data Buffer Meta-Data. + (line 80) * gpgme_data_t: Exchanging Data. (line 13) * gpgme_data_type_t: Data Buffer Convenience. (line 7) @@ -1067,17 +1595,25 @@ Function and Data Index * gpgme_data_write_cb_t: Callback Based Data Buffers. (line 30) * gpgme_decrypt_result_t: Decrypt. (line 54) -* gpgme_edit_cb_t: Advanced Key Editing. - (line 9) +* gpgme_edit_cb_t: Deprecated Functions. + (line 36) * gpgme_encrypt_result_t: Encrypting a Plaintext. - (line 87) + (line 93) * gpgme_engine_check_version: Engine Version Check. - (line 35) + (line 62) * gpgme_engine_info_t: Engine Information. (line 6) * gpgme_error: Error Values. (line 65) * gpgme_error_from_errno: Error Values. (line 88) * gpgme_error_t: Error Values. (line 24) -* gpgme_error_t (*gpgme_edit_cb_t) (void *HANDLE, gpgme_status_code_t STATUS, const char *ARGS, int FD): Advanced Key Editing. +* gpgme_error_t (*gpgme_assuan_data_cb_t) (void *OPAQUE, const void *DATA, size_t DATALEN): Using the Assuan protocol. + (line 15) +* gpgme_error_t (*gpgme_assuan_inquire_cb_t) (void *OPAQUE, const char *NAME, const char *ARGS, gpgme_data_t *R_DATA): Using the Assuan protocol. + (line 23) +* gpgme_error_t (*gpgme_assuan_status_cb_t) (void *OPAQUE, const char *STATUS, const char *ARGS): Using the Assuan protocol. + (line 35) +* gpgme_error_t (*gpgme_edit_cb_t) (void *HANDLE, gpgme_status_code_t STATUS, const char *ARGS, int FD): Deprecated Functions. + (line 33) +* gpgme_error_t (*gpgme_interact_cb_t) (void *HANDLE, const char *STATUS, const char *ARGS, int FD): Advanced Key Editing. (line 6) * gpgme_error_t (*gpgme_io_cb_t) (void *DATA, int FD): I/O Callback Interface. (line 6) @@ -1101,7 +1637,7 @@ Function and Data Index (line 7) * gpgme_free: Destroying Data Buffers. (line 25) -* gpgme_genkey_result_t: Generating Keys. (line 74) +* gpgme_genkey_result_t: Generating Keys. (line 295) * gpgme_get_armor: ASCII Armor. (line 13) * gpgme_get_dirinfo: Engine Version Check. (line 6) @@ -1111,48 +1647,68 @@ Function and Data Index * gpgme_get_io_cbs: Registering I/O Callbacks. (line 44) * gpgme_get_key: Listing Keys. (line 147) -* gpgme_get_keylist_mode: Key Listing Mode. (line 68) +* gpgme_get_keylist_mode: Key Listing Mode. (line 73) * gpgme_get_offline: Offline Mode. (line 23) -* gpgme_get_passphrase_cb: Passphrase Callback. (line 55) +* gpgme_get_passphrase_cb: Passphrase Callback. (line 59) +* gpgme_get_pinentry_mode: Pinentry Mode. (line 14) * gpgme_get_progress_cb: Progress Meter Callback. (line 31) * gpgme_get_protocol: Protocol Selection. (line 21) * gpgme_get_protocol_name: Protocols and Engines. - (line 48) -* gpgme_get_sig_key: Verify. (line 472) -* gpgme_get_sig_status: Verify. (line 321) -* gpgme_get_sig_string_attr: Verify. (line 376) -* gpgme_get_sig_ulong_attr: Verify. (line 410) + (line 51) +* gpgme_get_sig_key: Deprecated Functions. + (line 626) +* gpgme_get_sig_status: Deprecated Functions. + (line 475) +* gpgme_get_sig_string_attr: Deprecated Functions. + (line 530) +* gpgme_get_sig_ulong_attr: Deprecated Functions. + (line 564) * gpgme_get_status_cb: Status Message Callback. (line 29) * gpgme_get_textmode: Text Mode. (line 20) * gpgme_hash_algo_name: Hash Algorithms. (line 28) * gpgme_hash_algo_t: Hash Algorithms. (line 10) -* gpgme_import_result_t: Importing Keys. (line 111) -* gpgme_import_status_t: Importing Keys. (line 73) +* gpgme_import_result_t: Importing Keys. (line 110) +* gpgme_import_status_t: Importing Keys. (line 72) +* gpgme_interact_cb_t: Advanced Key Editing. + (line 9) * gpgme_invalid_key_t: Crypto Operations. (line 10) * gpgme_io_cb_t: I/O Callback Interface. (line 7) * gpgme_keylist_result_t: Listing Keys. (line 124) -* gpgme_key_get_string_attr: Information About Keys. - (line 183) -* gpgme_key_get_ulong_attr: Information About Keys. - (line 197) +* gpgme_key_get_string_attr: Deprecated Functions. + (line 278) +* gpgme_key_get_ulong_attr: Deprecated Functions. + (line 292) * gpgme_key_ref: Manipulating Keys. (line 6) -* gpgme_key_release: Manipulating Keys. (line 19) -* gpgme_key_sig_get_string_attr: Key Signatures. (line 75) -* gpgme_key_sig_get_ulong_attr: Key Signatures. (line 89) -* gpgme_key_sig_t: Key Management. (line 92) -* gpgme_key_t: Key Management. (line 200) +* gpgme_key_release: Deprecated Functions. + (line 14) +* gpgme_key_sig_get_string_attr: Deprecated Functions. + (line 369) +* gpgme_key_sig_get_ulong_attr: Deprecated Functions. + (line 383) +* gpgme_key_sig_t: Key objects. (line 226) +* gpgme_key_t: Key objects. (line 10) * gpgme_key_unref: Manipulating Keys. (line 10) * gpgme_new: Creating Contexts. (line 6) * gpgme_new_signature_t: Creating a Signature. (line 57) * gpgme_off_t: Exchanging Data. (line 24) -* gpgme_op_card_edit: Advanced Key Editing. - (line 48) -* gpgme_op_card_edit_start: Advanced Key Editing. - (line 55) +* gpgme_op_adduid: Generating Keys. (line 161) +* gpgme_op_adduid_start: Generating Keys. (line 185) +* gpgme_op_assuan_transact_ext: Using the Assuan protocol. + (line 56) +* gpgme_op_assuan_transact_start: Using the Assuan protocol. + (line 43) +* gpgme_op_card_edit: Deprecated Functions. + (line 82) +* gpgme_op_card_edit_start: Deprecated Functions. + (line 92) +* gpgme_op_createkey: Generating Keys. (line 14) +* gpgme_op_createkey_start: Generating Keys. (line 99) +* gpgme_op_createsubkey: Generating Keys. (line 109) +* gpgme_op_createsubkey_start: Generating Keys. (line 151) * gpgme_op_decrypt: Decrypt. (line 6) * gpgme_op_decrypt_result: Decrypt. (line 76) * gpgme_op_decrypt_start: Decrypt. (line 20) @@ -1160,44 +1716,53 @@ Function and Data Index * gpgme_op_decrypt_verify <1>: Decrypt and Verify. (line 30) * gpgme_op_delete: Deleting Keys. (line 6) * gpgme_op_delete_start: Deleting Keys. (line 20) -* gpgme_op_edit: Advanced Key Editing. - (line 19) -* gpgme_op_edit_start: Advanced Key Editing. - (line 37) +* gpgme_op_edit: Deprecated Functions. + (line 47) +* gpgme_op_edit_start: Deprecated Functions. + (line 68) * gpgme_op_encrypt: Encrypting a Plaintext. (line 6) * gpgme_op_encrypt_result: Encrypting a Plaintext. - (line 98) + (line 104) * gpgme_op_encrypt_sign: Encrypting a Plaintext. - (line 109) + (line 115) * gpgme_op_encrypt_sign_start: Encrypting a Plaintext. - (line 119) + (line 125) * gpgme_op_encrypt_start: Encrypting a Plaintext. - (line 70) + (line 76) * gpgme_op_export: Exporting Keys. (line 38) * gpgme_op_export_ext: Exporting Keys. (line 69) * gpgme_op_export_ext_start: Exporting Keys. (line 90) * gpgme_op_export_keys: Exporting Keys. (line 101) * gpgme_op_export_keys_start: Exporting Keys. (line 124) * gpgme_op_export_start: Exporting Keys. (line 58) -* gpgme_op_genkey: Generating Keys. (line 6) -* gpgme_op_genkey_result: Generating Keys. (line 95) -* gpgme_op_genkey_start: Generating Keys. (line 63) +* gpgme_op_genkey: Generating Keys. (line 225) +* gpgme_op_genkey_result: Generating Keys. (line 328) +* gpgme_op_genkey_start: Generating Keys. (line 283) * gpgme_op_import: Importing Keys. (line 9) -* gpgme_op_import_ext: Importing Keys. (line 175) +* gpgme_op_import_ext: Deprecated Functions. + (line 22) * gpgme_op_import_keys: Importing Keys. (line 35) -* gpgme_op_import_keys_start: Importing Keys. (line 60) -* gpgme_op_import_result: Importing Keys. (line 161) +* gpgme_op_import_keys_start: Importing Keys. (line 59) +* gpgme_op_import_result: Importing Keys. (line 160) * gpgme_op_import_start: Importing Keys. (line 24) +* gpgme_op_interact: Advanced Key Editing. + (line 21) +* gpgme_op_interact_start: Advanced Key Editing. + (line 46) * gpgme_op_keylist_end: Listing Keys. (line 81) * gpgme_op_keylist_ext_start: Listing Keys. (line 33) * gpgme_op_keylist_next: Listing Keys. (line 65) * gpgme_op_keylist_result: Listing Keys. (line 135) * gpgme_op_keylist_start: Listing Keys. (line 6) +* gpgme_op_keysign: Signing Keys. (line 12) +* gpgme_op_keysign_start: Signing Keys. (line 68) * gpgme_op_passwd: Changing Passphrases. (line 6) * gpgme_op_passwd_start: Changing Passphrases. (line 19) +* gpgme_op_revuid: Generating Keys. (line 192) +* gpgme_op_revuid_start: Generating Keys. (line 218) * gpgme_op_sign: Creating a Signature. (line 21) * gpgme_op_sign_result: Creating a Signature. @@ -1208,20 +1773,25 @@ Function and Data Index (line 13) * gpgme_op_spawn_start: Running other Programs. (line 38) +* gpgme_op_tofu_policy: Changing TOFU Data. (line 27) +* gpgme_op_tofu_policy_start: Changing TOFU Data. (line 39) * gpgme_op_trustlist_end: Listing Trust Items. (line 44) * 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 256) +* gpgme_op_verify_result: Verify. (line 262) * gpgme_op_verify_start: Verify. (line 26) * gpgme_passphrase_cb_t: Passphrase Callback. (line 10) +* gpgme_pinentry_mode_t: Pinentry Mode. (line 20) * gpgme_progress_cb_t: Progress Meter Callback. (line 8) * gpgme_protocol_t: Protocols and Engines. (line 17) * gpgme_protocol_t <1>: Engine Information. (line 7) * gpgme_pubkey_algo_name: Public Key Algorithms. - (line 47) + (line 50) +* gpgme_pubkey_algo_string: Public Key Algorithms. + (line 59) * gpgme_pubkey_algo_t: Public Key Algorithms. (line 10) * gpgme_recipient_t: Decrypt. (line 30) @@ -1231,6 +1801,8 @@ Function and Data Index * gpgme_result_ref: Result Management. (line 14) * gpgme_result_unref: Result Management. (line 20) * gpgme_set_armor: ASCII Armor. (line 6) +* gpgme_set_ctx_flag: Status Message Callback. + (line 37) * gpgme_set_engine_info: Engine Configuration. (line 11) * gpgme_set_global_flag: Library Version Check. @@ -1243,6 +1815,7 @@ Function and Data Index * gpgme_set_locale: Locale. (line 14) * gpgme_set_offline: Offline Mode. (line 6) * gpgme_set_passphrase_cb: Passphrase Callback. (line 36) +* gpgme_set_pinentry_mode: Pinentry Mode. (line 6) * gpgme_set_progress_cb: Progress Meter Callback. (line 16) * gpgme_set_protocol: Protocol Selection. (line 6) @@ -1250,10 +1823,10 @@ Function and Data Index (line 17) * gpgme_set_textmode: Text Mode. (line 6) * gpgme_signature_t: Verify. (line 88) -* gpgme_signers_add: Selecting Signers. (line 13) -* gpgme_signers_clear: Selecting Signers. (line 6) -* gpgme_signers_count: Selecting Signers. (line 20) -* gpgme_signers_enum: Selecting Signers. (line 24) +* gpgme_signers_add: Selecting Signers. (line 18) +* gpgme_signers_clear: Selecting Signers. (line 11) +* gpgme_signers_count: Selecting Signers. (line 25) +* gpgme_signers_enum: Selecting Signers. (line 29) * gpgme_sign_result_t: Creating a Signature. (line 85) * gpgme_sig_mode_t: Creating a Signature. @@ -1265,30 +1838,32 @@ Function and Data Index * gpgme_sig_notation_get: Signature Notation Data. (line 41) * gpgme_sig_notation_t: Verify. (line 38) -* gpgme_sig_stat_t: Verify. (line 274) +* gpgme_sig_stat_t: Deprecated Functions. + (line 428) * gpgme_ssize_t: Exchanging Data. (line 30) * gpgme_status_cb_t: Status Message Callback. (line 8) * gpgme_strerror: Error Strings. (line 6) * gpgme_strerror_r: Error Strings. (line 15) * gpgme_strsource: Error Strings. (line 26) -* gpgme_subkey_t: Key Management. (line 11) -* gpgme_trust_item_get_int_attr: Information About Trust Items. - (line 28) -* gpgme_trust_item_get_string_attr: Information About Trust Items. - (line 14) +* gpgme_subkey_t: Key objects. (line 94) +* gpgme_tofu_policy_t: Changing TOFU Data. (line 11) +* gpgme_trust_item_get_int_attr: Deprecated Functions. + (line 413) +* gpgme_trust_item_get_string_attr: Deprecated Functions. + (line 399) * gpgme_trust_item_ref: Manipulating Trust Items. (line 6) -* gpgme_trust_item_release: Manipulating Trust Items. - (line 20) +* gpgme_trust_item_release: Deprecated Functions. + (line 18) * gpgme_trust_item_t: Trust Item Management. (line 8) * gpgme_trust_item_unref: Manipulating Trust Items. (line 10) -* gpgme_user_id_t: Key Management. (line 165) +* gpgme_user_id_t: Key objects. (line 180) * gpgme_validity_t: Information About Keys. (line 9) -* gpgme_verify_result_t: Verify. (line 241) +* gpgme_verify_result_t: Verify. (line 247) * gpgme_wait: Waiting For Completion. (line 6) * IMPORT_FILES: UI Server Import/Export Keys. diff --git a/doc/gpgme.texi b/doc/gpgme.texi index c02a30f..ec7ebb7 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -1,6 +1,7 @@ \input texinfo @c -*- mode: texinfo; coding: utf-8; -*- @documentencoding UTF-8 @setfilename gpgme.info +@include defs.inc @settitle The `GnuPG Made Easy' Reference Manual @dircategory GNU Libraries @@ -13,8 +14,7 @@ @syncodeindex pg fn @copying -Copyright @copyright{} 2002, 2003, 2004, 2005, 2006, 2007, -2008, 2010, 2012, 2013, 2014 g10 Code GmbH. +Copyright @copyright{} 2002--2008, 2010, 2012--2016 g10 Code GmbH. @quotation Permission is granted to copy, distribute and/or modify this document @@ -30,8 +30,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @end copying -@include version.texi - @c Macros used by the description of the UI server protocol @macro clnt @sc{c:} @c @@ -72,7 +70,7 @@ This is Edition @value{EDITION}, last updated @value{UPDATED}, of @center for version @value{VERSION} @page @vskip 0pt plus 1filll -Published by g10 Code GmbH@* Hüttenstr. 61@* 40699 Erkrath, Germany +Published by The GnuPG Project@* c/o g10 Code GmbH@* Hüttenstr. 61@* 40699 Erkrath, Germany @insertcopying @end titlepage @@ -102,6 +100,7 @@ Appendices * UI Server Protocol:: The GnuPG UI Server Protocol. * Debugging:: How to solve problems. +* Deprecated Functions:: Documentation of deprecated functions. * Library Copying:: The GNU Lesser General Public License says how you can copy and share `GnuPG Made Easy'. @@ -199,21 +198,22 @@ Context Attributes Key Management +* Key objects:: Description of the key structures. * Listing Keys:: Browsing the list of available keys. * Information About Keys:: Requesting detailed information about keys. -* Key Signatures:: Listing the signatures on a key. * Manipulating Keys:: Operations on keys. * Generating Keys:: Creating new key pairs. +* Signing Keys:: Adding key signatures to public keys. * Exporting Keys:: Retrieving key data from the key ring. * Importing Keys:: Adding keys to the key ring. * Deleting Keys:: Removing keys from the key ring. * Changing Passphrases:: Change the passphrase of a key. +* Changing TOFU Data:: Changing data pertaining to TOFU. * Advanced Key Editing:: Advanced key edit operation. Trust Item Management * Listing Trust Items:: Browsing the list of available trust items. -* Information About Trust Items:: Requesting information about trust items. * Manipulating Trust Items:: Operations on trust items. Crypto Operations @@ -298,6 +298,13 @@ library. Experienced programmers might want to start looking at the examples at the end of the manual, and then only read up those parts of the interface which are unclear. +The documentation for the language bindings is currently not included +in this manual. Those languages bindings follow the general +programming model of @acronym{GPGME} but may provide some extra high +level abstraction on top of the @acronym{GPGME} style API. For now +please see the README files in the @file{lang/} directory of the +source distribution. + @node Features @section Features @@ -324,8 +331,11 @@ the programmer can focus on the other parts of the program, and still integrate strong cryptography in his application. Once support for @acronym{GPGME} has been added to a program, it is easy to add support for other crypto protocols once @acronym{GPGME} backends provide them. -@end table +@item it's language friendly +@acronym{GPGME} comes with languages bindings for several common +programming languages: Common Lisp, C++, Python 2, and Python 3. +@end table @node Overview @section Overview @@ -451,6 +461,19 @@ any other option to select the thread package you want to link with. Supported thread packages are @option{--thread=pth} and @option{--thread=pthread}. +If you need to detect the installed language bindings you can use list +them using: + +@example +gpgme-config --print-lang +@end example + +or test for the availability using + +@example +gpgme-config --have-lang=python && echo 'Bindings for Pythons available' +@end example + @node Largefile Support (LFS) @section Largefile Support (LFS) @@ -679,12 +702,12 @@ as early as possible --- even before @code{gpgme_check_version}. The features are identified by the following values for @var{name}: @table @code -@item "debug" +@item debug To enable debugging use the string ``debug'' for @var{name} and @var{value} identical to the value used with the environment variable @code{GPGME_DEBUG}. -@item "disable-gpgconf" +@item disable-gpgconf Using this feature with any @var{value} disables the detection of the gpgconf program and thus forces GPGME to fallback into the simple OpenPGP only mode. It may be used to force the use of GnuPG-1 on @@ -692,8 +715,8 @@ systems which have both GPG versions installed. Note that in general the use of @code{gpgme_set_engine_info} is a better way to select a specific engine version. -@item "gpgconf-name" -@itemx "gpg-name" +@item gpgconf-name +@itemx gpg-name Set the name of the gpgconf respective gpg binary. The defaults are @code{GNU/GnuPG/gpgconf} and @code{GNU/GnuPG/gpg}. Under Unix the leading directory part is ignored. Under Windows the leading @@ -701,6 +724,22 @@ directory part is used as the default installation directory; the @code{.exe} suffix is added by GPGME. Use forward slashed even under Windows. +@item require-gnupg +Set the mimimum version of the required GnuPG engine. If that version +is not met, GPGME fails early instead of trying to use the existant +version. The given version must be a string with major, minor, and +micro number. Example: "2.1.0". + +@item w32-inst-dir +On Windows GPGME needs to know its installation directory to find its +spawn helper. This is in general no problem because a DLL has this +information. Some applications however link statically to GPGME and +thus GPGME can only figure out the installation directory of this +application which may be wrong in certain cases. By supplying an +installation directory as value to this flag, GPGME will assume that +that directory is the installation directory. This flag has no effect +on non-Windows platforms. + @end table This function returns @code{0} on success. In contrast to other @@ -862,9 +901,12 @@ This specifies the OpenPGP protocol. @item GPGME_PROTOCOL_CMS This specifies the Cryptographic Message Syntax. -@item GPGME_PROTOCOL_ASSUAN +@item GPGME_PROTOCOL_GPGCONF Under development. Please ask on @email{gnupg-devel@@gnupg.org} for help. +@item GPGME_PROTOCOL_ASSUAN +This specifies the raw Assuan protocol. + @item GPGME_PROTOCOL_G13 Under development. Please ask on @email{gnupg-devel@@gnupg.org} for help. @@ -895,6 +937,7 @@ allocated string describing the protocol @var{protocol}, or * Engine Configuration:: Changing the engine configuration. * OpenPGP:: Support for the OpenPGP protocol. * Cryptographic Message Syntax:: Support for the CMS. +* Assuan:: Support for the raw Assuan protocol. @end menu @@ -914,9 +957,34 @@ supported values for @var{what} are: @item homedir Return the default home directory. +@item sysconfdir +Return the name of the system configuration directory + +@item bindir +Return the name of the directory with GnuPG program files. + +@item libdir +Return the name of the directory with GnuPG related library files. + +@item libexecdir +Return the name of the directory with GnuPG helper program files. + +@item datadir +Return the name of the directory with GnuPG shared data. + +@item localedir +Return the name of the directory with GnuPG locale data. + @item agent-socket Return the name of the socket to connect to the gpg-agent. +@item agent-ssh-socket +Return the name of the socket to connect to the ssh-agent component of +gpg-agent. + +@item dirmngr-socket +Return the name of the socket to connect to the dirmngr. + @item uiserver-socket Return the name of the socket to connect to the user interface server. @@ -1099,6 +1167,20 @@ GnuPG. The @acronym{CMS} protocol is specified by @code{GPGME_PROTOCOL_CMS}. +@node Assuan +@section Assuan +@cindex ASSUAN +@cindex protocol, ASSUAN +@cindex engine, ASSUAN + +Assuan is the RPC library used by the various @acronym{GnuPG} +components. The Assuan protocol allows one to talk to arbitrary +Assuan servers using @acronym{GPGME}. @xref{Using the Assuan +protocol}. + +The ASSUAN protocol is specified by @code{GPGME_PROTOCOL_ASSUAN}. + + @node Algorithms @chapter Algorithms @cindex algorithms @@ -1161,6 +1243,9 @@ Algorithm as defined by FIPS 186-2 and RFC-6637. This value indicates ECDH, the Eliptic Curve Diffie-Hellmann encryption algorithm as defined by RFC-6637. +@item GPGME_PK_EDDSA +This value indicates the EdDSA algorithm. + @end table @end deftp @@ -1174,6 +1259,14 @@ If @var{algo} is not a valid public key algorithm, @code{NULL} is returned. @end deftypefun +@deftypefun {char *} gpgme_pubkey_algo_string (@w{gpgme_subkey_t @var{key}}) +The function @code{gpgme_pubkey_algo_string} is a convenience function +to build and return an algorithm string in the same way GnuPG does +(e.g. ``rsa2048'' or ``ed25519''). The caller must free the result +using @code{gpgme_free}. On error (e.g. invalid argument or memory +exhausted), the function returns NULL and sets @code{ERRNO}. +@end deftypefun + @node Hash Algorithms @section Hash Algorithms @@ -1899,33 +1992,6 @@ data object was successfully created, and @code{GPG_ERR_ENOMEM} if not enough memory is available. @end deftypefun -The following interface is deprecated and only provided for backward -compatibility. Don't use it. It will be removed in a future version -of @acronym{GPGME}. - -@deftypefun gpgme_error_t gpgme_data_new_with_read_cb (@w{gpgme_data_t *@var{dh}}, @w{int (*@var{readfunc})} (@w{void *@var{hook}}, @w{char *@var{buffer}}, @w{size_t @var{count}}, @w{size_t *@var{nread}}), @w{void *@var{hook_value}}) -The function @code{gpgme_data_new_with_read_cb} creates a new -@code{gpgme_data_t} object and uses the callback function @var{readfunc} -to retrieve the data on demand. As the callback function can supply -the data in any way it wants, this is the most flexible data type -@acronym{GPGME} provides. However, it can not be used to write data. - -The callback function receives @var{hook_value} as its first argument -whenever it is invoked. It should return up to @var{count} bytes in -@var{buffer}, and return the number of bytes actually read in -@var{nread}. It may return @code{0} in @var{nread} if no data is -currently available. To indicate @code{EOF} the function should -return with an error code of @code{-1} and set @var{nread} to -@code{0}. The callback function may support to reset its internal -read pointer if it is invoked with @var{buffer} and @var{nread} being -@code{NULL} and @var{count} being @code{0}. - -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -data object was successfully created, @code{GPG_ERR_INV_VALUE} if -@var{dh} or @var{readfunc} is not a valid pointer, and -@code{GPG_ERR_ENOMEM} if not enough memory is available. -@end deftypefun - @node Destroying Data Buffers @section Destroying Data Buffers @@ -1954,9 +2020,11 @@ case, the data object @var{dh} is destroyed. @deftypefun void gpgme_free (@w{void *@var{buffer}}) The function @code{gpgme_free} releases the memory returned by -@code{gpgme_data_release_and_get_mem}. It should be used instead of -the system libraries @code{free} function in case different allocators -are used in a single program. +@code{gpgme_data_release_and_get_mem} and +@code{gpgme_pubkey_algo_string}. It should be used instead of the +system libraries @code{free} function in case different allocators are +used by a program. This is often the case if gpgme is used under +Windows as a DLL. @end deftypefun @@ -2035,20 +2103,6 @@ read/write position. If the function fails, -1 is returned and @var{errno} is set. @end deftypefun -The following function is deprecated and should not be used. It will -be removed in a future version of @acronym{GPGME}. - -@deftypefun gpgme_error_t gpgme_data_rewind (@w{gpgme_data_t @var{dh}}) -The function @code{gpgme_data_rewind} is equivalent to: - -@example - return (gpgme_data_seek (dh, 0, SEEK_SET) == -1) - ? gpgme_error_from_errno (errno) : 0; -@end example -@end deftypefun - - - @node Data Buffer Meta-Data @subsection Data Buffer Meta-Data @@ -2107,6 +2161,9 @@ scheme as used by @acronym{MIME} and other protocols. This specifies that the data is encoded in an armored form as used by OpenPGP and PEM. +@item GPGME_DATA_ENCODING_MIME +This specifies that the data is encoded as a MIME part. + @item GPGME_DATA_ENCODING_URL The data is a list of linefeed delimited URLs. This is only useful with @code{gpgme_op_import}. @@ -2134,6 +2191,30 @@ The function @code{gpgme_data_set_encoding} changes the encoding of the data object with the handle @var{dh} to @var{enc}. @end deftypefun +@deftypefun {gpgme_error_t} gpgme_data_set_flag @ + (@w{gpgme_data_t @var{dh}}, @ + @w{const char *@var{name}}, @ + @w{const char *@var{value}}) + +Some minor properties of the data object can be controlled with flags +set by this function. The properties are identified by the following +values for @var{name}: + +@table @code +@item size-hint +The value is a decimal number with the length gpgme shall assume for +this data object. This is useful if the data is provided by callbacks +or via file descriptors but the applications knows the total size of +the data. If this is set the OpenPGP engine may use this to decide on +buffer allocation strategies and to provide a total value for its +progress information. + +@end table + +This function returns @code{0} on success. +@end deftypefun + + @node Data Buffer Convenience @subsection Data Buffer Convenience Functions @cindex data buffer, convenience @@ -2288,6 +2369,7 @@ started. In fact, these references are accessed through the * ASCII Armor:: Requesting @acronym{ASCII} armored output. * Text Mode:: Choosing canonical text mode. * Offline Mode:: Choosing offline mode. +* Pinentry Mode:: Choosing the pinentry mode. * Included Certificates:: Including a number of certificates. * Key Listing Mode:: Selecting key listing mode. * Passphrase Callback:: Getting the passphrase from the user. @@ -2448,6 +2530,57 @@ valid pointer. @end deftypefun +@node Pinentry Mode +@subsection Pinentry Mode +@cindex context, pinentry mode +@cindex pinentry mode + +@deftypefun gpgme_error_t gpgme_set_pinentry_mode (@w{gpgme_ctx_t @var{ctx}}, +@w{gpgme_pinentry_mode_t @var{mode}}) +The function @code{gpgme_set_pinentry_mode} specifies the pinentry mode +to be used. + +For GnuPG >= 2.1 this option is required to be set to +@code{GPGME_PINENTRY_MODE_LOOPBACK} to enable the passphrase callback +mechanism in GPGME through @code{gpgme_set_passphrase_cb}. +@end deftypefun + +@deftypefun gpgme_pinentry_mode_t gpgme_get_pinentry_mode (@w{gpgme_ctx_t @var{ctx}}) +The function @code{gpgme_get_pinenty_mode} returns the +mode set for the context. +@end deftypefun + +@deftp {Data type} {enum gpgme_pinentry_mode_t} +@tindex gpgme_pinentry_mode_t +The @code{gpgme_minentry_mode_t} type specifies the set of possible pinentry +modes that are supported by @acronym{GPGME} if GnuPG >= 2.1 is used. +The following modes are supported: + +@table @code +@item GPGME_PINENTRY_MODE_DEFAULT +Use the default of the agent, which is ask. + +@item GPGME_PINENTRY_MODE_ASK +Force the use of the Pinentry. + +@item GPGME_PINENTRY_MODE_CANCEL +Emulate use of Pinentry's cancel button. + +@item GPGME_PINENTRY_MODE_ERROR +Return a Pinentry error @code{No Pinentry}. + +@item GPGME_PINENTRY_MODE_LOOPBACK +Redirect Pinentry queries to the caller. +This enables the use of @code{gpgme_set_passphrase_cb} whis pinentry +queries redirected to gpgme. + +Note: This mode requires @code{allow-loopback-pinentry} to be enabled +in the @file{gpg-agent.conf} or an agent started with that option. + +@end table +@end deftp + + @node Included Certificates @subsection Included Certificates @cindex certificates, included @@ -2520,6 +2653,11 @@ signature notations on key signatures should be included in the listed keys. This only works if @code{GPGME_KEYLIST_MODE_SIGS} is also enabled. +@item GPGME_KEYLIST_MODE_WITH_TOFU +The @code{GPGME_KEYLIST_MODE_WITH_TOFU} symbol specifies that +information pertaining to the TOFU trust model should be included in +the listed keys. + @item GPGME_KEYLIST_MODE_WITH_SECRET The @code{GPGME_KEYLIST_MODE_WITH_SECRET} returns information about the presence of a corresponding secret key in a public key listing. A @@ -2616,6 +2754,10 @@ implement their own passphrase query. Some engines do not even support an external passphrase callback at all, in this case the error code @code{GPG_ERR_NOT_SUPPORTED} is returned. +For GnuPG >= 2.1 the pinentry mode has to be set to +@code{GPGME_PINENTRY_MODE_LOOPBACK} to enable the passphrase callback. +See @code{gpgme_set_pinentry_mode}. + The user can disable the use of a passphrase callback function by calling @code{gpgme_set_passphrase_cb} with @var{passfunc} being @code{NULL}. @@ -2713,6 +2855,33 @@ or @var{ctx} is not a valid pointer, @code{NULL} is returned in both variables. @end deftypefun +@deftypefun {gpgme_error_t} gpgme_set_ctx_flag @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{name}}, @ + @w{const char *@var{value}}) + +Some minor properties of the context can be controlled with flags set +by this function. The properties are identified by the following +values for @var{name}: + +@table @code +@item "full-status" +Using a @var{value} of "1" the status callback set by +gpgme_set_status_cb returns all status lines with the exception of +PROGRESS lines. With the default of "0" the status callback is only +called in certain situations. + +@item "raw-description" +Setting the @var{value} to "1" returns human readable strings in a raw +format. For example the non breaking space characters ("~") will not +be removed from the @code{description} field of the +@code{gpgme_tofu_info_t} object. + +@end table + +This function returns @code{0} on success. +@end deftypefun + @node Locale @subsection Locale @@ -2760,9 +2929,120 @@ signers are specified. This is always done by specifying the respective keys that should be used for the operation. The following section describes how such keys can be selected and manipulated. + +@menu +* Key objects:: Description of the key structures. +* Listing Keys:: Browsing the list of available keys. +* Information About Keys:: Requesting detailed information about keys. +* Manipulating Keys:: Operations on keys. +* Generating Keys:: Creating new key pairs. +* Signing Keys:: Adding key signatures to public keys. +* Exporting Keys:: Retrieving key data from the key ring. +* Importing Keys:: Adding keys to the key ring. +* Deleting Keys:: Removing keys from the key ring. +* Changing Passphrases:: Change the passphrase of a key. +* Changing TOFU Data:: Changing data pertaining to TOFU. +* Advanced Key Editing:: Advanced key edit operation. +@end menu + +@node Key objects +@subsection Key objects + +The keys are represented in GPGME by structures which may only be read +by the application but never be allocated or changed. They are valid +as long as the key object itself is valid. + +@deftp {Data type} gpgme_key_t + +The @code{gpgme_key_t} type is a pointer to a key object. It has the +following members: + +@table @code +@item gpgme_keylist_mode_t keylist_mode +The keylist mode that was active when the key was retrieved. + +@item unsigned int revoked : 1 +This is true if the key is revoked. + +@item unsigned int expired : 1 +This is true if the key is expired. + +@item unsigned int disabled : 1 +This is true if the key is disabled. + +@item unsigned int invalid : 1 +This is true if the key is invalid. This might have several reasons, +for a example for the S/MIME backend, it will be set during key +listings if the key could not be validated due to missing +certificates or unmatched policies. + +@item unsigned int can_encrypt : 1 +This is true if the key (ie one of its subkeys) can be used for +encryption. + +@item unsigned int can_sign : 1 +This is true if the key (ie one of its subkeys) can be used to create +data signatures. + +@item unsigned int can_certify : 1 +This is true if the key (ie one of its subkeys) can be used to create +key certificates. + +@item unsigned int can_authenticate : 1 +This is true if the key (ie one of its subkeys) can be used for +authentication. + +@item unsigned int is_qualified : 1 +This is true if the key can be used for qualified signatures according +to local government regulations. + +@item unsigned int secret : 1 +This is true if the key is a secret key. Note, that this will always +be true even if the corresponding subkey flag may be false +(offline/stub keys). This is only set if a listing of secret keys has +been requested or if @code{GPGME_KEYLIST_MODE_WITH_SECRET} is active. + +@item gpgme_protocol_t protocol +This is the protocol supported by this key. + +@item char *issuer_serial +If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the +issuer serial. + +@item char *issuer_name +If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the +issuer name. + +@item char *chain_id +If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the +chain ID, which can be used to built the certificate chain. + +@item gpgme_validity_t owner_trust +If @code{protocol} is @code{GPGME_PROTOCOL_OpenPGP}, then this is the +owner trust. + +@item gpgme_subkey_t subkeys +This is a linked list with the subkeys of the key. The first subkey +in the list is the primary key and usually available. + +@item gpgme_user_id_t uids +This is a linked list with the user IDs of the key. The first user ID +in the list is the main (or primary) user ID. + +@item char *fpr +This field gives the fingerprint of the primary key. Note that +this is a copy of the fingerprint of the first subkey. For an +incomplete key (for example from a verification result) a subkey may +be missing but this field may be set nevertheless. + +@end table +@end deftp + + @deftp {Data type} gpgme_subkey_t + The @code{gpgme_subkey_t} type is a pointer to a subkey structure. -Sub keys are one component of a @code{gpgme_key_t} object. In fact, +Subkeys are one component of a @code{gpgme_key_t} object. In fact, subkeys are those parts that contains the real information about the individual cryptographic keys that belong to the same key object. One @code{gpgme_key_t} can contain several subkeys. The first subkey in @@ -2823,6 +3103,10 @@ This is the key ID of the subkey in hexadecimal digits. This is the fingerprint of the subkey in hexadecimal digits, if available. +@item char *keygrip +The keygrip of the subkey in hex digit form or @code{NULL} if not +availabale. + @item long int timestamp This is the creation timestamp of the subkey. This is -1 if the timestamp is invalid, and 0 if it is not available. @@ -2838,15 +3122,66 @@ True if the secret key is stored on a smart card. The serial number of a smart card holding this key or @code{NULL}. @item char *curve -For ECC algoritms the name of the curve. +For ECC algorithms the name of the curve. + +@end table +@end deftp + +@deftp {Data type} gpgme_user_id_t + +A user ID is a component of a @code{gpgme_key_t} object. One key can +have many user IDs. The first one in the list is the main (or +primary) user ID. + +The user ID structure has the following members. + +@table @code +@item gpgme_user_id_t next +This is a pointer to the next user ID structure in the linked list, or +@code{NULL} if this is the last element. + +@item unsigned int revoked : 1 +This is true if the user ID is revoked. + +@item unsigned int invalid : 1 +This is true if the user ID is invalid. + +@item gpgme_validity_t validity +This specifies the validity of the user ID. + +@item char *uid +This is the user ID string. + +@item char *name +This is the name component of @code{uid}, if available. + +@item char *comment +This is the comment component of @code{uid}, if available. + +@item char *email +This is the email component of @code{uid}, if available. +@item char *address; +The mail address (addr-spec from RFC-5322) of the user ID string. +This is general the same as the @code{email} part of this structure +but might be slightly different. If no mail address is available +@code{NULL} is stored. + +@item gpgme_tofu_info_t tofu +If not @code{NULL} information from the TOFU database pertaining to +this user id. + +@item gpgme_key_sig_t signatures +This is a linked list with the signatures on this user ID. @end table @end deftp + @deftp {Data type} gpgme_key_sig_t + The @code{gpgme_key_sig_t} type is a pointer to a key signature structure. Key signatures are one component of a @code{gpgme_key_t} object, and -validate user IDs on the key. +validate user IDs on the key in the OpenPGP protocol. The signatures on a key are only available if the key was retrieved via a listing operation with the @code{GPGME_KEYLIST_MODE_SIGS} mode @@ -2917,134 +3252,6 @@ This is a linked list with the notation data and policy URLs. @end table @end deftp -@deftp {Data type} gpgme_user_id_t -A user ID is a component of a @code{gpgme_key_t} object. One key can -have many user IDs. The first one in the list is the main (or -primary) user ID. - -The user ID structure has the following members. - -@table @code -@item gpgme_user_id_t next -This is a pointer to the next user ID structure in the linked list, or -@code{NULL} if this is the last element. - -@item unsigned int revoked : 1 -This is true if the user ID is revoked. - -@item unsigned int invalid : 1 -This is true if the user ID is invalid. - -@item gpgme_validity_t validity -This specifies the validity of the user ID. - -@item char *uid -This is the user ID string. - -@item char *name -This is the name component of @code{uid}, if available. - -@item char *comment -This is the comment component of @code{uid}, if available. - -@item char *email -This is the email component of @code{uid}, if available. - -@item gpgme_key_sig_t signatures -This is a linked list with the signatures on this user ID. -@end table -@end deftp - -@deftp {Data type} gpgme_key_t -The @code{gpgme_key_t} type is a pointer to a key object. It has the -following members: - -@table @code -@item gpgme_keylist_mode_t keylist_mode -The keylist mode that was active when the key was retrieved. - -@item unsigned int revoked : 1 -This is true if the key is revoked. - -@item unsigned int expired : 1 -This is true if the key is expired. - -@item unsigned int disabled : 1 -This is true if the key is disabled. - -@item unsigned int invalid : 1 -This is true if the key is invalid. This might have several reasons, -for a example for the S/MIME backend, it will be set in during key -listsing if the key could not be validated due to a missing -certificates or unmatched policies. - -@item unsigned int can_encrypt : 1 -This is true if the key (ie one of its subkeys) can be used for -encryption. - -@item unsigned int can_sign : 1 -This is true if the key (ie one of its subkeys) can be used to create -data signatures. - -@item unsigned int can_certify : 1 -This is true if the key (ie one of its subkeys) can be used to create -key certificates. - -@item unsigned int can_authenticate : 1 -This is true if the key (ie one of its subkeys) can be used for -authentication. - -@item unsigned int is_qualified : 1 -This is true if the key can be used for qualified signatures according -to local government regulations. - -@item unsigned int secret : 1 -This is true if the key is a secret key. Note, that this will always -be true even if the corresponding subkey flag may be false -(offline/stub keys). This is only set if a listing of secret keys has -been requested or if @code{GPGME_KEYLIST_MODE_WITH_SECRET} is active. - -@item gpgme_protocol_t protocol -This is the protocol supported by this key. - -@item char *issuer_serial -If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the -issuer serial. - -@item char *issuer_name -If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the -issuer name. - -@item char *chain_id -If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the -chain ID, which can be used to built the certificate chain. - -@item gpgme_validity_t owner_trust -If @code{protocol} is @code{GPGME_PROTOCOL_OpenPGP}, then this is the -owner trust. - -@item gpgme_subkey_t subkeys -This is a linked list with the subkeys of the key. The first subkey -in the list is the primary key and usually available. - -@item gpgme_user_id_t uids -This is a linked list with the user IDs of the key. The first user ID -in the list is the main (or primary) user ID. -@end table -@end deftp - -@menu -* Listing Keys:: Browsing the list of available keys. -* Information About Keys:: Requesting detailed information about keys. -* Key Signatures:: Listing the signatures on a key. -* Manipulating Keys:: Operations on keys. -* Generating Keys:: Creating new key pairs. -* Exporting Keys:: Retrieving key data from the key ring. -* Importing Keys:: Adding keys to the key ring. -* Deleting Keys:: Removing keys from the key ring. -* Changing Passphrases:: Change the passphrase of a key. -* Advanced Key Editing:: Advanced key edit operation. -@end menu @node Listing Keys @@ -3264,315 +3471,326 @@ validity is ``u''. @end deftp -The following interfaces are deprecated and only provided for backward -compatibility. Don't use them. They will be removed in a future -version of @acronym{GPGME}. -@deftp {Data type} gpgme_attr_t -The @code{gpgme_attr_t} type is used to specify a key or trust item -attribute. The following attributes are defined: -@table @code -@item GPGME_ATTR_KEYID -This is the key ID of a sub key. It is representable as a string. +@node Manipulating Keys +@subsection Manipulating Keys +@cindex key, manipulation -For trust items, the trust item refers to the key with this ID. +@deftypefun void gpgme_key_ref (@w{gpgme_key_t @var{key}}) +The function @code{gpgme_key_ref} acquires an additional reference for +the key @var{key}. +@end deftypefun -@item GPGME_ATTR_FPR -This is the fingerprint of a sub key. It is representable as a -string. +@deftypefun void gpgme_key_unref (@w{gpgme_key_t @var{key}}) +The function @code{gpgme_key_unref} releases a reference for the key +@var{key}. If this was the last reference, the key will be destroyed +and all resources associated to it will be released. +@end deftypefun -@item GPGME_ATTR_ALGO -This is the crypto algorithm for which the sub key can be used. It -is representable as a string and as a number. The numbers correspond -to the @code{enum gcry_pk_algos} values in the gcrypt library. -@item GPGME_ATTR_LEN -This is the key length of a sub key. It is representable as a -number. +@node Generating Keys +@subsection Generating Keys +@cindex key, creation +@cindex key ring, add -@item GPGME_ATTR_CREATED -This is the timestamp at creation time of a sub key. It is -representable as a number. +GPGME provides a set of functions to create public key pairs. Most of +these functions require the use of GnuPG 2.1 and later; for older +GnuPG versions the @code{gpgme_op_genkey} function can be used. +Existing code which wants to update to the new functions or new code +which shall supports older GnuPG versions may try the new functions +first and provide a fallback to the old function if the error code +@code{GPG_ERR_NOT_SUPPORTED} is received. -@item GPGME_ATTR_EXPIRE -This is the expiration time of a sub key. It is representable as a -number. +@c +@c gpgme_op_createkey +@c +@deftypefun gpgme_error_t gpgme_op_createkey @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{userid}}, @ + @w{const char *@var{algo}}, @ + @w{unsigned long @var{reserved}}, @ + @w{unsigned long @var{expires}}, @ + @w{gpgme_key_t @var{extrakey}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_createkey} generates a new key for the +procotol active in the context @var{ctx}. As of now this function +does only work for OpenPGP and requires at least version 2.1.13 of +GnuPG. -@item GPGME_ATTR_OTRUST -XXX FIXME (also for trust items) +@var{userid} is commonly the mail address 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. + +@var{algo} specifies the algorithm for the new key (actually a keypair +of public and private key). For a list of supported algorithms, see +the GnuPG manual. If @var{algo} is @code{NULL} or the string +"default", the key is generated using the default algorithm of the +engine. If the string "future-default" is used the engine may use an +algorithm which is planned to be the default in a future release of +the engine; however existing implementation of the protocol may not be +able to already handle such future algorithms. For the OpenPGP +protocol, the specification of a default algorithm, without requesting +a non-default usage via @var{flags}, triggers the creation of a +primary key plus a secondary key (subkey). + +@var{reserved} must be set to zero. + +@var{expires} can be set to the number of seconds since Epoch of the +desired expiration date in UTC for the new key. Using 0 does not +set an expiration date. Note that this parameter takes an unsigned long +value and not a @code{time_t} to avoid problems on systems which use a +signed 32 bit @code{time_t}. Note further that the OpenPGP protocol +uses 32 bit values for timestamps and thus can only encode dates up to +the year 2106. + +@var{extrakey} is currently not used and must be set to @code{NULL}. +A future version of GPGME may use this parameter to create X.509 keys. + +@var{flags} can be set to the bit-wise OR of the following flags: -@item GPGME_ATTR_USERID -This is a user ID. There can be more than one user IDs in a -@var{gpgme_key_t} object. The first one (with index 0) is the primary -user ID. The user ID is representable as a number. +@table @code +@item GPGME_CREATE_SIGN +@itemx GPGME_CREATE_ENCR +@itemx GPGME_CREATE_CERT +@itemx GPGME_CREATE_AUTH +Do not create the key with the default capabilities (key usage) of the +requested algorithm but use those explicitly given by these flags: +``signing'', ``encryption'', ``certification'', or ``authentication''. +The allowed combinations depend on the algorithm. + +If any of these flags are set and a default algorithm has been +selected only one key is created in the case of the OpenPGP +protocol. + +@item GPGME_CREATE_NOPASSWD +Request generation of the key without password protection. + +@item GPGME_CREATE_SELFSIGNED +For an X.509 key do not create a CSR but a self-signed certificate. +This has not yet been implemented. + +@item GPGME_CREATE_NOSTORE +Do not store the created key in the local key database. +This has not yet been implemented. + +@item GPGME_CREATE_WANTPUB +@itemx GPGME_CREATE_WANTSEC +Return the public or secret key as part of the result structure. +This has not yet been implemented. + +@item GPGME_CREATE_FORCE +The engine does not allow the creation of a key with a user ID +already existing in the local key database. This flag can be used to +override this check. -For trust items, this is the user ID associated with this trust item. +@end table -@item GPGME_ATTR_NAME -This is the name belonging to a user ID. It is representable as a string. +After the operation completed successfully, information about the +created key can be retrieved with @code{gpgme_op_genkey_result}. -@item GPGME_ATTR_EMAIL -This is the email address belonging to a user ID. It is representable -as a string. +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. -@item GPGME_ATTR_COMMENT -This is the comment belonging to a user ID. It is representable as a -string. +@end deftypefun -@item GPGME_ATTR_VALIDITY -This is the validity belonging to a user ID. It is representable as a -string and as a number. See below for a list of available validities. -For trust items, this is the validity that is associated with this -trust item. +@deftypefun gpgme_error_t gpgme_op_createkey_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{userid}}, @ + @w{const char *@var{algo}}, @ + @w{unsigned long @var{reserved}}, @ + @w{unsigned long @var{expires}}, @ + @w{gpgme_key_t @var{extrakey}}, @ + @w{unsigned int @var{flags}}); -@item GPGME_ATTR_UID_REVOKED -This specifies if a user ID is revoked. It is representable as a -number, and is @code{1} if the user ID is revoked, and @code{0} -otherwise. +The function @code{gpgme_op_createkey_start} initiates a +@code{gpgme_op_createkey} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. -@item GPGME_ATTR_UID_INVALID -This specifies if a user ID is invalid. It is representable as a -number, and is @code{1} if the user ID is invalid, and @code{0} -otherwise. +@end deftypefun -@item GPGME_ATTR_LEVEL -This is the trust level of a trust item. +@c +@c gpgme_op_createsubkey +@c +@deftypefun gpgme_error_t gpgme_op_createsubkey @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{algo}}, @ + @w{unsigned long @var{reserved}}, @ + @w{unsigned long @var{expires}}, @ + @w{unsigned int @var{flags}}); -@item GPGME_ATTR_TYPE -This returns information about the type of key. For the string function -this will eother be "PGP" or "X.509". The integer function returns 0 -for PGP and 1 for X.509. It is also used for the type of a trust item. +The function @code{gpgme_op_createsubkey} creates and adds a new +subkey to the primary OpenPGP key given by @var{KEY}. The only +allowed protocol in @var{ctx} is @code{GPGME_PROTOCOL_OPENPGP}. +Subkeys (aka secondary keys) are a concept in the OpenPGP protocol to +bind several keys to a primary key. As of now this function requires +at least version 2.1.13 of GnuPG. -@item GPGME_ATTR_IS_SECRET -This specifies if the key is a secret key. It is representable as a -number, and is @code{1} if the key is revoked, and @code{0} otherwise. +@var{key} specifies the key to operate on. -@item GPGME_ATTR_KEY_REVOKED -This specifies if a sub key is revoked. It is representable as a -number, and is @code{1} if the key is revoked, and @code{0} otherwise. +@var{algo} specifies the algorithm for the new subkey. For a list of +supported algorithms, see the GnuPG manual. If @var{algo} is +@code{NULL} or the string "default", the subkey is generated using the +default algorithm for an encryption subkey of the engine. If the +string "future-default" is used the engine may use an encryption +algorithm which is planned to be the default in a future release of +the engine; however existing implementation of the protocol may not be +able to already handle such future algorithms. -@item GPGME_ATTR_KEY_INVALID -This specifies if a sub key is invalid. It is representable as a -number, and is @code{1} if the key is invalid, and @code{0} otherwise. +@var{reserved} must be set to zero. -@item GPGME_ATTR_KEY_EXPIRED -This specifies if a sub key is expired. It is representable as a -number, and is @code{1} if the key is expired, and @code{0} otherwise. +@var{expires} can be set to the number of seconds since Epoch of the +desired expiration date in UTC for the new subkey. Using 0 does not +set an expiration date. Note that this parameter takes an unsigned long +value and not a @code{time_t} to avoid problems on systems which use a +signed 32 bit @code{time_t}. Note further that the OpenPGP protocol +uses 32 bit values for timestamps and thus can only encode dates up to +the year 2106. -@item GPGME_ATTR_KEY_DISABLED -This specifies if a sub key is disabled. It is representable as a -number, and is @code{1} if the key is disabled, and @code{0} otherwise. +@var{flags} takes the same values as described above for +@code{gpgme_op_createkey}. -@item GPGME_ATTR_KEY_CAPS -This is a description of the capabilities of a sub key. It is -representable as a string. The string contains the letter ``e'' if -the key can be used for encryption, ``s'' if the key can be used for -signatures, and ``c'' if the key can be used for certifications. +After the operation completed successfully, information about the +created key can be retrieved with @code{gpgme_op_genkey_result}. -@item GPGME_ATTR_CAN_ENCRYPT -This specifies if a sub key can be used for encryption. It is -representable as a number, and is @code{1} if the sub key can be used -for encryption, and @code{0} otherwise. +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. -@item GPGME_ATTR_CAN_SIGN -This specifies if a sub key can be used to create data signatures. It -is representable as a number, and is @code{1} if the sub key can be -used for signatures, and @code{0} otherwise. -@item GPGME_ATTR_CAN_CERTIFY -This specifies if a sub key can be used to create key certificates. -It is representable as a number, and is @code{1} if the sub key can be -used for certifications, and @code{0} otherwise. +@end deftypefun -@item GPGME_ATTR_SERIAL -The X.509 issuer serial attribute of the key. It is representable as -a string. +@deftypefun gpgme_error_t gpgme_op_createsubkey_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{algo}}, @ + @w{unsigned long @var{reserved}}, @ + @w{unsigned long @var{expires}}, @ + @w{unsigned int @var{flags}}); -@item GPGME_ATTR_ISSUE -The X.509 issuer name attribute of the key. It is representable as a -string. +The function @code{gpgme_op_createsubkey_start} initiates a +@code{gpgme_op_createsubkey} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. -@item GPGME_ATTR_CHAINID -The X.509 chain ID can be used to build the certification chain. It -is representable as a string. -@end table -@end deftp +@end deftypefun -@deftypefun {const char *} gpgme_key_get_string_attr (@w{gpgme_key_t @var{key}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_key_get_string_attr} returns the value of the -string-representable attribute @var{what} of key @var{key}. If the -attribute is an attribute of a sub key or an user ID, @var{idx} -specifies the sub key or user ID of which the attribute value is -returned. The argument @var{reserved} is reserved for later use and -should be @code{NULL}. -The string returned is only valid as long as the key is valid. +@c +@c gpgme_op_adduid +@c +@deftypefun gpgme_error_t gpgme_op_adduid @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned int @var{flags}}); -The function returns @code{0} if an attribute can't be returned as a -string, @var{key} is not a valid pointer, @var{idx} out of range, -or @var{reserved} not @code{NULL}. -@end deftypefun - -@deftypefun {unsigned long} gpgme_key_get_ulong_attr (@w{gpgme_key_t @var{key}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_key_get_ulong_attr} returns the value of the -number-representable attribute @var{what} of key @var{key}. If the -attribute is an attribute of a sub key or an user ID, @var{idx} -specifies the sub key or user ID of which the attribute value is -returned. The argument @var{reserved} is reserved for later use and -should be @code{NULL}. - -The function returns @code{0} if the attribute can't be returned as a -number, @var{key} is not a valid pointer, @var{idx} out of range, or -@var{reserved} not @code{NULL}. -@end deftypefun - - -@node Key Signatures -@subsection Key Signatures -@cindex key, signatures -@cindex signatures, on a key - -The following interfaces are deprecated and only provided for backward -compatibility. Don't use them. They will be removed in a future -version of @acronym{GPGME}. - -The signatures on a key are only available if the key was retrieved -via a listing operation with the @code{GPGME_KEYLIST_MODE_SIGS} mode -enabled, because it is expensive to retrieve all signatures of a key. - -So, before using the below interfaces to retrieve the signatures on a -key, you have to make sure that the key was listed with signatures -enabled. One convenient, but blocking, way to do this is to use the -function @code{gpgme_get_key}. - -@deftp {Data type} gpgme_attr_t -The @code{gpgme_attr_t} type is used to specify a key signature -attribute. The following attributes are defined: +The function @code{gpgme_op_adduid} adds a new user ID to the OpenPGP +key given by @var{KEY}. Adding additional user IDs after key creation +is a feature of the OpenPGP protocol and thus the protocol for the +context @var{ctx} must be set to OpenPGP. As of now this function +requires at least version 2.1.13 of GnuPG. -@table @code -@item GPGME_ATTR_KEYID -This is the key ID of the key which was used for the signature. It is -representable as a string. +@var{key} specifies the key to operate on. -@item GPGME_ATTR_ALGO -This is the crypto algorithm used to create the signature. It is -representable as a string and as a number. The numbers correspond to -the @code{enum gcry_pk_algos} values in the gcrypt library. +@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, +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. -@item GPGME_ATTR_CREATED -This is the timestamp at creation time of the signature. It is -representable as a number. +@var{flags} are currently not used and must be set to zero. -@item GPGME_ATTR_EXPIRE -This is the expiration time of the signature. It is representable as -a number. +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. -@item GPGME_ATTR_USERID -This is the user ID associated with the signing key. The user ID is -representable as a number. +@end deftypefun -@item GPGME_ATTR_NAME -This is the name belonging to a user ID. It is representable as a string. +@deftypefun gpgme_error_t gpgme_op_adduid_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned int @var{flags}}); -@item GPGME_ATTR_EMAIL -This is the email address belonging to a user ID. It is representable -as a string. +The function @code{gpgme_op_adduid_start} initiates a +@code{gpgme_op_adduid} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. -@item GPGME_ATTR_COMMENT -This is the comment belonging to a user ID. It is representable as a -string. +@end deftypefun -@item GPGME_ATTR_KEY_REVOKED -This specifies if a key signature is a revocation signature. It is -representable as a number, and is @code{1} if the key is revoked, and -@code{0} otherwise. -@c @item GPGME_ATTR_KEY_EXPIRED -@c This specifies if a key signature is expired. It is representable as -@c a number, and is @code{1} if the key is revoked, and @code{0} -@c otherwise. @c -@item GPGME_ATTR_SIG_CLASS -This specifies the signature class of a key signature. It is -representable as a number. The meaning is specific to the crypto -engine. - -@item GPGME_ATTR_SIG_CLASS -This specifies the signature class of a key signature. It is -representable as a number. The meaning is specific to the crypto -engine. - -@item GPGME_ATTR_SIG_STATUS -This is the same value as returned by @code{gpgme_get_sig_status}. -@end table -@end deftp - -@deftypefun {const char *} gpgme_key_sig_get_string_attr (@w{gpgme_key_t @var{key}}, @w{int @var{uid_idx}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_key_sig_get_string_attr} returns the value of -the string-representable attribute @var{what} of the signature -@var{idx} on the user ID @var{uid_idx} in the key @var{key}. The -argument @var{reserved} is reserved for later use and should be -@code{NULL}. - -The string returned is only valid as long as the key is valid. +@c gpgme_op_revuid +@c +@deftypefun gpgme_error_t gpgme_op_revuid @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned int @var{flags}}); -The function returns @code{0} if an attribute can't be returned as a -string, @var{key} is not a valid pointer, @var{uid_idx} or @var{idx} -out of range, or @var{reserved} not @code{NULL}. -@end deftypefun +The function @code{gpgme_op_revuid} revokes a user ID from the OpenPGP +key given by @var{KEY}. Revoking user IDs after key creation is a +feature of the OpenPGP protocol and thus the protocol for the context +@var{ctx} must be set to OpenPGP. As of now this function requires at +least version 2.1.13 of GnuPG. -@deftypefun {unsigned long} gpgme_key_sig_get_ulong_attr (@w{gpgme_key_t @var{key}}, @w{int @var{uid_idx}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_key_sig_get_ulong_attr} returns the value of -the number-representable attribute @var{what} of the signature -@var{idx} on the user ID @var{uid_idx} in the key @var{key}. The -argument @var{reserved} is reserved for later use and should be -@code{NULL}. +@var{key} specifies the key to operate on. -The function returns @code{0} if an attribute can't be returned as a -string, @var{key} is not a valid pointer, @var{uid_idx} or @var{idx} -out of range, or @var{reserved} not @code{NULL}. -@end deftypefun +@var{userid} is the user ID to be revoked from the key. The user ID +must be given verbatim because the engine does an exact and case +sensitive match. Thus the @code{uid} field from the user ID object +(@code{gpgme_user_id_t}) is to be used. This is a required parameter. +@var{flags} are currently not used and must be set to zero. -@node Manipulating Keys -@subsection Manipulating Keys -@cindex key, manipulation +Note that the engine won't allow to revoke the last valid user ID. To +change a user ID is better to first add the new user ID, then revoke +the old one, and finally publish the key. -@deftypefun void gpgme_key_ref (@w{gpgme_key_t @var{key}}) -The function @code{gpgme_key_ref} acquires an additional reference for -the key @var{key}. -@end deftypefun +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. -@deftypefun void gpgme_key_unref (@w{gpgme_key_t @var{key}}) -The function @code{gpgme_key_unref} releases a reference for the key -@var{key}. If this was the last reference, the key will be destroyed -and all resources associated to it will be released. @end deftypefun +@deftypefun gpgme_error_t gpgme_op_revuid_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned int @var{flags}}); -The following interface is deprecated and only provided for backward -compatibility. Don't use it. It will be removed in a future version -of @acronym{GPGME}. +The function @code{gpgme_op_revuid_start} initiates a +@code{gpgme_op_revuid} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. -@deftypefun void gpgme_key_release (@w{gpgme_key_t @var{key}}) -The function @code{gpgme_key_release} is equivalent to -@code{gpgme_key_unref}. @end deftypefun -@node Generating Keys -@subsection Generating Keys -@cindex key, creation -@cindex key ring, add +@c +@c gpgme_op_genkey +@c +@deftypefun gpgme_error_t gpgme_op_genkey @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{parms}}, @ + @w{gpgme_data_t @var{public}}, @ + @w{gpgme_data_t @var{secret}}) -@deftypefun gpgme_error_t gpgme_op_genkey (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{parms}}, @w{gpgme_data_t @var{public}}, @w{gpgme_data_t @var{secret}}) The function @code{gpgme_op_genkey} generates a new key pair in the context @var{ctx}. The meaning of @var{public} and @var{secret} depends on the crypto backend. -GnuPG does not support @var{public} and @var{secret}, they should be +GPG does not support @var{public} and @var{secret}, they should be @code{NULL}. GnuPG will generate a key pair and add it to the standard key ring. The fingerprint of the generated key is available with @code{gpgme_op_genkey_result}. @@ -3629,6 +3847,7 @@ if no key was created by the backend. @end deftypefun @deftypefun gpgme_error_t gpgme_op_genkey_start (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{parms}}, @w{gpgme_data_t @var{public}}, @w{gpgme_data_t @var{secret}}) + The function @code{gpgme_op_genkey_start} initiates a @code{gpgme_op_genkey} operation. It can be completed by calling @code{gpgme_wait} on the context. @xref{Waiting For Completion}. @@ -3640,7 +3859,12 @@ operation could be started successfully, @code{GPG_ERR_INV_VALUE} if @code{NULL}. @end deftypefun + +@c +@c gpgme_op_genkey_result +@c @deftp {Data type} {gpgme_genkey_result_t} + This is a pointer to a structure used to store the result of a @code{gpgme_op_genkey} operation. After successfully generating a key, you can retrieve the pointer to the result with @@ -3649,22 +3873,34 @@ members: @table @code @item unsigned int primary : 1 -This is a flag that is set to 1 if a primary key was created and to 0 +This flag is set to 1 if a primary key was created and to 0 if not. @item unsigned int sub : 1 -This is a flag that is set to 1 if a subkey was created and to 0 -if not. +This flag is set to 1 if a subkey was created and to 0 if not. + +@item unsigned int uid : 1 +This flag is set to 1 if a user ID was created and to 0 if not. @item char *fpr This is the fingerprint of the key that was created. If both a -primary and a sub key were generated, the fingerprint of the primary +primary and a subkey were generated, the fingerprint of the primary key will be returned. If the crypto engine does not provide the fingerprint, @code{fpr} will be a null pointer. + +@item gpgme_data_t pubkey +This will eventually be used to return the public key. It is +currently not used. + +@item gpgme_data_t seckey +This will eventually be used to return the secret key. It is +currently not used. + @end table @end deftp @deftypefun gpgme_genkey_result_t gpgme_op_genkey_result (@w{gpgme_ctx_t @var{ctx}}) + The function @code{gpgme_op_genkey_result} returns a @code{gpgme_genkey_result_t} pointer to a structure holding the result of a @code{gpgme_op_genkey} operation. The pointer is only valid if the @@ -3672,9 +3908,110 @@ last operation on the context was a @code{gpgme_op_genkey} or @code{gpgme_op_genkey_start} operation, and if this operation finished successfully. The returned pointer is only valid until the next operation is started on the context. + +@end deftypefun + + +@c +@c SIGNING KEYS +@c +@node Signing Keys +@subsection Signing Keys +@cindex key, signing + +Key signatures are a unique concept of the OpenPGP protocol. They can +be used to certify the validity of a key and are used to create the +Web-of-Trust (WoT). Instead of using the @code{gpgme_op_interact} +function along with a finite state machine, GPGME provides a +convenient function to create key signatures when using modern GnuPG +versions. + + +@c +@c gpgme_op_keysign +@c +@deftypefun gpgme_error_t gpgme_op_keysign @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned long @var{expires}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_keysign} adds a new key signature to the +public key @var{KEY}. This function requires at least version 2.1.12 of +GnuPG. + +@var{CTX} is the usual context which describes the protocol to use +(which must be OpenPGP) and has also the list of signer keys to be +used for the signature. The common case is to use the default key for +signing other keys. If another key or more than one key shall be used +for a key signature, @code{gpgme_signers_add} can be used. +@xref{Selecting Signers}. + +@var{key} specifies the key to operate on. + +@var{userid} selects the user ID or user IDs to be signed. If +@var{userid} is set to @code{NULL} all valid user IDs are signed. The +user ID must be given verbatim because the engine does an exact and +case sensitive match. Thus the @code{uid} field from the user ID +object (@code{gpgme_user_id_t}) is to be used. To select more than +one user ID put them all into one string separated by linefeeds +characters (@code{\n}) and set the flag @code{GPGME_KEYSIGN_LFSEP}. + +@var{expires} can be set to the number of seconds since Epoch of the +desired expiration date in UTC for the new signature. The common case +is to use 0 to not set an expiration date. However, if the +configuration of the engine defines a default expiration for key +signatures, that is still used unless the flag +@code{GPGME_KEYSIGN_NOEXPIRE} is used. Note that this parameter takes +an unsigned long value and not a @code{time_t} to avoid problems on +systems which use a signed 32 bit @code{time_t}. Note further that +the OpenPGP protocol uses 32 bit values for timestamps and thus can +only encode dates up to the year 2106. + +@var{flags} can be set to the bit-wise OR of the following flags: + +@table @code +@item GPGME_KEYSIGN_LOCAL +Instead of creating an exportable key signature, create a key +signature which is is marked as non-exportable. + +@item GPGME_KEYSIGN_LFSEP +Although linefeeds are uncommon in user IDs this flag is required to +explicitly declare that @var{userid} may contain several linefeed +separated user IDs. + +@item GPGME_KEYSIGN_NOEXPIRE +Force the creation of a key signature without an expiration date. This +overrides @var{expire} and any local configuration of the engine. + +@end table + +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. + +@end deftypefun + + +@deftypefun gpgme_error_t gpgme_op_keysign_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned long @var{expires}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_keysign_start} initiates a +@code{gpgme_op_keysign} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. + @end deftypefun +@c +@c EXPORTING KEYS +@c @node Exporting Keys @subsection Exporting Keys @cindex key, export @@ -3787,7 +4124,7 @@ for the context @var{ctx}, or, if that is not set, by the encoding specified for @var{keydata}. The keys to export are taken form the @code{NULL} terminated array -@var{keys}. Only keys of the the currently selected protocol of +@var{keys}. Only keys of the currently selected protocol of @var{ctx} which do have a fingerprint set are considered for export. Other keys specified by the @var{keys} are ignored. In particular OpenPGP keys retrieved via an external key listing are not included. @@ -3860,7 +4197,7 @@ permanent which have been retrieved from an external source (i.e. using for the usual workaround of exporting and then importing a key to make an X.509 key permanent.} -Only keys of the the currently selected protocol of @var{ctx} are +Only keys of the currently selected protocol of @var{ctx} are considered for import. Other keys specified by the @var{keys} are ignored. As of now all considered keys must have been retrieved using the same method, that is the used key listing mode must be identical. @@ -3947,34 +4284,34 @@ The number of keys without user ID. @item int imported The total number of imported keys. -@item imported_rsa +@item int imported_rsa The number of imported RSA keys. -@item unchanged +@item int unchanged The number of unchanged keys. -@item new_user_ids +@item int new_user_ids The number of new user IDs. -@item new_sub_keys +@item int new_sub_keys The number of new sub keys. -@item new_signatures +@item int new_signatures The number of new signatures. -@item new_revocations +@item int new_revocations The number of new revocations. -@item secret_read +@item int secret_read The total number of secret keys read. -@item secret_imported +@item int secret_imported The number of imported secret keys. -@item secret_unchanged +@item int secret_unchanged The number of unchanged secret keys. -@item not_imported +@item int not_imported The number of keys not imported. @item gpgme_import_status_t imports @@ -3993,24 +4330,6 @@ successfully. The returned pointer is only valid until the next operation is started on the context. @end deftypefun -The following interface is deprecated and only provided for backward -compatibility. Don't use it. It will be removed in a future version -of @acronym{GPGME}. - -@deftypefun gpgme_error_t gpgme_op_import_ext (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{keydata}}, @w{int *@var{nr}}) -The function @code{gpgme_op_import_ext} is equivalent to: - -@example - gpgme_error_t err = gpgme_op_import (ctx, keydata); - if (!err) - @{ - gpgme_import_result_t result = gpgme_op_import_result (ctx); - *nr = result->considered; - @} -@end example -@end deftypefun - - @node Deleting Keys @subsection Deleting Keys @cindex key, delete @@ -4043,7 +4362,7 @@ operation was started successfully, and @code{GPG_ERR_INV_VALUE} if @node Changing Passphrases -@subsection Changing Passphrases +@subsection Changing Passphrases @cindex passphrase, change @deftypefun gpgme_error_t gpgme_op_passwd @ @@ -4077,27 +4396,104 @@ could not be started. @end deftypefun +@c +@c CHANGING TOFU DATA +@c +@node Changing TOFU Data +@subsection Changing TOFU Data +@cindex validity, TOFU + +The OpenPGP engine features a Trust-On-First-Use (TOFU) key validation +model. For resolving clonflics it is necessary to declare the policy +for a key. See the GnuPG manual for details on the TOFU +implementation. + +@deftp {Data type} {enum gpgme_tofu_policy_t} +@tindex gpgme_tofu_policy_t +The @code{gpgme_tofu_policy_t} type specifies the set of possible +policy values that are supported by @acronym{GPGME}: + +@table @code +@item GPGME_TOFU_POLICY_AUTO +Set the policy to ``auto''. +@item GPGME_TOFU_POLICY_GOOD +Set the policy to ``goog''. +@item GPGME_TOFU_POLICY_BAD +Set the policy to ``bad''. +@item GPGME_TOFU_POLICY_ASK +Set the policy to ``ask''. +@item GPGME_TOFU_POLICY_UNKNOWN +Set the policy to ``unknown''. +@end table + +@end deftp + +To change the policy for a key the following functions can be used: + +@deftypefun gpgme_error_t gpgme_op_tofu_policy @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const gpgme_key_t @var{key}}, @ + @w{gpgme_tofu_policy_t @var{policy}}) + +The function @code{gpgme_op_tofu_policy} changes the TOFU policy of +@var{key}. The valid values for @var{policy} are listed above. As of +now this function does only work for OpenPGP and requires at least +version 2.1.10 of GnuPG. + +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. + +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_tofu_policy_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const gpgme_key_t @var{key}}, @ + @w{gpgme_tofu_policy_t @var{policy}}) + +The function @code{gpgme_op_tofu_policy_start} initiates a +@code{gpgme_op_tofu_policy} operation. It can be completed by calling +@code{gpgme_wait} on the context. @xref{Waiting For Completion}. + +The function returns @code{0} if the operation was started successfully, +and an error code if one of the arguments is not valid or the oepration +could not be started. + +@end deftypefun + + @node Advanced Key Editing @subsection Advanced Key Editing @cindex key, edit -@deftp {Data type} {gpgme_error_t (*gpgme_edit_cb_t) (@w{void *@var{handle}}, @w{gpgme_status_code_t @var{status}}, @w{const char *@var{args}}, @w{int @var{fd}})} -@tindex gpgme_edit_cb_t -The @code{gpgme_edit_cb_t} type is the type of functions which -@acronym{GPGME} calls if it a key edit operation is on-going. The -status code @var{status} and the argument line @var{args} are passed -through by @acronym{GPGME} from the crypto engine. The file -descriptor @var{fd} is -1 for normal status messages. If @var{status} -indicates a command rather than a status message, the response to the -command should be written to @var{fd}. The @var{handle} is provided -by the user at start of operation. - -The function should return @code{GPG_ERR_NO_ERROR} or an error value. +@deftp {Data type} {gpgme_error_t (*gpgme_interact_cb_t) @ + (@w{void *@var{handle}}, @ + @w{const char *@var{status}}, @ + @w{const char *@var{args}}, @ + @w{int @var{fd}})} +@tindex gpgme_interact_cb_t +The @code{gpgme_interact_cb_t} type is the type of functions which +@acronym{GPGME} calls if it a key interact operation is on-going. The +status keyword @var{status} and the argument line @var{args} are +passed through by @acronym{GPGME} from the crypto engine. An empty +string represents EOF. The file descriptor @var{fd} is -1 for normal +status messages. If @var{status} indicates a command rather than a +status message, the response to the command should be written to +@var{fd}. The @var{handle} is provided by the user at start of +operation. + +The function should return @code{GPG_ERR_FALSE} if it did not handle +the status code, @code{0} for success, or any other error value. @end deftp -@deftypefun gpgme_error_t gpgme_op_edit (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) -The function @code{gpgme_op_edit} processes the key @var{KEY} -interactively, using the edit callback function @var{FNC} with the +@deftypefun gpgme_error_t gpgme_op_interact (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{unsigned int @var{flags}}, @ + @w{gpgme_interact_cb_t @var{fnc}}, @ + @w{void *@var{handle}}, @ + @w{gpgme_data_t @var{out}}) +The function @code{gpgme_op_interact} processes the key @var{KEY} +interactively, using the interact callback function @var{FNC} with the handle @var{HANDLE}. The callback is invoked for every status and command request from the crypto engine. The output of the crypto engine is written to the data object @var{out}. @@ -4106,39 +4502,40 @@ Note that the protocol between the callback function and the crypto engine is specific to the crypto engine and no further support in implementing this protocol correctly is provided by @acronym{GPGME}. -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -edit operation completes successfully, @code{GPG_ERR_INV_VALUE} if -@var{ctx} or @var{key} is not a valid pointer, and any error returned -by the crypto engine or the edit callback handler. -@end deftypefun - -@deftypefun gpgme_error_t gpgme_op_edit_start (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) -The function @code{gpgme_op_edit_start} initiates a -@code{gpgme_op_edit} operation. It can be completed by calling -@code{gpgme_wait} on the context. @xref{Waiting For Completion}. +@var{flags} modifies the behaviour of the function; the only defined +bit value is: -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -operation was started successfully, and @code{GPG_ERR_INV_VALUE} if -@var{ctx} or @var{key} is not a valid pointer. -@end deftypefun +@table @code +@item GPGME_INTERACT_CARD +This is used for smartcard based keys and uses gpg’s +@code{--card-edit} command. +@end table -@deftypefun gpgme_error_t gpgme_op_card_edit (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) -The function @code{gpgme_op_card_edit} is analogous to -@code{gpgme_op_edit}, but should be used to process the smart card corresponding to the key @var{key}. +The function returns @code{0} if the edit operation completes +successfully, @code{GPG_ERR_INV_VALUE} if @var{ctx} or @var{key} is +not a valid pointer, and any error returned by the crypto engine or +the edit callback handler. @end deftypefun -@deftypefun gpgme_error_t gpgme_op_card_edit_start (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) -The function @code{gpgme_op_card_edit_start} initiates a -@code{gpgme_op_card_edit} operation. It can be completed by calling + +@deftypefun gpgme_error_t gpgme_op_interact_start (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{unsigned int @var{flags}}, @ + @w{gpgme_interact_cb_t @var{fnc}}, @ + @w{void *@var{handle}}, @ + @w{gpgme_data_t @var{out}}) +The function @code{gpgme_op_interact_start} initiates a +@code{gpgme_op_interact} operation. It can be completed by calling @code{gpgme_wait} on the context. @xref{Waiting For Completion}. -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -operation was started successfully, and @code{GPG_ERR_INV_VALUE} if -@var{ctx} or @var{key} is not a valid pointer. +The function returns @code{0} if the operation was started +successfully, and @code{GPG_ERR_INV_VALUE} if @var{ctx} or @var{key} +is not a valid pointer. @end deftypefun + @node Trust Item Management @section Trust Item Management @cindex trust item @@ -4173,7 +4570,6 @@ The user name if @code{type} is 2. @menu * Listing Trust Items:: Browsing the list of available trust items. -* Information About Trust Items:: Requesting information about trust items. * Manipulating Trust Items:: Operations on trust items. @end menu @@ -4230,50 +4626,9 @@ time during the operation there was not enough memory available. @end deftypefun -@node Information About Trust Items -@subsection Information About Trust Items -@cindex trust item, information about -@cindex trust item, attributes -@cindex attributes, of a trust item - -The following interfaces are deprecated and only provided for backward -compatibility. Don't use them. They will be removed in a future -version of @acronym{GPGME}. - -Trust items have attributes which can be queried using the interfaces -below. The attribute identifiers are shared with those for key -attributes. @xref{Information About Keys}. - -@deftypefun {const char *} gpgme_trust_item_get_string_attr (@w{gpgme_trust_item_t @var{item}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_trust_item_get_string_attr} returns the value -of the string-representable attribute @var{what} of trust item -@var{item}. The arguments @var{idx} and @var{reserved} are reserved -for later use and should be @code{0} and @code{NULL} respectively. - -The string returned is only valid as long as the key is valid. - -The function returns @code{0} if an attribute can't be returned as a -string, @var{key} is not a valid pointer, @var{idx} out of range, -or @var{reserved} not @code{NULL}. -@end deftypefun - -@deftypefun int gpgme_trust_item_get_int_attr (@w{gpgme_trust_item_t @var{item}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_trust_item_get_int_attr} returns the value of -the number-representable attribute @var{what} of trust item -@var{item}. If the attribute occurs more than once in the trust item, -the index is specified by @var{idx}. However, currently no such -attribute exists, so @var{idx} should be @code{0}. The argument -@var{reserved} is reserved for later use and should be @code{NULL}. - -The function returns @code{0} if the attribute can't be returned as a -number, @var{key} is not a valid pointer, @var{idx} out of range, -or @var{reserved} not @code{NULL}. -@end deftypefun - - -@node Manipulating Trust Items -@subsection Manipulating Trust Items -@cindex trust item, manipulation +@node Manipulating Trust Items +@subsection Manipulating Trust Items +@cindex trust item, manipulation @deftypefun void gpgme_trust_item_ref (@w{gpgme_trust_item_t @var{item}}) The function @code{gpgme_trust_item_ref} acquires an additional @@ -4288,16 +4643,6 @@ released. @end deftypefun -The following interface is deprecated and only provided for backward -compatibility. Don't use it. It will be removed in a future version -of @acronym{GPGME}. - -@deftypefun void gpgme_trust_item_release (@w{gpgme_trust_item_t @var{item}}) -The function @code{gpgme_trust_item_release} is an alias for -@code{gpgme_trust_item_unref}. -@end deftypefun - - @node Crypto Operations @section Crypto Operations @cindex cryptographic operation @@ -4676,6 +5021,13 @@ The hash algorithm used to create this signature. @item char *pka_address The mailbox from the PKA information or @code{NULL}. + +@item gpgme_key_t key +An object describing the key used to create the signature. This key +object may be incomplete in that it only conveys information +availabale directly with a signature. It may also be @code{NULL} if +such information is not readily available. + @end table @end deftp @@ -4712,357 +5064,130 @@ the context. @end deftypefun -The following interfaces are deprecated and only provided for backward -compatibility. Don't use them. They will be removed in a future -version of @acronym{GPGME}. - -@deftp {Data type} {enum gpgme_sig_stat_t} -@tindex gpgme_sig_stat_t -The @code{gpgme_sig_stat_t} type holds the result of a signature check, or -the combined result of all signatures. The following results are -possible: - -@table @code -@item GPGME_SIG_STAT_NONE -This status should not occur in normal operation. - -@item GPGME_SIG_STAT_GOOD -This status indicates that the signature is valid. For the combined -result this status means that all signatures are valid. +@node Decrypt and Verify +@subsection Decrypt and Verify +@cindex decryption and verification +@cindex verification and decryption +@cindex signature check +@cindex cryptographic operation, decryption and verification -@item GPGME_SIG_STAT_GOOD_EXP -This status indicates that the signature is valid but expired. For -the combined result this status means that all signatures are valid -and expired. +@deftypefun gpgme_error_t gpgme_op_decrypt_verify (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{cipher}}, @w{gpgme_data_t @var{plain}}) +The function @code{gpgme_op_decrypt_verify} decrypts the ciphertext in +the data object @var{cipher} and stores it into the data object +@var{plain}. If @var{cipher} contains signatures, they will be +verified. -@item GPGME_SIG_STAT_GOOD_EXPKEY -This status indicates that the signature is valid but the key used to -verify the signature has expired. For the combined result this status -means that all signatures are valid and all keys are expired. +After the operation completed, @code{gpgme_op_decrypt_result} and +@code{gpgme_op_verify_result} can be used to retrieve more information +about the signatures. -@item GPGME_SIG_STAT_BAD -This status indicates that the signature is invalid. For the combined -result this status means that all signatures are invalid. +If the error code @code{GPG_ERR_NO_DATA} is returned, @var{cipher} +does not contain any data to decrypt. However, it might still be +signed. The information about detected signatures is available with +@code{gpgme_op_verify_result} in this case. -@item GPGME_SIG_STAT_NOKEY -This status indicates that the signature could not be verified due to -a missing key. For the combined result this status means that all -signatures could not be checked due to missing keys. +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +ciphertext could be decrypted successfully, @code{GPG_ERR_INV_VALUE} +if @var{ctx}, @var{cipher} or @var{plain} is not a valid pointer, +@code{GPG_ERR_NO_DATA} if @var{cipher} does not contain any data to +decrypt, @code{GPG_ERR_DECRYPT_FAILED} if @var{cipher} is not a valid +cipher text, @code{GPG_ERR_BAD_PASSPHRASE} if the passphrase for the +secret key could not be retrieved, and passes through any errors that +are reported by the crypto engine support routines. +@end deftypefun -@item GPGME_SIG_STAT_NOSIG -This status indicates that the signature data provided was not a real -signature. +@deftypefun gpgme_error_t gpgme_op_decrypt_verify (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{cipher}}, @w{gpgme_data_t @var{plain}}) +The function @code{gpgme_op_decrypt_verify_start} initiates a +@code{gpgme_op_decrypt_verify} operation. It can be completed by +calling @code{gpgme_wait} on the context. @xref{Waiting For +Completion}. -@item GPGME_SIG_STAT_ERROR -This status indicates that there was some other error which prevented -the signature verification. +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +operation could be started successfully, @code{GPG_ERR_INV_VALUE} if +@var{ctx}, @var{cipher}, @var{plain} or @var{r_stat} is not a valid +pointer, and @code{GPG_ERR_NO_DATA} if @var{cipher} does not contain +any data to decrypt. +@end deftypefun -@item GPGME_SIG_STAT_DIFF -For the combined result this status means that at least two signatures -have a different status. You can get each key's status with -@code{gpgme_get_sig_status}. -@end table -@end deftp -@deftypefun {const char *} gpgme_get_sig_status (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_sig_stat_t *@var{r_stat}}, @w{time_t *@var{r_created}}) -The function @code{gpgme_get_sig_status} is equivalent to: +@node Sign +@subsection Sign +@cindex signature, creation +@cindex sign +@cindex cryptographic operation, signing -@example - gpgme_verify_result_t result; - gpgme_signature_t sig; +A signature can contain signatures by one or more keys. The set of +keys used to create a signatures is contained in a context, and is +applied to all following signing operations in this context (until the +set is changed). - result = gpgme_op_verify_result (ctx); - sig = result->signatures; +@menu +* Selecting Signers:: How to choose the keys to sign with. +* Creating a Signature:: How to create a signature. +* Signature Notation Data:: How to add notation data to a signature. +@end menu - while (sig && idx) - @{ - sig = sig->next; - idx--; - @} - if (!sig || idx) - return NULL; - if (r_stat) - @{ - switch (gpg_err_code (sig->status)) - @{ - case GPG_ERR_NO_ERROR: - *r_stat = GPGME_SIG_STAT_GOOD; - break; +@node Selecting Signers +@subsubsection Selecting Signers +@cindex signature, selecting signers +@cindex signers, selecting - case GPG_ERR_BAD_SIGNATURE: - *r_stat = GPGME_SIG_STAT_BAD; - break; +The key or the keys used to create a signature are stored in the +context. The following functions can be used to manipulate this list. +If no signer has been set into the context a default key is used for +signing. - case GPG_ERR_NO_PUBKEY: - *r_stat = GPGME_SIG_STAT_NOKEY; - break; +@deftypefun void gpgme_signers_clear (@w{gpgme_ctx_t @var{ctx}}) +The function @code{gpgme_signers_clear} releases a reference for each +key on the signers list and removes the list of signers from the +context @var{ctx}. - case GPG_ERR_NO_DATA: - *r_stat = GPGME_SIG_STAT_NOSIG; - break; +Every context starts with an empty list. +@end deftypefun - case GPG_ERR_SIG_EXPIRED: - *r_stat = GPGME_SIG_STAT_GOOD_EXP; - break; +@deftypefun gpgme_error_t gpgme_signers_add (@w{gpgme_ctx_t @var{ctx}}, @w{const gpgme_key_t @var{key}}) +The function @code{gpgme_signers_add} adds the key @var{key} to the +list of signers in the context @var{ctx}. - case GPG_ERR_KEY_EXPIRED: - *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY; - break; +Calling this function acquires an additional reference for the key. +@end deftypefun - default: - *r_stat = GPGME_SIG_STAT_ERROR; - break; - @} - @} - if (r_created) - *r_created = sig->timestamp; - return sig->fpr; -@end example +@deftypefun @w{unsigned int} gpgme_signers_count (@w{const gpgme_ctx_t @var{ctx}}) +The function @code{gpgme_signers_count} returns the number of signer keys in +the context @var{ctx}. @end deftypefun -@deftypefun {const char *} gpgme_get_sig_string_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_string_attr} is equivalent to: +@deftypefun gpgme_key_t gpgme_signers_enum (@w{const gpgme_ctx_t @var{ctx}}, @w{int @var{seq}}) +The function @code{gpgme_signers_enum} returns the @var{seq}th key in +the list of signers in the context @var{ctx}. An additional reference +is acquired for the user. -@example - gpgme_verify_result_t result; - gpgme_signature_t sig; +If @var{seq} is out of range, @code{NULL} is returned. +@end deftypefun - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - while (sig && idx) - @{ - sig = sig->next; - idx--; - @} - if (!sig || idx) - return NULL; +@node Creating a Signature +@subsubsection Creating a Signature - switch (what) - @{ - case GPGME_ATTR_FPR: - return sig->fpr; +@deftp {Data type} {enum gpgme_sig_mode_t} +@tindex gpgme_sig_mode_t +The @code{gpgme_sig_mode_t} type is used to specify the desired type of a +signature. The following modes are available: - case GPGME_ATTR_ERRTOK: - if (whatidx == 1) - return sig->wrong_key_usage ? "Wrong_Key_Usage" : ""; - else - return ""; - default: - break; - @} +@table @code +@item GPGME_SIG_MODE_NORMAL +A normal signature is made, the output includes the plaintext and the +signature. - return NULL; -@end example -@end deftypefun +@item GPGME_SIG_MODE_DETACH +A detached signature is made. -@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}}) -The function @code{gpgme_get_sig_ulong_attr} is equivalent to: - -@example - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - @{ - sig = sig->next; - idx--; - @} - if (!sig || idx) - return 0; - - switch (what) - @{ - case GPGME_ATTR_CREATED: - return sig->timestamp; - - case GPGME_ATTR_EXPIRE: - return sig->exp_timestamp; - - case GPGME_ATTR_VALIDITY: - return (unsigned long) sig->validity; - - case GPGME_ATTR_SIG_STATUS: - switch (sig->status) - @{ - case GPG_ERR_NO_ERROR: - return GPGME_SIG_STAT_GOOD; - - case GPG_ERR_BAD_SIGNATURE: - return GPGME_SIG_STAT_BAD; - - case GPG_ERR_NO_PUBKEY: - return GPGME_SIG_STAT_NOKEY; - - case GPG_ERR_NO_DATA: - return GPGME_SIG_STAT_NOSIG; - - case GPG_ERR_SIG_EXPIRED: - return GPGME_SIG_STAT_GOOD_EXP; - - case GPG_ERR_KEY_EXPIRED: - return GPGME_SIG_STAT_GOOD_EXPKEY; - - default: - return GPGME_SIG_STAT_ERROR; - @} - - case GPGME_ATTR_SIG_SUMMARY: - return sig->summary; - - default: - break; - @} - return 0; -@end example -@end deftypefun - -@deftypefun {const char *} gpgme_get_sig_key (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_key_t *@var{r_key}}) -The function @code{gpgme_get_sig_key} is equivalent to: - -@example - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - @{ - sig = sig->next; - idx--; - @} - if (!sig || idx) - return gpg_error (GPG_ERR_EOF); - - return gpgme_get_key (ctx, sig->fpr, r_key, 0); -@end example -@end deftypefun - - -@node Decrypt and Verify -@subsection Decrypt and Verify -@cindex decryption and verification -@cindex verification and decryption -@cindex signature check -@cindex cryptographic operation, decryption and verification - -@deftypefun gpgme_error_t gpgme_op_decrypt_verify (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{cipher}}, @w{gpgme_data_t @var{plain}}) -The function @code{gpgme_op_decrypt_verify} decrypts the ciphertext in -the data object @var{cipher} and stores it into the data object -@var{plain}. If @var{cipher} contains signatures, they will be -verified. - -After the operation completed, @code{gpgme_op_decrypt_result} and -@code{gpgme_op_verify_result} can be used to retrieve more information -about the signatures. - -If the error code @code{GPG_ERR_NO_DATA} is returned, @var{cipher} -does not contain any data to decrypt. However, it might still be -signed. The information about detected signatures is available with -@code{gpgme_op_verify_result} in this case. - -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -ciphertext could be decrypted successfully, @code{GPG_ERR_INV_VALUE} -if @var{ctx}, @var{cipher} or @var{plain} is not a valid pointer, -@code{GPG_ERR_NO_DATA} if @var{cipher} does not contain any data to -decrypt, @code{GPG_ERR_DECRYPT_FAILED} if @var{cipher} is not a valid -cipher text, @code{GPG_ERR_BAD_PASSPHRASE} if the passphrase for the -secret key could not be retrieved, and passes through any errors that -are reported by the crypto engine support routines. -@end deftypefun - -@deftypefun gpgme_error_t gpgme_op_decrypt_verify (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{cipher}}, @w{gpgme_data_t @var{plain}}) -The function @code{gpgme_op_decrypt_verify_start} initiates a -@code{gpgme_op_decrypt_verify} operation. It can be completed by -calling @code{gpgme_wait} on the context. @xref{Waiting For -Completion}. - -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -operation could be started successfully, @code{GPG_ERR_INV_VALUE} if -@var{ctx}, @var{cipher}, @var{plain} or @var{r_stat} is not a valid -pointer, and @code{GPG_ERR_NO_DATA} if @var{cipher} does not contain -any data to decrypt. -@end deftypefun - - -@node Sign -@subsection Sign -@cindex signature, creation -@cindex sign -@cindex cryptographic operation, signing - -A signature can contain signatures by one or more keys. The set of -keys used to create a signatures is contained in a context, and is -applied to all following signing operations in this context (until the -set is changed). - -@menu -* Selecting Signers:: How to choose the keys to sign with. -* Creating a Signature:: How to create a signature. -* Signature Notation Data:: How to add notation data to a signature. -@end menu - - -@node Selecting Signers -@subsubsection Selecting Signers -@cindex signature, selecting signers -@cindex signers, selecting - -@deftypefun void gpgme_signers_clear (@w{gpgme_ctx_t @var{ctx}}) -The function @code{gpgme_signers_clear} releases a reference for each -key on the signers list and removes the list of signers from the -context @var{ctx}. - -Every context starts with an empty list. -@end deftypefun - -@deftypefun gpgme_error_t gpgme_signers_add (@w{gpgme_ctx_t @var{ctx}}, @w{const gpgme_key_t @var{key}}) -The function @code{gpgme_signers_add} adds the key @var{key} to the -list of signers in the context @var{ctx}. - -Calling this function acquires an additional reference for the key. -@end deftypefun - -@deftypefun @w{unsigned int} gpgme_signers_count (@w{const gpgme_ctx_t @var{ctx}}) -The function @code{gpgme_signers_count} returns the number of signer keys in -the context @var{ctx}. -@end deftypefun - -@deftypefun gpgme_key_t gpgme_signers_enum (@w{const gpgme_ctx_t @var{ctx}}, @w{int @var{seq}}) -The function @code{gpgme_signers_enum} returns the @var{seq}th key in -the list of signers in the context @var{ctx}. An additional reference -is acquired for the user. - -If @var{seq} is out of range, @code{NULL} is returned. -@end deftypefun - - -@node Creating a Signature -@subsubsection Creating a Signature - -@deftp {Data type} {enum gpgme_sig_mode_t} -@tindex gpgme_sig_mode_t -The @code{gpgme_sig_mode_t} type is used to specify the desired type of a -signature. The following modes are available: - -@table @code -@item GPGME_SIG_MODE_NORMAL -A normal signature is made, the output includes the plaintext and the -signature. - -@item GPGME_SIG_MODE_DETACH -A detached signature is made. - -@item GPGME_SIG_MODE_CLEAR -A clear text signature is made. The @acronym{ASCII} armor and text -mode settings of the context are ignored. -@end table -@end deftp +@item GPGME_SIG_MODE_CLEAR +A clear text signature is made. The @acronym{ASCII} armor and text +mode settings of the context are ignored. +@end table +@end deftp @deftypefun gpgme_error_t gpgme_op_sign (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{plain}}, @w{gpgme_data_t @var{sig}}, @w{gpgme_sig_mode_t @var{mode}}) The function @code{gpgme_op_sign} creates a signature for the text in @@ -5271,6 +5396,12 @@ protocol to prepare an encryption (i.e. sending the @code{GPGME_ENCRYPT_EXPECT_SIGN} symbol the UI Server is advised to also expect a sign command. +@item GPGME_ENCRYPT_SYMMETRIC +The @code{GPGME_ENCRYPT_SYMMETRIC} symbol specifies that the +output should be additionally encrypted symmetically even +if recipients are provided. This feature is only supported for +for the OpenPGP crypto engine. + @end table If @code{GPG_ERR_UNUSABLE_PUBKEY} is returned, some recipients in @@ -5369,6 +5500,7 @@ Here are some support functions which are sometimes useful. @menu * Running other Programs:: Running other Programs +* Using the Assuan protocol:: Using the Assuan protocol @end menu @@ -5383,7 +5515,7 @@ which are part of the GnuPG system but are not directly accessible with the GPGME API. -@deftypefun gpgme_error_t gpgme_op_spawn +@deftypefun gpgme_error_t gpgme_op_spawn @ (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{file}}, @ @w{const char *@var{argv}[]}, @w{gpgme_data_t @var{datain}}, @ @w{gpgme_data_t @var{dataout}}, @w{gpgme_data_t @var{dataerr}}, @ @@ -5413,7 +5545,7 @@ the foreground. @end table @end deftypefun -@deftypefun gpgme_error_t gpgme_op_spawn_start +@deftypefun gpgme_error_t gpgme_op_spawn_start @ (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{file}}, @ @w{const char *@var{argv}[]}, @w{gpgme_data_t @var{datain}}, @ @w{gpgme_data_t @var{dataout}}, @w{gpgme_data_t @var{dataerr}}, @ @@ -5423,6 +5555,83 @@ This is the asynchronous variant of @code{gpgme_op_spawn}. @end deftypefun +@node Using the Assuan protocol +@subsection Using the Assuan protocol + +The Assuan protocol can be used to talk to arbitrary Assuan servers. +By default it is connected to the GnuPG agent, but it may be connected +to arbitrary servers by using @code{gpgme_ctx_set_engine_info}, +passing the location of the servers socket as @var{file_name} +argument, and an empty string as @var{home_dir} argument. + +The Assuan protocol functions use three kinds of callbacks to transfer +data: + +@deftp {Data type} {gpgme_error_t (*gpgme_assuan_data_cb_t) @ + (@w{void *@var{opaque}}, @w{const void *@var{data}}, @ + @w{size_t @var{datalen}})} + +This callback receives any data sent by the server. @var{opaque} is +the pointer passed to @code{gpgme_op_assuan_transact_start}, +@var{data} of length @var{datalen} refers to the data sent. +@end deftp + +@deftp {Data type} {gpgme_error_t (*gpgme_assuan_inquire_cb_t) @ + (@w{void *@var{opaque}}, @w{const char *@var{name}}, @ + @w{const char *@var{args}}, @w{gpgme_data_t *@var{r_data}})} + +This callback is used to provide additional data to the Assuan server. +@var{opaque} is the pointer passed to +@code{gpgme_op_assuan_transact_start}, @var{name} and @var{args} +specify what kind of data the server requested, and @var{r_data} is +used to return the actual data. + +Note: Returning data is currently not implemented in @acronym{GPGME}. +@end deftp + +@deftp {Data type} {gpgme_error_t (*gpgme_assuan_status_cb_t) @ + (@w{void *@var{opaque}}, @w{const char *@var{status}}, @ + @w{const char *@var{args}})} + +This callback receives any status lines sent by the server. +@var{opaque} is the pointer passed to +@code{gpgme_op_assuan_transact_start}, @var{status} and @var{args} +denote the status update sent. +@end deftp + +@deftypefun gpgme_error_t gpgme_op_assuan_transact_start @ + (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{command}}, @ + @w{gpgme_assuan_data_cb_t @var{data_cb}}, @ + @w{void * @var{data_cb_value}}, @ + @w{gpgme_assuan_inquire_cb_t @var{inquire_cb}}, @ + @w{void * @var{inquire_cb_value}}, @ + @w{gpgme_assuan_status_cb_t @var{status_cb}}, @ + @w{void * @var{status_cb_value}}) + +Send the Assuan @var{command} and return results via the callbacks. +Any callback may be @code{NULL}. The result of the operation may be +retrieved using @code{gpgme_wait_ext}. + +Asynchronous variant. +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_assuan_transact_ext @ + (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{command}}, @ + @w{gpgme_assuan_data_cb_t @var{data_cb}}, @ + @w{void * @var{data_cb_value}}, @ + @w{gpgme_assuan_inquire_cb_t @var{inquire_cb}}, @ + @w{void * @var{inquire_cb_value}}, @ + @w{gpgme_assuan_status_cb_t @var{status_cb}}, @ + @w{void * @var{status_cb_value}}, @ + @w{gpgme_error_t *@var{op_err}}) + +Send the Assuan @var{command} and return results via the callbacks. +The result of the operation is returned in @var{op_err}. + +Synchronous variant. +@end deftypefun + + @node Run Control @section Run Control @cindex run control @@ -6124,16 +6333,16 @@ operation in the context @var{ctx}. This only works if you use the global event loop or your own event loop. If you use the global event loop, you must not call @code{gpgme_wait} -or @code{gpgme_wait} during cancellation. After successful +during cancellation. After successful cancellation, you can call @code{gpgme_wait} (optionally waiting on @var{ctx}), and the context @var{ctx} will appear as if it had finished with the error code @code{GPG_ERR_CANCEL}. -If you use your an external event loop, you must ensure that no I/O +If you use an external event loop, you must ensure that no I/O callbacks are invoked for this context (for example by halting the event loop). On successful cancellation, all registered I/O callbacks for this context will be unregistered, and a @code{GPGME_EVENT_DONE} -event with the error code @code{GPG_ERR_CANCEL} will be signaled. +event with the error code @code{GPG_ERR_CANCEL} will be signalled. The function returns an error code if the cancellation failed (in this case the state of @var{ctx} is not modified). @@ -6198,6 +6407,682 @@ your application. If you are asked to send a log file, make sure that you run your tests only with play data. +@node Deprecated Functions +@appendix Deprecated Functions +@cindex deprecated + +For backward compatibility @acronym{GPGME} has a number of functions, +data types and constants which are deprecated and should not be used +anymore. We document here those which are really old to help +understanding old code and to allow migration to their modern +counterparts. + +@strong{Warning:} These interfaces will be removed in a future version +of @acronym{GPGME}. + +@deftypefun void gpgme_key_release (@w{gpgme_key_t @var{key}}) +The function @code{gpgme_key_release} is equivalent to +@code{gpgme_key_unref}. +@end deftypefun + +@deftypefun void gpgme_trust_item_release (@w{gpgme_trust_item_t @var{item}}) +The function @code{gpgme_trust_item_release} is an alias for +@code{gpgme_trust_item_unref}. +@end deftypefun + + +@deftypefun gpgme_error_t gpgme_op_import_ext (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{keydata}}, @w{int *@var{nr}}) +The function @code{gpgme_op_import_ext} is equivalent to: + +@example + gpgme_error_t err = gpgme_op_import (ctx, keydata); + if (!err) + @{ + gpgme_import_result_t result = gpgme_op_import_result (ctx); + *nr = result->considered; + @} +@end example +@end deftypefun + + +@deftp {Data type} {gpgme_error_t (*gpgme_edit_cb_t) @ + (@w{void *@var{handle}}, @ + @w{gpgme_status_code_t @var{status}}, @ + @w{const char *@var{args}}, @ + @w{int @var{fd}})} +@tindex gpgme_edit_cb_t +The @code{gpgme_edit_cb_t} type is the type of functions which +@acronym{GPGME} calls if it a key edit operation is on-going. The +status code @var{status} and the argument line @var{args} are passed +through by @acronym{GPGME} from the crypto engine. The file +descriptor @var{fd} is -1 for normal status messages. If @var{status} +indicates a command rather than a status message, the response to the +command should be written to @var{fd}. The @var{handle} is provided +by the user at start of operation. + +The function should return @code{GPG_ERR_FALSE} if it did not handle +the status code, @code{0} for success, or any other error value. +@end deftp + +@deftypefun gpgme_error_t gpgme_op_edit (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) +Note: This function is deprecated, please use +@code{gpgme_op_interact} instead. + +The function @code{gpgme_op_edit} processes the key @var{KEY} +interactively, using the edit callback function @var{FNC} with the +handle @var{HANDLE}. The callback is invoked for every status and +command request from the crypto engine. The output of the crypto +engine is written to the data object @var{out}. + +Note that the protocol between the callback function and the crypto +engine is specific to the crypto engine and no further support in +implementing this protocol correctly is provided by @acronym{GPGME}. + +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +edit operation completes successfully, @code{GPG_ERR_INV_VALUE} if +@var{ctx} or @var{key} is not a valid pointer, and any error returned +by the crypto engine or the edit callback handler. +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_edit_start (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) +Note: This function is deprecated, please use +@code{gpgme_op_interact_start} instead. + +The function @code{gpgme_op_edit_start} initiates a +@code{gpgme_op_edit} operation. It can be completed by calling +@code{gpgme_wait} on the context. @xref{Waiting For Completion}. + +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +operation was started successfully, and @code{GPG_ERR_INV_VALUE} if +@var{ctx} or @var{key} is not a valid pointer. +@end deftypefun + + +@deftypefun gpgme_error_t gpgme_op_card_edit (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) +Note: This function is deprecated, please use @code{gpgme_op_interact} +with the flag @code{GPGME_INTERACT_CARD} instead. + +The function @code{gpgme_op_card_edit} is analogous to +@code{gpgme_op_edit}, but should be used to process the smart card corresponding to the key @var{key}. +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_card_edit_start (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) +Note: This function is deprecated, please use @code{gpgme_op_interact_start} +with the flag @code{GPGME_INTERACT_CARD} instead. + +The function @code{gpgme_op_card_edit_start} initiates a +@code{gpgme_op_card_edit} operation. It can be completed by calling +@code{gpgme_wait} on the context. @xref{Waiting For Completion}. + +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +operation was started successfully, and @code{GPG_ERR_INV_VALUE} if +@var{ctx} or @var{key} is not a valid pointer. +@end deftypefun + + + +@deftypefun gpgme_error_t gpgme_data_new_with_read_cb (@w{gpgme_data_t *@var{dh}}, @w{int (*@var{readfunc})} (@w{void *@var{hook}}, @w{char *@var{buffer}}, @w{size_t @var{count}}, @w{size_t *@var{nread}}), @w{void *@var{hook_value}}) +The function @code{gpgme_data_new_with_read_cb} creates a new +@code{gpgme_data_t} object and uses the callback function @var{readfunc} +to retrieve the data on demand. As the callback function can supply +the data in any way it wants, this is the most flexible data type +@acronym{GPGME} provides. However, it can not be used to write data. + +The callback function receives @var{hook_value} as its first argument +whenever it is invoked. It should return up to @var{count} bytes in +@var{buffer}, and return the number of bytes actually read in +@var{nread}. It may return @code{0} in @var{nread} if no data is +currently available. To indicate @code{EOF} the function should +return with an error code of @code{-1} and set @var{nread} to +@code{0}. The callback function may support to reset its internal +read pointer if it is invoked with @var{buffer} and @var{nread} being +@code{NULL} and @var{count} being @code{0}. + +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +data object was successfully created, @code{GPG_ERR_INV_VALUE} if +@var{dh} or @var{readfunc} is not a valid pointer, and +@code{GPG_ERR_ENOMEM} if not enough memory is available. +@end deftypefun + +@deftypefun gpgme_error_t gpgme_data_rewind (@w{gpgme_data_t @var{dh}}) +The function @code{gpgme_data_rewind} is equivalent to: + +@example + return (gpgme_data_seek (dh, 0, SEEK_SET) == -1) + ? gpgme_error_from_errno (errno) : 0; +@end example +@end deftypefun + + +@deftp {Data type} gpgme_attr_t +The @code{gpgme_attr_t} type is used to specify a key or trust item +attribute. The following attributes are defined: + +@table @code +@item GPGME_ATTR_KEYID +This is the key ID of a sub key. It is representable as a string. + +For trust items, the trust item refers to the key with this ID. + +@item GPGME_ATTR_FPR +This is the fingerprint of a sub key. It is representable as a +string. + +@item GPGME_ATTR_ALGO +This is the crypto algorithm for which the sub key can be used. It +is representable as a string and as a number. The numbers correspond +to the @code{enum gcry_pk_algos} values in the gcrypt library. + +@item GPGME_ATTR_LEN +This is the key length of a sub key. It is representable as a +number. + +@item GPGME_ATTR_CREATED +This is the timestamp at creation time of a sub key. It is +representable as a number. + +@item GPGME_ATTR_EXPIRE +This is the expiration time of a sub key. It is representable as a +number. + +@item GPGME_ATTR_OTRUST +XXX FIXME (also for trust items) + +@item GPGME_ATTR_USERID +This is a user ID. There can be more than one user IDs in a +@var{gpgme_key_t} object. The first one (with index 0) is the primary +user ID. The user ID is representable as a number. + +For trust items, this is the user ID associated with this trust item. + +@item GPGME_ATTR_NAME +This is the name belonging to a user ID. It is representable as a string. + +@item GPGME_ATTR_EMAIL +This is the email address belonging to a user ID. It is representable +as a string. + +@item GPGME_ATTR_COMMENT +This is the comment belonging to a user ID. It is representable as a +string. + +@item GPGME_ATTR_VALIDITY +This is the validity belonging to a user ID. It is representable as a +string and as a number. See below for a list of available validities. + +For trust items, this is the validity that is associated with this +trust item. + +@item GPGME_ATTR_UID_REVOKED +This specifies if a user ID is revoked. It is representable as a +number, and is @code{1} if the user ID is revoked, and @code{0} +otherwise. + +@item GPGME_ATTR_UID_INVALID +This specifies if a user ID is invalid. It is representable as a +number, and is @code{1} if the user ID is invalid, and @code{0} +otherwise. + +@item GPGME_ATTR_LEVEL +This is the trust level of a trust item. + +@item GPGME_ATTR_TYPE +This returns information about the type of key. For the string function +this will eother be "PGP" or "X.509". The integer function returns 0 +for PGP and 1 for X.509. It is also used for the type of a trust item. + +@item GPGME_ATTR_IS_SECRET +This specifies if the key is a secret key. It is representable as a +number, and is @code{1} if the key is revoked, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_REVOKED +This specifies if a sub key is revoked. It is representable as a +number, and is @code{1} if the key is revoked, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_INVALID +This specifies if a sub key is invalid. It is representable as a +number, and is @code{1} if the key is invalid, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_EXPIRED +This specifies if a sub key is expired. It is representable as a +number, and is @code{1} if the key is expired, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_DISABLED +This specifies if a sub key is disabled. It is representable as a +number, and is @code{1} if the key is disabled, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_CAPS +This is a description of the capabilities of a sub key. It is +representable as a string. The string contains the letter ``e'' if +the key can be used for encryption, ``s'' if the key can be used for +signatures, and ``c'' if the key can be used for certifications. + +@item GPGME_ATTR_CAN_ENCRYPT +This specifies if a sub key can be used for encryption. It is +representable as a number, and is @code{1} if the sub key can be used +for encryption, and @code{0} otherwise. + +@item GPGME_ATTR_CAN_SIGN +This specifies if a sub key can be used to create data signatures. It +is representable as a number, and is @code{1} if the sub key can be +used for signatures, and @code{0} otherwise. + +@item GPGME_ATTR_CAN_CERTIFY +This specifies if a sub key can be used to create key certificates. +It is representable as a number, and is @code{1} if the sub key can be +used for certifications, and @code{0} otherwise. + +@item GPGME_ATTR_SERIAL +The X.509 issuer serial attribute of the key. It is representable as +a string. + +@item GPGME_ATTR_ISSUE +The X.509 issuer name attribute of the key. It is representable as a +string. + +@item GPGME_ATTR_CHAINID +The X.509 chain ID can be used to build the certification chain. It +is representable as a string. +@end table +@end deftp + +@deftypefun {const char *} gpgme_key_get_string_attr (@w{gpgme_key_t @var{key}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_key_get_string_attr} returns the value of the +string-representable attribute @var{what} of key @var{key}. If the +attribute is an attribute of a sub key or an user ID, @var{idx} +specifies the sub key or user ID of which the attribute value is +returned. The argument @var{reserved} is reserved for later use and +should be @code{NULL}. + +The string returned is only valid as long as the key is valid. + +The function returns @code{0} if an attribute can't be returned as a +string, @var{key} is not a valid pointer, @var{idx} out of range, +or @var{reserved} not @code{NULL}. +@end deftypefun + +@deftypefun {unsigned long} gpgme_key_get_ulong_attr (@w{gpgme_key_t @var{key}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_key_get_ulong_attr} returns the value of the +number-representable attribute @var{what} of key @var{key}. If the +attribute is an attribute of a sub key or an user ID, @var{idx} +specifies the sub key or user ID of which the attribute value is +returned. The argument @var{reserved} is reserved for later use and +should be @code{NULL}. + +The function returns @code{0} if the attribute can't be returned as a +number, @var{key} is not a valid pointer, @var{idx} out of range, or +@var{reserved} not @code{NULL}. +@end deftypefun + + +@c +@c Key Signatures +@c +The signatures on a key are only available if the key was retrieved +via a listing operation with the @code{GPGME_KEYLIST_MODE_SIGS} mode +enabled, because it is expensive to retrieve all signatures of a key. + +So, before using the below interfaces to retrieve the signatures on a +key, you have to make sure that the key was listed with signatures +enabled. One convenient, but blocking, way to do this is to use the +function @code{gpgme_get_key}. + +@deftp {Data type} gpgme_attr_t +The @code{gpgme_attr_t} type is used to specify a key signature +attribute. The following attributes are defined: + +@table @code +@item GPGME_ATTR_KEYID +This is the key ID of the key which was used for the signature. It is +representable as a string. + +@item GPGME_ATTR_ALGO +This is the crypto algorithm used to create the signature. It is +representable as a string and as a number. The numbers correspond to +the @code{enum gcry_pk_algos} values in the gcrypt library. + +@item GPGME_ATTR_CREATED +This is the timestamp at creation time of the signature. It is +representable as a number. + +@item GPGME_ATTR_EXPIRE +This is the expiration time of the signature. It is representable as +a number. + +@item GPGME_ATTR_USERID +This is the user ID associated with the signing key. The user ID is +representable as a number. + +@item GPGME_ATTR_NAME +This is the name belonging to a user ID. It is representable as a string. + +@item GPGME_ATTR_EMAIL +This is the email address belonging to a user ID. It is representable +as a string. + +@item GPGME_ATTR_COMMENT +This is the comment belonging to a user ID. It is representable as a +string. + +@item GPGME_ATTR_KEY_REVOKED +This specifies if a key signature is a revocation signature. It is +representable as a number, and is @code{1} if the key is revoked, and +@code{0} otherwise. + +@c @item GPGME_ATTR_KEY_EXPIRED +@c This specifies if a key signature is expired. It is representable as +@c a number, and is @code{1} if the key is revoked, and @code{0} +@c otherwise. +@c +@item GPGME_ATTR_SIG_CLASS +This specifies the signature class of a key signature. It is +representable as a number. The meaning is specific to the crypto +engine. + +@item GPGME_ATTR_SIG_CLASS +This specifies the signature class of a key signature. It is +representable as a number. The meaning is specific to the crypto +engine. + +@item GPGME_ATTR_SIG_STATUS +This is the same value as returned by @code{gpgme_get_sig_status}. +@end table +@end deftp + +@deftypefun {const char *} gpgme_key_sig_get_string_attr (@w{gpgme_key_t @var{key}}, @w{int @var{uid_idx}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_key_sig_get_string_attr} returns the value of +the string-representable attribute @var{what} of the signature +@var{idx} on the user ID @var{uid_idx} in the key @var{key}. The +argument @var{reserved} is reserved for later use and should be +@code{NULL}. + +The string returned is only valid as long as the key is valid. + +The function returns @code{0} if an attribute can't be returned as a +string, @var{key} is not a valid pointer, @var{uid_idx} or @var{idx} +out of range, or @var{reserved} not @code{NULL}. +@end deftypefun + +@deftypefun {unsigned long} gpgme_key_sig_get_ulong_attr (@w{gpgme_key_t @var{key}}, @w{int @var{uid_idx}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_key_sig_get_ulong_attr} returns the value of +the number-representable attribute @var{what} of the signature +@var{idx} on the user ID @var{uid_idx} in the key @var{key}. The +argument @var{reserved} is reserved for later use and should be +@code{NULL}. + +The function returns @code{0} if an attribute can't be returned as a +string, @var{key} is not a valid pointer, @var{uid_idx} or @var{idx} +out of range, or @var{reserved} not @code{NULL}. +@end deftypefun + + +@c node Information About Trust Items +@c subsection Information About Trust Items +@c cindex trust item, information about +@c cindex trust item, attributes +@c cindex attributes, of a trust item + +Trust items have attributes which can be queried using the interfaces +below. The attribute identifiers are shared with those for key +attributes. @xref{Information About Keys}. + +@deftypefun {const char *} gpgme_trust_item_get_string_attr (@w{gpgme_trust_item_t @var{item}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_trust_item_get_string_attr} returns the value +of the string-representable attribute @var{what} of trust item +@var{item}. The arguments @var{idx} and @var{reserved} are reserved +for later use and should be @code{0} and @code{NULL} respectively. + +The string returned is only valid as long as the key is valid. + +The function returns @code{0} if an attribute can't be returned as a +string, @var{key} is not a valid pointer, @var{idx} out of range, +or @var{reserved} not @code{NULL}. +@end deftypefun + +@deftypefun int gpgme_trust_item_get_int_attr (@w{gpgme_trust_item_t @var{item}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_trust_item_get_int_attr} returns the value of +the number-representable attribute @var{what} of trust item +@var{item}. If the attribute occurs more than once in the trust item, +the index is specified by @var{idx}. However, currently no such +attribute exists, so @var{idx} should be @code{0}. The argument +@var{reserved} is reserved for later use and should be @code{NULL}. + +The function returns @code{0} if the attribute can't be returned as a +number, @var{key} is not a valid pointer, @var{idx} out of range, +or @var{reserved} not @code{NULL}. +@end deftypefun + + +@deftp {Data type} {enum gpgme_sig_stat_t} +@tindex gpgme_sig_stat_t +The @code{gpgme_sig_stat_t} type holds the result of a signature check, or +the combined result of all signatures. The following results are +possible: + +@table @code +@item GPGME_SIG_STAT_NONE +This status should not occur in normal operation. + +@item GPGME_SIG_STAT_GOOD +This status indicates that the signature is valid. For the combined +result this status means that all signatures are valid. + +@item GPGME_SIG_STAT_GOOD_EXP +This status indicates that the signature is valid but expired. For +the combined result this status means that all signatures are valid +and expired. + +@item GPGME_SIG_STAT_GOOD_EXPKEY +This status indicates that the signature is valid but the key used to +verify the signature has expired. For the combined result this status +means that all signatures are valid and all keys are expired. + +@item GPGME_SIG_STAT_BAD +This status indicates that the signature is invalid. For the combined +result this status means that all signatures are invalid. + +@item GPGME_SIG_STAT_NOKEY +This status indicates that the signature could not be verified due to +a missing key. For the combined result this status means that all +signatures could not be checked due to missing keys. + +@item GPGME_SIG_STAT_NOSIG +This status indicates that the signature data provided was not a real +signature. + +@item GPGME_SIG_STAT_ERROR +This status indicates that there was some other error which prevented +the signature verification. + +@item GPGME_SIG_STAT_DIFF +For the combined result this status means that at least two signatures +have a different status. You can get each key's status with +@code{gpgme_get_sig_status}. +@end table +@end deftp + +@deftypefun {const char *} gpgme_get_sig_status (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_sig_stat_t *@var{r_stat}}, @w{time_t *@var{r_created}}) +The function @code{gpgme_get_sig_status} is equivalent to: + +@example + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + @{ + sig = sig->next; + idx--; + @} + if (!sig || idx) + return NULL; + + if (r_stat) + @{ + switch (gpg_err_code (sig->status)) + @{ + case GPG_ERR_NO_ERROR: + *r_stat = GPGME_SIG_STAT_GOOD; + break; + + case GPG_ERR_BAD_SIGNATURE: + *r_stat = GPGME_SIG_STAT_BAD; + break; + + case GPG_ERR_NO_PUBKEY: + *r_stat = GPGME_SIG_STAT_NOKEY; + break; + + case GPG_ERR_NO_DATA: + *r_stat = GPGME_SIG_STAT_NOSIG; + break; + + case GPG_ERR_SIG_EXPIRED: + *r_stat = GPGME_SIG_STAT_GOOD_EXP; + break; + + case GPG_ERR_KEY_EXPIRED: + *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY; + break; + + default: + *r_stat = GPGME_SIG_STAT_ERROR; + break; + @} + @} + if (r_created) + *r_created = sig->timestamp; + return sig->fpr; +@end example +@end deftypefun + +@deftypefun {const char *} gpgme_get_sig_string_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_string_attr} is equivalent to: + +@example + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + @{ + sig = sig->next; + idx--; + @} + if (!sig || idx) + return NULL; + + switch (what) + @{ + case GPGME_ATTR_FPR: + return sig->fpr; + + case GPGME_ATTR_ERRTOK: + if (whatidx == 1) + return sig->wrong_key_usage ? "Wrong_Key_Usage" : ""; + else + return ""; + default: + break; + @} + + return NULL; +@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}}) +The function @code{gpgme_get_sig_ulong_attr} is equivalent to: + +@example + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + @{ + sig = sig->next; + idx--; + @} + if (!sig || idx) + return 0; + + switch (what) + @{ + case GPGME_ATTR_CREATED: + return sig->timestamp; + + case GPGME_ATTR_EXPIRE: + return sig->exp_timestamp; + + case GPGME_ATTR_VALIDITY: + return (unsigned long) sig->validity; + + case GPGME_ATTR_SIG_STATUS: + switch (sig->status) + @{ + case GPG_ERR_NO_ERROR: + return GPGME_SIG_STAT_GOOD; + + case GPG_ERR_BAD_SIGNATURE: + return GPGME_SIG_STAT_BAD; + + case GPG_ERR_NO_PUBKEY: + return GPGME_SIG_STAT_NOKEY; + + case GPG_ERR_NO_DATA: + return GPGME_SIG_STAT_NOSIG; + + case GPG_ERR_SIG_EXPIRED: + return GPGME_SIG_STAT_GOOD_EXP; + + case GPG_ERR_KEY_EXPIRED: + return GPGME_SIG_STAT_GOOD_EXPKEY; + + default: + return GPGME_SIG_STAT_ERROR; + @} + + case GPGME_ATTR_SIG_SUMMARY: + return sig->summary; + + default: + break; + @} + return 0; +@end example +@end deftypefun + +@deftypefun {const char *} gpgme_get_sig_key (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_key_t *@var{r_key}}) +The function @code{gpgme_get_sig_key} is equivalent to: + +@example + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + @{ + sig = sig->next; + idx--; + @} + if (!sig || idx) + return gpg_error (GPG_ERR_EOF); + + return gpgme_get_key (ctx, sig->fpr, r_key, 0); +@end example +@end deftypefun + + + + @include lesser.texi diff --git a/doc/mkdefsinc.c b/doc/mkdefsinc.c new file mode 100644 index 0000000..0f30d93 --- /dev/null +++ b/doc/mkdefsinc.c @@ -0,0 +1,310 @@ +/* mkdefsinc.c - Tool to create defs.inc + * Copyright (C) 2015 g10 Code GmbH + * + * This file is free software; as a special exception the author gives + * unlimited permission to copy and/or distribute it, with or without + * modifications, as long as this notice is preserved. + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/* This tool needs to be build with command line supplied -D options + for the various directory variables. It is easier to do this in + build file than to use fragile make rules and a template file. */ + + +#include +#include +#include +#include +#include +#include +#include +#include + +#define PGM "mkdefsinc" + +/* We include config.h after all include files because the config.h + values are not valid for the build platform but we need some values + nevertheless. */ +#include "config.h" + + +static int verbose; + + +/* The usual free wrapper. */ +static void +xfree (void *a) +{ + if (a) + free (a); +} + + +static char * +xmalloc (size_t n) +{ + char *p; + + p = malloc (n); + if (!p) + { + fputs (PGM ": out of core\n", stderr); + exit (1); + } + return p; +} + + +static char * +xstrdup (const char *string) +{ + char *p; + + p = xmalloc (strlen (string)+1); + strcpy (p, string); + return p; +} + + +/* Return a malloced string with the last modification date of the + FILES. Returns NULL on error. */ +static char * +get_date_from_files (char **files) +{ + const char *file; + const char *usedfile = NULL; + struct stat sb; + struct tm *tp; + int errors = 0; + time_t stamp = 0; + char *result; + + for (; (file = *files); files++) + { + if (!*file || !strcmp (file, ".") || !strcmp (file, "..")) + continue; + if (stat (file, &sb)) + { + fprintf (stderr, PGM ": stat failed for '%s': %s\n", + file, strerror (errno)); + errors = 1; + continue; + } + if (sb.st_mtime > stamp) + { + stamp = sb.st_mtime; + usedfile = file; + } + } + if (errors) + exit (1); + + if (usedfile) + fprintf (stderr, PGM ": taking date from '%s'\n", usedfile); + + tp = gmtime (&stamp); + if (!tp) + return NULL; + result = xmalloc (4+1+2+1+2+1); + snprintf (result, 4+1+2+1+2+1, "%04d-%02d-%02d", + tp->tm_year + 1900, tp->tm_mon+1, tp->tm_mday); + return result; +} + + +/* We need to escape file names for Texinfo. */ +static void +print_filename (const char *prefix, const char *name) +{ + const char *s; + + fputs (prefix, stdout); + for (s=name; *s; s++) + switch (*s) + { + case '@': fputs ("@atchar{}", stdout); break; + case '{': fputs ("@lbracechar{}", stdout); break; + case '}': fputs ("@rbracechar{}", stdout); break; + case ',': fputs ("@comma{}", stdout); break; + case '\\':fputs ("@backslashchar{}", stdout); break; + case '#': fputs ("@hashchar{}", stdout); break; + default: putchar (*s); break; + } + putchar('\n'); +} + + +int +main (int argc, char **argv) +{ + int last_argc = -1; + char *opt_date = NULL; + int monthoff; + char *p, *pend; + size_t n; + + /* Option parsing. */ + if (argc) + { + argc--; argv++; + } + while (argc && last_argc != argc ) + { + last_argc = argc; + if (!strcmp (*argv, "--")) + { + argc--; argv++; + break; + } + else if (!strcmp (*argv, "--help")) + { + fputs ("Usage: " PGM " [OPTION] [FILES]\n" + "Create defs.inc file.\nOptions:\n" + " -C DIR Change to DIR before doing anything\n" + " --date STRING Take publication date from STRING\n" + " --verbose Enable extra informational output\n" + " --help Display this help and exit\n" + , stdout); + exit (0); + } + else if (!strcmp (*argv, "--verbose")) + { + verbose = 1; + argc--; argv++; + } + else if (!strcmp (*argv, "-C")) + { + argc--; argv++; + if (argc) + { + if (chdir (*argv)) + { + fprintf (stderr, PGM ": chdir to '%s' failed: %s\n", + *argv, strerror (errno)); + exit (1); + } + argc--; argv++; + } + } + else if (!strcmp (*argv, "--date")) + { + argc--; argv++; + if (argc) + { + opt_date = xstrdup (*argv); + argc--; argv++; + } + } + else if (!strncmp (*argv, "--", 2)) + { + fprintf (stderr, PGM ": unknown option '%s'\n", *argv); + exit (1); + } + } + + if (opt_date && *opt_date) + { + time_t stamp; + struct tm *tp; + + if (*opt_date == '2' && strlen (opt_date) >= 10 + && opt_date[4] == '-' && opt_date[7] == '-') + { + opt_date[10] = 0; + } + else if ((stamp = strtoul (opt_date, NULL, 10)) > 0 + && (tp = gmtime (&stamp))) + { + p = xmalloc (4+1+2+1+2+1); + snprintf (p, 4+1+2+1+2+1, "%04d-%02d-%02d", + tp->tm_year + 1900, tp->tm_mon+1, tp->tm_mday); + xfree (opt_date); + opt_date = p; + } + else + { + fprintf (stderr, PGM ": bad date '%s'\n", opt_date); + exit (1); + } + } + else + { + xfree (opt_date); + opt_date = argc? get_date_from_files (argv) : NULL; + } + if (!opt_date) + { + opt_date = xstrdup ("unknown"); + monthoff = 0; + } + else + { + const char *month = "?"; + + switch (atoi (opt_date+5)) + { + case 1: month = "January"; break; + case 2: month = "February"; break; + case 3: month = "March"; break; + case 4: month = "April"; break; + case 5: month = "May"; break; + case 6: month = "June"; break; + case 7: month = "July"; break; + case 8: month = "August"; break; + case 9: month = "September"; break; + case 10: month = "October"; break; + case 11: month = "November"; break; + case 12: month = "December"; break; + } + n = strlen (opt_date) + strlen (month) + 2 + 1; + p = xmalloc (n); + snprintf (p, n, "%d %n%s %d", + atoi (opt_date+8), &monthoff, month, atoi (opt_date)); + xfree (opt_date); + opt_date = p; + } + + + fputs ("@c defs.inc -*- texinfo -*-\n" + "@c Common and build specific constants for the manuals.\n" + "@c This file has been created by " PGM ".\n\n", stdout); + + fputs ("@ifclear defsincincluded\n" + "@set defsincincluded 1\n\n", stdout); + + + fputs ("\n@c Flags\n\n", stdout); + + fputs ("\n@c Directories\n\n", stdout); + + /* print_filename ("@set BINDIR ", GNUPG_BINDIR ); */ + + fputs ("\n@c Version information a la version.texi\n\n", stdout); + + printf ("@set UPDATED %s\n", opt_date); + printf ("@set UPDATED-MONTH %s\n", opt_date + monthoff); + printf ("@set EDITION %s\n", PACKAGE_VERSION); + printf ("@set VERSION %s\n", PACKAGE_VERSION); + + fputs ("\n@c Macros\n\n", stdout); + + /* Trailer. */ + fputs ("\n" + "@end ifclear\n" + "\n" + "@c Loc" "al Variables:\n" + "@c buffer-read-only: t\n" + "@c End:\n", stdout); + + if (ferror (stdout)) + { + fprintf (stderr, PGM ": error writing to stdout: %s\n", strerror (errno)); + return 1; + } + + return 0; +} diff --git a/doc/stamp-vti b/doc/stamp-vti deleted file mode 100644 index c0e1438..0000000 --- a/doc/stamp-vti +++ /dev/null @@ -1,4 +0,0 @@ -@set UPDATED 26 August 2015 -@set UPDATED-MONTH August 2015 -@set EDITION 1.6.0 -@set VERSION 1.6.0 diff --git a/doc/version.texi b/doc/version.texi deleted file mode 100644 index c0e1438..0000000 --- a/doc/version.texi +++ /dev/null @@ -1,4 +0,0 @@ -@set UPDATED 26 August 2015 -@set UPDATED-MONTH August 2015 -@set EDITION 1.6.0 -@set VERSION 1.6.0 diff --git a/gpgme.spec b/gpgme.spec index e97e1db..7a269c6 100644 --- a/gpgme.spec +++ b/gpgme.spec @@ -1,7 +1,7 @@ # This is a template. The dist target uses it to create the real file. Summary: GPGME - GnuPG Made Easy Name: gpgme -Version: 1.6.0 +Version: 1.7.0 Release: 1 URL: http://www.gnupg.org/gpgme.html Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz diff --git a/lang/Makefile.am b/lang/Makefile.am index 854d934..fd3ce4e 100644 --- a/lang/Makefile.am +++ b/lang/Makefile.am @@ -17,6 +17,7 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -SUBDIRS = cl +SUBDIRS = $(ENABLED_LANGUAGES) +DIST_SUBDIRS = cl cpp qt python EXTRA_DIST = README diff --git a/lang/Makefile.in b/lang/Makefile.in index 3dc49d0..5c96b8f 100644 --- a/lang/Makefile.in +++ b/lang/Makefile.in @@ -100,12 +100,16 @@ 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/glib-2.0.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnupg-ttyname.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4/ax_pkg_swig.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnupg-ttyname.m4 \ $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libassuan.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -167,7 +171,6 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -208,6 +211,7 @@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -219,12 +223,14 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLED_LANGUAGES = @ENABLED_LANGUAGES@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ @@ -235,15 +241,23 @@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GPGME_CONFIG_API_VERSION = @GPGME_CONFIG_API_VERSION@ +GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ +GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ +GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ +GPGME_QT_LIBS = @GPGME_QT_LIBS@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@ GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@ +GRAPHVIZ = @GRAPHVIZ@ GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ +HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -254,10 +268,16 @@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBGPGMEPP_LT_AGE = @LIBGPGMEPP_LT_AGE@ +LIBGPGMEPP_LT_CURRENT = @LIBGPGMEPP_LT_CURRENT@ +LIBGPGMEPP_LT_REVISION = @LIBGPGMEPP_LT_REVISION@ LIBGPGME_LT_AGE = @LIBGPGME_LT_AGE@ LIBGPGME_LT_CURRENT = @LIBGPGME_LT_CURRENT@ LIBGPGME_LT_REVISION = @LIBGPGME_LT_REVISION@ LIBOBJS = @LIBOBJS@ +LIBQGPGME_LT_AGE = @LIBQGPGME_LT_AGE@ +LIBQGPGME_LT_CURRENT = @LIBQGPGME_LT_CURRENT@ +LIBQGPGME_LT_REVISION = @LIBQGPGME_LT_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -267,6 +287,8 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ NEED__FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -283,14 +305,27 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -QT4_CORE_CFLAGS = @QT4_CORE_CFLAGS@ -QT4_CORE_LIBS = @QT4_CORE_LIBS@ +PYTHON = @PYTHON@ +PYTHONS = @PYTHONS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_VERSIONS = @PYTHON_VERSIONS@ +QTCHOOSER = @QTCHOOSER@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_LIB = @SWIG_LIB@ SYSROOT = @SYSROOT@ VERSION = @VERSION@ VERSION_NUMBER = @VERSION_NUMBER@ @@ -339,9 +374,13 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -350,7 +389,8 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = cl +SUBDIRS = $(ENABLED_LANGUAGES) +DIST_SUBDIRS = cl cpp qt python EXTRA_DIST = README all: all-recursive diff --git a/lang/README b/lang/README index da54c78..f7a1595 100644 --- a/lang/README +++ b/lang/README @@ -10,3 +10,6 @@ sub-directory. Directory Language cl Common Lisp +cpp C++ +qt Qt-Framework API +python Python 2 and 3 (port of PyME 0.9.0) diff --git a/lang/cl/Makefile.in b/lang/cl/Makefile.in index 954fc18..7a79757 100644 --- a/lang/cl/Makefile.in +++ b/lang/cl/Makefile.in @@ -103,12 +103,16 @@ 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/glib-2.0.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnupg-ttyname.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4/ax_pkg_swig.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnupg-ttyname.m4 \ $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libassuan.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -180,6 +184,7 @@ BUILD_REVISION = @BUILD_REVISION@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -191,12 +196,14 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLED_LANGUAGES = @ENABLED_LANGUAGES@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ @@ -207,15 +214,23 @@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GPGME_CONFIG_API_VERSION = @GPGME_CONFIG_API_VERSION@ +GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ +GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ +GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ +GPGME_QT_LIBS = @GPGME_QT_LIBS@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@ GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@ +GRAPHVIZ = @GRAPHVIZ@ GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ +HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -226,10 +241,16 @@ LDFLAGS = @LDFLAGS@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBGPGMEPP_LT_AGE = @LIBGPGMEPP_LT_AGE@ +LIBGPGMEPP_LT_CURRENT = @LIBGPGMEPP_LT_CURRENT@ +LIBGPGMEPP_LT_REVISION = @LIBGPGMEPP_LT_REVISION@ LIBGPGME_LT_AGE = @LIBGPGME_LT_AGE@ LIBGPGME_LT_CURRENT = @LIBGPGME_LT_CURRENT@ LIBGPGME_LT_REVISION = @LIBGPGME_LT_REVISION@ LIBOBJS = @LIBOBJS@ +LIBQGPGME_LT_AGE = @LIBQGPGME_LT_AGE@ +LIBQGPGME_LT_CURRENT = @LIBQGPGME_LT_CURRENT@ +LIBQGPGME_LT_REVISION = @LIBQGPGME_LT_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -239,6 +260,8 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ NEED__FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -255,14 +278,27 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -QT4_CORE_CFLAGS = @QT4_CORE_CFLAGS@ -QT4_CORE_LIBS = @QT4_CORE_LIBS@ +PYTHON = @PYTHON@ +PYTHONS = @PYTHONS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_VERSIONS = @PYTHON_VERSIONS@ +QTCHOOSER = @QTCHOOSER@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_LIB = @SWIG_LIB@ SYSROOT = @SYSROOT@ VERSION = @VERSION@ VERSION_NUMBER = @VERSION_NUMBER@ @@ -311,9 +347,13 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lang/cl/gpgme.asd b/lang/cl/gpgme.asd index 9030a65..c192da7 100644 --- a/lang/cl/gpgme.asd +++ b/lang/cl/gpgme.asd @@ -27,7 +27,7 @@ (defsystem gpgme :description "GnuPG Made Easy." :author "g10 Code GmbH" - :version "1.6.0" + :version "1.7.0" :licence "GPL" :depends-on ("cffi" "gpg-error") :components ((:file "gpgme-package") diff --git a/lang/cpp/Makefile.am b/lang/cpp/Makefile.am new file mode 100644 index 0000000..7fbaca8 --- /dev/null +++ b/lang/cpp/Makefile.am @@ -0,0 +1,23 @@ +# Makefile.am for GPGMEPP. +# Copyright (C) 2016 Intevation GmbH +# +# This file is part of GPGMEPP. +# +# GPGME-CL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# GPGME-CL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA + +SUBDIRS = src + +EXTRA_DIST = README diff --git a/lang/cpp/Makefile.in b/lang/cpp/Makefile.in new file mode 100644 index 0000000..f042f77 --- /dev/null +++ b/lang/cpp/Makefile.in @@ -0,0 +1,709 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am for GPGMEPP. +# Copyright (C) 2016 Intevation GmbH +# +# This file is part of GPGMEPP. +# +# GPGME-CL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# GPGME-CL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +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 \ + $(top_srcdir)/m4/ax_python_devel.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnupg-ttyname.m4 \ + $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libassuan.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +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 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +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. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLED_LANGUAGES = @ENABLED_LANGUAGES@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ +GLIBC21 = @GLIBC21@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CONFIG_API_VERSION = @GPGME_CONFIG_API_VERSION@ +GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ +GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ +GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ +GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ +GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ +GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ +GPGME_QT_LIBS = @GPGME_QT_LIBS@ +GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ +GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ +GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ +GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@ +GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@ +GRAPHVIZ = @GRAPHVIZ@ +GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ +LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ +LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBGPGMEPP_LT_AGE = @LIBGPGMEPP_LT_AGE@ +LIBGPGMEPP_LT_CURRENT = @LIBGPGMEPP_LT_CURRENT@ +LIBGPGMEPP_LT_REVISION = @LIBGPGMEPP_LT_REVISION@ +LIBGPGME_LT_AGE = @LIBGPGME_LT_AGE@ +LIBGPGME_LT_CURRENT = @LIBGPGME_LT_CURRENT@ +LIBGPGME_LT_REVISION = @LIBGPGME_LT_REVISION@ +LIBOBJS = @LIBOBJS@ +LIBQGPGME_LT_AGE = @LIBQGPGME_LT_AGE@ +LIBQGPGME_LT_CURRENT = @LIBQGPGME_LT_CURRENT@ +LIBQGPGME_LT_REVISION = @LIBQGPGME_LT_REVISION@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ +NEED__FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +PYTHONS = @PYTHONS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_VERSIONS = @PYTHON_VERSIONS@ +QTCHOOSER = @QTCHOOSER@ +RANLIB = @RANLIB@ +RC = @RC@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_LIB = @SWIG_LIB@ +SYSROOT = @SYSROOT@ +VERSION = @VERSION@ +VERSION_NUMBER = @VERSION_NUMBER@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +emacs_local_vars_begin = @emacs_local_vars_begin@ +emacs_local_vars_end = @emacs_local_vars_end@ +emacs_local_vars_read_only = @emacs_local_vars_read_only@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = src +EXTRA_DIST = README +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + 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*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + + +# 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/lang/cpp/README b/lang/cpp/README new file mode 100644 index 0000000..b9a48da --- /dev/null +++ b/lang/cpp/README @@ -0,0 +1,101 @@ +GpgMEpp - C++ bindings/wrapper for GPGME +---------------------------------------- +Based on KF5gpgmepp + +Overview +-------- + +GpgMEpp is a C++ wrapper (or C++ bindings) for the GnuPG project's +gpgme (GnuPG Made Easy) library, version 0.4.4 and later. + +It is fairly complete, with some minor things still missing (in +particular, the key edit interface). + +The design principles of this library are as follows: + +1. A value-based interface (most clases are implicitly shared) +2. Callbacks are replaced by C++ interfaces (classes with only + abstract methods). +3. No exceptions are thrown +4. There is (as yet) no explicit support for multi-threaded use + (other than what gpgme itself provides; most notably the + refcounting for implicit sharing is not thread-safe) +5. To avoid binary incompatible interface changes, we make + extensive use of the d-pointer pattern and avoid virtual + methods; any polymorphism present is already provided by gpgme + itself, anyway (see e.g. Data). A notable exception of the + no-virtuals rule is the use of abstract classes to cover + C-callbacks. +6. Use of STL containers for improved memory management and + dealing with lists. +7. Complete abstraction of the C-API so "gpgme.h" should not + be needed in your project using GpgME++. +8. Abstraction of GnuPG's edit-key interface by prepared + Editinteractor classes. + +GpgMEpp was originally developed as part of the KDEPIM community. + +Usage +----- + +The usage pattern of GpgMEpp closely follows GPGMEs core usage +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 +a Dataprovider interface that can be used to implement GPGME's +data with any subclass by implementing the right callbacks. + +EditInteractor subclasses provide ready to use classes for +common --edit-key tasks. You can implement your own editinteractor +classes by implementing the EditInteractor interface and using +your subclass as an interactor in the edit function. + +Example to set the ownertrust of a key: + + /* Create an edit interactor */ + EditInteractor *ei = new GpgSetOwnerTrustEditInteractor(Key::Ultimate); + /* Obtain a Context */ + Context *ctx = Context::createForProtocol(Protocol::OpenPGP); + /* Create an in memory data object */ + Data data; + /* Start the edit on some key previously obtained. */ + Error e = ctx->edit(key, std::unique_ptr(ei), data); + /* Errors provide boolean comparision */ + if (!e) + ... + /* Delete the context */ + delete ctx; + +Examples / Tests +---------------- + +GpgMEpp is tested through the Qt API. You can refer to the +tests in qt/tests for examples of usage or refer to +the actual QGpgME*Job.cpp implementations which rely +on GpgMEpp and should cover most use cases. + +Hacking +------- + +GpgMEpp follows KDE Coding styles. See: +https://techbase.kde.org/Policies/Frameworks_Coding_Style +for more info. + +License +------- +GPGMEpp is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +GPGMEpp 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 Library General Public License for more details. + +You should have received a copy of the GNU Library General Public License +along with GPGME++; see the file COPYING.LIB. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. diff --git a/lang/cpp/src/GpgmeppConfig.cmake.in.in b/lang/cpp/src/GpgmeppConfig.cmake.in.in new file mode 100644 index 0000000..d54011e --- /dev/null +++ b/lang/cpp/src/GpgmeppConfig.cmake.in.in @@ -0,0 +1,108 @@ +# CMake Config file for GPGMEPP. +# Copyright (C) 2016 Intevation GmbH +# +# This file is part of GPGMEPP. +# +# GPGME-CL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# GPGME-CL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA + +# based on a generated file from cmake. +# Generated by CMake 3.0.2 + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget KF5::Gpgmepp Gpgmepp) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) + +# Create imported target Gpgmepp +add_library(Gpgmepp SHARED IMPORTED) + +set_target_properties(Gpgmepp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/gpgme++" + INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@" + IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp@libsuffix@" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) + +get_filename_component(QGpgme_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +# Pull in QGpgme for compatibility with KF5 variant. +find_package(QGpgme CONFIG) diff --git a/lang/cpp/src/GpgmeppConfigVersion.cmake.in b/lang/cpp/src/GpgmeppConfigVersion.cmake.in new file mode 100644 index 0000000..43d6512 --- /dev/null +++ b/lang/cpp/src/GpgmeppConfigVersion.cmake.in @@ -0,0 +1,31 @@ +# CMake Version file for GPGMEPP. +# Copyright (C) 2016 Intevation GmbH +# +# This file is part of GPGMEPP. +# +# GPGME-CL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# GPGME-CL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA + +# based on a generated file from cmake. +set(PACKAGE_VERSION "@LIBGPGMEPP_LT_CURRENT@.@LIBGPGMEPP_LT_AGE@.@LIBGPGMEPP_LT_REVISION@.@BUILD_REVISION@") + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/lang/cpp/src/Makefile.am b/lang/cpp/src/Makefile.am new file mode 100644 index 0000000..e65a875 --- /dev/null +++ b/lang/cpp/src/Makefile.am @@ -0,0 +1,99 @@ +# Makefile.am for GPGMEPP. +# Copyright (C) 2016 Intevation GmbH +# +# This file is part of GPGMEPP. +# +# GPGME-CL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# GPGME-CL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA + +EXTRA_DIST = GpgmeppConfig.cmake.in.in GpgmeppConfigVersion.cmake.in \ + gpgmepp_version.h.in + +lib_LTLIBRARIES = libgpgmepp.la + +main_sources = \ + exception.cpp context.cpp key.cpp trustitem.cpp data.cpp callbacks.cpp \ + eventloopinteractor.cpp editinteractor.cpp \ + keylistresult.cpp keygenerationresult.cpp importresult.cpp \ + decryptionresult.cpp verificationresult.cpp \ + signingresult.cpp encryptionresult.cpp \ + engineinfo.cpp gpgsetexpirytimeeditinteractor.cpp \ + gpgsetownertrusteditinteractor.cpp gpgsignkeyeditinteractor.cpp \ + gpgadduserideditinteractor.cpp defaultassuantransaction.cpp \ + scdgetinfoassuantransaction.cpp gpgagentgetinfoassuantransaction.cpp \ + vfsmountresult.cpp configuration.cpp tofuinfo.cpp + +gpgmepp_headers = \ + configuration.h context.h data.h decryptionresult.h \ + defaultassuantransaction.h editinteractor.h encryptionresult.h \ + engineinfo.h error.h eventloopinteractor.h exception.h global.h \ + gpgadduserideditinteractor.h gpgagentgetinfoassuantransaction.h \ + gpgmefw.h gpgsetexpirytimeeditinteractor.h \ + gpgsetownertrusteditinteractor.h gpgsignkeyeditinteractor.h \ + importresult.h keygenerationresult.h key.h keylistresult.h \ + notation.h result.h scdgetinfoassuantransaction.h signingresult.h \ + trustitem.h verificationresult.h vfsmountresult.h gpgmepp_export.h \ + tofuinfo.h + +private_gpgmepp_headers = \ + result_p.h context_p.h util.h callbacks.h data_p.h + +interface_headers= \ + interfaces/assuantransaction.h interfaces/dataprovider.h \ + interfaces/passphraseprovider.h interfaces/progressprovider.h + +gpgmeppincludedir = $(includedir)/gpgme++ +gpgmeppinclude_HEADERS = $(gpgmepp_headers) +nobase_gpgmeppinclude_HEADERS = $(interface_headers) +nodist_include_HEADERS = gpgmepp_version.h + +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 + +libgpgmepp_la_LIBADD = ../../../src/libgpgme.la @LIBASSUAN_LIBS@ +libgpgmepp_la_LDFLAGS = -version-info \ + @LIBGPGMEPP_LT_CURRENT@:@LIBGPGMEPP_LT_REVISION@:@LIBGPGMEPP_LT_AGE@ + +if HAVE_W32_SYSTEM +libsuffix=.dll.a +else +libsuffix=.so +endif + +GpgmeppConfig.cmake: GpgmeppConfig.cmake.in + sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" > "$@" + sed -e 's|[@]libsuffix@|$(libsuffix)|g' < "$@" > "$@".2 + mv "$@".2 "$@" + +install-cmake-files: GpgmeppConfig.cmake GpgmeppConfigVersion.cmake + -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp + $(INSTALL) GpgmeppConfig.cmake \ + $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake + $(INSTALL) GpgmeppConfigVersion.cmake \ + $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake + +uninstall-cmake-files: + -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake + -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake + -rmdir $(DESTDIR)$(libdir)/cmake/Gpgmepp/ + +install-data-local: install-cmake-files + +uninstall-local: uninstall-cmake-files + +CLEANFILES = GpgmeppConfig.cmake diff --git a/lang/cpp/src/Makefile.in b/lang/cpp/src/Makefile.in new file mode 100644 index 0000000..9237d27 --- /dev/null +++ b/lang/cpp/src/Makefile.in @@ -0,0 +1,955 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am for GPGMEPP. +# Copyright (C) 2016 Intevation GmbH +# +# This file is part of GPGMEPP. +# +# GPGME-CL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# GPGME-CL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +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.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 \ + $(top_srcdir)/m4/ax_python_devel.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnupg-ttyname.m4 \ + $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libassuan.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = GpgmeppConfig.cmake.in GpgmeppConfigVersion.cmake \ + gpgmepp_version.h +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(gpgmeppincludedir)" \ + "$(DESTDIR)$(gpgmeppincludedir)" "$(DESTDIR)$(includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libgpgmepp_la_DEPENDENCIES = ../../../src/libgpgme.la +am__objects_1 = exception.lo context.lo key.lo trustitem.lo data.lo \ + callbacks.lo eventloopinteractor.lo editinteractor.lo \ + keylistresult.lo keygenerationresult.lo importresult.lo \ + decryptionresult.lo verificationresult.lo signingresult.lo \ + encryptionresult.lo engineinfo.lo \ + gpgsetexpirytimeeditinteractor.lo \ + gpgsetownertrusteditinteractor.lo gpgsignkeyeditinteractor.lo \ + gpgadduserideditinteractor.lo defaultassuantransaction.lo \ + scdgetinfoassuantransaction.lo \ + gpgagentgetinfoassuantransaction.lo vfsmountresult.lo \ + configuration.lo tofuinfo.lo +am__objects_2 = +am_libgpgmepp_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ + context_vanilla.lo $(am__objects_2) $(am__objects_2) +libgpgmepp_la_OBJECTS = $(am_libgpgmepp_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libgpgmepp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(libgpgmepp_la_LDFLAGS) $(LDFLAGS) \ + -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +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) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libgpgmepp_la_SOURCES) +DIST_SOURCES = $(libgpgmepp_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(gpgmeppinclude_HEADERS) $(nobase_gpgmeppinclude_HEADERS) \ + $(nodist_include_HEADERS) +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. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLED_LANGUAGES = @ENABLED_LANGUAGES@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ +GLIBC21 = @GLIBC21@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CONFIG_API_VERSION = @GPGME_CONFIG_API_VERSION@ +GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ +GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ +GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ +GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ +GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ +GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ +GPGME_QT_LIBS = @GPGME_QT_LIBS@ +GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ +GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ +GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ +GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@ +GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@ +GRAPHVIZ = @GRAPHVIZ@ +GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ +LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ +LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBGPGMEPP_LT_AGE = @LIBGPGMEPP_LT_AGE@ +LIBGPGMEPP_LT_CURRENT = @LIBGPGMEPP_LT_CURRENT@ +LIBGPGMEPP_LT_REVISION = @LIBGPGMEPP_LT_REVISION@ +LIBGPGME_LT_AGE = @LIBGPGME_LT_AGE@ +LIBGPGME_LT_CURRENT = @LIBGPGME_LT_CURRENT@ +LIBGPGME_LT_REVISION = @LIBGPGME_LT_REVISION@ +LIBOBJS = @LIBOBJS@ +LIBQGPGME_LT_AGE = @LIBQGPGME_LT_AGE@ +LIBQGPGME_LT_CURRENT = @LIBQGPGME_LT_CURRENT@ +LIBQGPGME_LT_REVISION = @LIBQGPGME_LT_REVISION@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ +NEED__FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +PYTHONS = @PYTHONS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_VERSIONS = @PYTHON_VERSIONS@ +QTCHOOSER = @QTCHOOSER@ +RANLIB = @RANLIB@ +RC = @RC@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_LIB = @SWIG_LIB@ +SYSROOT = @SYSROOT@ +VERSION = @VERSION@ +VERSION_NUMBER = @VERSION_NUMBER@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +emacs_local_vars_begin = @emacs_local_vars_begin@ +emacs_local_vars_end = @emacs_local_vars_end@ +emacs_local_vars_read_only = @emacs_local_vars_read_only@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = GpgmeppConfig.cmake.in.in GpgmeppConfigVersion.cmake.in \ + gpgmepp_version.h.in + +lib_LTLIBRARIES = libgpgmepp.la +main_sources = \ + exception.cpp context.cpp key.cpp trustitem.cpp data.cpp callbacks.cpp \ + eventloopinteractor.cpp editinteractor.cpp \ + keylistresult.cpp keygenerationresult.cpp importresult.cpp \ + decryptionresult.cpp verificationresult.cpp \ + signingresult.cpp encryptionresult.cpp \ + engineinfo.cpp gpgsetexpirytimeeditinteractor.cpp \ + gpgsetownertrusteditinteractor.cpp gpgsignkeyeditinteractor.cpp \ + gpgadduserideditinteractor.cpp defaultassuantransaction.cpp \ + scdgetinfoassuantransaction.cpp gpgagentgetinfoassuantransaction.cpp \ + vfsmountresult.cpp configuration.cpp tofuinfo.cpp + +gpgmepp_headers = \ + configuration.h context.h data.h decryptionresult.h \ + defaultassuantransaction.h editinteractor.h encryptionresult.h \ + engineinfo.h error.h eventloopinteractor.h exception.h global.h \ + gpgadduserideditinteractor.h gpgagentgetinfoassuantransaction.h \ + gpgmefw.h gpgsetexpirytimeeditinteractor.h \ + gpgsetownertrusteditinteractor.h gpgsignkeyeditinteractor.h \ + importresult.h keygenerationresult.h key.h keylistresult.h \ + notation.h result.h scdgetinfoassuantransaction.h signingresult.h \ + trustitem.h verificationresult.h vfsmountresult.h gpgmepp_export.h \ + tofuinfo.h + +private_gpgmepp_headers = \ + result_p.h context_p.h util.h callbacks.h data_p.h + +interface_headers = \ + interfaces/assuantransaction.h interfaces/dataprovider.h \ + interfaces/passphraseprovider.h interfaces/progressprovider.h + +gpgmeppincludedir = $(includedir)/gpgme++ +gpgmeppinclude_HEADERS = $(gpgmepp_headers) +nobase_gpgmeppinclude_HEADERS = $(interface_headers) +nodist_include_HEADERS = gpgmepp_version.h +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 + +libgpgmepp_la_LIBADD = ../../../src/libgpgme.la @LIBASSUAN_LIBS@ +libgpgmepp_la_LDFLAGS = -version-info \ + @LIBGPGMEPP_LT_CURRENT@:@LIBGPGMEPP_LT_REVISION@:@LIBGPGMEPP_LT_AGE@ + +@HAVE_W32_SYSTEM_FALSE@libsuffix = .so +@HAVE_W32_SYSTEM_TRUE@libsuffix = .dll.a +CLEANFILES = GpgmeppConfig.cmake +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + 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*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +GpgmeppConfig.cmake.in: $(top_builddir)/config.status $(srcdir)/GpgmeppConfig.cmake.in.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +GpgmeppConfigVersion.cmake: $(top_builddir)/config.status $(srcdir)/GpgmeppConfigVersion.cmake.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +gpgmepp_version.h: $(top_builddir)/config.status $(srcdir)/gpgmepp_version.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libgpgmepp.la: $(libgpgmepp_la_OBJECTS) $(libgpgmepp_la_DEPENDENCIES) $(EXTRA_libgpgmepp_la_DEPENDENCIES) + $(AM_V_CXXLD)$(libgpgmepp_la_LINK) -rpath $(libdir) $(libgpgmepp_la_OBJECTS) $(libgpgmepp_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callbacks.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configuration.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context_vanilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decryptionresult.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/defaultassuantransaction.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/editinteractor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encryptionresult.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/engineinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventloopinteractor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpgadduserideditinteractor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpgagentgetinfoassuantransaction.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpgsetexpirytimeeditinteractor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpgsetownertrusteditinteractor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpgsignkeyeditinteractor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/importresult.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/key.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keygenerationresult.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keylistresult.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scdgetinfoassuantransaction.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signingresult.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tofuinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trustitem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verificationresult.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfsmountresult.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-gpgmeppincludeHEADERS: $(gpgmeppinclude_HEADERS) + @$(NORMAL_INSTALL) + @list='$(gpgmeppinclude_HEADERS)'; test -n "$(gpgmeppincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(gpgmeppincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(gpgmeppincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(gpgmeppincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(gpgmeppincludedir)" || exit $$?; \ + done + +uninstall-gpgmeppincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(gpgmeppinclude_HEADERS)'; test -n "$(gpgmeppincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(gpgmeppincludedir)'; $(am__uninstall_files_from_dir) +install-nobase_gpgmeppincludeHEADERS: $(nobase_gpgmeppinclude_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nobase_gpgmeppinclude_HEADERS)'; test -n "$(gpgmeppincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(gpgmeppincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(gpgmeppincludedir)" || exit 1; \ + fi; \ + $(am__nobase_list) | while read dir files; do \ + xfiles=; for file in $$files; do \ + if test -f "$$file"; then xfiles="$$xfiles $$file"; \ + else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ + test -z "$$xfiles" || { \ + test "x$$dir" = x. || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(gpgmeppincludedir)/$$dir'"; \ + $(MKDIR_P) "$(DESTDIR)$(gpgmeppincludedir)/$$dir"; }; \ + echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(gpgmeppincludedir)/$$dir'"; \ + $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(gpgmeppincludedir)/$$dir" || exit $$?; }; \ + done + +uninstall-nobase_gpgmeppincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nobase_gpgmeppinclude_HEADERS)'; test -n "$(gpgmeppincludedir)" || list=; \ + $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ + dir='$(DESTDIR)$(gpgmeppincludedir)'; $(am__uninstall_files_from_dir) +install-nodist_includeHEADERS: $(nodist_include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-nodist_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gpgmeppincludedir)" "$(DESTDIR)$(gpgmeppincludedir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local install-gpgmeppincludeHEADERS \ + install-nobase_gpgmeppincludeHEADERS \ + install-nodist_includeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-gpgmeppincludeHEADERS uninstall-libLTLIBRARIES \ + uninstall-local uninstall-nobase_gpgmeppincludeHEADERS \ + uninstall-nodist_includeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-dvi install-dvi-am \ + install-exec install-exec-am install-gpgmeppincludeHEADERS \ + install-html install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man \ + install-nobase_gpgmeppincludeHEADERS \ + install-nodist_includeHEADERS install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am \ + uninstall-gpgmeppincludeHEADERS uninstall-libLTLIBRARIES \ + uninstall-local uninstall-nobase_gpgmeppincludeHEADERS \ + uninstall-nodist_includeHEADERS + + +GpgmeppConfig.cmake: GpgmeppConfig.cmake.in + sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" > "$@" + sed -e 's|[@]libsuffix@|$(libsuffix)|g' < "$@" > "$@".2 + mv "$@".2 "$@" + +install-cmake-files: GpgmeppConfig.cmake GpgmeppConfigVersion.cmake + -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp + $(INSTALL) GpgmeppConfig.cmake \ + $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake + $(INSTALL) GpgmeppConfigVersion.cmake \ + $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake + +uninstall-cmake-files: + -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake + -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake + -rmdir $(DESTDIR)$(libdir)/cmake/Gpgmepp/ + +install-data-local: install-cmake-files + +uninstall-local: uninstall-cmake-files + +# 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/lang/cpp/src/callbacks.cpp b/lang/cpp/src/callbacks.cpp new file mode 100644 index 0000000..4b4dd80 --- /dev/null +++ b/lang/cpp/src/callbacks.cpp @@ -0,0 +1,149 @@ +/* + callbacks.cpp - callback targets for internal use: + Copyright (C) 2003,2004 Klarälvdalens Datakonsult AB + + This file is part of GPGME++. + + GPGME++ is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + GPGME++ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with GPGME++; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "callbacks.h" +#include "util.h" + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +static inline gpgme_error_t make_err_from_syserror() +{ + return gpgme_error_from_syserror(); +} + +using GpgME::ProgressProvider; +using GpgME::PassphraseProvider; +using GpgME::DataProvider; + +void progress_callback(void *opaque, const char *what, + int type, int current, int total) +{ + ProgressProvider *provider = static_cast(opaque); + if (provider) { + provider->showProgress(what, type, current, total); + } +} + +/* To avoid that a compiler optimizes certain memset calls away, these + macros may be used instead. */ +#define wipememory2(_ptr,_set,_len) do { \ + volatile char *_vptr=(volatile char *)(_ptr); \ + size_t _vlen=(_len); \ + while(_vlen) { *_vptr=(_set); _vptr++; _vlen--; } \ + } while(0) +#define wipememory(_ptr,_len) wipememory2(_ptr,0,_len) + +gpgme_error_t passphrase_callback(void *opaque, const char *uid_hint, const char *desc, + int prev_was_bad, int fd) +{ + 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 ; + if (canceled) { + err = make_error(GPG_ERR_CANCELED); + } else { + if (passphrase && *passphrase) { + size_t passphrase_length = std::strlen(passphrase); + size_t written = 0; + do { + ssize_t now_written = gpgme_io_write(fd, passphrase + written, passphrase_length - written); + if (now_written < 0) { + err = make_err_from_syserror(); + break; + } + written += now_written; + } while (written < passphrase_length); + } + } + + if (passphrase && *passphrase) { + wipememory(passphrase, std::strlen(passphrase)); + } + free(passphrase); + gpgme_io_write(fd, "\n", 1); + return err; +} + +static gpgme_ssize_t +data_read_callback(void *opaque, void *buf, size_t buflen) +{ + DataProvider *provider = static_cast(opaque); + if (!provider) { + gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); + return -1; + } + return (gpgme_ssize_t)provider->read(buf, buflen); +} + +static gpgme_ssize_t +data_write_callback(void *opaque, const void *buf, size_t buflen) +{ + DataProvider *provider = static_cast(opaque); + if (!provider) { + gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); + return -1; + } + return (gpgme_ssize_t)provider->write(buf, buflen); +} + +static gpgme_off_t +data_seek_callback(void *opaque, gpgme_off_t offset, int whence) +{ + DataProvider *provider = static_cast(opaque); + if (!provider) { + gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); + return -1; + } + if (whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END) { + gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); + return -1; + } + return provider->seek((off_t)offset, whence); +} + +static void data_release_callback(void *opaque) +{ + DataProvider *provider = static_cast(opaque); + if (provider) { + provider->release(); + } +} + +const gpgme_data_cbs GpgME::data_provider_callbacks = { + &data_read_callback, + &data_write_callback, + &data_seek_callback, + &data_release_callback +}; diff --git a/lang/cpp/src/callbacks.h b/lang/cpp/src/callbacks.h new file mode 100644 index 0000000..4206637 --- /dev/null +++ b/lang/cpp/src/callbacks.h @@ -0,0 +1,45 @@ +/* + callbacks.h - callback targets for internal use: + Copyright (C) 2003 Klarälvdalens Datakonsult AB + + This file is part of GPGME++. + + This is an internal header file, subject to change without + notice. DO NOT USE. + + GPGME++ is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + GPGME++ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with GPGME++; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef __GPGMEPP_CALLBACKS_H__ +#define __GPGMEPP_CALLBACKS_H__ + +#include + +extern "C" { + + void progress_callback(void *opaque, const char *what, + int type, int current, int total); + gpgme_error_t passphrase_callback(void *opaque, const char *uid_hint, + const char *desc, int prev_was_bad, int fd); +} + +namespace GpgME +{ +extern const gpgme_data_cbs data_provider_callbacks; +extern const gpgme_edit_cb_t edit_interactor_callback; +} + +#endif // __GPGME_CALLBACKS_H__ diff --git a/lang/cpp/src/configuration.cpp b/lang/cpp/src/configuration.cpp new file mode 100644 index 0000000..7ef2883 --- /dev/null +++ b/lang/cpp/src/configuration.cpp @@ -0,0 +1,934 @@ +/* + configuration.cpp - wraps gpgme configuration components + Copyright (C) 2010 Klarälvdalens Datakonsult AB + + This file is part of GPGME++. + + GPGME++ is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + GPGME++ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with GPGME++; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "configuration.h" +#include "error.h" +#include "util.h" + +#include + +#include +#include +#include +#include +#include + +using namespace GpgME; +using namespace GpgME::Configuration; + +typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_conf_opt_t; +typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_conf_opt_t; + +typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_conf_arg_t; +typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_conf_arg_t; + +typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_ctx_t; +typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_ctx_t; + +namespace +{ +struct nodelete { + template void operator()(T *) {} +}; +} + +// static +std::vector Component::load(Error &returnedError) +{ + + // + // 1. get a context: + // + gpgme_ctx_t ctx_native = 0; + if (const gpgme_error_t err = gpgme_new(&ctx_native)) { + returnedError = Error(err); + return std::vector(); + } + const shared_gpgme_ctx_t ctx(ctx_native, &gpgme_release); + + // + // 2. load the config: + // + gpgme_conf_comp_t conf_list_native = 0; + if (const gpgme_error_t err = gpgme_op_conf_load(ctx_native, &conf_list_native)) { + returnedError = Error(err); + return std::vector(); + } + shared_gpgme_conf_comp_t head(conf_list_native, &gpgme_conf_release); + + // + // 3. convert to vector: + // + std::vector result; + + while (head) { + // secure 'head->next' (if any) against memleaks: + shared_gpgme_conf_comp_t next; + if (head->next) { + next.reset(head->next, &gpgme_conf_release); + } + + // now prevent double-free of next.get() and following: + head->next = 0; + + // now add a new Component to 'result' (may throw): + result.resize(result.size() + 1); + result.back().comp.swap(head); // .comp = std::move( head ); + head.swap(next); // head = std::move( next ); + } + + return result; +} + +Error Component::save() const +{ + + if (isNull()) { + return Error(make_error(GPG_ERR_INV_ARG)); + } + + // + // 1. get a context: + // + gpgme_ctx_t ctx_native = 0; + if (const gpgme_error_t err = gpgme_new(&ctx_native)) { + return Error(err); + } + const shared_gpgme_ctx_t ctx(ctx_native, &gpgme_release); + + // + // 2. save the config: + // + return Error(gpgme_op_conf_save(ctx.get(), comp.get())); +} + +const char *Component::name() const +{ + return comp ? comp->name : 0 ; +} + +const char *Component::description() const +{ + return comp ? comp->description : 0 ; +} + +const char *Component::programName() const +{ + return comp ? comp->program_name : 0 ; +} + +Option Component::option(unsigned int idx) const +{ + gpgme_conf_opt_t opt = 0; + if (comp) { + opt = comp->options; + } + while (opt && idx) { + opt = opt->next; + --idx; + } + if (opt) { + return Option(comp, opt); + } + return Option(); +} + +Option Component::option(const char *name) const +{ + gpgme_conf_opt_t opt = 0; + if (comp) { + opt = comp->options; + } + using namespace std; // for strcmp + while (opt && strcmp(name, opt->name) != 0) { + opt = opt->next; + } + if (opt) { + return Option(comp, opt); + } + return Option(); +} + +unsigned int Component::numOptions() const +{ + unsigned int result = 0; + for (gpgme_conf_opt_t opt = comp ? comp->options : 0 ; opt ; opt = opt->next) { + ++result; + } + return result; +} + +std::vector