aboutsummaryrefslogtreecommitdiffstats
path: root/NEWS (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Post release updatesWerner Koch2020-08-241-0/+4
| | | | --
* Release 1.39libgpg-error-1.39gpgrt-1.39Werner Koch2020-08-241-3/+15
|
* core,w32: Add UTF-8 support to gpgrt_fopen, gpgrt_mkdir and gpgrt_chdir.Werner Koch2020-08-211-2/+5
| | | | | | | | | | | | | | | | | | | | * src/protos.h: New. * src/Makefile.am (libgpg_error_la_SOURCES): Add file. * src/gpgrt-int.h: Include protos.h. * src/sysutils.c (_gpgrt_mkdir) [W32]: Make UTF-8 aware. (_gpgrt_chdir) [W32]: Ditto. * src/w32-gettext.c: Include protos.h. (utf8_to_wchar): Allow for strings. (_gpgrt_utf8_to_wchar): New. (_gpgrt_free_wchar): New. * src/estream.c (map_w32_to_errno): Add more error codes. (_gpgrt_w32_set_errno): New. (any8bitchar) [W32]: New helper. (func_file_create) [W32]: Convert file name and use _wopen. -- GnuPG-bug-id: 4083 Signed-off-by: Werner Koch <[email protected]>
* estream: Add gpgrt_fcancelWerner Koch2020-06-261-0/+5
| | | | | | | | | | | | * src/estream.c (do_close): Add arg 'cancel_mode' and chnage all callers. (_gpgrt_fcancel): New. * src/gpg-error.def.in, src/gpg-error.vers: Add function. * src/visibility.c (gpgrt_fcancel): New. * src/gpg-error.h.in (gpgrt_fcancel): New. -- Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2020-05-291-0/+4
| | | | --
* Release 1.38libgpg-error-1.38gpgrt-1.38Werner Koch2020-05-291-1/+16
|
* core: Tweak the printing of headers in the --help output.Werner Koch2020-03-061-0/+2
| | | | | | | * src/argparse.c (show_help): Do not print empty sections between headers. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgrt_reallocarray.Werner Koch2020-03-031-0/+1
| | | | | | | | | | | | | | | | | * src/init.c (_gpgrt_reallocarray): New. * src/visibility.c (gpgrt_reallocarray): New. * src/gpg-error.vers, src/gpg-error.def.in: Add new function. * src/gpg-error.h.in: Add new interface. * tests/t-malloc.c: New. * tests/Makefile.am (TESTS): Add new test. -- Note that this function is different from the glibc function because it has an extra parameter which allows to clear the new elements. A realloc after a calloc with forgotten memset after it is a common source of error, thus we introduce this slightly different function. Signed-off-by: Werner Koch <[email protected]>
* core: Allow returning of attributes from gpgrt_argparser.Werner Koch2020-03-021-0/+4
| | | | | | | | | | | | | | | | | | * src/gpg-error.h.in (ARGPARSE_FLAG_WITHATTR): New. (ARGPARSE_ATTR_FORCE): New. (ARGPARSE_ATTR_IGNORE): New. (ARGPARSE_TYPE_MASK): Moved from argparse.c to here. * src/argparse.c: Always use macros for constants. (_gpgrt_argparse): Handle ARGPARSE_FLAG_WITHATTR. (arg_parse): Ditto. * tests/t-argparse.c (main): Add commented test case. -- This is a ABI compatible hack to allow the ignore and force attributes as well as to return which option has been ignored in a user file or on the command line. Signed-off-by: Werner Koch <[email protected]>
* core: Implement meta commands for the argparser.Werner Koch2020-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/argparse.c (opttable_t): Add new flags forced, ignore, and explicit_ignore. (struct _gpgrt_argparse_internal_s): Change flags to bitflags. Add several flags to support meta commands. (initialize): Clear them. (handle_meta_user): Use the new verbose flag. (handle_meta_force): Implement. (handle_meta_ignore): Implement. (handle_meta_echo): Support "-echo". (handle_meta_verbose): New. (handle_metacmd): New meta command verbose. Add always flag and move the detection of unexpected meta commands to here. (_gpgrt_argparse): Make use of the ignore and forced meta commands. (finish_read_sys): New. (_gpgrt_argparser): Support the verbose flag. Call finish_read_sys. (arg_parse): Ignore non-explicit ignored and all forced options. * tests/t-argparse.c (main): Fix printing of the ARGPARSE_CONFFILE case. New option 'M'. * tests/t-argparse.conf, tests/etc/t-argparse.conf: Various changes to test the new meta commands. -- For the command line we print a diagnostic if an ignored or forced options is used. However, we do not ignore options which are only set via [ignore-all]. The rationale for the latter is that an administrator can't be be required to unignore all options used by all modes, of say gpgme. Documentation of the meta commands will for now be added to GnuPG. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <[email protected]>
* core: Add parser for meta commands to gpgrt_argparser.Werner Koch2020-02-251-0/+3
| | | | | | | | | | | | | | | | | | | | | * src/gpg-error.h.in (ARGPARSE_INVALID_META): New (ARGPARSE_UNKNOWN_META, ARGPARSE_UNEXPECTED_META): New. * src/argparse.c (struct _gpgrt_argparse_internal_s): Add flag insysconfig. (initialize): Init flag. Add error strings. (_gpgrt_argparser): Set that flag. (_gpgrt_argparse): Add parsing of meta commands. * tests/etc/t-argparse.conf: Add some test cases. * tests/t-argparse.conf: Ditto. * tests/t-argparse.c (main): Die only after printing all warnings. -- Noe that this is just the framework to add meta commands to the global config file. We also need to get away from fixes test config files and create them on the fly to that we are able to test also errors. GnuPG-bug-id: 4788
* core: New flag ARGPARSE_FLAG_USERVERS to try versioned config files.Werner Koch2020-02-251-0/+1
| | | | | | | | | | | | * src/gpg-error.h.in (ARGPARSE_FLAG_USERVERS): New. * src/argparse.c: Include unistd.h. (try_versioned_conffile): New. (_gpgrt_argparser): Use it. -- This is neded to bring the versioned config files back to gpg. Signed-off-by: Werner Koch <[email protected]>
* core: New pseudo option ARGPARSE_PERMISSION_ERROR.Werner Koch2020-02-251-0/+1
| | | | | | | | | | | * src/gpg-error.h.in (ARGPARSE_PERMISSION_ERROR): New. * src/argparse.c (initialize): Add code to print this error. -- We need this option to reject certain config files if we detect a permission problem. Signed-off-by: Werner Koch <[email protected]>
* core: Add a high level option/argument parser.Werner Koch2020-02-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gpg-error.h.in (GPGRT_CONFDIR_USER, GPGRT_CONFDIR_SYS): New consts. (ARGPARSE_FLAG_SYS, ARGPARSE_FLAG_USER, ARGPARSE_FLAG_VERBOSE) (ARGPARSE_NO_CONFFILE, ARGPARSE_CONFFILE, ARGPARSE_OPT_CONFFILE): New consts. (ARGPARSE_conffile, ARGPARSE_noconffile): New macros. (gpgrt_set_confdir): New func. (gpgrt_argparser): New func. * src/argparse.c (confdir): New var. (enum argparser_states): New. (struct _gpgrt_argparse_internal_s): Add a couple of new fields. (initialize): Init them. (any_opt_conffile): New. (_gpgrt_argparser): New. (_gpgrt_set_confdir): New. * src/visibility.c (gpgrt_argparser): New. (gpgrt_set_confdir): New. * src/gpg-error.def.in, src/gpg-error.vers: Add those functions. * tests/t-argparse.c (main): Reworked. * tests/etc/t-argparse.conf: New file. * tests/t-argparse.conf: New file. -- gpgrt_argparser is a high level version of gpgrt_argparse. It handles reading of configuration files internally and allows allows for a global configuration file. The design is so that it minimizes the work to replace the existing option parsing in gpg and friends by this one and to allow global configuration files for them. This is the just the basic code which should allow replacement of the parsers. A forthcoming patch will implement flags for options given in the global config file. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <[email protected]>
* core: Add gpgrt_fnameconcat and gpgrt_absfnameconcat.Werner Koch2020-02-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpg-error.h.in (gpgrt_fnameconcat): New. (gpgrt_absfnameconcat): New. * src/visibility.c (gpgrt_fnameconcat, gpgrt_absfnameconcat): New. * src/stringutils.c: New file. (_gpgrt_vfnameconcat): New. (_gpgrt_fnameconcat, _gpgrt_absfnameconcat): New. * src/gpg-error.def.in: Add new functions. * src/gpg-error.vers: Ditto. * src/sysutils.c: Include pwd.h. (_gpgrt_getpwdir): New. * configure.ac: Test for pwd.h, getpwnam, getpwuid, and their _r variants. * src/Makefile.am (libgpg_error_la_SOURCES): Add new file. * tests/t-stringutils.c: New. * tests/t-common.h (xmalloc, xstrdup, xfree): New. (die): Kludge to avoid compiler warnings. -- The new functions are based on the code of make_filename from GnuPG. They have been written by me ages ago with only minor modifications by David Shaw. I re-license them from LGPL-3.0+ OR GPL-2.0+ to LGPL-2.1-or-later. Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2020-02-071-0/+4
| | | | --
* Release 1.37libgpg-error-1.37gpgrt-1.37Werner Koch2020-02-071-2/+58
|
* New error codes for SQLiteWerner Koch2019-12-131-0/+2
| | | | | | | * src/err-codes.h.in: Add GPG_ERR_SQL_ codes. * src/gpg-error.h.in (gpg_err_code_from_sqlite): New. Signed-off-by: Werner Koch <[email protected]>
* post release updatesWerner Koch2019-03-191-0/+4
| | | | --
* Release 1.36libgpg-error-1.36gpgrt-1.36Werner Koch2019-03-191-1/+8
| | | | | | * configure.ac: Bump LT version to C27/A27/R0. Signed-off-by: Werner Koch <[email protected]>
* New error codes NO_AUTH and BAD_AUTHWerner Koch2019-02-111-0/+6
| | | | | | | | | -- In particular for PIV cards ithe use of BAD_PIN sounds worong, thus we now use dedicated codes. Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2019-01-281-0/+4
| | | | --
* Release 1.35libgpg-error-1.35gpgrt-1.35Werner Koch2019-01-281-1/+3
| | | | | | | | | | | | -- Because gpgrt-config is not anymore generated from gpgrt-config.in and a stale (generated) gpgrt-config was hanging around in the build directory the make distcheck target didn't caught this situation and we accidently distributed the old gpgrt-config from the build directory. Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2019-01-161-0/+4
| | | | --
* Release 1.34libgpg-error-1.34gpgrt-1.34Werner Koch2019-01-161-1/+9
| | | | | | * configure.ac: Bump LT version to C26/A26/R0. Signed-off-by: Werner Koch <[email protected]>
* core: New functions gpgrt_abort and gpgrt_add_emergency_cleanup.Werner Koch2019-01-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/init.c (emergency_cleanup_list): New gloabl var. (_gpgrt_add_emergency_cleanup): New. (_gpgrt_abort): New. Repalce all calls to abort by this. Also replace all assert by either log_assert or a stderr output followed by a _gpgrt_abort. (run_emergency_cleanup): New. * src/visibility.c (gpgrt_add_emergency_cleanup): New public API. (gpgrt_abort): New public API. -- Libgcrypt uses its own assert function which makes sure to terminate the secure memory. This is safe as log as an assert is triggered internally in Libgcrypt. GnuPG runs emergency cleanup handlers right before log_fatal etc to tell Libgcrypt to terminate the secure memory. With the move of the logging function to gpgrt in gnupg 2.3 this did not anymore. Thus we now provide a mechanism in gpgrt to do right that. Eventually Libgcrypt can also make use of this. What this does not handle are calls to abort or failed asserts in external libraries or in libc. We can't do anything about it in a library because a library may not setup signal handlers. Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2018-12-071-0/+4
| | | | --
* Release 1.33.libgpg-error-1.33gpgrt-1.33Werner Koch2018-12-071-2/+19
| | | | | | | * configure.ac: Set LT version to C25/A25/R0. GnuPG-bug-id: 4205 Signed-off-by: Werner Koch <[email protected]>
* core: New functions gpgrt_fprintf_sf anf gpgrt_fprintf_sf_unlocked.Werner Koch2018-11-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpg-error.h.in (gpgrt_string_filter_t): New type. (gpgrt_fprintf_sf, gpgrt_fprintf_sf_unlocked): New. * src/gpg-error.vers, src/gpg-error.def.in: Add them. * src/visibility.c (gpgrt_fprintf_sf): New. (gpgrt_fprintf_sf_unlocked): New. * src/estream-printf.c (pr_string): Add and use args sf, sfvalue and string_no. (do_format): Add args sf and sfvalue. Keep a string format counter. (_gpgrt_estream_format): Add args sf and sfvalue. Change all callers to provide NULL for them. * src/estream.c (_gpgrt_vfprintf_unlocked, _gpgrt_vfprintf): Add sf and sfvalue and adjust all callers. (do_print_stream): Ditto. * tests/t-printf.c (stream_to_string): New. (struct sfstate_s): New. (string_filter): New. (check_fprintf_sf): New. (main): Call new test. -- The actual reason to implement these functions is to enhance the internal logging function with a filter to sanitized strings so that control values or other things can be quoted. Signed-off-by: Werner Koch <[email protected]>
* core: New API gpgrt_cmp_versionWerner Koch2018-11-151-0/+5
| | | | | | | | | | | | | | | | | | | | | * src/gpg-error.h.in: New API gpgrt_cmp_version. * src/visibility.c (gpgrt_cmp_version): New wrapper. * src/version.c (parse_version_string): Revamped. (do_cmp_version): New. (_gpgrt_cmp_version): New. (_gpg_error_check_version): Re-implemented using the new func. * tests/t-version.c: Include t-common.h. (t_gpgrt_cmp_version): New test. (main): Run new test. Change test for new version number to require a 2 level number. -- We have implementations of very similar functions in all out libs. Thus it makes sense to provide a generic version. This version is actually derived from the ftp-indexer.c we use for the gnupg website (see the gnupg-doc repo). Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2018-07-121-0/+4
| | | | --
* Release 1.32libgpg-error-1.32Werner Koch2018-07-121-1/+9
| | | | Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2018-05-021-0/+4
| | | | --
* Release 1.31.libgpg-error-1.31Werner Koch2018-05-021-2/+6
| | | | * configure.ac: Set LT version to C24/A24/R2.
* Post release updatesWerner Koch2018-04-301-0/+4
| | | | --
* Release 1.30.libgpg-error-1.30Werner Koch2018-04-301-1/+5
| | | | | | * configure.ac: Bump LT version to C24/A/24/R1. Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2018-04-111-0/+4
| | | | --
* Release 1.29libgpg-error-1.29gpgrt-1.29Werner Koch2018-04-111-1/+1
| | | | | | * configure.ac: Bump LT version to C24/A24/R0. Signed-off-by: Werner Koch <[email protected]>
* doc: Update NEWSWerner Koch2018-03-221-0/+9
| | | | --
* core: Add Base-64 encoder.Werner Koch2018-03-221-6/+9
| | | | | | | | | | | | | | | | | | | | | | | * src/b64enc.c: Change to fit into libgpg-error. * src/Makefile.am: Add b64enc.c * src/b64dec.c: Use xtrymalloc etc. Always use gpg_err_code_t. (_gpgrt_b64dec_start): Set decoder flag (_gpgrt_b64dec_finish): Check for conflict. (_gpgrt_b64state): Move to ... * src/gpgrt-int.h: here. Add new fields. * src/visibility.c (gpgrt_b64enc_start): New. (gpgrt_b64enc_write): New. (gpgrt_b64enc_finish): New. * src/gpg-error.vers, src/gpg-error.def.in: Add new functions. * src/gpg-error.h.in: Ditto. * src/visibility.h: Ditto. * tests/t-b64dec.c: Remove. * tests/t-b64.c: New. * tests/Makefile.am (TESTS): Replace t-b64dec by t-b64. -- Signed-off-by: Werner Koch <[email protected]>
* core: Add public function gpgrt_usage.Werner Koch2018-03-211-0/+1
| | | | | | * src/visibility.c (gpgrt_usage): New. Signed-off-by: Werner Koch <[email protected]>
* core: Add the group of argparse functions.Werner Koch2018-03-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/visibility.c (gpgrt_argparse): New. (gpgrt_strusage): New. (gpgrt_set_strusage): New. (gpgrt_set_usage_outfnc): New. (gpgrt_set_fixed_string_mapper): New. * src/gpg-error.def.in, src/gpg-error.vers: Add new functions. * src/gpg-error.h.in: Add ARGPARSE macros from the former argparse.h. (gpgrt_argparse_t): New. (gpgrt_opt_t): New. * configure.ac (AH_BOTTOM): Request argparse macros. * src/Makefile.am (libgpg_error_la_SOURCES): Add argparse.c. * src/argparse.h: Remove. * src/argparse.c: Revamp to fit into libgpg-error. (_gpgrt_argparse): New. (_gpgrt_usage): Rename from usage. (_gpgrt_strusage): Rename from strusage. Define two new levels and templates for three common licenses. (_gpgrt_set_strusage): Rename from set_strusage. (_gpgrt_set_usage_outfnc): New. (_gpgrt_set_fixed_string_mapper): New. * tests/t-argparse.c: New. -- These functions are in use by GnuPG and other software for 20 years and it makes sense to have them always available instead of copying and maintaing the source in several projects. Note that there are minor changes in the API compared to GnuPG. Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2018-03-131-0/+4
| | | | --
* Release 1.28libgpg-error-1.28gpgrt-1.28Werner Koch2018-03-131-2/+6
| | | | Signed-off-by: Werner Koch <[email protected]>
* build: Update copyright notices and remove gpgscm from the release.Werner Koch2018-03-131-0/+48
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* build: Install yat2m.Werner Koch2017-07-051-0/+3
| | | | | | | * doc/Makefile.am (install-exec-hook): New. (uninstall-local): Uninstall yat2m. Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2017-02-281-0/+7
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* Release 1.27libgpg-error-1.27Werner Koch2017-02-281-5/+10
| | | | | | | | | | * configure.ac: Bump LT version to C22/A22/R0. -- Note that C21/A21/R0 was used in 1.26 but later lost in the repo due to a merge. Signed-off-by: Werner Koch <[email protected]>
* New error code GPG_ERR_INV_NAME.Werner Koch2017-02-191-0/+5
| | | | Signed-off-by: Werner Koch <[email protected]>
* Add Base64 decoder.NIIBE Yutaka2017-02-011-0/+7
| | | | | | | | | | | | | | | | * NEWS: Add interface changes. * src/Makefile.am (libgpg_error_la_SOURCES): Add b64dec.c. * src/b64dec.c: New. Taken from gpgme. Prefix function names with _gpgrt_. Change API a bit, not exposing the structure. * src/gpg-error.def.in: Export Base64 functions. * src/gpg-error.vers: Likewise. * src/visibility.c, src/visibility.h: Likewise. * src/gpg-error.h.in: Add Base64 struct and functions. * src/gpgrt-int.h: Add Base64 internal functions. * tests/Makefile.am (TESTS): Add t-b64dec. * tests/t-b64dec.c: New. Signed-off-by: NIIBE Yutaka <[email protected]>