aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | g10/decrypt-data: use iobuf_read for higher performanceJussi Kivilinna2018-11-081-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/decrypt-data.c (fill_buffer): Use iobuf_read instead of iobuf_get for reading data. -- This patch reduces iobuf_read per byte processing overhead and speeds up decryption. Benchmark results below, tested on Intel Core i7-4790K (turbo off). Encrypted 2 GiB through pipe to ramfs file using AES128. Decrypt ramfs file out through pipe to /dev/null. before patch-set ---------------- gpg process no-armor: user time pipe transfer rate encrypt-aead: 1.02 1.0 GB/s decrypt-aead: 10.8 185 MB/s encrypt-cfb: 4.8 342 MB/s decrypt-cfb: 12.7 157 MB/s gpg process armor: user time pipe transfer rate encrypt-aead: 13.8 140 MB/s decrypt-aead: 30.6 68 MB/s encrypt-cfb: 17.4 114 MB/s decrypt-cfb: 32.6 64 MB/s after (decrypt opt) ------------------- gpg process no-armor: user time pipe transfer rate decrypt-aead: 7.3 263 MB/s decrypt-cfb: 9.3 211 MB/s gpg process armor: user time pipe transfer rate decrypt-aead: 27.0 77 MB/s decrypt-cfb: 29.0 72 MB/s Note: decryption results are much slower than encryption because of extra SHA1 & RIPEMD160 hashing. GnuPG-bug-id: 3786 Signed-off-by: Jussi Kivilinna <[email protected]>
* | g10/decrypt-data: use fill_buffer in more placesJussi Kivilinna2018-11-081-77/+5
| | | | | | | | | | | | | | | | * g10/decrypt-data.c (mdc_decode_filter, decode_filter): Use fill_buffer. -- Signed-off-by: Jussi Kivilinna <[email protected]>
* | gpgcompose: Fix --sk-esk.NIIBE Yutaka2018-11-081-3/+14
| | | | | | | | | | | | | | | | | | | | * g10/gpgcompose.c (sk_esk): Copy the result content correctly. Don't forget to free the result. -- Fixes-commit: 0131d4369a81a51bf7bb328cc81a3bb082ed1a94 Signed-off-by: NIIBE Yutaka <[email protected]>
* | g10: Fix log_debug formatting.NIIBE Yutaka2018-11-082-4/+4
| | | | | | | | | | | | | | | | * g10/cipher-aead.c (do_flush): No cast is correct. * g10/decrypt-data.c (aead_underflow): No cast needed. Use "%j" for uint64_t for chunklen. Signed-off-by: NIIBE Yutaka <[email protected]>
* | g10: Fix print_keygrip for smartcard.NIIBE Yutaka2018-11-061-1/+1
| | | | | | | | | | | | | | | | | | * g10/card-util.c (print_keygrip): Use tty_fprintf. -- Reported-by: Joey Pabalinas <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
* | wks: New option --with-colons for gpg-wks-client.Werner Koch2018-11-054-68/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tools/gpg-wks.h (opt): Add field with_colons. * tools/gpg-wks-client.c (oWithColons): New const. (opts, parse_arguments): Add option --with-colons. (main): Change aSupported to take several domains in --with-colons mode. (command_send): Factor policy getting code out to ... (get_policy_and_sa): New function. (command_supported): Make use of new function. -- In addition to this the --create command now also supports a submission address only in the policy file. That means the submission-address file is not anymore required and can be replaced by the policy file. Signed-off-by: Werner Koch <[email protected]>
* | speedo: Remove obsolete configure option of gpgme.Werner Koch2018-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | * build-aux/speedo.mk (speedo_pkg_gpgme_configure): Remove --disable-w32-qt option. -- This option is obsolete since GPGME 1.7 (in 2016) Signed-off-by: Werner Koch <[email protected]>
* | dirmngr: Fix LDAP port parsing.Werner Koch2018-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | * dirmngr/misc.c (host_and_port_from_url): Fix bad port parsing and a segv for a missing slash after the host name. -- Reportted-by: Tomas Mraz GnuPG-bug-id: 4230 Signed-off-by: Werner Koch <[email protected]>
* | build: Update *.m4 from libraries.NIIBE Yutaka2018-11-026-14/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/gpg-error.m4: Update from master. * m4/ksba.m4: Ditto. * m4/libassuan.m4: Ditto. * m4/libgcrypt.m4: Ditto. * m4/npth.m4: Ditto. * m4/ntbtls.m4: Ditto. -- Do it again today. Signed-off-by: NIIBE Yutaka <[email protected]>
* | build: Update *.m4 from libraries.NIIBE Yutaka2018-10-306-141/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | * m4/gpg-error.m4: Update from master. * m4/ksba.m4: Ditto. * m4/libassuan.m4: Ditto. * m4/libgcrypt.m4: Ditto. * m4/npth.m4: Ditto. * m4/ntbtls.m4: Ditto. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | build: By default build wks-tools on all Unix platforms.Werner Koch2018-10-261-1/+8
| | | | | | | | Signed-off-by: Werner Koch <[email protected]>
* | wkd: Add option --directory to the server.Werner Koch2018-10-262-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | * tools/gpg-wks-server.c (opts): Add '--directory', (main): Explain how to set correct permissions. (command_list_domains): Create an empty policy file and remove the warning for an empty policy file. -- Note that a policy file is meanwhile required and thus is is useful to create it. Signed-off-by: Werner Koch <[email protected]>
* | kbx: Increase size of field for fingerprint.NIIBE Yutaka2018-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * kbx/keybox-search-desc.h (fpr): Increase the size. -- In the function keydb_search_fpr in g10/keydb.c, it is copied using MAX_FINGERPRINT_LEN. So, more size is required. Fixes-commit: ecbbafb88d920e713439b6b1b8e1b41a6f8d0e38 Signed-off-by: NIIBE Yutaka <[email protected]>
* | all: fix more spelling errorsDaniel Kahn Gillmor2018-10-2519-43/+43
| |
* | headers: fix spellingDaniel Kahn Gillmor2018-10-257-7/+7
| | | | | | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* | speedo: Sign the windows installer with a timestamp.Werner Koch2018-10-251-3/+7
| | | | | | | | --
* | dirmngr: Fix out of scope use of a var in the keyserver LDAP code.Werner Koch2018-10-251-23/+10
| | | | | | | | | | | | | | | | | | * dirmngr/ks-engine-ldap.c (extract_attributes): Don't use a variabale out of scope and cleanup the entire pgpKeySize block. -- GnuPG-bug-id: 4229 Signed-off-by: Werner Koch <[email protected]>
* | g10,scd: Improve UIF support.NIIBE Yutaka2018-10-254-3/+30
| | | | | | | | | | | | | | | | | | | | * g10/call-agent.c (learn_status_cb): Parse "bt" flag. * g10/call-agent.h: New member field "bt". * g10/card-util.c (uif): Limit its access only when it is supported. * scd/app-openpgp.c (do_setattr): Allow access to UIF objects only when there is a button. Signed-off-by: NIIBE Yutaka <[email protected]>
* | all: fix spelling and typosDaniel Kahn Gillmor2018-10-2477-120/+120
| | | | | | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* | doc: fix spelling mistakesDaniel Kahn Gillmor2018-10-246-18/+18
| | | | | | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* | agent: Fix possible uninitalized use of CTX in simple_pwquery.Werner Koch2018-10-241-0/+1
| | | | | | | | | | | | | | | | * common/simple-pwquery.c (agent_open): Clear CTX even on early error. -- GnuPG-bug-id: 4223 Signed-off-by: Werner Koch <[email protected]>
* | agent: Fix possible release of unitialize var in a genkey error case.Werner Koch2018-10-241-1/+1
| | | | | | | | | | | | | | | | * agent/command.c (cmd_genkey): Initialize 'value'. -- GnuPG-bug-id: 4222 Signed-off-by: Werner Koch <[email protected]>
* | ssh: Fix possible infinite loop in case of an read error.Werner Koch2018-10-241-3/+4
| | | | | | | | | | | | | | | | | | * agent/command-ssh.c (ssh_handler_add_identity): Handle other errors than EOF. -- GnuPG-bug-id: 4221 Signed-off-by: Werner Koch <[email protected]>
* | tools: Fix FILE memory leak in gpg-connect-agent.Werner Koch2018-10-241-2/+4
| | | | | | | | | | | | | | | | * tools/gpg-connect-agent.c (do_open): dup the fileno and close the stream. GnuPG-bug-id: 4220 Signed-off-by: Werner Koch <[email protected]>
* | sm: Use the correct string in an error message.Werner Koch2018-10-241-1/+1
| | | | | | | | | | | | | | * sm/gpgsm.c (main): Fix error message. -- GnuPG-bug-id: 4219
* | gpg: Unfinished support for v5 signatures.Werner Koch2018-10-244-40/+54
| | | | | | | | | | | | | | | | | | | | | | | | * g10/parse-packet.c (parse_signature): Allow for v5 signatures. * g10/sig-check.c (check_signature_end_simple): Support the 64bit v5 byte count. * g10/sign.c (hash_sigversion_to_magic): Ditto. (write_signature_packets): Request v5 sig for v5 keys. Remove useless condition. (make_keysig_packet): Request v5 sig for v5 keys. Signed-off-by: Werner Koch <[email protected]>
* | indent: Modernize g10/sign.cWerner Koch2018-10-241-791/+829
| | | | | | | | --
* | dirmngr: Prepare for updated WKD specs with ?l= paramWerner Koch2018-10-221-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/server.c (proc_wkd_get): Tack the raw local address to the request. -- We append the raw non-canonicalized local address part to the hash. Servers who serve the requests from static files will ignore the parameters and a test with posteo shows that also services using a database ignore the parameter. The general idea is that service providers may use their own canonicalization rules. The problem is that we currently filter the returned key for the full mail address and thus we will never see a key if the service did a different canonicalization than we. So consider this to be an experiment. Signed-off-by: Werner Koch <[email protected]>
* | agent: Fix build regression for Windows.Werner Koch2018-10-222-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | * agent/command-ssh.c (get_client_info): Turn client_uid into an int. Fix setting of it in case of a failed getsocketopt. * agent/command.c (start_command_handler): Fix setting of the pid and uid for Windows. -- Fixes-commit: 28aa6890588cc108639951bb4bef03ac17743046 which obviously was only added to master. Signed-off-by: Werner Koch <[email protected]>
* | dirmngr: In verbose mode print the OCSP responder id.Werner Koch2018-10-221-0/+27
| | | | | | | | | | | | * dirmngr/ocsp.c (ocsp_isvalid): Print the responder id. Signed-off-by: Werner Koch <[email protected]>
* | tools: Replace duplicated code in mime-maker.Werner Koch2018-10-153-62/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tools/rfc822parse.c (HEADER_NAME_CHARS): New. Taken from mime-maker.c. (rfc822_valid_header_name_p): New. Based on code from mime-maker.c. (rfc822_capitalize_header_name): New. Copied from mime-maker.c. (capitalize_header_name): Remove. Replace calls by new func. (my_toupper, my_strcasecmp): New. * tools/mime-maker.c: Include rfc822parse.h. (HEADER_NAME_CHARS, capitalize_header_name): Remove. (add_header): Replace check and capitalization by new functions. -- This is a straightforward change with two minor chnages: - In rfc822parse.c the capitalization handles MIME-Version special. - The check in mime-maker bow detects a zero-length name as invalid. my_toupper and my_strcasecmp are introduced to allow standalone use of that file. Signed-off-by: Werner Koch <[email protected]>
* | scd: Fix signing authentication status.NIIBE Yutaka2018-10-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * scd/app-openpgp.c (do_sign): Clear DID_CHV1 after signing. -- We have a corner case: In "not forced" situation and authenticated, and it is changed to "forced", card implementaiton can actually accept signing, but GnuPG requires authentication, because it is "forced". GnuPG-bug-id: 4177 Signed-off-by: NIIBE Yutaka <[email protected]>
* | agent: Fix message for ACK button.NIIBE Yutaka2018-10-121-13/+35
| | | | | | | | | | | | * agent/divert-scd.c (getpin_cb): Display correct message. Signed-off-by: NIIBE Yutaka <[email protected]>
* | scd: Support "acknowledge button" feature.NIIBE Yutaka2018-10-117-1/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | * scd/apdu.c (set_prompt_cb): New member function. (set_prompt_cb_ccid_reader): New function. (open_ccid_reader): Initialize with set_prompt_cb_ccid_reader. (apdu_set_prompt_cb): New. * scd/app.c (lock_app, unlock_app): Add call to apdu_set_prompt_cb. * ccid-driver.c (ccid_set_prompt_cb): New. (bulk_in): Call ->prompt_cb when timer extension. * scd/command.c (popup_prompt): New. Signed-off-by: NIIBE Yutaka <[email protected]>
* | agent: Support --ack option for POPUPPINPADPROMPT.NIIBE Yutaka2018-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/divert-scd.c (getpin_cb): Support --ack option. -- We are now introducing "acknowledge button" feature to scdaemon, so that we can support OpenPGPcard User Interaction Flag. We will (re)use the mechanism of POPUPPINPADPROMPT for this. Perhaps, we will change the name of POPUPPINPADPROMPT, since it will be no longer for PINPAD only. Signed-off-by: NIIBE Yutaka <[email protected]>
* | gpg: Don't take the a TOFU trust model from the trustdb,Werner Koch2018-10-102-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/tdbio.c (tdbio_update_version_record): Never store a TOFU model. (create_version_record): Don't init as TOFU. (tdbio_db_matches_options): Don't indicate a change in case TOFU is stored in an old trustdb file. -- This change allows to switch between a tofu and pgp or tofu+pgp trust model without an auto rebuild of the trustdb. This also requires that the tofu trust model is requested on the command line. If TOFU will ever be the default we need to tweak the model detection via TM_AUTO by also looking into the TOFU data base, GnuPG-bug-id: 4134
* | gpg: Fix extra check for sign usage of a data signature.Werner Koch2018-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | * g10/sig-check.c (check_signature_end_simple): -- Obviously we should not ignore a back signature here. Fixes-commit: 214b0077264e35c079e854a8b6374704aea45cd5 GnuPG-bug-id: 4014 Signed-off-by: Werner Koch <[email protected]>
* | gpg: Make --skip-hidden-recipients work again.Werner Koch2018-10-081-0/+13
| | | | | | | | | | | | | | | | | | | | | | * g10/pubkey-enc.c (get_session_key): Take care of opt.skip_hidden_recipients. -- This was lost due to Fixes-commit: ce2f71760155b71a71418fe145a557c99bd52290 GnuPG-bug-id: 4169 Signed-off-by: Werner Koch <[email protected]>
* | gpg: Add new card vendorWerner Koch2018-10-041-0/+1
| | | | | | | | --
* | gpg: New options import-drop-uids and export-drop-uids.Werner Koch2018-10-025-9/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/options.h (IMPORT_DROP_UIDS): New. (EXPORT_DROP_UIDS): New. * g10/import.c (parse_import_options): Add option "import-drop-uids". (import_one): Don't bail out with that options and no uids found. Also remove all uids. (remove_all_uids): New. * g10/export.c (parse_export_options): Add option "export-drop-uids". (do_export_one_keyblock): Implement option. -- These options are required for experiments with changes to the keyserver infrastructure. Signed-off-by: Werner Koch <[email protected]>
* | common: Fix gnupg_reopen_std.NIIBE Yutaka2018-10-021-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/sysutils.c (gnupg_reopen_std): Use fcntl instead of fstat. -- When gpg was invoked by a Perl web application on FreeBSD, fstat in gnupg_reopen_std failed with EBADF. Using fcntl, which is considered lighter than fstat, it works fine. Since uur purpose is to check if file descriptor is valid or not, lighter operation is better. Reported-by: Marcin Gryszkalis <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
* | g10,scd: Support UIF changing command.NIIBE Yutaka2018-09-272-5/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/card-util.c (uif, cmdUIF): New. (card_edit): Add call to uif by cmdUIF. * scd/app-openpgp.c (do_getattr): Support UIF-1, UIF-2, and UIF-3. (do_setattr): Likewise. (do_learn_status): Learn UIF-1, UIF-2, and UIF-3. -- GnuPG-bug-id: 4158 Signed-off-by: NIIBE Yutaka <[email protected]>
* | g10: Fix memory leak for --card-status.NIIBE Yutaka2018-09-181-4/+3
| | | | | | | | | | | | * g10/card-util.c (card_status): Release memory of serial number. Signed-off-by: NIIBE Yutaka <[email protected]>
* | g10: Fix another memory leak.NIIBE Yutaka2018-09-131-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | * g10/skclist.c (enum_secret_keys): Use SK_LIST instead of pubkey_t. -- The use of pubkey_t was wrong. The use is just a list of keys, not with keyblock. With SK_LIST, release_sk_list releases memory by free_public_key. Signed-off-by: NIIBE Yutaka <[email protected]>
* | g10: Fix memory leak (more).NIIBE Yutaka2018-09-131-5/+9
| | | | | | | | | | | | | | | | * g10/skclist.c (enum_secret_keys): Free SERIALNO on update. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | g10: Fix memory leak in enum_secret_keys.NIIBE Yutaka2018-09-131-2/+10
| | | | | | | | | | | | | | | | | | | | | | * g10/skclist.c (enum_secret_keys): Don't forget to call free_public_key in the error return paths. -- Reported-by: Philippe Antoine GnuPG-bug-id: 4140 Signed-off-by: NIIBE Yutaka <[email protected]>
* | Revert "dirmngr: hkp: Avoid potential race condition when some hosts die."NIIBE Yutaka2018-09-111-10/+13
| | | | | | | | | | | | | | | | This reverts commit 04b56eff118ec34432c368b87e724bce1ac683f9. -- Now the access to hosttable is serialized correctly.
* | dirmngr: Serialize access to hosttable.NIIBE Yutaka2018-09-113-8/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/dirmngr.h (ks_hkp_init): New. * dirmngr/dirmngr.c (main): Call ks_hkp_init. * dirmngr/ks-engine-hkp.c (ks_hkp_init): New. (ks_hkp_mark_host): Serialize access to hosttable. (ks_hkp_print_hosttable, make_host_part): Likewise. (ks_hkp_housekeeping, ks_hkp_reload): Likewise. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | common: Use iobuf_get_noeof to avoid undefined behaviors.NIIBE Yutaka2018-09-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | * common/iobuf.c (block_filter): Use iobuf_get_noeof. -- When singed integer has negative value, left shift computation is undefined in C. GnuPG-bug-id: 4093 Reported-by: Philippe Antoine Signed-off-by: NIIBE Yutaka <[email protected]>
* | agent: Fix error code check from npth_mutex_init.NIIBE Yutaka2018-09-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * agent/call-pinentry.c (initialize_module_call_pinentry): It's an error when npth_mutex_init returns non-zero. -- Actually, initialize_module_call_pinentry is only called once from main. So, this bug had no harm and having the static variable INITIALIZED is not needed. Signed-off-by: NIIBE Yutaka <[email protected]>