aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add kmac.c.gniibe/kemNIIBE Yutaka2024-03-294-55/+155
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix pkdecrypt.c, now works with the test vector.NIIBE Yutaka2024-03-211-8/+7
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix computation of PQC KEM.NIIBE Yutaka2024-03-201-15/+19
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix cmd_sigkey and agent_hybrid_kem_decap.NIIBE Yutaka2024-03-192-4/+2
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix since AES KeyWrap is always with AES256 for hybrid KEM.NIIBE Yutaka2024-03-071-7/+8
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* Experiment with hybrid KEM.NIIBE Yutaka2024-03-071-3/+304
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* agent: PKDECRYPT KEM-mode can be used by CMS too.NIIBE Yutaka2024-03-043-12/+25
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* agent: Add --another option for hybrid crypto.NIIBE Yutaka2024-03-012-4/+15
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* Experiment to use KEM interface for Curve25519 ECDH.NIIBE Yutaka2024-01-269-13/+253
| | | | | | Works now with hard-coded, but not checked things. Signed-off-by: NIIBE Yutaka <[email protected]>
* Experiment with new KEM API of libgcrypt for Curve25519.NIIBE Yutaka2024-01-241-21/+144
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* kbx: Have threads monitoring socket takeover and homedir if no inotify.NIIBE Yutaka2024-01-241-117/+229
| | | | | | | | | | | | | | | | | | * kbx/keyboxd.c (CHECK_PROBLEMS_INTERVAL): New. (have_homedir_inotify): Remove the global. [HAVE_W32_SYSTEM] (create_an_event): New. (handle_tick): Remove. (handle_signal): Add handling SIGCONT. (keyboxd_kick_the_loop): New. (handle_connections): Spawn check_own_socket_thread and check_others_thread if no inotify. (check_own_socket_thread, check_others_thread): New. -- This change follows the change of gpg-agent. Signed-off-by: NIIBE Yutaka <[email protected]>
* common: Remove t-b64.c.NIIBE Yutaka2023-12-262-156/+1
| | | | | | | | | | | * common/Makefile.am (module_tests): Remove t-b64. (t_b64_LDADD): Remove. * common/t-b64.c: Remove. -- GnuPG-bug-id: 6734 Signed-off-by: NIIBE Yutaka <[email protected]>
* agent,kbx: Fix reliable_homedir_inotify (2/2).NIIBE Yutaka2023-12-262-22/+12
| | | | | | | | | | | | * agent/gpg-agent.c (main): The value of reliable_homedir_inotify doesn't not related to nodetach, and it's only zero in the specific condition. * kbx/keyboxd.c (handle_connections): Remove the last argument. (main): Remove reliable_homedir_inotify, as it's always one. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* agent,kbx: Fix reliable_homedir_inotify (1/2).NIIBE Yutaka2023-12-262-23/+22
| | | | | | | | | | | | | | | * agent/gpg-agent.c (reliable_homedir_inotify): Remove the global. (handle_connections): Add reliable_homedir_inotify as an arg. Don't call gnupg_inotify_watch_delete_self when it's not reliable. (check_others_thread): No check of reliable_homedir_inotify repeatedly in the loop. * kbx/keyboxd.c (reliable_homedir_inotify): Remove the global. (handle_connections): Add reliable_homedir_inotify as an arg. (handle_tick): No check of reliable_homedir_inotify in the loop. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Merge branch 'STABLE-BRANCH-2-4'Werner Koch2023-12-2238-367/+1146
|\ | | | | | | | | | | | | | | | | | | -- Fixed conflicts in NEWS g10/encrypt.c sm/encrypt.c sm/sign.c
| * doc: Explain why socket activation is a problemWerner Koch2023-12-221-0/+30
| | | | | | | | --
| * common: Add keyword socketdir to gpgconf.ctlWerner Koch2023-12-223-55/+118
| | | | | | | | | | | | | | | | | | | | | | * common/homedir.c (enum wantdir_values): New enums. (unix_rootdir): Change arg to use the enums. Adjust all callers. Add support for the socketdir keyword. (_gnupg_socketdir_internal): Take care of the socketdir keyword in gpgconf.ctl. * doc/tools.texi (Files used by gpgconf): Briefly explain the gpgconf.ctl syntax.
| * scd:openpgp: Add the length check for new PIN.NIIBE Yutaka2023-12-221-16/+32
| | | | | | | | | | | | | | | | | | | | * scd/app-openpgp.c (do_change_pin): Make sure new PIN length is longer than MINLEN. -- GnuPG-bug-id: 6843 Signed-off-by: NIIBE Yutaka <[email protected]>
| * tools: Remove the dotlock tool.NIIBE Yutaka2023-12-212-122/+1
| | | | | | | | | | | | | | | | | | | | | | * tools/Makefile.am (libexec_PROGRAMS): Remove dotlock. * tools/dotlock.c: Remove. -- It's integrated into gpgconf (--lock/--unlock). Signed-off-by: NIIBE Yutaka <[email protected]>
| * scd:p15: Add a diagnostic for unsupported DTRUST4 features.Werner Koch2023-12-201-1/+4
| | | | | | | | * scd/app-p15.c (do_sign): Add a diagnostic.
| * scd:p15: Add support for D-Trust Card 4.1/4.4Mario Haustein via Gnupg-devel2023-12-201-9/+71
| | | | | | | | | | | | | | | | | | * scd/app-p15.c (CARD_PRODUCT_DTRUST4) New. (app_select_p15): This cards uses a different AID for PKCS#15 application (do_sign): The card doesn't support MSE SET, but requires MSE RESTORE to a predefined template. (do_decipher): Ditto.
| * scd:p15: Add support for CardOS 5.4Mario Haustein via Gnupg-devel2023-12-201-2/+8
| | | | | | | | * scd/app-p15.c (CARD_TYPE_CARDOS_54): New.
| * doc: Explain what to put into mailcap for gpg-wks-client.Werner Koch2023-12-201-0/+15
| | | | | | | | --
| * tools: Integrate the dotlock tool into gpgconf.NIIBE Yutaka2023-12-201-1/+69
| | | | | | | | | | | | | | | | | | * tools/gpgconf.c (dotlock_tool): New. (main): Add --lock and --unlock commands. -- Signed-off-by: NIIBE Yutaka <[email protected]>
| * common: Add dotlock util under libexec.NIIBE Yutaka2023-12-202-31/+65
| | | | | | | | | | | | | | | | | | * tools/Makefile.am (libexec_PROGRAMS): Add dotlock. * tools/dotlock.c: Finish the first implementation. -- Signed-off-by: NIIBE Yutaka <[email protected]>
| * common: Clean up the temporary file at dotlock_destroy.NIIBE Yutaka2023-12-201-0/+6
| | | | | | | | | | | | | | | | | | * common/dotlock.c (dotlock_destroy): Clean up the temporary file created when it fails. -- Signed-off-by: NIIBE Yutaka <[email protected]>
| * common: Support not-removing the lockfile by dotlock_destroy.NIIBE Yutaka2023-12-201-1/+4
| | | | | | | | | | | | | | | | | | * common/dotlock.c (dotlock_destroy): Keep the lock when DOTLOCK_LOCK_BY_PARENT. -- Signed-off-by: NIIBE Yutaka <[email protected]>
| * common: Fix a possible resource leak for dotlock.NIIBE Yutaka2023-12-201-2/+5
| | | | | | | | | | | | | | | | | | * common/dotlock.c (dotlock_destroy_unix): Don't release ->TNAME here. (dotlock_destroy): Release the memory unconditionally. -- Signed-off-by: NIIBE Yutaka <[email protected]>
| * common: Improve the parsing of gpgconf.ctl variables.Werner Koch2023-12-191-30/+27
| | | | | | | | | | | | | | | | * common/homedir.c (unix_rootdir): Simplify. -- This also relaxes the syntax in that the equal sign may now be surrounded by any number of spaces.
| * common: Enhance dotlock, so that we can have a CLI util.NIIBE Yutaka2023-12-192-11/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/dotlock.h (DOTLOCK_LOCK_BY_PARENT, DOTLOCK_LOCKED): New. * common/dotlock.c [HAVE_POSIX_SYSTEM]: Include <dirent.h>. (dotlock_get_process_id, dotlock_detect_tname): New. (dotlock_create_unix): Handle the case when no_write option is specified. Not creating the lock file, but detect the the file of tname. (dotlock_create) [HAVE_POSIX_SYSTEM]: Add support of DOTLOCK_LOCK_BY_PARENT and DOTLOCK_LOCKED for dotlock CLI util. (dotlock_take_unix): Support the case of DOTLOCK_LOCK_BY_PARENT. -- Signed-off-by: NIIBE Yutaka <[email protected]>
| * kbx: Create public-keys.d, after creating the homedir.NIIBE Yutaka2023-12-192-0/+88
| | | | | | | | | | | | | | | | | | * kbx/keyboxd.c (create_directories): Following the behavior of gpg-agent, call create_public_keys_directory after mkdir. -- Signed-off-by: NIIBE Yutaka <[email protected]>
| * keyboxd: Pass lock info back to gpg and gpgsm.Werner Koch2023-12-183-9/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/call-keyboxd.c (keydb_default_status_cb): New. (keydb_update_keyblock): Add new status callback. (keydb_insert_keyblock): Ditto. (keydb_delete_keyblock): Ditto. (search_status_cb): Also try the new status callback. * sm/keydb.c (keydb_default_status_cb): New. (keydb_insert_cert): Add new status callback. (keydb_delete): Ditto (search_status_cb): Also try the new status callback. -- GnuPG-bug-id: 6838
| * keyboxd: Timeout on failure to get the database lock.Werner Koch2023-12-181-15/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * kbx/backend-sqlite.c (dblock_info_cb): New. (create_or_open_database): Add arg ctrl. Add a 10 second timeout. Avoid warning on error if not locked. (be_sqlite_add_resource): Do not open the database here. (be_sqlite_search): ... but do it here. -- Note that we need to delay the initalization to the first use of the database so that we actually have a recipient for the status messages. GnuPG-bug-id: 6838
| * common: Add an info callback to dotlock.Werner Koch2023-12-183-11/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | * common/dotlock.h (enum dotlock_reasons): New. (DOTLOCK_PREPARE_CREATE): New flag. * common/dotlock.c (struct dotlock_handle): Add info_cb and info_cb_value. (dotlock_create): Support the new flag. (dotlock_finish_create): New. (read_lockfile): Silence in case of ENOENT. (dotlock_set_info_cb): New. Use callback after all error and info messages. (dotlock_take_unix, dotlock_take_w32): Allow termination by callback.
| * common: Improve error return for dotlock.Werner Koch2023-12-121-2/+8
| | | | | | | | | | | | * common/dotlock.c (dotlock_take_unix): Return a ETIMEDOUT insteaad of EACCESS on timeout. (dotlock_take_w32): Ditto.
| * doc: Fix description of scdaemon for --disable-ccid.NIIBE Yutaka2023-12-121-10/+8
| | | | | | | | | | | | | | -- GnuPG-bug-id: 6871 Signed-off-by: NIIBE Yutaka <[email protected]>
| * po: Fix quotes in Polish Translation.Ahelenia Ziemiańska2023-12-071-395/+395
| | | | | | | | | | | | -- Signed-off-by: Ahelenia Ziemiańska <[email protected]>
| * po: Update Portuguese Translation.Daniel Cerqueira2023-11-292-5767/+3530
| | | | | | | | | | | | | | | | | | | | -- This commit log (with no ChangeLog entry) is written by gniibe, following the practice; Translation update don't need a ChangeLog entry in a commit log. Signed-off-by: Daniel Cerqueira <[email protected]>
| * gpgsm: Set validity flag in keylisting to n for untrusted root cert.Werner Koch2023-11-271-0/+2
| | | | | | | | | | | | | | | | * sm/keylist.c (list_cert_colon): Map not_trusted to 'n' for non-root certs like we do for root certs. -- GnuPG-bug-id: 6841
| * scd:openpgp: Fallback to default ECDH params in writekey.Werner Koch2023-11-231-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | * scd/app-openpgp.c (ecc_writekey): Use default ECDH parameters and remove the now useless check. -- This seems to be better than bailing out. In almost all cases our standard parameters are used and if not, well, the fingerprint will be wrong. GnuPG-bug-id: 6378
| * agent: Update the key file only if changed (slight return).Werner Koch2023-11-211-12/+52
| | | | | | | | | | | | | | | | | | | | * agent/findkey.c (read_key_file): Add optional arg r_orig_key_value to return the old Key value. Change all callers. (agent_write_private_key): Detect whether the Key entry was really changed. -- GnuPG-bug-id: 6829
| * common: Check wether to set the modified flag in nve_set.Werner Koch2023-11-211-22/+8
| | | | | | | | | | * common/name-value.c (nvc_set): Factor code out to ... (nve_set): here.
| * agent: Update the key file only if not changed.Werner Koch2023-11-213-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/name-value.c (struct name_value_container): Add flag "modified". (nvc_modified): New. (nvc_new): Set flag. (_nvc_add): Set flag. (nvc_delete): Set flag. (nvc_set): Set flag unless value did not change. (nve_set): Add arg PK. Change the caller. * agent/findkey.c (agent_write_private_key): Update only if modified. -- This helps software which uses a file system watcher to track changes to private keys. In particular smartcard triggered changes are a problem for such software because this may at worst trigger another smartcard read. GnuPG-bug-id: 6829
| * scd: New option --debug-allow-pin-logging.Werner Koch2023-11-213-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | * scd/scdaemon.c (oDebugAllowPINLogging): New. (opts): Add option. (main): Set option. * scd/scdaemon.h (opt): Add debug_allow_pin_logging. * scd/apdu.c (pcsc_send_apdu): Do not hide the PIN dat in the debug output if the option is set. (send_apdu_ccid): Ditto. -- This option is only required during development.
| * po: Update Japanese Translation.NIIBE Yutaka2023-11-201-12/+12
| | | | | | | | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
| * gpg: Report BEGIN_* status before examining the input.NIIBE Yutaka2023-11-168-189/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/miscellaneous.c (is_openpgp_compressed_packet) (is_file_compressed): Moved to ... * common/iobuf.c: ... in this file. (is_file_compressed): Change the argument to INP, the iobuf. * common/util.h (is_file_compressed): Remove. * common/iobuf.h (is_file_compressed): Add. * g10/cipher-aead.c (write_header): Don't call write_status_printf here. (cipher_filter_aead): Call write_status_printf when called with IOBUFCTRL_INIT. * g10/cipher-cfb.c (write_header): Don't call write_status_printf here. (cipher_filter_cfb): Call write_status_printf when called with IOBUFCTRL_INIT. * g10/encrypt.c (encrypt_simple): Use new is_file_compressed function, after call of iobuf_push_filter. (encrypt_crypt): Likewise. * g10/sign.c (sign_file): Likewise. -- Cherry-pick from master commit of: 2f872fa68c6576724b9dabee9fb0844266f55d0d GnuPG-bug-id: 6481 Signed-off-by: NIIBE Yutaka <[email protected]>
| * scd:p15: Basic support for Starcos 3.2.Werner Koch2023-11-161-32/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scd/app-p15.c (CARD_TYPE_STARCOS_32): New. (card_atr_list): Add ATR for my sample card. (cardtype2str): Add starcos string. (select_ef_by_path): Factor all code out to ... (select_by_path): this. Add arg to request a directory. Simplify the case pathlen>1 case. Fix error printing. (select_df_by_path): New. (prepare_verify_pin): For starcos select a DF. (app_select_p15): Don't use extended mode for starcos. -- This allows reading the certificates from my sample cards. Signing does not yet work; I need to do get some I/O traces using other software. The basic support for AET cards shut still work but I have not found my AET card.
| * scd: Minor debug output tweakWerner Koch2023-11-162-2/+4
| | | | | | | | | | * scd/apdu.c (send_le): Do not dump "[all zero]" if tehre is no data. * scd/iso7816.c (iso7816_select_mf): Cosmetic fix.
| * gpg,gpgsm: Hide password in debug output also for asked passwords.Werner Koch2023-11-142-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/call-agent.c (agent_get_passphrase): Call assuan_begin_confidential and assuan_end_confidential. * sm/call-agent.c (gpgsm_agent_ask_passphrase): Ditto. -- GnuPG-bug-id: 6654 The drawback of this solution is that we don't see any IPC lines from the assuan_transact. Everything else would require larger changes to libassuan.
| * gpgsm: Re-introduce the bad passphrase hint for pkcs#12.Werner Koch2023-11-141-0/+2
| | | | | | | | | | | | * sm/minip12.c (parse_bag_encrypted_data): Set the badpass flag. (parse_shrouded_key_bag): Ditto. --