| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* configure.ac (GPGRT_STD_COPYRIGHT_LINE): New.
* src/gpg-error.c (my_strusage): Use it here.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* tests/t-strlist.c: new.
--
The test cases are taken from the GnuPG version of strlist.c
|
|
|
|
|
|
| |
* tests/t-common.h (current_func): New var.
(enter_test_function, leave_test_function): New macros.
(die, fail, show): Print the fucntion name.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--
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]>
|
|
|
|
|
|
|
| |
--
This reverts commit 542b6fce139047b5a0fa42ae11179a2308ac8f9e.
and uses the --exclude option instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
* src/gpgrt-config.in: Fix initializing PKG_CONFIG_PATH.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error-config-test.sh.in: Skip the test with pkgconf 1.8.0.
--
Possibly, we need to skip with 1.9.0, 1.9.1, 1.9.2, and 1.9.3, too.
pkgconf 1.8.1 (on Debian) works well.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (GPG_ERR_ENABLE_ERRNO_MACROS): Remove.
--
It was for Windows CE.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (closefrom_really): Handle interrupted call of
closefrom.
(close_except): Likewise for call of close.
(_gpgrt_close_all_fds): Use closefrom_really and close_except.
--
GnuPG-bug-id: 7478
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* configure.ac (AC_CHECK_FUNCS): Check closefrom.
* src/spawn-posix.c [HAVE_CLOSEFROM]: Use closefrom if possible.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/w32-reg.c (_gpgrt_w32_reg_query_string): Implement a prefix for
root and consider an empty string for root also HKCU.
* src/visibility.c (gpgrt_w32_reg_get_string): New.
* src/gpg-error.def.in: Add new function.
* src/gpg-error.c (my_strusage): Print the Windows version (32 or 64
bit) of the binary.
(main): New command --getreg.
--
This function is already used internally and we have a similar
function in GnuPG. It is much more convenient to work with this
function.
Also we can now pass the KEY_WOW64_32KEY andKEY_WOW64_64KEY flags to
the registry read functions. For example
!32key!HKLM\software\gnu\gnupg:ntdskeyserver
returns the value using the KEY_WOW64_32KEY flag; likewise for
!64key!. If !cross! is used the reversed flag of the binary type is
used.
|
|
|
|
| |
* autogen.sh (w32root): Remove double slash in case of HOME=/.
|
|
|
|
| |
Signed-off-by: Daniel Cerqueira <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
* autogen.sh: New command --print-tsdir.
(maintainer_mode_option): Allow setting via autogen.rc
--
The maintainer mode config option is required for docker builds to
avoid surprising rebuilds in a read-only mounted volume. The
print-tsdir is a help er for baking the source dir into the configure.
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (spawn_detached): Make sure to release
lpAttributeList.
(_gpgrt_process_spawn): Likewise.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
| |
--
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* tests/t-printf.c (check_fprintf_sf): Use 'null_ptr'
as an identifier.
--
GnuPG-bug-id: 7344
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.def.in: Rename to gpgrt_spawn_actions_set_env_rev.
* src/gpg-error.h.in: Likewise.
* src/gpg-error.vers: Likewise.
* src/gpgrt-int.h: Likewise.
* src/spawn-posix.c: Likewise.
* src/spawn-w32.c: Likewise.
* src/visibility.c: Likewise.
* src/visibility.h: Likewise.
* tests/t-spawn.c (run_test): Use gpgrt_spawn_actions_set_env_rev.
--
Fixes-commit: 1860f6407f834b681c21f67db7236eaad161524c
GnuPG-bug-id: 7307
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.def.in (gpgrt_spawn_actions_set_envchange): New.
* src/gpg-error.vers (gpgrt_spawn_actions_set_envchange): New.
* src/gpg-error.h.in (gpgrt_spawn_actions_set_envchange): New.
* src/gpgrt-int.h (_gpgrt_spawn_actions_set_envchange): New.
* src/spawn-posix.c (struct gpgrt_spawn_actions): New field ENVCHANGE.
(prepare_environ): New.
(my_exec): Take care of ENVCHANGE.
(_gpgrt_spawn_actions_set_envchange): New.
* src/spawn-w32.c (struct gpgrt_spawn_actions): New field ENVCHANGE.
(prepare_env_block): New.
(_gpgrt_spawn_actions_set_envchange): New.
(spawn_detached, _gpgrt_process_spawn): Take care of ENVCHANGE.
* src/visibility.c (gpgrt_spawn_actions_set_envchange): New.
* src/visibility.h (gpgrt_spawn_actions_set_envchange): New.
* tests/Makefile.am (TESTS): Add t-spawn.
* tests/t-spawn.c: New.
--
GnuPG-bug-id: 7307
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (spawn_detached): Use _gpgrt_free_wchar.
(_gpgrt_process_spawn): Likewise.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
| |
* src/estream.c (_gpgrt_poll): Set got_nval.
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (do_create_pipe_and_estream): Call post_syscall.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (spawn_detached): Free ARGV.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (get_max_fds): Remove.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (_gpgrt_spawn_actions_set_envvars): It's an ASCII
string.
--
In future, we can extend it as UTF-8 string. When doing so, we will
detect ASCII or utf-8, and if needed, convert it to Unicode wchar
string with four-byte-zero terminated, and let the flag have
CREATE_UNICODE_ENVIRONMENT.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (GPGRT_PROCESS_ALLOW_SET_FG): New.
* src/spawn-w32.c (_gpgrt_process_spawn): Support the flag.
--
When GPGME will use gpgrt_process_spawn in future, this flag
will be needed to support GPGME_SPAWN_ALLOW_SET_FG.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* src/init.c (utf8_for_new_threads): New var.
(_gpgrt_w32_utf8_for_new_threads): New func.
(get_tls): Init the TLS utf8 flag from the new var.
* src/w32-gettext.c (_gpg_w32_gettext_use_utf8): Implement new flag.
--
GnuPG-bug-id: 7185
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
| |
* autogen.sh <find-version>: Also print the full commit id.
* configure.ac: Get the full commit id. Add it to VERSION.
(BUILD_REVISION): Replace this ac_define by
(BUILD_COMMITID): this.
* src/version.c (cright_blurb): Use here.
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (environ): Declare.
--
GnuPG-bug-id: 7169
|
|
|
|
| |
--
|
| |
|
|
|
|
| |
--
|
|
|
|
|
|
| |
* src/gpg-error.h.in (GPGRT_PROCESS_NO_EUID_CHECK): New.
* src/spawn-posix.c (spawn_detached): Move check to ...
(_gpgrt_process_spawn): here and skip if flag is set.
|
|
|
|
|
| |
* src/spawn-posix.c: Move include and struct defs around.
* src/spawn-w32.c: Move struct defs around.
|
|
|
|
|
|
| |
* src/gpg-error.m4: Apply spell fix from GnuPG master.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.m4 (_AM_PATH_GPGRT_CONFIG): Don't set
gpg_error_config_version.
(AM_PATH_GPG_ERROR): Set GPG_ERROR_CONFIG here and set
gpg_error_config_version with GPG_ERROR_CONFIG.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (my_exec): When PGMNAME==NULL, just fork.
(_gpgrt_process_spawn): Support PGMNAME==NULL use case.
* src/spawn-w32.c (_gpgrt_process_spawn): Return GPG_ERR_INV_ARG,
when PGMNAME==NULL.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.def.in: Update.
* src/gpg-error.h.in: Add declarations.
* src/gpg-error.vers: Update.
* src/visibility.c: Update.
* src/visibility.h: Update.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (GPGRT_PROCESS_NO_CONSOLE): New.
* src/spawn-w32.c (_gpgrt_process_spawn): Handle
GPGRT_PROCESS_NO_CONSOLE.
--
This may be used to support ASSUAN_PIPE_CONNECT_DETACHED
in libassuan.
Signed-off-by: NIIBE Yutaka <[email protected]>
|