aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '16821293' into gniibe/t8264gniibe/t8264NIIBE Yutaka2026-05-181-7/+7
|\
| * io:w32:spawn_sans_helper: Fix inherit of HANDLES to child process.NIIBE Yutaka2026-05-181-7/+7
| | | | | | | | | | | | | | | | | | | | | | * src/w32-io.c (_gpgme_io_spawn_sans_helper): Inherit HANDLES correctly, even when an argument is not modified. -- Fixes-commit: 64f80903ec9bc8897f9b2dcebb7068c02ff9ae07 GnuPG-bug-id: 7127 Signed-off-by: NIIBE Yutaka <[email protected]>
* | w32:io: Serialize the access to ctx->* between reader/writer and io.NIIBE Yutaka2026-05-181-30/+40
|/ | | | | | | | | | * src/w32-io.c (reader, writer): Protect shared access to ctx->* and use internal buffer. -- GnuPG-bug-id: 8264 Signed-off-by: NIIBE Yutaka <[email protected]>
* Support setting attributes for CMS signatures.Werner Koch2026-05-176-16/+246
| | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_SIG_NOTATION_UNPROTECTED): New. (struct _gpgme_sig_notation): Add field 'unprotected'. * src/sig-notation.c (sig_notation_set_flags): Set flag. * src/engine-gpgsm.c (gpgsm_sign): Implement setting of notations. * tests/run-support.h: Add conversion macros. * tests/run-sign.c (struct mystringlist_s): New. (xmalloc): New. (xstrtokenize): New. (print_result): Add arg fp and adjust callers. (main): Add options --binary and --notation.
* engine:gpgconf: Increase the buffer size.NIIBE Yutaka2026-05-151-1/+1
| | | | | | | | * src/engine-gpgconf.c (gpgconf_read): Update to 2048. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* w32:tests: Use pinentry executable instead of script.NIIBE Yutaka2026-05-154-24/+55
| | | | | | | | | | | | * tests/gpg/pinentry: Remove. * tests/gpg/pinentry.c: New. * tests/gpg/Makefile.am (EXTRA_DIST): Remove pinentry script. (noinst_PROGRAMS): Add pinentry executable and its rules to build. * tests/json/Makefile.am (gpg-agent.conf): Use pinentry executable. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* w32:tests: Fix Makefiles and start-stop-agent for EXEEXT.NIIBE Yutaka2026-05-144-20/+24
| | | | | | | | | | | * tests/gpg/Makefile.am: Care about EXEEXT. * tests/gpgsm/Makefile.am: Likewise. * tests/json/Makefile.am: Likewise. * tests/start-stop-agent: Use EXEEXT. Handle \r correctly. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* w32: Add cast for assuan_fd_t.NIIBE Yutaka2026-05-144-15/+17
| | | | | | | | | | | | * src/assuan-support.c (my_pipe, my_close, my_read, my_write, my_spawn) (my_socketpair, my_connect): Cast assuan_fd_t between int. * src/engine-assuan.c (start): Likewise. * src/engine-g13.c (start): Likewise. * src/engine-gpgsm.c (gpgsm_new, prepare): Likewise. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Make GPGME_DECRYPT_SESSION_HASH also work for gnupg 2.2.55Werner Koch2026-05-112-5/+23
| | | | | * src/engine-gpg.c (have_usable_session_hash): New. (gpg_decrypt): Use here.
* New decryption flag GPGME_DECRYPT_SESSION_HASH.Werner Koch2026-04-236-3/+50
| | | | | | | | | | | | | | * src/gpgme.h.in (_gpgme_op_decrypt_result): Add field session_hash. (gpgme_decrypt_flags_t): Add flag GPGME_DECRYPT_SESSION_HASH. (gpgme_status_code_t): Add flags GPGME_STATUS_SESSION_HASH. * src/status-table.c (status_table): Add "SESSION_HASH". * src/decrypt.c (release_op_data): Free new field. (_gpgme_decrypt_status_handler): Handle new status code. * src/engine-gpg.c (gpg_decrypt): Implement GPGME_DECRYPT_SESSION_HASH. * tests/run-decrypt.c (print_result): Print session_hash. (main): Add option --show-session-hash.
* indent: Align a debug output.Werner Koch2026-04-231-2/+2
| | | | * src/dirinfo.c (get_gpgconf_item): Add blanks to a string.
* Add flag fields is_de_vs and beta_compliance to encryption resultsIngo Klöcker2026-04-216-2/+35
| | | | | | | | | | | | | | | | | | | * src/encrypt.c (_gpgme_encrypt_status_handler): Handle the compliance status line. * src/gpgme.h.in (struct _gpgme_op_encrypt_result): Add fields is_de_vs and beta_compliance. (gpgme_status_code_t): Add status code for the encryption compliance status line. * src/status-table.c (status_table): Add encryption compliance status line. * tests/run-encrypt.c (print_encrypt_result): Print compliance. -- This allows checking whether the encrypt operation is in compliance with the VS-NfD criteria. GnuPG-bug-id: 6702
* doc: Fix argument type of gpgme_set_senderIngo Klöcker2026-04-211-1/+1
| | | | --
* Update NEWSIngo Klöcker2026-03-241-0/+4
| | | | --
* gpgsm: Read all pending lines before waiting for more dataIngo Klöcker2026-03-241-68/+74
| | | | | | | | | | | | | | | | | * src/engine-gpgsm.c (gpgsm_assuan_simple_command): Add a loop to read all pending lines. -- This fixes the problem that gpgme waited indefinitely for the completion of the "simple command" if the reply consisted of more than one line. For example, if an invalid recipient is sent to gpgsm then gpgsm replies something like S INV_RECP 10 798413A50E4C66292914361E8358AC45668F412A<LF> ERR 50331746 Not trusted <GpgSM><LF> gpgsm_assuan_simple_command read the first line and then waited forever for more data sent by gpgsm. GnuPG-bug-id: 8187
* Fix passphrase cancel handling.NIIBE Yutaka2026-03-181-3/+11
| | | | | | | | | | | | | * src/passphrase.c (op_data_t): Add "canceled" field. (_gpgme_passphrase_status_handler): Mark "canceled" when it sees GPGME_STATUS_CANCELED_BY_USER. Reset at GPGME_STATUS_PINENTRY_LAUNCHED. Return GPG_ERR_CANCELED when "canceled" is marked at GPGME_STATUS_EOF. -- GnuPG-bug-id: 8172 Signed-off-by: NIIBE Yutaka <[email protected]>
* Handle the case when pinentry is invoked multiple times.NIIBE Yutaka2026-03-101-0/+5
| | | | | | | | | | * src/passphrase.c (_gpgme_passphrase_status_handler): Reset no_passphrase and bad_passphrase field. -- GnuPG-bug-id: 7339 Signed-off-by: NIIBE Yutaka <[email protected]>
* Don't cap ISO dates beyond year 2037 on WindowsIngo Klöcker2026-02-051-0/+2
| | | | | | | | | | | * src/conversion.c (_gpgme_parse_timestamp): On Windows, disable hack for 32-bit time_t. -- On Windows, SystemTimeToFileTime is used for converting the timestamp to seconds since epoch and this API doesn't have a year 2038 problem. GnuPG-bug-id: 8088
* Fix build with libassuan 2.Collin Funk2026-01-281-0/+1
| | | | | | | | | | * src/assuan-support.c: Include util.h for the assuan_pid_t definition. -- Fixes-commit: 77b9e1de7d7614e8e7eb79f507a1de292efb30a7 Signed-off-by: Collin Funk <[email protected]>
* build: Update build-aux and m4 from libgpg-error and libassuan.NIIBE Yutaka2026-01-1511-2078/+3918
| | | | | | | | | | | * build-aux/compile, build-aux/depcomp, build-aux/ltmain.sh: Update. * build-aux/mdate-sh, build-aux/missing: Likewise. * m4/gpg-error.m4, m4/libassuan.m4, m4/ltoptions.m4: Likewise. * m4/ltsugar.m4, m4/ltversion.m4, m4/lt~obsolete.m4: Likewise. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Allow setting export filters when exporting keysIngo Klöcker2026-01-1411-14/+71
| | | | | | | | | | | | | | | | | | | | | | * src/context.h (struct gpgme_context): New field export_filter. * src/engine-backend.h (struct engine_ops): Add arg export_filter to field 'export' and field 'export_ext'. * src/engine-gpg.c (export_common): Add arg export_filter and pass option --export-filter with argument value to gpg. (gpg_export, gpg_export_ext): Add arg export_filter and pass it to export_common. Adjust all callers of the two functions. * src/engine-gpgsm.c (gpgsm_export, gpgsm_export_ext): Add dummy arg export_filter. * src/gpgme.c (gpgme_release): Free 'export_filter'. (gpgme_set_ctx_flag, gpgme_get_ctx_flag): New flag "export-filter". * tests/run-export.c (main): Add option --export-filter. -- This makes the --export-filter option available in the GPGME API for key exports. GnuPG-bug-id: 8033
* tests: It's start-stop-agent which invokes gpg-agent.NIIBE Yutaka2026-01-092-14/+0
| | | | | | | | | | | | | * tests/gpgsm/Makefile.am (gpgsm.conf): Don't touch agent-program. * tests/start-stop-agent: Don't modify gpg.conf and gpgsm.conf. -- When start-stop-agent fails, this allows invocation of gpg-agent by gpg/gpgsm. This enables semihosted build. Fixes-commit: 9cd2b58dfb2c21cce64520cf4c726859b583d14e Signed-off-by: NIIBE Yutaka <[email protected]>
* w32:spawn: Support the case without no helper.NIIBE Yutaka2026-01-091-37/+239
| | | | | | | | | | * src/w32-io.c (_gpgme_io_spawn_sans_helper): New. (_gpgme_io_spawn): Use _gpgme_io_spawn_sans_helper. -- GnuPG-bug-id: 7127 Signed-off-by: NIIBE Yutaka <[email protected]>
* w32: Use SetHandleInformation for _gpgme_io_pipe.NIIBE Yutaka2026-01-081-35/+9
| | | | | | | | | * src/w32-io.c (_gpgme_io_pipe): Create a pipe with bInheritHandle = TRUE, and then clear an end by SetHandleInformation. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* w32: Fix for process handle.NIIBE Yutaka2026-01-082-5/+17
| | | | | | | | | | * src/assuan-support.c (my_waitpid): Call __assuan_waitpid for libassuan 3. * src/w32-io.c (_gpgme_io_spawn): Use process handle for libassuan 3. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* tests:gpg: Use GPGME_PINENTRY_MODE_LOOPBACK for tests.NIIBE Yutaka2025-12-2513-15/+47
| | | | | | | | | | | | | | | | | | | | | | | * tests/gpg/t-decrypt-verify.c (main): Call gpgme_set_pinentry_mode. * tests/gpg/t-decrypt.c (main): Likewise. * tests/gpg/t-edit-sign.c (main): Likewise. * tests/gpg/t-edit.c (main): Likewise. * tests/gpg/t-encrypt-mixed.c (main): Likewise. * tests/gpg/t-encrypt-sign.c (main): Likewise. * tests/gpg/t-encrypt-sign.c (main): Likewise. * tests/gpg/t-encrypt-sym.c (main): Likewise. * tests/gpg/t-file-name.c (main): Likewise. * tests/gpg/t-sig-notation.c (main): Likewise. * tests/gpg/t-sign.c (main): Likewise. * tests/gpg/t-signers.c (main): Likewise. * tests/gpg/t-thread1.c (main): Likewise. * tests/gpg/Makefile.am (gpg-agent.conf): We use the passphrase_cb. -- We can't remove tests/gpg/pinentry since it's used by tests/json. Signed-off-by: NIIBE Yutaka <[email protected]>
* w32: Fix debug print on 64-bit machine.NIIBE Yutaka2025-12-241-17/+19
| | | | | | | | | | | * src/w32-io.c (release_hddesc): Cast SOCKET to (void *) and use %p. (reader, create_reader, destroy_reader, writer): Likewise. (create_writer, find_writer): Likewise. (_gpgme_io_socket): Likewise. Add "z" modifier for NFDS. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* w32: Fix spawn for 64-bit machine.NIIBE Yutaka2025-12-236-23/+31
| | | | | | | | | | | | | | | | | | | | | | * src/priv-io.h (struct spawn_fd_item_s): Use HANDLE for peer_name field. * src/dirinfo.c (read_gpgconf_dirs): Use ASSUAN_INVALID_FD for default value for peer_name field of CFD. * src/engine-gpgconf.c (gpgconf_read, gpgconf_write) (gpgconf_query_swdb): Likewise. * src/version.c (_gpgme_get_program_version): Likewise. * src/w32-io.c (handle_to_fd): Remove. (_gpgme_io_spawn): Assign HD to the peer_name field. Use %p for printing the value of peer_name field. * src/gpgme-w32spawn.c (my_spawn): Use peer_name field with no cast. Use %p for printing the value of peer_name field. Remove wrong CloseHandle calls. (translate_get_from_file): Use HANDLE type for the TO variable. Use strtoull on 64-bit machine. Use ASSUAN_INVALID_FD. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix a regression wrt the auto-key-locate option.NIIBE Yutaka2025-12-221-1/+1
| | | | | | | | | | * src/keylist.c (gpgme_get_key): Don't call gpgme_set_ctx_flag when it's "". -- Fixes-commit: 964bc14ccfba84b050c20dc5035414438b10bd74 Signed-off-by: NIIBE Yutaka <[email protected]>
* tests:w32: Use Sleep instead of _sleep.NIIBE Yutaka2025-12-221-1/+1
| | | | | | | | * tests/gpg/t-wait.c [HAVE_W32_SYSTEM] (sleep): Use Sleep. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix function prototypes to match ones in libassuan.NIIBE Yutaka2025-12-152-4/+22
| | | | | | | | | | | * src/assuan-support.c (my_read, my_write): Use ssize_t. (my_socket, my_connect): Use int instead of assuan_fd_t for older libassuan. * tests/gpg/t-encrypt-large.c (read_cb, write_cb): Use gpgme_ssize_t. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix build with libassuan 2.NIIBE Yutaka2025-12-151-0/+4
| | | | | | | | * src/util.h (assuan_pid_t): Typedef if not available. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix portability for the use of the assuan types.NIIBE Yutaka2025-12-1111-16/+17
| | | | | | | | | | | | | | | | | | | * src/assuan-support.c (my_spawn, my_waitpid): Use assuan_pid_t. (my_socket, my_connect): Use assuan_fd_t. * src/engine-gpg.c (start): Remove unused PID. * src/engine-spawn.c (engspawn_start): Likewise. * src/gpgme-w32spawn.c: Add util.h for assuan types. * src/version.c: Likewise. * src/wait-user.c: Likewise. * src/posix-io.c (_gpgme_io_spawn): Use assuan_pid_t. * src/priv-io.h (_gpgme_io_spawn): Likewise. * src/w32-io.c (_gpgme_io_spawn): Likewise. * src/wait-private.c: Include util.h earlier. -- GnuPG-bug-id: 7968 Signed-off-by: NIIBE Yutaka <[email protected]>
* w32: Add a cast for GetProcAddress, add AM_CFLAGS for w32spawn.NIIBE Yutaka2025-12-112-2/+2
| | | | | | | | | | | | * src/Makefile.am (gpgme_w32spawn_CFLAGS): Add AM_CFLAGS. * src/gpgme-w32spawn.c (my_spawn): GetProcAddress returns an address for the symbol. The correctness should be checked by human when writing the code (not by the function prototype). -- GnuPG-bug-id: 7968 Signed-off-by: NIIBE Yutaka <[email protected]>
* Avoid K&R-style function definition.NIIBE Yutaka2025-12-051-3/+1
| | | | | | | | * src/stpcpy.c (__stpcpy): Supply function prototype. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Treat empty DISPLAY envvar as unset.Werner Koch2025-11-145-5/+16
| | | | | | | | | | | | | * src/engine-gpg.c (gpg_new): Do not pass option --display if DISPLAY is set to the empty string. * src/engine-gpgsm.c (gpgsm_new): Likewiese for sending the display option. * src/engine-g13.c (g13_new): Ditto. * src/engine-assuan.c (llass_new): Ditto. * src/engine-uiserver.c (uiserver_new): Ditto. -- GnuPG-bug-id: 7919
* doc: Add DCO for Chandler DavisWerner Koch2025-11-131-0/+3
| | | | --
* doc: Remove duplicate `is_cardkey` from `gpgme_subkey_t`.Chandler Davis2025-11-131-5/+1
| | | | --
* gpgme_get_key: respect caller's ctx configurationGiacomo Tesio2025-11-101-0/+5
|
* doc: Clarify that keygrip lists multiple keygrips for combined algosIngo Klöcker2025-10-292-3/+5
| | | | | | | | | * doc/gpgme.texi (section Data type gpgme_subkey_t): Amend documentation of keygrip member. * src/gpgme.h.in (_gpgme_subkey): Ditto. -- GnuPG-bug-id: 7883
* Improve tracing for engine-gpgsmWerner Koch2025-10-271-5/+29
| | | | | * src/engine-gpgsm.c (gpgsm_assuan_simple_command): More tracing calls.
* Slight changes to comments and trace output.Werner Koch2025-10-144-4/+5
| | | | --
* build: Avoid using -o for test(1).NIIBE Yutaka2025-09-251-2/+2
| | | | | | | | | * configure.ac: Use || in shell level, instead of -o of test. -- GnuPG-bug-id: 7807 Signed-off-by: NIIBE Yutaka <[email protected]>
* Post release updatesWerner Koch2025-09-232-1/+5
| | | | --
* Release 2.0.1gpgme-2.0.1Werner Koch2025-09-232-2/+14
|
* Adjust configure and gpgme.m4 for test(1) -a changesWerner Koch2025-09-232-5/+5
| | | | | | | -- See GnuPG-bug-id: 7807
* Update autogen.sh, gpg-error.m4, and libassuan.m4 from upstream.Werner Koch2025-09-233-7/+9
| | | | | | -- See GnuPG-bug-id: 7807
* gpgsm: Extend gpgsm_assuan_simple_command to consule diag output.gniibe/t7759NIIBE Yutaka2025-08-291-0/+35
| | | | | | | | | | * src/engine-gpgsm.c (gpgsm_assuan_simple_command): Take care about diag output. -- GnuPG-bug-id: 7759 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgsm: Introduce two phase interactions to consume diag output.NIIBE Yutaka2025-08-291-24/+89
| | | | | | | | | | | | | | | * src/engine-gpgsm.c (prepare): Move the first part from... (start): ... here. (gpgsm_decrypt, gpgsm_delete, gpgsm_encrypt) (gpgsm_export, gpgsm_export_ext, gpgsm_genkey) (gpgsm_import, gpgsm_keylist, gpgsm_keylist_ext) (gpgsm_sign, gpgsm_verify, gpgsm_getauditlog) (gpgsm_passwd): Follow the change. -- GnuPG-bug-id: 7759 Signed-off-by: NIIBE Yutaka <[email protected]>
* w32: gpgme-w32spawn now appends to the debug log if enabled.Werner Koch2025-08-081-1/+6
| | | | --