aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* sm: Use gnupg_fd_t and open_stream_nc for assuan_get_input_fd.NIIBE Yutaka2023-07-131-11/+11
| | | | | | | | | | * sm/server.c (cmd_genkey): Use open_stream_nc for input and output. (cmd_getauditlog): Use open_stream_nc for output. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* sm: Use open_stream_nc for HANDLE by assuan_get_output_fd.NIIBE Yutaka2023-07-131-18/+21
| | | | | | | | | | | * sm/server.c (cmd_encrypt): Use gnupg_fd_t for OUT_FD. Call open_stream_nc with OUT_FD. (cmd_decrypt, cmd_verify, cmd_sign, cmd_export): Likewise. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Add support for Subkey-Expire-Date.NIIBE Yutaka2023-07-121-6/+25
| | | | | | | | | | * g10/keygen.c (enum para_name): Add pSUBKEYEXPIREDATE. (proc_parameter_file): Add support for pSUBKEYEXPIREDATE. (read_parameter_file): Add "Subkey-Expire-Date". -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Fix expiration time when Creation-Date is specified.NIIBE Yutaka2023-07-121-9/+20
| | | | | | | | | | | | | | * g10/keygen.c (parse_expire_string_with_ct): New function, optionally supply the creation time. (parse_expire_string): Use parse_expire_string_with_ct with no creation time. (proc_parameter_file): Use parse_expire_string_with_ct possibly with the creation time. -- GnuPG-bug-id: 5252 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Move the check by is_secured_file earlier.NIIBE Yutaka2023-07-112-7/+13
| | | | | | | | | | | * g10/decrypt.c (decrypt_message_fd): Call is_secured_file here. * g10/plaintext.c (get_output_file): Remove the call. -- Fixes-commit: 71625f56fd98ab37bc05f1806b4b49a2e418ac37 GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* common: Change iobuf_fdopen argument type to gnupg_fd_t.NIIBE Yutaka2023-07-112-4/+3
| | | | | | | | | | | * common/iobuf.h (iobuf_fdopen): Use gnupg_fd_t. * common/iobuf.c (iobuf_fdopen): Use gnupg_fd_t. (iobuf_sockopen): Call do_iobuf_fdopen. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* common: Add gnupg_check_special_filename.NIIBE Yutaka2023-07-114-41/+52
| | | | | | | | | | | | | | | * common/sysutils.h (gnupg_check_special_filename): New. * common/sysutils.c (gnupg_check_special_filename): New. * common/iobuf.c (translate_file_handle): Remove. (iobuf_is_pipe_filename): Use gnupg_check_special_filename. (do_open): Use gnupg_check_special_filename. * g10/plaintext.c (get_output_file): Use gnupg_check_special_filename and open_stream_nc. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* common,gpg,kbx: Factor out open_stream_nc.NIIBE Yutaka2023-07-105-29/+23
| | | | | | | | | | | | | * common/sysutils.h (open_stream_nc): New. * common/sysutils.c (open_stream_nc): New. * g10/decrypt.c (decrypt_message_fd): Use open_stream_nc. * g10/server.c (cmd_verify): Likewise. * kbx/kbxserver.c (prepare_outstream): Likewise. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* common:w32: Fix gnupg_w32_set_errno.NIIBE Yutaka2023-07-101-0/+1
| | | | | | | | * common/sysutils.c (gnupg_w32_set_errno): Return EC. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Add algo constants for PQC.Werner Koch2023-07-074-3/+53
| | | | | | | | | | | | | | | | | * common/openpgpdefs.h (PUBKEY_ALGO_KY768_25519): New. (PUBKEY_ALGO_KY1024_448): New. (PUBKEY_ALGO_DIL3_25519): New. (PUBKEY_ALGO_DIL5_448): New. (PUBKEY_ALGO_SPHINX_SHA2): New. * g10/keygen.c (parse_key_parameter_part): Force v5 keys for these algos. * g10/keyid.c (pubkey_string): Add mapping. * g10/misc.c (openpgp_pk_algo_usage): Add standard key usage. -- See draft-wussler-openpgp-pqc-01.txt for the code points. To limit the number of algorithms, only MUST and SHOULD algorithms are considered.
* kbx: Fix memory leak at spawning a thread for data pipe.NIIBE Yutaka2023-07-061-0/+1
| | | | | | | | | * kbx/kbx-client-util.c (prepare_data_pipe): Release the attribute for thread creation. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* kbx: Use es_sysopen_nc instead of es_fdopen_nc.NIIBE Yutaka2023-07-061-7/+20
| | | | | | | | | | | * kbx/kbxserver.c (prepare_outstream): Use es_sysopen_nc and avoid the use of translate_sys2libc_fd. -- On Windows, it's better directly use the system HANDLE. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Fix gpg --server mode on Windows.NIIBE Yutaka2023-07-051-10/+10
| | | | | | | | | | | * g10/server.c (cmd_encrypt): Don't translate_sys2libc_fd, since it requires HANDLE on Windows. (cmd_decrypt): Likewise. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Format the value of type gnupg_fd_t by casting to int.NIIBE Yutaka2023-07-053-4/+4
| | | | | | | | | | | * g10/openfile.c (open_outfile): Cast to int. * g10/encrypt.c (encrypt_crypt): Ditto. * g10/decrypt.c (decrypt_message_fd): Ditto. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Use gnupg_fd_t for decryption and sign.NIIBE Yutaka2023-07-055-18/+30
| | | | | | | | | | | | | | | | * g10/decrypt.c (decrypt_message_fd): Use gnupg_fd_t. * g10/plaintext.c (hash_datafile_by_fd): Use gnupg_fd_t. * g10/main.h: Fix the declarations. * g10/mainproc.c (struct mainproc_context): Use gnupg_fd_t for DATA_FD. (proc_compressed_cb, proc_signature_packets): Follow the change. (proc_signature_packets_by_fd): Use gnupg_fd_t. * g10/packet.h: Fix the declaration. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Use gnupg_fd_t for encrypt_crypt and gpg_verify.NIIBE Yutaka2023-07-056-17/+22
| | | | | | | | | | | | | | | * common/iobuf.h (iobuf_fdopen_nc): Use gnupg_t. * common/iobuf.c (iobuf_fdopen_nc): Use gnupg_t. * g10/main.h (encrypt_crypt, gpg_verify): Use gnupg_fd_t. * g10/encrypt.c (encrypt_crypt): Use gnupg_fd_t. (encrypt_crypt_files): Follow the change. * g10/gpg.c (main): Follow the change. * g10/verify.c (gpg_verify): Use gnupg_fd_t. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Use gnupg_fd_t for open_outfile.NIIBE Yutaka2023-07-057-13/+14
| | | | | | | | | | | | | | | | * g10/main.h (open_outfile): Use gnupg_fd_t instead of int. * g10/openfile.c (open_outfile): Likewise. Use GNUPG_INVALID_FD. * g10/dearmor.c (dearmor_file, enarmor_file): Follow the change. * g10/encrypt.c (encrypt_simple): Likewise. * g10/export.c (do_export): Likewise. * g10/revoke.c (gen_desig_revoke, create_revocation): Likewise. * g10/sign.c (sign_file, clearsign_file, sign_symencrypt_file): Likewise. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: Enable the call of ks_ldap_help_variables when USE_LDAP.NIIBE Yutaka2023-07-051-0/+2
| | | | | | | | * dirmngr/server.c [USE_LDAP] (cmd_ad_query): Conditionalize. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg:card: Remove the code for GnuPG version 1.NIIBE Yutaka2023-07-051-23/+1
| | | | | | | | | | * g10/card-util.c [GNUPG_MAJOR_VERSION == 1] (get_data_from_file): Remove the old code. (put_data_to_file): Likewise. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Merge branch 'STABLE-BRANCH-2-4' into masterWerner Koch2023-07-0489-1314/+3174
|\
| * Post release updatesWerner Koch2023-07-042-1/+7
| | | | | | | | --
| * Release 2.4.3gnupg-2.4.3Werner Koch2023-07-041-2/+5
| |
| * po: msgmergeWerner Koch2023-07-043-90/+19
| | | | | | | | --
| * po: Update Turkish translationEmir SARI2023-07-041-53/+20
| | | | | | | | --
| * scd:p15: Make signing work for Nexus cards.Werner Koch2023-07-041-12/+19
| | | | | | | | | | | | | | | | * scd/app-p15.c (CARD_PRODUCT_NEXUS): New. (read_p15_info): Detect Nexus cards. (get_dispserialno): Use product_id instead of comparing the manufacturer_id. (do_sign): Handle Nexus like BELPIC.
| * gpgsm: Init a diagnostic var.Werner Koch2023-07-041-1/+1
| | | | | | | | | | * sm/minip12.c (p12_parse): Init where. --
| * common,w32: Add missing GetLastError->errno mapping.Werner Koch2023-07-043-6/+8
| | | | | | | | | | | | | | * common/iobuf.c (file_filter, sock_filter): Add missing mapping. -- GnuPG-bug-id: 6528
| * Prepare NEWS for the next releaseWerner Koch2023-06-301-1/+39
| | | | | | | | --
| * sm: Adding missing stuff to the PKCS#12 parser rewrite.Werner Koch2023-06-296-90/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sm/minip12.c (struct bufferlist_s): New. (struct tlv_ctx_s): Add bufferlist. (tlv_register_buffer): New. (tlv_release): Release bufferlist. (tlv_expect_object): Handle octet string cramming. (tlv_expect_octet_string): Ditto. (cram_octet_string): Changed interface. We don't need the input_consumed value anymore. * sm/minip12.c (parse_shrouded_key_bag): Also parse the attribute set. * sm/t-minip12.c (main): Add option --no-extra. (cert_collect_cb, run_tests_from_file): Fix memory leak * tests/cms/samplekeys/t5793-openssl.pfx: New from T5793. * tests/cms/samplekeys/t5793-test.pfx: Ditto. * tests/cms/samplekeys/Description-p12: Add them. * tests/cms/Makefile.am (EXTRA_DIST): Add samplekeys. -- This should finish the rewrite of the pkcsc#12 parser for now. More fun is likely to come. GnuPG-bug-id: 6536, 5793
| * sm: Major rewrite of the PKCS#12 parserWerner Koch2023-06-287-799/+1880
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sm/minip12.c: Reworked most of the parser. (p12_set_verbosity): Add arg debug and change all callers. * sm/t-minip12.c: Major rewrite to run regression tests unattended. * sm/Makefile.am (module_maint_tests): Move t-Minit to ... (module_tests): here. * tests/cms/samplekeys/Description-p12: New. -- Note that cram_octet_string stuff has not yet been reworked. I need to locate the sample files first. GnuPG-bug-id: 6536
| * sm: Remove duplicated code.Werner Koch2023-06-282-84/+34
| | | | | | | | | | | | * sm/minip12.c (struct tag_info): Change type of length and nhdr. (dump_tag_info): Adjust. (parse_tag): Re-implement using the parse_ber_header.
| * scd:piv: Fix authentication with Administration Key.NIIBE Yutaka2023-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * scd/app-piv.c (auth_adm_key): Fix the value of the Response Tag. (do_setattr): Fix the comment. -- Cherry-pick master commit of: 7cfbf0dd72d8d5c14fbf19c13722d153bd1cbd70 Reported-by: Heiko Schäfer <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
| * wks: Make --add-revocs the default.Werner Koch2023-06-212-4/+13
| | | | | | | | | | | | | | | | * tools/gpg-wks-client.c (opt): New option --no-add-revocs. (main): Make --add-revocs the default. (command_send): Rename to ... (command_create): to match the command name.
| * wks: Use export-clean for --mirror and --create.Werner Koch2023-06-211-1/+1
| | | | | | | | | | | | | | | | | | * tools/wks-util.c (wks_get_key): Change from export-minimal to export-clean -- To properly work with tusted introducers et al. it is important to also upload valid key signatures to the Web Key Directory.
| * kbx: Close file handle when return.zhangguangzhi2023-06-201-0/+4
| | | | | | | | | | | | | | | | | | | | * kbx/keybox-dump.c (_keybox_dump_find_dups): Close FP on the error paths. -- GnuPG-bug-id: 6495 Signed-off-by: zhangguangzhi <[email protected]>
| * delete redundant characterszhangguangzhi2023-06-204-4/+4
| | | | | | | | | | | | | | -- GnuPG-bug-id: 6482 Signed-off-by: zhangguangzhi <[email protected]>
| * dirmngr: New option --ignore-crl-extensions.Werner Koch2023-06-194-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/dirmngr.c (oIgnoreCRLExtension): New. (opts): Add --ignore-crl-extension. (parse_rereadable_options): Add to list/ * dirmngr/dirmngr.h (opt): Add ignored_crl_extensions. * dirmngr/crlcache.c (crl_cache_insert): Implement option. -- This option is is useful for debugging problems with new CRL extensions. It is similar to --ignore-cert-extension. GnuPG-bug-id: 6545
| * gpgsm: Support SENDCERT_SKI for --call-dirmngrWerner Koch2023-06-192-9/+37
| | | | | | | | | | | | | | * sm/call-dirmngr.c (run_command_inq_cb): Support SENDCERT_SKI. * dirmngr/crlcache.c (crl_cache_insert): Print the CRL name along with the unknown OID nortice.
| * dirmngr: Disable the HTTP redirect rewriting.Werner Koch2023-06-155-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/http.h (struct http_redir_info_s): Add restrict_redir. * dirmngr/ks-engine-hkp.c (send_request): Set it depending on flags. * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto. * dirmngr/t-http-basic.c (test_http_prepare_redirect): Always set it. * dirmngr/http.c (http_prepare_redirect): Remove location rewriting unless the flag is set. -- GnuPG-bug-id: 6477
| * dirmngr: New option --compatibility-flags.Werner Koch2023-06-153-0/+43
| | | | | | | | | | | | | | * dirmngr/dirmngr.c (oCompatibilityFlags): NEw. (opts): Add option --compatibility-flags. (compatibility_flags): New. (parse_rereadable_options): Parse them.
| * gpgtar: New option --no-compress.Werner Koch2023-06-154-0/+12
| | | | | | | | | | | | | | | | | | * tools/gpgtar.c: Add option --no-compress. * tools/gpgtar.h (opt): Add field no_compress. * tools/gpgtar-create.c (gpgtar_create): Pass -z0 to gpg. -- This option is probably easier to remember than --gpg-args '-z0'.
| * gpg: New option --no-compress as alias for -z0.Werner Koch2023-06-152-7/+19
| |
| * gpgsm: New option --input-size-hint.Werner Koch2023-06-158-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sm/gpgsm.c (oInputSizeHint): New. (opts): Add "--input-size-hint". (main): Set option. * sm/server.c (option_handler): Add option "input-size-hint". * sm/gpgsm.h (struct server_control_s): Add field input_size_hint. * sm/encrypt.c (gpgsm_encrypt): Set the toatl file size. * sm/decrypt.c (gpgsm_decrypt): Ditto. * sm/sign.c (gpgsm_sign): Ditto. * sm/verify.c (gpgsm_verify): Ditto. -- This option allows to set a value for the progress output line. Note that as of now there is no other way to set the file size. GnuPG-bug-id: 6534
| * gpgsm: Fix last commitWerner Koch2023-06-151-9/+1
| | | | | | | | | | | | -- There was some test code left over and a check reversed.
| * gpgsm: Print PROGRESS status lines.Werner Koch2023-06-158-10/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/ksba-io-support.c (struct writer_cb_parm_s): Add field progress. (struct gnupg_ksba_io_s): Add field is_writer. (update_write_progress): New. (base64_writer_cb, plain_writer_cb): Call update_write_progress. (base64_finish_write): Ditto. (gnupg_ksba_create_writer): Set is_writer. (gnupg_ksba_set_progress_cb): New. (gnupg_ksba_set_total): New. * common/ksba-io-support.h (gnupg_ksba_progress_cb_t): New type. * sm/server.c (gpgsm_status2): Return error from statusfp writes. (gpgsm_progress_cb): New. * sm/decrypt.c (gpgsm_decrypt): Set progress handler. * sm/encrypt.c (gpgsm_encrypt): Ditto. * sm/sign.c (gpgsm_sign): Ditto. * sm/verify.c (gpgsm_verify): Ditto. -- GnuPG-bug-id: 6534
| * gpg: Make progress work for large files on Windows.Werner Koch2023-06-138-86/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/iobuf.c (iobuf_get_filelength): Change return type to uint64_t and remove the overflow args. For Windows always use GetFileSizeEx which is available since the long EOL-ed Windows XP. * g10/sign.c (write_plaintext_packet): Adjust for changed iobuf_get_filelength. * g10/encrypt.c (encrypt_simple, encrypt_crypt): Ditto. * g10/photoid.c (generate_photo_id): Ditto. Also add an upper limit. * g10/filter.h (progress_filter_context_t): Change amount values to use uint64_t. * g10/progress.c (write_status_progress): Change accordingly. -- GnuPG-bug-id: 6534
| * gpg: Print status line and proper diagnostics for write errors.Werner Koch2023-06-092-6/+17
| | | | | | | | | | | | | | | | | | * common/iobuf.c (file_filter): Improve diagnostics. * g10/build-packet.c (do_plaintext): Make sure to cache all error cases. -- GnuPG-bug-id: 6528
| * speedo,w32: Call gpgconf --kill allAndre Heinecke2023-06-091-3/+1
| | | | | | | | | | * build-aux/speedo/w32/inst.nsi: Use kill all instead of explicitly killing processes.
| * w32: Map ERROR_FILE_INVALID to EIO.Werner Koch2023-06-091-0/+3
| | | | | | | | | | | | | | * common/sysutils.c (map_w32_to_errno): Add mapping. -- We see this error sometimes when writing to an USB connected disk.
| * gpg: Add --list-filter properties key_expires and key_expires_d.Werner Koch2023-06-092-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/import.c (impex_filter_getval): Support new filter properties. -- Here is how to list all subkeys expiring in the year 2061: gpg --list-keys --list-filter 'select= sub/key_expires_d -gt 2061-01-01 \ && sub/key_expires_d -lt 2061-12-31' To list all primary key expirations, use the "pub/" prefix and to list all expiration dates use no prefix. GnuPG-bug-id: 6509