gpgme.git
17 months agodoc: python bindings howto
Ben McGinnes [Tue, 13 Mar 2018 15:21:44 +0000 (02:21 +1100)]
doc: python bindings howto

* Added a section on key selection.
* Included recommendation for using fingerprint when selecting one
  specific key.
* Also included the most ironically amusing example of multiple key
  selection in a GPG guide.  Hey, it's public data ... (heh).

17 months agodoc: python bindings howto
Ben McGinnes [Tue, 13 Mar 2018 14:41:21 +0000 (01:41 +1100)]
doc: python bindings howto

* Added explanation of the ascendance of Python 3 over Python 2 in the
  guide to the intro.
* Expanded key selection description so people know what not to
  include regarding key IDs with this key selection method.

17 months agodoc: python bindings howto
Ben McGinnes [Tue, 13 Mar 2018 08:20:44 +0000 (19:20 +1100)]
doc: python bindings howto

* Added key selection for specifying signing key or keys.

17 months agodoc: python bindings howto
Ben McGinnes [Tue, 13 Mar 2018 07:32:30 +0000 (18:32 +1100)]
doc: python bindings howto

* During the course of working out the updated signature methods,
  determined that key selection (including counting) will beed to be
  presented before the basic functions.
* Moved "working with keys" up.

17 months agodoc: python bindings howto
Ben McGinnes [Tue, 13 Mar 2018 04:03:11 +0000 (15:03 +1100)]
doc: python bindings howto

* Signatures have changed as a result of the recent update from Justus.
* Sample code updated.
* Text to follow later.

17 months agodoc: python bindings howto
Ben McGinnes [Tue, 13 Mar 2018 00:50:38 +0000 (11:50 +1100)]
doc: python bindings howto

* Added text description for the decryption example.

17 months agodoc: python bindings howto
Ben McGinnes [Mon, 12 Mar 2018 21:26:22 +0000 (08:26 +1100)]
doc: python bindings howto

* Added a miscellaneous work-arounds section at the end.
* Included code in said miscellaneous section for accessing the groups
  specified in a gpg.conf file.
* It's a bit ugly since it does require subprocess (but not call,
  Popen or shell access and only accesses one command).

17 months agodoc: python bindings howto
Ben McGinnes [Mon, 12 Mar 2018 20:49:42 +0000 (07:49 +1100)]
doc: python bindings howto

* Fixed a spelling error in the key counting text.

17 months agodoc: python bindings howto
Ben McGinnes [Mon, 12 Mar 2018 20:42:04 +0000 (07:42 +1100)]
doc: python bindings howto

* updated multi-encryption final example to be complete.
* second example shows most likely method of reading plaintext.
* updated example filenames to stick with running gag
  (i.e. secret_plans.txt).

17 months agodoc: python bindings howto
Ben McGinnes [Mon, 12 Mar 2018 19:09:53 +0000 (06:09 +1100)]
doc: python bindings howto

* error corrections.
* multiple typesetting fixes only required due to certain archaic
  eccentricities of LaTeX.
* a couple of minor python PEP8 compliance corrections.

17 months agodoc: python bindings howto
Ben McGinnes [Mon, 12 Mar 2018 18:42:50 +0000 (05:42 +1100)]
doc: python bindings howto

* Fixed an error in the encryption try/except statement.

17 months agodoc: python bindings howto
Ben McGinnes [Mon, 12 Mar 2018 17:55:44 +0000 (04:55 +1100)]
doc: python bindings howto

* Added a more complicated encryption example with a few variations on
  the encryption method to account for untrusted recipient keys,
  signing or not signing, including or excluding default keys and so
  on.

17 months agodoc: python bindings howto
Ben McGinnes [Mon, 12 Mar 2018 13:33:11 +0000 (00:33 +1100)]
doc: python bindings howto

* Switched from links to some external docs to using footnotes where
  necessary.
* Ideally the howto should be as stand alone as possible.
* Also it makes it difficult to convert to another format for
  proof-reading if there are links that the conversion can't find.

17 months agodoc: python bindings HOWTO
Ben McGinnes [Fri, 9 Mar 2018 09:45:14 +0000 (20:45 +1100)]
doc: python bindings HOWTO

* Added instructions and code to count the number of public and secret
  keys available since it was quick and easy.

17 months agodoc: python TODO list
Ben McGinnes [Fri, 9 Mar 2018 09:44:02 +0000 (20:44 +1100)]
doc: python TODO list

* Slightly tweaked one heading to make it clear it wasn't a duplicate.

17 months agodoc: python bindings howto
Ben McGinnes [Fri, 9 Mar 2018 05:49:05 +0000 (16:49 +1100)]
doc: python bindings howto

* Wrote the text description explaining each step in the most basic
  encryption operation.
* Will need to include additional examples for encrypting to multiple
  recipients using Context().encrypt instead of Context().op_encrypt.

17 months agodoc: python bindings TODO list
Ben McGinnes [Fri, 9 Mar 2018 04:27:40 +0000 (15:27 +1100)]
doc: python bindings TODO list

* Updated to reflect the most recent work on the HOWTO for the Python
  bindings.

17 months agodoc: python bindings howto
Ben McGinnes [Fri, 9 Mar 2018 04:22:24 +0000 (15:22 +1100)]
doc: python bindings howto

* Added example for verifying both detached and "in-line" signatures.

17 months agoMerge branch 'master' of ssh+git://playfair.gnupg.org/git/gpgme into ben/docs/2018-03
Ben McGinnes [Thu, 8 Mar 2018 22:31:44 +0000 (09:31 +1100)]
Merge branch 'master' of ssh+git://playfair.gnupg.org/git/gpgme into ben/docs/2018-03

* Fixed conflicts with TODO.

17 months agodocs: TODO
Ben McGinnes [Thu, 8 Mar 2018 22:01:53 +0000 (09:01 +1100)]
docs: TODO

* Removed WS.

17 months agodoc: TODO list update
Ben McGinnes [Thu, 8 Mar 2018 21:36:12 +0000 (08:36 +1100)]
doc: TODO list update

* Closed off a few ancient items and added recommendation to others to
  use the dev.gnupg.org site for real bugs/features updates.
* See also this statement on the gnupg-devel list regarding this file:
  https://lists.gnupg.org/pipermail/gnupg-devel/2018-March/033499.html

17 months agodocs: python bindings howto update.
Ben McGinnes [Thu, 8 Mar 2018 20:53:57 +0000 (07:53 +1100)]
docs: python bindings howto update.

* Added all four signing code examples that are most likely to be
  used: armoured, clearsigned, detached armoured and detached binary.
* May remove some examples and just discuss the differences, but it
  depends on the way the text is filled out.

17 months agodoc: python bindings howto update
Ben McGinnes [Thu, 8 Mar 2018 18:25:49 +0000 (05:25 +1100)]
doc: python bindings howto update

* Added example of decryption.
* included some quick notes for myself regarding aspects to explain
  when I flesh out the explanatory text.

17 months agodoc: Basic operation of the python bindings
Ben McGinnes [Thu, 8 Mar 2018 17:42:41 +0000 (04:42 +1100)]
doc: Basic operation of the python bindings

* Added sample code for encrypting some text to a single key.
* Basically I'm just lifting existing production code and changing the
  key IDs from mine to "0x12345678DEADBEEF" for these first few
  examples.
* I'll fill in the text description after.
* Note: due to my regional location, I might split some tasks into
  more commits in order to be sure no work gets lost in case of
  emergency (or to put it another way: I know Telstra too well to
  trust them).

17 months agodoc-howto: fundamental aspects of GPGME vs Python
Ben McGinnes [Thu, 8 Mar 2018 04:23:05 +0000 (15:23 +1100)]
doc-howto: fundamental aspects of GPGME vs Python

* Added a section for those pythonistas who are too used to web
  programming.  Stressed that it's not simply not RESTful, it's not
  even REST-like.
* Letting me move on to drawing a very loose parallel between a
  session and a context.  The differences should become obvious in the
  subsequent sections.

17 months agodoc: Added multiple TODOs for inclusion in the HOWTO
Ben McGinnes [Thu, 8 Mar 2018 03:13:00 +0000 (14:13 +1100)]
doc: Added multiple TODOs for inclusion in the HOWTO

* Some instructions to include are fairly obvious; as with encryption,
  decryption and signature verification.
* Some are a little less obvious.
* This includes the requests received to specifically include subkey
  management (adding and revoking subkeys on a primary key that's
  being retained.
* Added the UID equivalents to the list, as well as key selection
  matters (and may or may not include something for handling group
  lines since that involves wrapping a CLI binary).
* Key control documentation and examples requested by Mike Ingle of
  confidantmail.org.

17 months agoGPL compatible license for documentation
Ben McGinnes [Wed, 7 Mar 2018 10:27:54 +0000 (21:27 +1100)]
GPL compatible license for documentation

* Added the same, slightly modified GPL based license that is used in
  other parts of GnuPG.

17 months agoHOWTO update
Ben McGinnes [Wed, 7 Mar 2018 09:12:26 +0000 (20:12 +1100)]
HOWTO update

* removed one bit of whitespace.
* Marked up references to gpgme.h.
* Fixed one spelling error.
* Removed py2.6 from python search order since even if it is
  supported, it shouldn't be encouraged.

17 months agoGPGME Python bindings HOWTO
Ben McGinnes [Wed, 7 Mar 2018 09:05:21 +0000 (20:05 +1100)]
GPGME Python bindings HOWTO

* Started work on the GPGME Python bindings HOWTO.
* 1,050 words to begin with at approx. 7.5KB.
* Got as far as installation.
* Includes instruction not to use PyPI for this.

17 months agoTODO - HOWTO
Ben McGinnes [Wed, 7 Mar 2018 08:13:37 +0000 (19:13 +1100)]
TODO - HOWTO

* Added suv-entry for the new HOWTO being started and, since it has
  been started, checked it off.

17 months agoTODO
Ben McGinnes [Wed, 7 Mar 2018 06:56:54 +0000 (17:56 +1100)]
TODO

* Slightly expanded the list.

17 months agocopyright fix
Ben McGinnes [Wed, 7 Mar 2018 05:11:35 +0000 (16:11 +1100)]
copyright fix

* Made the copyright line a new top level org heading in order to
  prevent it getting folded into other tasks which will eventually get
  closed (so it doesn't go missing if those items are subsequently
  archived).

17 months agoNuxed doubles
Ben McGinnes [Wed, 7 Mar 2018 05:07:24 +0000 (16:07 +1100)]
Nuxed doubles

* Just because there's a lot of documentation which needs to be added,
  doesn't mean it needs to be listed twice.  Merged the two lists.

17 months agoRemoved double
Ben McGinnes [Tue, 6 Mar 2018 23:41:18 +0000 (10:41 +1100)]
Removed double

* default.profraw didn't need to be listed twice.

17 months agoIDENTIFY
Ben McGinnes [Sun, 4 Mar 2018 22:40:41 +0000 (09:40 +1100)]
IDENTIFY

* Fixed sp error in docstring.

17 months agoMissed a couple
Ben McGinnes [Sat, 3 Mar 2018 21:59:41 +0000 (08:59 +1100)]
Missed a couple

* WS indicated 2 custom-ids were missed, now they're set.

Signed-off-by: Ben McGinnes <ben@adversary.org>
17 months agoTODO DONE
Ben McGinnes [Sat, 3 Mar 2018 21:56:26 +0000 (08:56 +1100)]
TODO DONE

* Marked off a TODO for this clean-up.

Signed-off-by: Ben McGinnes <ben@adversary.org>
17 months agoTODO ben/docs/2018-02
Ben McGinnes [Sat, 3 Mar 2018 21:38:19 +0000 (08:38 +1100)]
TODO

* WS removal

17 months agoTODO updates
Ben McGinnes [Sat, 3 Mar 2018 21:32:31 +0000 (08:32 +1100)]
TODO updates

* Updated TODO with tags to make everything appear properly when
  exported to HTML or PDF.
* Added a couple more items, mainly to do with docs or future bindings.
* Marked some, but not all as actual TODO items.
* Some items should probably be removed, but haven't been yet.
* Some have probably been completed already.

17 months agoNew stuff
Ben McGinnes [Tue, 27 Feb 2018 16:43:59 +0000 (03:43 +1100)]
New stuff

* Added the idea for alternative Emacs bindings (to extend the
  existing ones, not replace them outright).
* Added a reference to the API Squared part of the project.

17 months agoTODO the TODO
Ben McGinnes [Tue, 27 Feb 2018 16:30:46 +0000 (03:30 +1100)]
TODO the TODO

* Added an actual TODO to fix the TODOs.
* Pretty sure I know who will be completing this one ...  ;)

17 months agoTODO ... the TODO
Ben McGinnes [Tue, 27 Feb 2018 16:21:18 +0000 (03:21 +1100)]
TODO ... the TODO

* If we're going to use Org, let's actually use Org.
* Added the properties tags for each point.
* Some of thems still need custom ID tags assigned properly.
* Probably ought to make them actual TODOs at some point, but that can
  wait until they can be marked as DONE anyway.
* Will add a TODO for some of this stuff ... oh, the irony.

17 months agocore: Support non-thread-safe getenv.
NIIBE Yutaka [Tue, 27 Feb 2018 09:43:40 +0000 (18:43 +0900)]
core: Support non-thread-safe getenv.

* src/get-env.c (_gpgme_getenv): Use gpgrt_lock_lock
and gpgrt_lock_unlock to protect call of getnev.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
17 months agoWS removal
Ben McGinnes [Mon, 26 Feb 2018 03:09:38 +0000 (14:09 +1100)]
WS removal

* Whitespace removal.

17 months agoMerge branch 'ben/python-docs-01'
Ben McGinnes [Mon, 26 Feb 2018 03:04:23 +0000 (14:04 +1100)]
Merge branch 'ben/python-docs-01'

* Documentation and the first brush strokes towards the future.

Signed-off-by: Ben McGinnes <ben@adversary.org>
17 months agoLaTeX headers ben/python-docs-01
Ben McGinnes [Mon, 26 Feb 2018 02:51:23 +0000 (13:51 +1100)]
LaTeX headers

* Set LaTeX headers to enable ligatures and a 12pt font by default.
* Paper size left for regional defaults.
* Using XeLaTeX for easier font control.
* Using default LaTeX font of Latin Main, but that's easy enough to change.

17 months agoMerge branch 'ben/gitsettings' of ben/gitignored
Ben McGinnes [Mon, 26 Feb 2018 01:15:01 +0000 (12:15 +1100)]
Merge branch 'ben/gitsettings' of ben/gitignored

Signed-off-by: Ben McGinnes <ben@adversary.org>
18 months agoRenaming ad infinitum ...
Ben McGinnes [Mon, 19 Feb 2018 16:13:42 +0000 (03:13 +1100)]
Renaming ad infinitum ...

* Dropped the .txt from the end of the file ...

18 months agoText conversion
Ben McGinnes [Mon, 19 Feb 2018 16:11:50 +0000 (03:11 +1100)]
Text conversion

* Exported from Org Mode to UTF-8 text.
* Removed my name from just under the title.

18 months agoTitle fix
Ben McGinnes [Mon, 19 Feb 2018 16:11:02 +0000 (03:11 +1100)]
Title fix

* Fixed title.

18 months agoConflict with Phabricator files
Ben McGinnes [Mon, 19 Feb 2018 15:51:02 +0000 (02:51 +1100)]
Conflict with Phabricator files

* The developers of Phabricator, the web front-end on dev.gnupg.org
  have not implemented renderers for Markdown, Org-Mode or any other
  common markdown like language.
* They also refuse to do so.
* Instead they re-invented the wheel and implemented their own version
  of Markdown-like thing which is incompatible with everything else.
  It is called Remarkup.
* The developers of Phabricator and Remarkup have refused to provide
  conversion tools to move files to/from any format to/from Remarkup.
* They expect everyone to learn their new favourite pet project.
* Remarkup may or may not display Org Mode files, but if so then it is
  likely to only want to do so as plain text.
* There is an unaffiliated and unofficial project to convert Github
  Markdown to Remarkup via Pandoc.  This might be adapted for our use,
  but requires testing.
* Until then exporting from Org Mode to UTF-8 text is likely the least
  worst plan.
* Which means renaming this file to README.org first.

18 months agoSchizophrenic file types
Ben McGinnes [Mon, 19 Feb 2018 15:45:44 +0000 (02:45 +1100)]
Schizophrenic file types

* Removed Markdown style heading underlining.
* Removed in-line file type declaration (which is not correctly parsed
  by the web interface on dev.gnupg.org).

18 months agocpp: Add shorthand for key locate
Andre Heinecke [Fri, 16 Feb 2018 11:58:54 +0000 (12:58 +0100)]
cpp: Add shorthand for key locate

* lang/cpp/src/key.cpp (Key::locate): New static helper.
* lang/cpp/src/key.h: Update accordingly.

18 months agoHistory path
Ben McGinnes [Fri, 16 Feb 2018 08:15:32 +0000 (19:15 +1100)]
History path

* Fixed a typo in a filepath reference.
* Moved conjecture regarding the first version of Python used to a
  footnote.

18 months agoMerge branch 'master' of /Users/ben/dev/hgit/mine/gnupg/gpgme/master into ben/python...
Ben McGinnes [Thu, 15 Feb 2018 15:04:57 +0000 (02:04 +1100)]
Merge branch 'master' of /Users/ben/dev/hgit/mine/gnupg/gpgme/master into ben/python-docs-01

18 months agoLaTeX margins
Ben McGinnes [Thu, 15 Feb 2018 14:26:20 +0000 (01:26 +1100)]
LaTeX margins

* Added LaTeX header for 1 inch margins in the quite likely event that
  all PDF output ultimately uses LaTeX.

18 months agoTODO Documentation
Ben McGinnes [Thu, 15 Feb 2018 10:30:32 +0000 (21:30 +1100)]
TODO Documentation

* Checked off the decision to stick with Org Mode.

18 months agoTODO
Ben McGinnes [Thu, 15 Feb 2018 10:28:07 +0000 (21:28 +1100)]
TODO

* Beginning to turn the first part of this into something kind of like
  an actual TODO list as Org Mode uses it (maybe).

18 months agotests: Fix previous commit
NIIBE Yutaka [Thu, 15 Feb 2018 02:31:57 +0000 (11:31 +0900)]
tests: Fix previous commit

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
18 months agotests: More Makefile portability.
NIIBE Yutaka [Thu, 15 Feb 2018 02:24:33 +0000 (11:24 +0900)]
tests: More Makefile portability.

* tests/gpg/Makefile.am: Invoke GPG with TESTS_ENVIRONMENT.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
18 months agotests: Makefile portability.
NIIBE Yutaka [Thu, 15 Feb 2018 02:14:49 +0000 (11:14 +0900)]
tests: Makefile portability.

* tests/gpg/Makefile.am: Don't use "export" directive.
* tests/gpgsm/Makefile.am: Ditto.
* lang/qt/tests/Makefile.am: Ditto.
* lang/python/tests/Makefile.am: Ditto.

--

GnuPG-bug-id: 3056
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
18 months agobuild: More Makefile fix.
NIIBE Yutaka [Thu, 15 Feb 2018 01:27:59 +0000 (10:27 +0900)]
build: More Makefile fix.

* lang/python/tests/Makefile.am: Avoid target with '/'.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
18 months agoShort History
Ben McGinnes [Wed, 14 Feb 2018 17:19:15 +0000 (04:19 +1100)]
Short History

* Fixed or updated the most fundamental errors.
* Also included some details on which modules are available on PyPI,
  as well as what happened to the PyME commit log.

18 months agoSubsectioned history
Ben McGinnes [Wed, 14 Feb 2018 14:03:12 +0000 (01:03 +1100)]
Subsectioned history

* Split the main parts down into subsections.
* Still need to cull the incorrect stuff towards the end and add more
  recent changes.

18 months agoHistory
Ben McGinnes [Wed, 14 Feb 2018 11:44:27 +0000 (22:44 +1100)]
History

* Reshaping the history file to fit Org Mode's structuring for docs.
* Also said history needs to be a bit more clear (it was kind of
  unfinished).

18 months agoTODO
Ben McGinnes [Wed, 14 Feb 2018 11:28:50 +0000 (22:28 +1100)]
TODO

* Updated TODO.
* The entirety of the old TODO has been replaced with either more
  relevant tasks or goals for the examples and a more measured
  approach to the docs and why, in this project, Org Mode trumps reST,
  even though it's Python through and through.

18 months agoTODO
Ben McGinnes [Wed, 14 Feb 2018 10:25:45 +0000 (21:25 +1100)]
TODO

* Removed reST version of file.

18 months agoTODO
Ben McGinnes [Wed, 14 Feb 2018 10:24:54 +0000 (21:24 +1100)]
TODO

* Converted document from reST to org-mode.

18 months agoShort History
Ben McGinnes [Wed, 14 Feb 2018 10:23:04 +0000 (21:23 +1100)]
Short History

* Removed reST version.

18 months agoShort History
Ben McGinnes [Wed, 14 Feb 2018 10:21:58 +0000 (21:21 +1100)]
Short History

* Converted document from reST to org-mode.

18 months agoHouse keeping ben/gitsettings
Ben McGinnes [Wed, 14 Feb 2018 10:08:04 +0000 (21:08 +1100)]
House keeping

* Added a bunch of things to .gitignore that might otherwise creep in
  during Python development.
* This really should be merged ASAP.  You'll thank me later ...

18 months agobuild: Fix Makefiles for portability.
NIIBE Yutaka [Wed, 14 Feb 2018 08:34:28 +0000 (17:34 +0900)]
build: Fix Makefiles for portability.

* tests/gpg/Makefile.am: Don't allow target with '/'.
* tests/gpgsm/Makefile.am: Ditto.

--

BSD Make doesn't allow a target with '/'.  We still have such a target
in lang/python/Makefile.am, but it's for maintainer only, so,
assumption to GNU Make is OK there.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
18 months agoconfigure: Fix mingw check for getenv.
Andre Heinecke [Tue, 13 Feb 2018 06:49:10 +0000 (07:49 +0100)]
configure: Fix mingw check for getenv.

* configure.ac: have_thread_safe_getenv=yes with have_w32_system.

--
We want to define this for both 32 and 64 bit targets if
we use mingw. have_w32_system is defined for both targets.

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
18 months agoconfigure: MinGW has thread-safe getenv.
NIIBE Yutaka [Mon, 12 Feb 2018 23:51:26 +0000 (08:51 +0900)]
configure: MinGW has thread-safe getenv.

* configure.ac: have_thread_safe_getenv=yes with have_w64_system.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
18 months agocpp: Add SpawnShowWindow flag
Andre Heinecke [Fri, 9 Feb 2018 15:10:32 +0000 (16:10 +0100)]
cpp: Add SpawnShowWindow flag

* lang/cpp/src/context.h (SpawnShowWindow): New.

18 months agocore, w32: Enable spawning GUI applications
Andre Heinecke [Fri, 9 Feb 2018 15:07:58 +0000 (16:07 +0100)]
core, w32: Enable spawning GUI applications

* src/engine-spawn.c (engspawn_start): Translate spawn flag
to IOSPAWN flag.
* src/gpgme-w32spawn.c (my_spawn): Handle the new flag.
* src/gpgme.h.in (GPGME_SPAWN_SHOW_WINDOW): New.
* src/priv-io.h (IOSPAWN_FLAG_SHOW_WINDOW): New.

--
Used by GpgOL

18 months agocore, w32: Fix flags passing to gpgme-w32-spawn
Andre Heinecke [Fri, 9 Feb 2018 15:04:54 +0000 (16:04 +0100)]
core, w32: Fix flags passing to gpgme-w32-spawn

* src/w32-io.c (_gpgme_io_spawn): Don't hardcode flags value.

--
IOSPAWN_FLAG_ALLOW_SET_FG is 2 and was translated to 1.

This might fix the pinentry foreground handling pass through.

18 months agocpp: Add conveniance Data::toString
Andre Heinecke [Fri, 9 Feb 2018 15:03:37 +0000 (16:03 +0100)]
cpp: Add conveniance Data::toString

* lang/cpp/src/data.h, lang/cpp/src/data.cpp: Add Data::toString.

--
I'm lazy and like to waste memory.

18 months agoFix for BSD Make.
NIIBE Yutaka [Mon, 29 Jan 2018 23:22:57 +0000 (08:22 +0900)]
Fix for BSD Make.

* tests/gpg/Makefile.am, tests/gpgsm/Makefile.am: Remove ./.

--

GNU Make is powerful enough for handling and interpreting of
pathname as target, but BSD Make is not.

GnuPG-bug-id: 3056
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
18 months agoFix compile error message.
NIIBE Yutaka [Mon, 29 Jan 2018 10:38:49 +0000 (19:38 +0900)]
Fix compile error message.

* src/get-env.c (_gpgme_getenv): Fix error message.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
18 months agotests: Fix for NetBSD.
NIIBE Yutaka [Mon, 29 Jan 2018 03:04:55 +0000 (12:04 +0900)]
tests: Fix for NetBSD.

* tests/gpg/pinentry: Use /bin/sh instead of Bash.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
18 months agocore: Implement _gpgme_getenv for NetBSD.
NIIBE Yutaka [Mon, 29 Jan 2018 02:45:33 +0000 (11:45 +0900)]
core: Implement _gpgme_getenv for NetBSD.

* src/get-env.c [HAVE_GETENV_R] (_gpgme_getenv): New.

--

GnuPG-bug-id: 3056
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
20 months agoPost release updates.
Werner Koch [Tue, 12 Dec 2017 12:11:04 +0000 (13:11 +0100)]
Post release updates.

--

20 months agoRelease 1.10.0. gpgme-1.10.0
Werner Koch [Tue, 12 Dec 2017 11:46:00 +0000 (12:46 +0100)]
Release 1.10.0.

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agoRequire libgpg-error 1.24 and libassuan 2.4.2
Werner Koch [Tue, 12 Dec 2017 11:12:47 +0000 (12:12 +0100)]
Require libgpg-error 1.24 and libassuan 2.4.2

* src/util.h (GPG_ERR_FALSE): Remove due to newer libgpg-error.
--

We require these over one year old versions to better allign with
GnuPG's demand.  Note that the required libassuan is acgtually 2 years
old.

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agoqt: Don't use QDateTime::toSecsSinceEpoch
Andre Heinecke [Mon, 11 Dec 2017 16:07:10 +0000 (17:07 +0100)]
qt: Don't use QDateTime::toSecsSinceEpoch

* lang/qt/src/qgpgmequickjob.cpp (addSubkeyWorker)
(createWorker): Use toMSecsSinceEpoch instead toSecsSinceEpoch.

--
toSecsSinceEpoch was only introduced in Qt 5.8.

20 months agocore,w32: Fix popping up of console windows due to gpgconf.
Werner Koch [Mon, 11 Dec 2017 12:54:22 +0000 (13:54 +0100)]
core,w32: Fix popping up of console windows due to gpgconf.

* src/gpgme-w32spawn.c (my_spawn): Create w/o DETACHED_PROCESS.
--

The spawn helper is actually called with DETACHED_PROCESS and should
not need to do a DETACHED_PROCESS of its own.  Interestingly this
patch removes the popups.

See Andre's report
GnuPG-bug-id: 3515

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agoSpelling fixes for comments and doc
Andre Heinecke [Fri, 8 Dec 2017 04:59:11 +0000 (05:59 +0100)]
Spelling fixes for comments and doc

--
Patch provided by ka7 in dev.gnupg.org

Differential D423

20 months agocpp: Fix handling of lsig promotion
Andre Heinecke [Thu, 7 Dec 2017 15:21:01 +0000 (16:21 +0100)]
cpp: Fix handling of lsig promotion

* src/gpgsignkeyeditinteractor.cpp (SignKeyState): Add second
CONFIRM state.
(makeTable): Properly handle local_promote_okay.
(action): Handle CONFIRM2.

--
This fixes changing a local signature to a "public" signature.

GnuPG-Bug-Id: T1649

20 months agotests: Print userid signatures in run-keylist
Andre Heinecke [Thu, 7 Dec 2017 12:47:18 +0000 (13:47 +0100)]
tests: Print userid signatures in run-keylist

* tests/run-keylist.c (main): Print UID signatures if there
are any.

20 months agocore: Also check for a failed selftest in gpgm_data_new.
Werner Koch [Mon, 4 Dec 2017 11:08:31 +0000 (12:08 +0100)]
core: Also check for a failed selftest in gpgm_data_new.

* src/data.c (_gpgme_data_new): Check for failed selftest.
* tests/run-support.h (make_filename): Print a message on mallooc
failure.
(init_gpgme_basic): New.
* tests/run-identify.c (main): Call init_gpgme_basic becuase we do not
need to setup a protocol.
* tests/t-data.c: Define PGM and include run-support.h.
(make_filename): Remove.
(main): Call init_gpgme_basic.
--

Note: This patch may break applications which used gpgme_data but no
gpgme_new without having called the required gpgme_check_version.

GPGME can be used without a protocol for example to work with the data
object abstraction.  Thus a call to gpgme_data_new also needs to check
the result of the core selftests - including on whether
gpgme_check_version has been called.

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agopython: Default whence argument for Data() to SEEK_SET.
Tobias Mueller [Tue, 22 Aug 2017 15:48:25 +0000 (17:48 +0200)]
python: Default whence argument for Data() to SEEK_SET.

* lang/python/gpgme.i: copied signature from gpgme.h and defaulted the
value to SEEK_SET.
* lang/python/tests/t-data.py: Added a test for no second argument
--

Having to import the os package when wanting to read a Data object is a
slight annoyance. With SWIG, we can define default parameters. This
change defaults the whence argument to SEEK_SET which is how StringIO
and BytesIO behave.

Signed-off-by: Tobias Mueller <muelli@cryptobitch.de>
20 months agoRegister DCO for Tobias Mueller
Werner Koch [Sun, 3 Dec 2017 18:28:11 +0000 (19:28 +0100)]
Register DCO for Tobias Mueller

--

20 months agoqt: Add job for quick commands
Andre Heinecke [Fri, 1 Dec 2017 13:29:04 +0000 (14:29 +0100)]
qt: Add job for quick commands

* lang/qt/src/qgpgmequickjob.cpp,
lang/qt/src/qgpgmequickjob.h,
lang/qt/src/quickjob.h: New.
* lang/qt/src/Makefile.am,
lang/qt/src/protocol.h,
lang/qt/src/protocol_p.h,
lang/qt/src/job.cpp: Update accordingly.

--
Keeping it in line with the Job for everything pattern.
Although it's reduced to one job for four commands as
the commands all behave the same.

20 months agocpp: Wrap create_key and create_subkey
Andre Heinecke [Fri, 1 Dec 2017 12:21:34 +0000 (13:21 +0100)]
cpp: Wrap create_key and create_subkey

* lang/cpp/src/context.cpp,
lang/cpp/src/context.h (Context::startCreateKey)
(Context::createKey, Context::createSubkey)
(Context::startCreateSubkey): New.

20 months agoFix uid parsing for ldap keyserver
Andre Heinecke [Fri, 1 Dec 2017 08:44:47 +0000 (09:44 +0100)]
Fix uid parsing for ldap keyserver

* src/engine-gpg.c (gpg_keylist_preprocess): Check field count
for uid and add fallback.

--
This fixes accessing unintialized memory and resulting
crashes in gpgrt_asprintf.

GnuPG-Bug-Id: T3550

20 months agotests: Add missing variable to gpgsm tests Makefile
Werner Koch [Thu, 30 Nov 2017 08:49:38 +0000 (09:49 +0100)]
tests: Add missing variable to gpgsm tests Makefile

* tests/gpgsm/Makefile.am (GPG_AGENT): Set var.  It is used later.
--

Note that the var is used by the gpgsm.conf target.

Reported-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Werner Koch <wk@gnupg.org>
21 months agotests: Make portability fix.
NIIBE Yutaka [Tue, 21 Nov 2017 06:35:10 +0000 (15:35 +0900)]
tests: Make portability fix.

* lang/python/tests/Makefile.am: Distinguish target and path.
* tests/gpg/Makefile.am: Ditto.
* tests/gpgsm/Makefile.am: Ditto.

--

GNU Make is powerful enough to match path to target (and vice versa),
but BSD make is not.

GnuPG-bug-id: 3056
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
21 months agoqt: Fix IODeviceDataProvider with Process
Andre Heinecke [Tue, 14 Nov 2017 13:28:32 +0000 (14:28 +0100)]
qt: Fix IODeviceDataProvider with Process

* lang/qt/src/dataprovider.cpp (blocking_read): Keep
reading if process is not atEnd.

--
This fixes a regression in Kleopatra that uses this dataprovider
to chain the gpgtar process to the encryption / signing.

22 months agocore: use getdents64 syscall on linux instead of getdents.
Daniel Kahn Gillmor [Wed, 11 Oct 2017 15:38:39 +0000 (11:38 -0400)]
core: use getdents64 syscall on linux instead of getdents.

* src/posix-io.c (get_max_fds): use getdents64 instead of getdents.
--

getdents64 was introduced in linux 2.4, so it should be widely
available.  some Linux architectures which post-date 2.4 (e.g. arm64)
appear to not have getdents at all, so it's probably better to use the
more modern interface.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>