aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* syscfg: Add x86_64 Android arch.HEADmasterBen Kibbey6 days2-0/+26
| | | | | | | | | * src/syscfg/lock-obj-pub.x86_64-unknown-linux-androideabi.h: New. * src/Makefile.am (lock_obj_pub): Add it. -- Signed-off-by: Ben Kibbey <[email protected]>
* syscfg: Add i686 Android arch.Ben Kibbey6 days2-0/+22
| | | | | | | | | * src/syscfg/lock-obj-pub.i686-unknown-linux-androideabi.h: New. * src/Makefile.am (lock_obj_pub): Add it. -- Signed-off-by: Ben Kibbey <[email protected]>
* syscfg: Add armv7a alias to arm for Android.Ben Kibbey6 days1-0/+1
| | | | | | | | * src/mkheader.c (canon_host_triplet): Add alias. -- Signed-off-by: Ben Kibbey <[email protected]>
* syscfg: Add 64-bit Android arch.Ben Kibbey6 days2-0/+26
| | | | | | | | | * src/syscfg/lock-obj-pub.aarch64-unknown-linux-androideabi.h: New. * src/Makefile.am (lock_obj_pub): Add it. -- Signed-off-by: Ben Kibbey <[email protected]>
* w32:spawn: Support pipe I/O for GPGRT_PROCESS_DETACHED.NIIBE Yutaka10 days1-208/+69
| | | | | | | | | | | | | | | | | * src/spawn-w32.c (struct gpgrt_spawn_actions): Add detached field. (spawn_detached): Merge into ... (_gpgrt_process_spawn): ... here, supporting pipe I/O. (_gpgrt_process_release): Handle detached process. (_gpgrt_process_wait_list): Likewise. -- For old Windows, pipe I/O and NUL stdio are not supported for a process with GPGRT_PROCESS_DETACHED. Creation of a process can be done, but the process has INVALID HANDLE for stdio. GnuPG-bug-id: 7716 Signed-off-by: NIIBE Yutaka <[email protected]>
* w32:spawn: New flag GPGRT_PROCESS_STDIO_NUL.NIIBE Yutaka10 days2-11/+27
| | | | | | | | | | | * src/gpg-error.h.in (GPGRT_PROCESS_STDIO_NUL): New. * src/spawn-w32.c (w32_open_null): Add ENABLE_NULL_DEVICE argument. (_gpgrt_process_spawn): Follow the change. -- GnuPG-bug-id: 7723 Signed-off-by: NIIBE Yutaka <[email protected]>
* w32:spawn: Fix resource leaks for HANDLEs by w32_open_null.NIIBE Yutaka10 days1-125/+126
| | | | | | | | | | * src/spawn-w32.c (_gpgrt_process_spawn): Don't modify hd fields in ACT. Clean up use of hd_in, hd_out, and hd_err. -- GnuPG-bug-id: 7716 Signed-off-by: NIIBE Yutaka <[email protected]>
* w32:spawn: Fix inheriting HANDLEs.NIIBE Yutaka11 days1-2/+2
| | | | | | | | | | | * src/spawn-w32.c (spawn_detached): Use EXTENDED_STARTUPINFO_PRESENT to enable lpAttributeList in STARTUPINFOEXW. (_gpgrt_process_spawn): Likewise. -- GnuPG-bug-id: 7716 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgrt-config: It's gcc which supports -print-search-dirs option.NIIBE Yutaka2025-07-021-1/+1
| | | | | | | | | | | * src/gpgrt-config.in (determine_gpgrt_libdir): Default to gcc. -- This minor chang helps non-GNU system with vendor C compiler as cc. Signed-off-by: NIIBE Yutaka <[email protected]>
* spawn: Define _GPGRT_NEED_AFLOCAL for OS without AF_LOCAL.NIIBE Yutaka2025-06-301-0/+1
| | | | | | | | * src/spawn-posix.c (_GPGRT_NEED_AFLOCAL): Add. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* po: Update Japanese Translation.NIIBE Yutaka2025-06-301-3/+7
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* spawn:posix: Use 1024 for arbitrary limit, following GPGME.NIIBE Yutaka2025-06-261-2/+2
| | | | | | | | | * src/spawn-posix.c (get_max_fds): Use 1024 (was: 256). -- GnuPG-bug-id: 7696 Signed-off-by: NIIBE Yutaka <[email protected]>
* spawn:posix: Add an improvement when closefrom is not available.NIIBE Yutaka2025-06-262-25/+35
| | | | | | | | | | | | | | | * src/gpgrt-int.h (_gpgrt_close_all_fds): Fix function declaration. * src/spawn-posix.c (USE_GET_MAX_FDS): Define when closefrom is not available. (get_max_fds): Add an argument of FALLBACK_MAX_FDS. (_gpgrt_close_all_fds, my_exec, spawn_detached): Likewise. (_gpgrt_process_spawn): [USE_GET_MAX_FDS && _SC_OPEN_MAX]: It's a parent process which calls sysconf. -- GnuPG-bug-id: 7696 Signed-off-by: NIIBE Yutaka <[email protected]>
* posix:spawn: Use getdents64 when closefrom is not available.NIIBE Yutaka2025-06-262-25/+47
| | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_FUNCS): Check getdents64. * src/spawn-posix.c [!HAVE_CLOSEFROM] (get_max_fds): Use getdents64 instead of readdir, for AS-Safety. -- closefrom is available with glibc >= 2.34. getdents64 is available with glibc >= 2.30. To support older glibc versions, we could use syscall as GPGME does. GnuPG-bug-id: 7696 Signed-off-by: NIIBE Yutaka <[email protected]>
* spawn:posix: Fix spawning a process on POSIX machine.NIIBE Yutaka2025-06-231-5/+0
| | | | | | | | | | * src/spawn-posix.c (get_max_fds): Don't use _POSIX_OPEN_MAX, since it's irrelevant; It's a minimum value of OPEN_MAX. -- GnuPG-bug-id: 7696 Signed-off-by: NIIBE Yutaka <[email protected]>
* w32: Allow building on Windows with gcc < 12Werner Koch2025-06-161-0/+4
| | | | | | | | | * src/spawn-w32.c (_WIN32_WINNT): Define. -- With the i686-w64-mingw32-gcc version 12 the default NT version is 10 (0xa00) but the gcc 10 mingw comes defines 5.02. To avoid setting this in the gcc call as we used to do, we define it here.
* argparse: Remove a duplicated condition.Collin Funk via Gnupg-devel2025-06-101-1/+1
| | | | | | | | | * src/argparse.c (emulated_registry_lookup): Remove duplicated condition. -- Signed-off-by: Collin Funk <[email protected]>
* libtool: Add support for zOSWerner Koch2025-05-281-0/+4
| | | | | | | | * m4/libtool.m4: Add casefor openedition. -- Suggested-by: Sachin T <[email protected]> for ntbtls but added here as this is "our" upstream for such tools.
* argparse: Fix a memory leak.NIIBE Yutaka2025-05-281-0/+1
| | | | | | | | * src/argparse.c (handle_meta_echo): Free the STRING. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Release the memory after the use.NIIBE Yutaka2025-05-281-3/+19
| | | | | | | | | * doc/yat2m.c (add_content): Fix the type of LINE. (finish_page): Clean up. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Time for a new error code; this time GPG_ERR_UNEXPECTED_PACKETWerner Koch2025-05-163-0/+11
| | | | | | | | | | -- We already have _tag which is used for ASN.1, _MSG which is used by protocols like WKS and TLS, and the GPG_ERR_UNEXPECTED which is unrelated the former one and means just that an error was not expected. OpenPGP also has some cases where a packet is not expected. A dedicated error code thus makes sense.
* Post release updatesWerner Koch2025-04-242-1/+7
| | | | --
* Release 1.55.libgpg-error-1.55gpgrt-1.55Werner Koch2025-04-242-2/+9
|
* Add commands mkdir and chdir to gpg-errorWerner Koch2025-04-241-32/+62
| | | | | | | | * src/gpg-error.c (main): Add new commands mkdir and chdir. Allow for commands w/o dashes. -- Again some more or less useful stuff for testing on Windows.
* w32: Yet another extended length path kludge.Werner Koch2025-04-241-3/+7
| | | | | | | | * src/sysutils.c (_gpgrt_fname_to_wchar): Change threshold from 255 to 250. -- Updates-commit: 65114f24e13f835a289f791ed7a5e408b2843d59
* w32: More changes to the extended length path handling.Werner Koch2025-04-221-32/+90
| | | | | | | | | | | | | | | | | | | | * src/sysutils.c (has_path_separator): New. (_gpgrt_fname_to_wchar): Rewrite to add the prefix only when needed. ---- GetFullPathNameW has no MAX_PATH limit and thus can be used with any input. We now prefix the resulting absolute path after the call to GFPN. This allows to check whether the CWD is an UNC and thus use the right prefix. We also don't run the entire thing for just a drive letter etc and further skip the prefix if the absolute path is less than MAX_PATH. This gives better backward compatibility. There is also now a GPGRT_DISABLE_EXTLENPATH=-2 which does not disable the extended path handling but enables debug output. To actually disable the feature a positive value must be used. Updates-commit 28ae4ee194ec56e98123d3aceda130161dfd2df8 GnuPG-bug-id: 5754
* Mark the initializations with __nonstring__ attribute.NIIBE Yutaka2025-04-212-0/+7
| | | | | | | | | | * src/b64enc.c (bintoasc): Use GPGRT_ATTR_NONSTRING. * src/gpg-error.h.in (GPGRT_ATTR_NONSTRING): New. -- GnuPG-bug-id: 7621 Signed-off-by: NIIBE Yutaka <[email protected]>
* Post release updatesWerner Koch2025-04-172-1/+8
| | | | --
* Release 1.54libgpg-error-1.54gpgrt-1.54Werner Koch2025-04-173-3/+11
|
* w32: Fix extended length path handling for UNC specified files.Werner Koch2025-04-161-4/+26
| | | | | | | | | | | | | | | | | | | | | * src/sysutils.c (_gpgrt_fname_to_wchar): Fix the extended length path support for UNC file names. Also add an envvar to disable the entire extended length path support. -- GnuPG-bug-id: 5754 Fixes-commit: a4a692fcf1ed128693ec6d64d5e3163775aad10b With the last fix we fixed the extended length path support but it also truned outa wrong implementaion of it for UNC. Before the previous patch the UNC support was already wrong but it exhibited itself only when the requested UNC was already long. The patch then kicked in the support more often and in particular always if an UNC was used (due to the new checking for backslashes and not just the length). To avoid further surprises we now have an envvar to disable that support entirely. But if should be correct now ;-).
* Add command --fopen to gpg-error to help testingWerner Koch2025-04-161-2/+22
| | | | | | | | | | * src/gpg-error.c (main): Implement command --fopen. Also ignore log file settings from the Registry. -- To test estream functions it is useful to have commands to run some of them. Here we use gpgrt_fopen (fname, "r,sysopen") for the --fopen command.
* Post release updatesWerner Koch2025-04-092-1/+5
| | | | --
* Release 1.53libgpg-error-1.53gpgrt-1.53Werner Koch2025-04-092-2/+4
|
* tests: Check that we do not use the es macros in the public API.Werner Koch2025-04-092-1/+7
| | | | * tests/t-version.c: Undef the macros.
* Use gpgrt_stream_t for the API of gpgrt_nvc_*.NIIBE Yutaka2025-04-091-2/+2
| | | | | | | | | | | | | * src/gpg-error.h.in (gpgrt_nvc_parse): Use gpgrt_stream_t. (gpgrt_nvc_write): Likewise. -- For applications with no GPGRT_ENABLE_ES_MACROS, it's good not to use estream_t here. Fixes-commit: 7ec1f27b60eec95297c5267ab5ebbdb73b263c3f Signed-off-by: NIIBE Yutaka <[email protected]>
* Post release updatesWerner Koch2025-04-082-1/+5
| | | | --
* Release 1.52libgpg-error-1.52gpgrt-1.52Werner Koch2025-04-085-11/+18
|
* po: Update infos on the Portuguese translation.Werner Koch2025-04-082-4/+5
| | | | --
* argparse: Make getreg meta command work on Unix.Werner Koch2025-04-076-10/+116
| | | | | | | | | | | * src/argparse.c (_gpgrt_argparse_internal_s): Add fields no_registry and registry. (initialize): Init them. (emulated_registry_lookup): New. (handle_meta_getenv): Use it. * tests/etc/t-argparse.conf: Add a getreg meta command. * tests/t-argparse.c (opt): Add a disable-akr command. * tests/etc/Registry: New.
* Add a section mode to the name-value functions.Werner Koch2025-04-073-19/+190
| | | | | | | | | | * src/gpg-error.h.in (GPGRT_NVC_SECTION): New. * src/name-value.c (_gpgrt_name_value_container): Add section_mode. (_gpgrt_nvc_new): Set it. (_gpgrt_nvc_get_flag): Return it. (valid_name): Add arg sectionmode and change callers. (do_nvc_parse): Parse section names in section mode. (_gpgrt_nvc_write): Return an error in section mode.
* Allow name-value lookup w/o a trailing colon for the name.Werner Koch2025-04-073-24/+78
| | | | | | | | | | | | | | * src/name-value.c (_gpgrt_name_value_entry): Add field namelen. (ascii_memcasecmp): New. (same_name_p): New. (valid_name): Strip the colon and return the length. (do_nvc_add): Set namelen. (_gpgrt_nvc_lookup): Simplify. * tests/t-name-value.c (test_getting_values): Add some extra tests. -- The requirement for a colon after the name is too cumbersome.
* New public API gpgrt_nvc_* and gpgrt_nve_*Werner Koch2025-04-0711-5/+1760
| | | | | | | | | | | | | | | | | | * src/name-value.c: New. * tests/t-name-value.c: New. * src/gpg-error.def.in: Add new functions. * src/gpg-error.h.in: Ditto. * src/gpg-error.vers: Ditto. * src/visibility.c: Ditto. * src/visibility.h: Ditto. -- These new functions were originally added to GnuPG taken from current GnuPG master. The license has been changed from (LGPL-3.0-or-later OR GPL-2.0-or-later) to LGPL-2.1-or-later: Everything was written by me or employees/contractors of g10 Code GmbH. The private key handling has been removed because that would require Libgcrypt functions. Some functions are changed.
* Update the copyright notice.Werner Koch2025-04-072-1/+3
| | | | | * configure.ac (GPGRT_STD_COPYRIGHT_LINE): New. * src/gpg-error.c (my_strusage): Use it here.
* w32: Improve the detection of the need for a \\?\ prefixWerner Koch2025-04-041-3/+5
| | | | | | | | | | | | | * src/sysutils.c (_gpgrt_fname_to_wchar): Use the no-max-path prefix for shorter files and for filenames with path separators. -- Depending on the current directory the old threshold of 230 was to larger. Now we use a lower limit which should handle most standard file names w/o the need for the prefix. We also always do this if the requested file includes a directory part. Updates-commit: 32dad4e4135f0bdc436ed684da753d4b0cdb0ea1
* Add test cases for the strlist functions.Werner Koch2025-04-042-1/+328
| | | | | | | * tests/t-strlist.c: new. -- The test cases are taken from the GnuPG version of strlist.c
* tests: Add macros to improve the debug output.Werner Koch2025-04-041-4/+18
| | | | | | * tests/t-common.h (current_func): New var. (enter_test_function, leave_test_function): New macros. (die, fail, show): Print the fucntion name.
* New public API gpgrt_strlist_*Werner Koch2025-04-0111-214/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/strlist.c: Rename all functions to have a _gpgrt_strlist prefix. (append_to_strlist2, strlist_length): Remove. (_gpgrt_strlist_free): rtake care of the wipe flag. (_gpgrt_strlist_add): Add a flags arg to use it for prepend and append. Return an error on failure. (_gpgrt_strlist_tokenize): Ditto. (_gpgrt_strlist_copy): Chnage to return an error on failure. (_gpgrt_strlist_pop): Ditto. * src/Makefile.am (libgpg_error_la_SOURCES): Add strlist.c. * src/argparse.c (trim_spaces): Move to ... * src/stringutils.c (_gpgrt_trim_spaces): here and rename. * src/visibility.c: Add wrappers for all exported functions. * src/visibility.h: MArk exported functions as visisble. * src/gpg-error.def.in: Export new functions * src/gpg-error.vers: Ditto. * src/gpg-error.h.in (GPGRT_STRLIST_APPEND): New. (GPGRT_STRLIST_WIPE): New. (gpgrt_strlist_free): New. (gpgrt_strlist_add): New. (gpgrt_strlist_tokenize): New. (gpgrt_strlist_copy): New. (gpgrt_strlist_rev): New. (gpgrt_strlist_prev): New. (gpgrt_strlist_last): New. (gpgrt_strlist_pop): New. (gpgrt_strlist_find): New. (gpgrt_strlist_count): New inline function. -- This is a modified set of function as used by gpg for ages. These are quite useful functions and will be needed internally for some other planned features. The idea is to make their counterparts in gnupg wrapper around those new functions. After we have moved the secure memory stuff from Libgcrypt to here we can also implement a GPGRT_STRLICT_SECMEM flag to allow allocating strings here ion secure memory. For now we only have the WIPE flag which wipes the memory on free.
* Add source file strlist.cWerner Koch2025-03-281-0/+355
| | | | | | | | | | | | | | | | | | | | -- This is a copy from current GnuPG master. The license has been chnaged from (LGPL-3.0-or-later OR GPL-2.0-or-later) to LGPL-2.1-or-later: Almost everything was written by me or by employees of g10 Code GmbH. The only exception is strlist_pop 2002-06-14 David Shaw <[email protected]> * strgutil.c (pop_strlist): New function to pop the head off of a strlist. from gnupg-1.4/util/strgutil.c. However the function is to obvious to inhibit the license change. It needs to be changes anyway with followup commits. Signed-off-by: Werner Koch <[email protected]>
* Re-fix logic for finding the beta version numberWerner Koch2025-03-101-8/+7
| | | | | | | -- This reverts commit 542b6fce139047b5a0fa42ae11179a2308ac8f9e. and uses the --exclude option instead.
* Fix logic for finding the beta version numberIngo Klöcker2025-02-211-3/+5
| | | | | | | | | | | | | | * autogen.sh: Check if $tmp is empty after each assignment. -- This fixes the problem that due to the gpg4win-5.0.0-beta103 tag `./autogen.sh --find-version gpg4win 5 0 0` erroneously outputs version 5.0.0 instead of 5.0.0-betaNNN. Fix originally done for gpg4win and copied to gpgrt by [email protected]: commit d3452493e665a4175218b7272ca8b1ca6fc57718 Author: Ingo Klöcker <[email protected]> AuthorDate: Wed Feb 19 15:46:55 2025 +0100