aboutsummaryrefslogtreecommitdiffstats
path: root/gpgscm/scheme.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpgscm: Incorporate changes from GnuPG.NIIBE Yutaka2023-07-171-1/+5
| | | | | | | | | | | | | * gpgscm/scheme.c [__GNUC__] (type_to_string): Use __builtin_unreachable for GCC. * gpgscm/ffi.c (do_get_temp_path): Remove the last backslash. * gpgscm/ffi.c (do_chdir): Use gpg_error_from_syserror. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgscm: Build well even if NDEBUG defined.NIIBE Yutaka2019-01-231-1/+3
| | | | | | | | | | | | | * gpgscm/scheme.c (gc_reservation_failure): Fix adding ";". [!NDEBUG] (scheme_init_custom_alloc): Don't init seserved_lineno. -- In some build environment, NDEBUG is defined (although it's bad practice). This change supports such a situation. GnuPG-bug-id: 3959 Signed-off-by: NIIBE Yutaka <[email protected]>
* core: New functions gpgrt_abort and gpgrt_add_emergency_cleanup.Werner Koch2019-01-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* gpgscm: Suppress warnings for GCC > 6.NIIBE Yutaka2018-09-061-15/+14
| | | | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme.c (CASE): Use unused attribute for GCC > 6. (FALLTHROUGH): New for fallthrough. (Eval_Cycle): Use FALLTHROUGH. Remove not-needed comment of fallthrough. -- Since GCC combines C preprocessor macro expansion, the fallthrough comment doesn't work well to suppress warnings for -Wimplicit-fallthrough, near the macro CASE. To handle this problem, we use GCC's extension of unused label and fallthrough attributes. Signed-off-by: NIIBE Yutaka <[email protected]> Cherry-picked from gnupg master commit of: 99c17b970bc0ca7e0cff7fe031c6f9feb05af3ff
* gpgscm: Change license from GPLv3+ to LGPLv2.1+Werner Koch2017-10-051-0/+2
| | | | | | | | | -- All changes to TinySCHEME were done by employees of g10 Code GmbH and some minor things by a contractor. Signed-off-by: Werner Koch <[email protected]>
* gpgscm: Move files to a gpgscm subdirectory.Werner Koch2017-10-051-0/+6028
-- Note that we used git filter-branch --subdirectory-filter tests/gpgscm in gnupg master to filter out the gpgscm part. This commit merely moves these files to a subdirectory which will be used in libgpg-error for gpgscm. Signed-off-by: Werner Koch <[email protected]>