Commit Graph

348 Commits

Author SHA1 Message Date
NIIBE Yutaka
223779dfde build: Update with newer autoconf constructs.
* configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE.
Use AS_HELP_STRING instead of AC_HELP_STRING.
* m4/libtool.m4: Update from libgpg-error.
* m4/gpg-error.m4: Update from libgpg-error.
* m4/libassuan.m4: Update from libassuan.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2020-11-18 14:34:52 +09:00
Werner Koch
01a0d8ec1a
Post release updates 2020-11-12 11:02:58 +01:00
Werner Koch
feea38c89d
Release 1.15.0
* configure.ac: Bump LT versions to c=C35/A24/R0, cpp=C18/A13/R0,
qt=C12/A5/R0.
--

GnuPG-bug-id: 5131
2020-11-12 10:24:22 +01:00
Werner Koch
eb99e8c483
Require at least libgpg-error 1.36
* configure.ac (NEED_GPG_ERROR_VERSION): Require 1.36.
* src/cJSON.c: Remove code for older version.
* src/engine.c (gpgme_get_engine_info): Ditto.
* src/gpgme-json.c: Ditto.
* src/op-support.c: Ditto.
* src/util.h: Ditto.
--

Libgpg-error 1.36 has been released more than 18 months ago so it is
time to avoid hacks and require this verion.  This will for example
help Kleopatra to support PIV cards and improves the gpgme-json.

Signed-off-by: Werner Koch <wk@gnupg.org>
2020-11-09 11:50:46 +01:00
Werner Koch
81db412245
Post release updates
--
2020-07-16 17:33:34 +02:00
Werner Koch
6d7bf78ca5
Release 1.14.0
* configure.ac: Bump LT versions to c=C34/A23/R0 cpp=C17/A11/R0
qt=C11/A4/R0.
--
GnuPG-bug-id: 4996
2020-07-16 17:17:34 +02:00
Werner Koch
2b8680aba9
python: Also detect python 3.9.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
2020-02-14 13:16:01 +01:00
Werner Koch
067b1a73d9
doc: Note the need for a base tag.
--
2019-11-04 09:15:43 +01:00
Werner Koch
44cedf9796
Post release updates
--
2019-06-13 15:35:58 +02:00
Werner Koch
ea11c2a13c
Release 1.13.1
* configure.ac: Bump LT versions to c=C33/A22/R1 cpp=C16/A10/R0
qt=C10/A3/R4.

Signed-off-by: Werner Koch <wk@gnupg.org>
2019-06-13 15:18:38 +02:00
Andre Heinecke
f9c923bb2d
python: Make EXTRA_DIST files explicit
* configure.ac: Configure new Makefiles.
* lang/python/Makefile.am: Remove dirs from extra dist and use
subdirs.
* lang/python/examples/Makefile.am, lang/python/src/Makefile.am,
lang/python/doc/Makefile.am: New. Files that list EXTRA_DIST files.

--
This is similar to what lang/js does by explicitly listing the
files. This ensures that we have clean distribution tarballs
without accidentall additions that just lay in the directory.

GnuPG-Bug-Id: T4481
2019-05-06 16:08:26 +02:00
Andre Heinecke
33b13d1c29
Always use maintainer mode -Wno cflags
* configure.ac (CFLAGS): Move -Wno flags out of the maintainer mode.

--
It makes sense to have more warnings in maintainer mode and
not more warnings in release builds.

GnuPG-Bug-Id: T4477
2019-05-03 10:56:03 +02:00
Werner Koch
5d2b3b28aa
Post release updates.
--
2019-03-26 18:42:26 +01:00
Werner Koch
1b5a6bf27a
Release GPGME 1.13.0
* configure.ac: Bump LT versions.
                For C to C33/A22/R0.
                For C++ to C15/A9/R0.
                For Qt to C10/A3/R3.

Signed-off-by: Werner Koch <wk@gnupg.org>
2019-03-26 17:17:08 +01:00
NIIBE Yutaka
66bcb8acb2 build: With LD_LIBRARY_PATH defined, use --disable-new-dtags.
* configure.ac (LDADD_FOR_TESTS_KLUDGE): New for --disable-new-dtags.
* tests/Makefile.am (LDADD): Use LDADD_FOR_TESTS_KLUDGE.
* lang/cpp/tests/Makefile.am, lang/qt/tests/Makefile.am: Likewise.
* tests/gpg/Makefile.am, tests/gpgsm/Makefile.am: Likewise.
* tests/json/Makefile.am, tests/opassuan/Makefile.am: Likewise.

--

GnuPG-bug-id: 4298
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2019-01-16 10:59:25 +09:00
Werner Koch
8b41fb08f0
core: Silence newer compiler warnings.
* configure.ac: Add -Wno-format-truncation and
  -Wno-sizeof-pointer-div.
* src/b64dec.c (_gpgme_b64dec_proc): Add fallthrough annotation.
* src/cJSON.c (parse_string): Ditto.
* src/gpgme-json.c (main): Ditto.
--

gcc 8 enables a couple of new warnings.  Some of them are useless for
us.  In particular:

  util.h:42:26: warning: division 'sizeof (char *) / sizeof (char)'
  does not compute the number of array elements [-Wsizeof-pointer-div]
  #define DIM(v) (sizeof(v)/sizeof((v)[0])) ^

  trustlist.c:101:22: note:
  in expansion of macro 'DIM' if (strlen (p) == DIM(item->keyid) - 1)

Which is a real standard way to use DIM, here the right hand side is
equivalent to sizeof but nevertheless it is correct.  Yes sir, we know
C.

The format string warnings I have seen were assuming that the time
structure returns valued out of scope - but if the system is that
broken, the s_n_printf catches this.

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-12-17 16:47:27 +01:00
Werner Koch
5857491a2a
core: Simplify the trace maros by using variadics.
* src/debug.h (TRACE_BEG, TRACE_LOG, TRACE_SUC): Use variadic macros
and remove the TRACE_BEG1 et al.  Change all users to always pass a
format string.
(TRACE): Ditto.
* src/debug.c (_gpgme_debugf): New.
* configure.ac <GCC>: Add -Wno-format-zero-length.
--

This makes it easier for use to enable format checks.  The zero-length
format is required to allow for an empty format due to the comman
problematic of __VA_ARGS__.

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-11-16 16:25:49 +01:00
Werner Koch
8d91c0f4cd
Add SPDX identifiers to most source files
--

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-11-16 13:27:33 +01:00
Andre Heinecke
0c31837766
tests: Add json testrunner
* configure.ac: Configure makefile.
* tests/Makefile.am: Run json tests if gpg tests are run.
* tests/json/t-json.c: New testrunner for json tests.
* tests/json/t-config.in, tests/json/t-config.out: First test.
--
The idea of this test runner is that it only looks for parts
in the output. This should allow it to write robust tests
that check for the basics in the output but don't fail when
the output is extended or slightly changed.
2018-11-14 11:51:08 +01:00
NIIBE Yutaka
895176f42a Fix the previous commit.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2018-11-12 19:11:49 +09:00
NIIBE Yutaka
f3e6052189 build: Provide gpgme.pc, generated by configure.
* configure.ac: Generate src/gpgme.pc.
* src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New.
(EXTRA_DIST): Add gpgme.pc.in.
* src/gpgme.pc.in: New.
* src/gpgme-config.in: Use variables.

--

Some usages of gpgme-config is not compatible to pkg-config style;
The --glib option and --thread option which affect the output
by --cflags or --libs are not supported by gpgme.pc.

gpgme-config's embedding information for gpg-error and libassuan at
the build time of gpgme is considered inflexible than pkg-config
style.  It is now handled by dependency of gpgme.pc (Requires field).

To use gpgme.pc, newer libgpg-error (>= 1.33) and libassuan (>= 2.5.3)
are required, which provide gpg-error.pc and libassuan.pc respectively.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2018-11-12 09:03:49 +09:00
Daniel Kahn Gillmor
2557d0ae6f spelling: fix misspellings
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2018-11-08 12:34:27 +07:00
Werner Koch
3c04dea3ec
w32: Remove all support for WindowsCE
* configure.ac: Remove WindwosCE support.
* contrib/: Remove all; it was only used for WindowsCE.
* src/w32-ce.c, src/w32-ce.h: Remove files.
* src/Makefile.am (system_components): Remove these files.
* src/ath.c, src/ath.h: Remove W32CE support.
* src/data-compat.c (gpgme_data_new_from_filepart): Ditto.
(gpgme_data_new_from_file): Ditto.
* src/debug.c (debug_init, _gpgme_debug): Ditto.
* src/gpgme-tool.c (gpgme_server): Ditto.
(main): Ditto.
* src/priv-io.h: Do not include w32-ce.h.
* src/util.h: Remove WindowsCE support.
* src/w32-io.c: Ditto.
* src/w32-util.c: Ditto.
* src/debug.h (TRACE_SUC4): New.
--

There is no more hardware to test our code, the support for Windows CE
terminated along time ago.  Note that our code worked only with the
old WindowsCE with that overall system limit of 31 processes.

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-10-31 12:35:14 +01:00
Daniel Kahn Gillmor
12b0b5c894 doc: convert more links to equivalent https:// URLs
--

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2018-10-18 00:28:51 -04:00
Werner Koch
ff6ff616ae
python: Auto-check for all installed python versions.
* m4/python.m4 (AM_PATH_PYTHON): Add a 4th arg.
* configure.ac (available_languages): Remove separate python2 and
python3 and keep just python.  Simplify test for pythons.  Use an
explicit list of python versions to test.
--

This seems to be a starightforward chnage to support more than two
python versions.  I am not sure why we had that complicated thing
before.  On my box I get builds and run tests for 2.7, 3.4 and 3.5.
If 3.6, 3.7 or 3.8 are installed they should also work.

GnuPG-bug-id: 3354
Signed-off-by: Werner Koch <wk@gnupg.org>
2018-10-17 10:05:35 +02:00
NIIBE Yutaka
85dd0fa4b5 build: Let configure create the VERSION file.
* autogen.sh: Update from libgpg-error.
* configure.ac: Use mym4_version to create VERSION file.
* Makefile.am (dist-hook): Do not create VERSION.
(EXTRA_DIST): Add VERSION.

--

GnuPG-bug-id: 3283
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2018-10-10 13:39:42 +09:00
Andre Heinecke
9f85f4967e
cpp: Add first manual tests
* lang/cpp/Makefile.am: Add tests subdir.
* lang/cpp/tests/Makefile.am: New.
* lang/cpp/tests/README,
lang/cpp/tests/run-getkey.cpp,
lang/cpp/tests/run-keylist.cpp: New.
* configure.ac: Configure tests makefile.

--
The autotests for c++ live in lang/qt/tests these
tests are more for manual experiments to validate some
functionality.
2018-10-09 11:24:18 +02:00
Werner Koch
1c7f93fbc8
Post release updates
--
2018-10-08 11:36:37 +02:00
Werner Koch
1aff2512d8
Release 1.12.0
* configure.ac: Bump core LT version to C32/A21/R0.  Bump C++ LT
version to C14/A8/R0.

* lang/qt/tests/Makefile.am (CLEANFILES): Add reader status files.
* Makefile.am (EXTRA_DIST): Add conf/whatisthis.

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-10-08 11:17:01 +02:00
Werner Koch
ecfa48fffa
build: Move config.h to conf/config.h
* conf/: New dir.
* configure.ac (AC_CONFIG_HEADER): Move header to conf dir.
* doc/Makefile.am (mkdefsinc): Adjust rule.
* lang/python/Makefile.am (copystamp): Ditto.
--

C++ uses those stupid files without a suffix and thus the new standard
header <version> as included by newer other libc++ versions may
conflict with the VERSION file in out top directory.   This change
should solve the problem.

GnuPG-bug-id: 4168
Signed-off-by: Werner Koch <wk@gnupg.org>
2018-10-05 15:14:58 +02:00
Andre Heinecke
59ed27bae1
Merge branch 'javascript-binding'
This adds a new language binding "gpgme.js" to GPGME. It
serves as a bridge between the native-messaging service "gpgme-json"
and JavaScript Applications.

The first user of this binding will be Mailvelope which will
see GnuPG integration in the near future.

GnuPG-Bug-Id: T4107
2018-08-22 13:15:35 +02:00
Andre Heinecke
fe3de5b86b
Remove js as language from configure.ac
* configure.ac: Remove js language.

--
It does not make much sense to integrate gpgme-js into the
GPGME build system. gpgme-js will be distrbuted by it's users
as part of the web extensions / their distribution as that
is the JavaScript way.

So they can use their tools etc. to compile gpgme-js JavaScript
style, which is documented in the lang/js folder.
2018-08-21 13:58:40 +02:00
Werner Koch
085cdeddef
core: Blank out the plaintext after decryption failure.
* src/data.h (data_prop_t): New enum.
(struct gpgme_data): Add field propidx.
* src/data.c (property_t): New.
(property_table, property_table_size, property_table_lock): New.
(insert_into_property_table): New.
(remove_from_property_table): New.
(_gpgme_data_get_dserial): New.
(_gpgme_data_set_prop): New.
(_gpgme_data_get_prop): New.
(_gpgme_data_new): Connect new object to property_table.
(_gpgme_data_release): Remove from property_table.
(gpgme_data_read): With DATA_PROP_BLANKOUT set don't fill the buffer.
* src/data-mem.c (gpgme_data_release_and_get_mem): Likewise.
* src/decrypt.c (struct op_data): Add field plaintext_dserial.
(_gpgme_op_decrypt_init_result): Add arg plaintext and init new field.
(_gpgme_decrypt_status_handler): Set DATA_PROP_BLANKOUT on decryption
failure.
(_gpgme_decrypt_start): Pass PLAIN to the init function.
* src/decrypt-verify.c (decrypt_verify_start): Ditto.
* configure.ac: Check for stdint.h and bail out if uint64_t is not
available.
--

This is a best effort feature to not output plaintext after a
decryption failure (e.g. due to no or broken authenticated
encryption).  It always work when using a memory object and reading it
after the decryption but it can't work reliable when the user is
reading from the data object while the decryption process is still
running.

This is quite a large change because the data objects and the context
objects are allowed to be owned by different threads.  Thus a
synchronization is needed and we do this with a global table of all
data objects to which the context objects can do soft-linking via a
unique data object serial number.

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-07-19 17:39:09 +02:00
Andre Heinecke
d27703ea4f
Prepare build system for gpgme-js and dist it
* configure.ac: Add js as language.
* lang/Makefile.am: Add js as dist language.
* lang/js/BrowserTestExtension/Makefile.am,
lang/js/DemoExtension/Makefile.am,
lang/js/Makefile.am,
lang/js/src/Makefile.am: Populate EXTRA_DIST variables.

--
There is no actual build done yet as there seems to be
no way to build it with debian stable tools. This needs
clarification.
2018-06-19 16:40:40 +02:00
Werner Koch
302ec1f9aa
Post release updates
--
2018-04-20 10:41:38 +02:00
Werner Koch
2e9a14912f
Release 1.11.1
* configure.ac: Bump LT version to C31/A20/R1.  For cpp to C13/A7/R0.
For qt to: C10/A3/R2.

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-04-20 10:32:54 +02:00
Werner Koch
d98f08fa63
Post release updates
--
2018-04-18 20:27:14 +02:00
Werner Koch
3f55c52b9a
Release 1.11.0
* configure.ac: Bump LT version to C31/A20/R0.  For cpp to C12/A6/R0.
For qt to: C10/A3/R1.

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-04-18 20:11:52 +02:00
Werner Koch
67b4dafb6d
doc: Update copyright years and change two URLs.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-04-18 19:30:50 +02:00
Andre Heinecke
5ec890b9c7
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>
2018-02-13 07:49:10 +01:00
NIIBE Yutaka
77ca9cc2db 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>
2018-02-13 08:51:26 +09:00
Werner Koch
7da01c7352
Post release updates.
--
2017-12-12 13:11:04 +01:00
Werner Koch
6a42eb5f38
Release 1.10.0.
Signed-off-by: Werner Koch <wk@gnupg.org>
2017-12-12 12:46:00 +01:00
Werner Koch
d4d04d6c04
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>
2017-12-12 12:12:47 +01:00
Andre Heinecke
7b5182f288
Spelling fixes for comments and doc
--
Patch provided by ka7 in dev.gnupg.org

Differential D423
2017-12-08 05:59:11 +01:00
Werner Koch
4632adf403
core: Allow disabling the use of SYS_getdents for Linux.
* configure.ac (USE_LINUX_GETDENTS): New ac_define.  Add option
--disable-linux-getdents.
* src/posix-io.c: Make use of USE_LINUX_GETDENTS.

Signed-off-by: Werner Koch <wk@gnupg.org>
2017-10-04 18:03:54 +02:00
Werner Koch
6745eb69e2
Set next version to 1.10.0
--
2017-08-24 16:20:51 +02:00
Alon Bar-Lev
a827382caf
python: use autoconf pre-processor when building via autoconf
* configure.ac: Add AC_PROG_CPP.
* lang/python/Makefile.am: Set CPP environment for setup.py to use.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2017-04-11 10:24:44 +02:00
Alon Bar-Lev
25e6444b3f
python: Remove usage of PYTHON_VERSIONS
* configure.ac: Remove PYTHON_VERSIONS subst.
* lang/python/Makefile.am: Use basename of python as builddir prefix.
* lang/python/tests/run-tests.py: Likewise.

--

Two variables needs be at sync PYTHONS and PYTHON_VERSIONS, these may go
out of sync in some cases, for example in Gentoo where default python is
3.4 we get:

PYTHON='/usr/bin/python2'
PYTHONS='/usr/bin/python /usr/bin/python2'
PYTHON_VERSIONS='2.7 3.4'

We can use the basename of the python interpreter to achieve similar
effect without having to sync indexes between these two variables.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2017-04-10 14:44:16 +02:00
Alon Bar-Lev
49195c487e
python: simplify build, some fixups
* lang/python/gpg/version.py.in: Rename to lang/python/version.py.in.
configure.ac: Generate version.py.in in lang/python.
* lang/python/MANIFEST.in: Include version.py explicitly.
* lang/python/gpg: Rename to 'src'.
* lang/python/Makefile.am: Do not copy source files, do not use absolute
directories, support lib64 in uninstall, clean also dist directory, use
symlink for gpg src.
* lang/python/setup.py.in: Use builddir, copy sources into builddir,
copy version.py into module.
--

Simplify build to symlink the gpg sources into builddir instead of
copying. This requires handling of version.py as generated file.

In addition apply some cleanups: Drop the absolution pathes, clean the
dist directory as well, support lib64 for sitelib at uninstall.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2017-04-07 12:12:20 +02:00