aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* agent: Allow import of overly large keys.Werner Koch2016-08-161-1/+1
| | | | | | | | * agent/command.c (MAXLEN_KEYDATA): Double the size. -- Debian-bug-id: 834447 Signed-off-by: Werner Koch <[email protected]>
* g13: Allow the use of a g13tab label for --mount.Werner Koch2016-08-141-4/+6
| | | | | | | * g13/mount.c (g13_mount_container): Do not run the first access check if syshelp is required. Signed-off-by: Werner Koch <[email protected]>
* g13: Implement --umount for dm-crypt.Werner Koch2016-08-1411-22/+244
| | | | | | | | | | | | | * g13/g13.c (main): Implement command --umount. * g13/mount.c (g13_umount_container): use the syshelper if needed. * g13/backend.c (be_umount_container): New. * g13/be-dmcrypt.c (be_dmcrypt_umount_container): New. * g13/call-syshelp.c (call_syshelp_run_umount): New. * g13/sh-cmd.c (cmd_umount): New. (register_commands): Register UMOUNT. * g13/sh-dmcrypt.c (sh_dmcrypt_umount_container): New. Signed-off-by: Werner Koch <[email protected]>
* g13: Fix double free bug.Werner Koch2016-08-131-2/+0
| | | | | | * g13/sh-cmd.c (cmd_mount, cmd_resume): Do not xfree TIUPLES. Signed-off-by: Werner Koch <[email protected]>
* g13: Consider g13tab for a mount command.Werner Koch2016-08-134-14/+132
| | | | | | | | | | | | * g13/sh-cmd.c (cmd_getkeyblob): New. (register_commands): Register it. * g13/call-syshelp.c (getkeyblob_data_cb): New. (call_syshelp_get_keyblob): New. * g13/mount.c: Include callsyshelp.h. (g13_mount_container): Ask syshelp whether the filename is managed by g13tab. Call syshelp to get the encrypted keyblob in this case. Signed-off-by: Werner Koch <[email protected]>
* g13: Move some function around.Werner Koch2016-08-137-26/+34
| | | | | | | | | | | | | * g13/keyblob.c (g13_keyblob_decrypt): Move to ... * g13/server.c: to here. * g13/suspend.c, g13/mount.c: Include server.h. * g13/Makefile.am (g13_syshelp_SOURCES): Add keyblob.c -- This is done to be able to use keyblob read code in syshelp w/o requiring linking to call-gpg.c Signed-off-by: Werner Koch <[email protected]>
* g13: New command --find-device.Werner Koch2016-08-135-0/+162
| | | | | | | | | | | | | | | | * common/status.h (STATUS_BLOCKDEV: New. * g13/call-syshelp.c: Include "call-syshelp.h". (finddevice_status_cb, call_syshelp_find_device): New. * g13/g13.c (aFindDevice): New. (opts): Add "--find-device". (main): Implement --find-device. * g13/sh-cmd.c (cmd_finddevice): New. (register_commands): Register new command. -- This might be useful for scripting. Signed-off-by: Werner Koch <[email protected]>
* Avoid leading ": " in the log output when there are no prefixes.Daniel Kahn Gillmor2016-08-121-2/+3
| | | | | | | | * common/logging.c (do_logv): When no prefixes have been requested, omit the ": " separator, since there is nothing on the left-hand side of it. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Call log_set_prefix() with human-readable labels.Daniel Kahn Gillmor2016-08-1217-23/+23
| | | | | | | | | | | | | | | | | | * agent/preset-passphrase.c, agent/protect-tool.c, dirmngr/dirmngr.c * dirmngr/t-http.c, g10/gpg.c, g10/gpgv.c, g13/g13-syshelp.c * g13/g13.c, kbx/kbxutil.c, scd/scdaemon.c, sm/gpgsm.c * tests/gpgscm/main.c, tools/gpg-check-pattern.c * tools/gpg-connect-agent.c, tools/gpgconf.c, tools/gpgtar.c * tools/symcryptrun.c: Invoke log_set_prefix() with human-readable labels. -- Some invocations of log_set_prefix() were done with raw numeric values instead of values that humans can understand. Use symbolic representations instead of numeric for better readability. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpg: New option --input-size-hint.Werner Koch2016-08-114-2/+31
| | | | | | | | | | | | | | | * g10/options.h: Include stdint.h. (struct opt): Add field 'input_size_hint'. * g10/gpg.c (oInputSizeHint): New. (opts): Add --input-size-hint. (main): Set opt.input_size_hint. * g10/progress.c (write_status_progress): Use the hint. -- This is a prerequisite to fix GnuPG-bug-id: 2368 Signed-off-by: Werner Koch <[email protected]>
* common: New function string_to_u64.Werner Koch2016-08-114-14/+25
| | | | | | | | | | | | | * common/stringhelp.c (string_to_u64): New. * dirmngr/http.c (longcounter_t): Remove. (struct cookie_s): Change content_length to uint64_t. (parse_response): Use string_to_u64. -- Meanwhile we allow some C99 features including stdint.h. Thus we can simplify things now. Signed-off-by: Werner Koch <[email protected]>
* common: Remove compatibility code.Justus Winter2016-08-113-212/+1
| | | | | | | | | * common/Makefile.am: Drop deleted files. * common/w32-afunix.c: Delete file. * common/w32-afunix.h: Likewise. GnuPG-bug-id: 2408 Signed-off-by: Justus Winter <[email protected]>
* common: Rework the simple password query module.Justus Winter2016-08-113-321/+103
| | | | | | | | | | | | | * common/simple-pwquery.c (writen, readline): Drop. (agent_send_option, agent_send_all_options, agent_open): Just use libassuan. (simple_pw_set_socket): Simplify. (default_inq_cb): New function. (simple_pwquery, simple_query): Just use libassuan. * agent/Makefile.am (gpg_preset_passphrase_LDADD): Add libassuan. * tools/Makefile.am (symcryptrun_LDADD): Likewise. Signed-off-by: Justus Winter <[email protected]>
* common: Remove simple password query error codes.Justus Winter2016-08-114-53/+11
| | | | | | | | | | | | * common/simple-pwquery.h: Remove mapping function. Move all definitions of status codes... * common/simple-pwquery.c: ... here, and define them to meaningful gpg error values. * agent/preset-passphrase.c (preset_passphrase): Use error code as-is. (forget_passphrase): Likewise. * tools/symcryptrun.c (confucius_get_pass): Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpg: Print the signer's UID during verification.Werner Koch2016-08-103-7/+33
| | | | | | | | | | | * g10/parse-packet.c (parse_signature): Sanitize the value stored in SIGNERS_UID. * g10/mainproc.c (issuer_fpr_string): New. (check_sig_and_print): Print the signers' UID. Print the issuer fingerprint in --rfc4880bis mode. -- Signed-off-by: Werner Koch <[email protected]>
* common: New function try_make_printable_string.Werner Koch2016-08-104-64/+67
| | | | | | | | * common/stringhelp.c (sanitize_buffer): Remove. Move code to ... * common/miscellaneous.c (try_make_printable_string): new. (make_printable_string): Call try_make_printable_string. Signed-off-by: Werner Koch <[email protected]>
* tests: Fix distcheck.Justus Winter2016-08-101-0/+4
| | | | | | * tests/openpgp/issue2417.scm: Copy configuration. Signed-off-by: Justus Winter <[email protected]>
* gpg: Remove tofu database format "split".Werner Koch2016-08-1011-771/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/options.h (struct opt): Remove field tofu_db_format. * g10/gpg.h (server_control_s): Add fields tofu.batch_update_ref and tofu.batch_update_started. * g10/gpg.c (parse_tofu_db_format): Remove. (main): Make option --tofu-db-format obsolete. * g10/tofu.c: Major rework. Remove the pretty complicated and slower split format and with that all the caching. Use the dbs struct directly. Move global vars for batch update into CTRL. Change calling conventions of some function to take CTRL or DBS pointers instead of the former low-level database pointer. -- The split database format might have been nice for use with Unison but it bypasses the concept of a relational database by doing parts of this itself and also risking deadlocks. Working with the Tofu database for debugging or experiments is also not possible with parts of the database logic implemented in gpg. The Tofu support is quite new and we can assume that it is not in real use now. Thus we better remove that now so that we do not need to maintain it for all future. Signed-off-by: Werner Koch <[email protected]>
* g10: Fix opening of trust database.Justus Winter2016-08-103-2/+42
| | | | | | | | | | | | * g10/tdbio.c (tdbio_set_dbname): This function explicitly checks for the file size, but handled the case of a zero-sized file incorrectly by returning success. Fix this by initializing the database in that case. * tests/openpgp/Makefile.am (XTESTS): Add new test. * tests/openpgp/issue2417.scm: New file. GnuPG-bug-id: 2417 Signed-off-by: Justus Winter <[email protected]>
* tests: Fix distcheck.Justus Winter2016-08-101-1/+2
| | | | | | | | * tests/openpgp/Makefile.am (EXTRA_DIST): Explicitly add setup and teardown scripts now that they no longer are included in the list of tests. Signed-off-by: Justus Winter <[email protected]>
* tests: Improve temporary directory handling.Justus Winter2016-08-103-5/+14
| | | | | | | | | | | | * tests/gpgscm/ffi.c (ffi_init): Rename 'mkdtemp'. * tests/gpgscm/tests.scm (mkdtemp): New function that uses a sensible location and template if no arguments are given. (with-temporary-working-directory): Simplify accordingly. (make-temporary-file): Likewise. * tests/openpgp/run-tests.scm (run-tests-parallel-isolated): Likewise. (run-tests-sequential-isolated): Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Make the name of foreign functions more unique.Justus Winter2016-08-101-1/+1
| | | | | | | * tests/gpgscm/ffi-private.h (ffi_define_function_name): Add another underscore. Signed-off-by: Justus Winter <[email protected]>
* tests: Run each test in a clean environment.Justus Winter2016-08-102-9/+19
| | | | | | | | | | | | | | * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Drop obsolete variables, add 'srcdir', use absolute paths. (TESTS): Rename to 'XTESTS' to avoid emitting the automake test runner. Drop 'setup.scm' and 'finish.scm'. (xcheck): New target that runs 'run-tests.scm', our Scheme test suite runner. It will run each test in a clean environment, isolated from the other tests. (EXTRA_DIST): Adapt accordingly. * tests/openpgp/README: Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests: Make ssh test more robust.Justus Winter2016-08-101-5/+5
| | | | | | | * tests/openpgp/ssh.scm: Drop the 'MD5:' which was not printed by previous ssh versions. Signed-off-by: Justus Winter <[email protected]>
* agent: SSH support fix.NIIBE Yutaka2016-08-101-1/+3
| | | | | | | | | * agent/command-ssh.c (ssh_handler_request_identities): Keep error message same. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* agent: Fix regression in recent ssh changes.Werner Koch2016-08-091-3/+9
| | | | | | | | | | | | * agent/command-ssh.c (sexp_key_construct): Lowercase the algo name. -- We need to use a lowercase version of the algo in S-expression. Unfortunately Libgcrypt has no function for this, thus we need to malloc and first. Fixes-commit: ebf24e3 Signed-off-by: Werner Koch <[email protected]>
* gpg: Extend the PROGRESS line to give the used unit.Werner Koch2016-08-092-4/+16
| | | | | | * g10/progress.c (write_status_progress): Print the units parameter. Signed-off-by: Werner Koch <[email protected]>
* Cleanup initialization of libgcrypt.Ben Kibbey2016-08-0914-75/+10
| | | | | | | | | | | | * common/init.c (init_common_subsystems): Initialize libgcrypt. * dirmngr/Makefile.am (dirmngr_ldap): Link with libgcrypt. -- Most other modules already call gcry_check_version() after init_common_subsystems() so may as well move initialization of libgcrypt to here. Also fixes a warning in the system log from gpgconf --homedir. Signed-off-by: Ben Kibbey <[email protected]>
* agent: SSH support improvement.NIIBE Yutaka2016-08-092-2/+2
| | | | | | | | | | | | | | | | | | | * agent/command-ssh.c (ssh_handler_request_identities): Skip a key with error, not giving up to handle the request itself. * agent/cvt-openpgp.c (extract_private_key): Support "ecdsa" key. -- Note that "ecdsa" key is still in use by old versions of gpg-agent through its SSH handling (until 2.1.14). With old versions of gpg-agent, adding ECDSA key by ssh-add command, "ecdsa" key will be created. So, "ecdsa" key should be supported. For g10/gpg, "ecdsa" and "ecdh" was only used in some experimental versions of libgcrypt, with parameters. We now use "ecc" for all cases in released versions. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Cleanup of dek_to_passphrase function (part 2).Werner Koch2016-08-087-204/+46
| | | | | | | | | | | * g10/passphrase.c (passphrase_get): Remove arg KEYID. Change arg MODE to NOCACHE. (passphrase_to_dek): Remove args KEYID and PUBKEY_ALGO. Split arg MODE into CREATE and NOCACHE. Change all callers and adjust stubs. (passphrase_clear_cache): Remove args KEYID and ALGO. They are not used. Change caller. Signed-off-by: Werner Koch <[email protected]>
* gpg: Cleanup of dek_to_passphrase function (part 1).Werner Koch2016-08-081-31/+11
| | | | | | | | | | | | * g10/passphrase.c (passphrase_to_dek_ext): Remove args CUSTDESC and CUSTPROMPT. Merge into the passphrase_to_dek wrapper. (passphrase_get): Remove args CUSTOM_DESCRIPTION and CUSTOM_PROMPT. -- The function is nowadays only used for symmetric encryption. Thus we do not need all the former advanced stuff. Signed-off-by: Werner Koch <[email protected]>
* agent: More clean up of SSH support.NIIBE Yutaka2016-08-084-95/+80
| | | | | | | | | | | | | | | | | | | | | * common/util.h (get_pk_algo_from_key): New. * common/sexputil.c (get_pk_algo_from_key): The implementation. * agent/gpg-agent.c: Remove include of openpgpdefs.h. * agent/command-ssh.c (struct ssh_key_type_spec): Use integer ALGO. (ssh_key_types): Update with GCRY_PK_*. (make_cstring, sexp_extract_identifier): Remove. (sexp_key_construct): Use gcry_pk_algo_name to get ALGO string. (ssh_key_to_blob): Use cadr to get value list. (ssh_key_type_lookup): Lookup with integer ALGO. (ssh_receive_key): Follow the change of ssh_key_type_lookup. (ssh_send_key_public): Likewise. Use get_pk_algo_from_key to get ALGO. -- This fixes the regresson introduced by the commit 894789c3299dc47a8c1ccaaa7070382f0fae0262. Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Add openpgp/gpgv-forged-keyring.scm.NIIBE Yutaka2016-08-084-0/+70
| | | | | | | | | | | | * tests/openpgp/gpgv-forged-keyring.scm: New. * tests/openpgp/forged-keyring.gpg: New. * tests/openpgp/Makefile.am (TESTS): Add gpgv-forged-keyring.scm. * tests/openpgp/defs.scm (tools): Add GPGV. (GPGV): New. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* agent: Fix long standing regression tracking the connection count.Werner Koch2016-08-063-0/+22
| | | | | | | | | | | | | | | * agent/gpg-agent.c (get_agent_active_connection_count): New. (do_start_connection_thread, start_connection_thread_ssh): Bump ACTIVE_CONNECTIONS up and down. * agent/command.c (cmd_getinfo): Add subcommand "connections". -- The variable ACTIVE_CONNECTIONS is used to shutdown gpg-agent in a friendly way. Before we switched to nPth a Pth provided count of threads was used for this. During the migration to nPth ACTIVE_CONNECTIONS was introduced and checked but never set. Signed-off-by: Werner Koch <[email protected]>
* agent: Clean up SSH support.NIIBE Yutaka2016-08-061-127/+11
| | | | | | | | | * agent/command-ssh.c (file_to_buffer): Remove. (ssh_handler_request_identities): Use agent_public_key_from_file. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Avoid publishing the GnuPG version by defaultDaniel Kahn Gillmor2016-08-052-3/+3
| | | | | | | | | | | | | | | | | | | | | * g10/gpg.c (main): initialize opt.emit_version to 0 * doc/gpg.texi: document different default for --emit-version -- The version of GnuPG in use is not particularly helpful. It is not cryptographically verifiable, and it doesn't distinguish between significant version differences like 2.0.x and 2.1.x. Additionally, it leaks metadata that can be used to distinguish users from one another, and can potentially be used to target specific attacks if there are known behaviors that differ between major versions. It's probably better to take the more parsimonious approach to metadata production by default. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpg: Make sure that keygrips are printed for each subkey.Werner Koch2016-08-041-6/+14
| | | | | | | * g10/keylist.c (list_keyblock_colon): Print an emprty grip in case of an error. Signed-off-by: Werner Koch <[email protected]>
* gpg: Always print the fingerprint in colons mode.Werner Koch2016-08-042-21/+14
| | | | | | | | | | * g10/keylist.c (list_keyblock_colon): Remove arg FPR. Always print fingerprint records. For secret keys always print keygrip records. -- The fingerprint should always be used thus we should always print it. Signed-off-by: Werner Koch <[email protected]>
* tests: Use gpgconf to set the ssh socket envvar.Werner Koch2016-08-041-1/+3
| | | | | | * tests/openpgp/ssh.scm ("SSH_AUTH_SOCK"): Use gpgconf. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Add limited support for -0.Werner Koch2016-08-042-1/+8
| | | | | | | | | | | | * tools/gpgconf.h (opt): Add field 'null'. * tools/gpgconf.c: Add option --null/-0. (list_dirs): Use it here. -- This option changes the delimites for --list-dir with arguments from LF to Nul. Signed-off-by: Werner Koch <[email protected]>
* tests: Update list of tests in Scheme test runner.Justus Winter2016-08-041-1/+7
| | | | | | * tests/openpgp/run-tests.scm: Add missing tests. Signed-off-by: Justus Winter <[email protected]>
* tests: Fix path to fake-pinentry.Justus Winter2016-08-041-2/+3
| | | | | | * tests/openpgp/defs.scm: Correctly compute the path to fake-pinentry. Signed-off-by: Justus Winter <[email protected]>
* po: Update Japanese translation.NIIBE Yutaka2016-08-041-341/+379
|
* po: update Japanese translation.NIIBE Yutaka2016-08-041-386/+342
|
* g10: Fix checking key for signature validation.NIIBE Yutaka2016-08-041-2/+2
| | | | | | | | | | | | * g10/sig-check.c (check_signature2): Not only subkey, but also primary key should have flags.valid=1. -- The tweak of gpgv in e32c575e0f3704e7563048eea6d26844bdfc494b only makes sense with this change. Signed-off-by: NIIBE Yutaka <[email protected]>
* Reword feature description.Justus Winter2016-08-032-4/+4
| | | | | | -- Suggested-by: Peter Gutmann Signed-off-by: Justus Winter <[email protected]>
* kbx: Add missing header file.Justus Winter2016-08-031-0/+1
| | | | | | * kbx/keybox-update.c: Add missing header file. Signed-off-by: Justus Winter <[email protected]>
* More cleanup of "allow to".Daniel Kahn Gillmor2016-08-0356-88/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | * README, agent/command.c, agent/keyformat.txt, common/i18n.c, common/iobuf.c, common/keyserver.h, dirmngr/cdblib.c, dirmngr/ldap-wrapper.c, doc/DETAILS, doc/TRANSLATE, doc/announce-2.1.txt, doc/gpg.texi, doc/gpgsm.texi, doc/scdaemon.texi, doc/tools.texi, doc/whats-new-in-2.1.txt, g10/export.c, g10/getkey.c, g10/import.c, g10/keyedit.c, m4/ksba.m4, m4/libgcrypt.m4, m4/ntbtls.m4, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/fr.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/nb.po, po/pl.po, po/pt.po, po/ro.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, scd/app-p15.c, scd/ccid-driver.c, scd/command.c, sm/gpgsm.c, sm/sign.c, tools/gpgconf-comp.c, tools/gpgtar.h: replace "Allow to" with clearer text. In standard English, the normal construction is "${XXX} allows ${YYY} to" -- that is, the subject (${XXX}) of the sentence is allowing the object (${YYY}) to do something. When the object is missing, the phrasing sounds awkward, even if the object is implied by context. There's almost always a better construction that isn't as awkward. These changes should make the language a bit clearer. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* dirmngr: Emit correct spelling of "superseded".Daniel Kahn Gillmor2016-08-032-2/+2
| | | | | | | | | | | * dirmngr/crlcache.c (list_one_crl_entry): Spell superseded correctly. * dirmngr/ocsp.c (ocsp_invalid): Likewise. This might break some tools which parse the existing output and expect misspellings, but i'm not sure there are many such tools, and we should use standardized orthography going forward. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Fix spelling and grammar.Daniel Kahn Gillmor2016-08-0310-24/+24
| | | | | | | | | | | | | | * agent/learncard.c: s/coccured/occurred/ * doc/dirmngr.texi: s/ommitted/omitted/, s/orginally/originally/, s/reponses/responses/i * doc/gpg-agent.texi, doc/dirmngr.texi, doc/gpg.texi: Fix "allows to" to more conventional english usage. * doc/tools.texi, g10/gpgcommpose.c, tests/openpgp/armor.scm, tests/openpgp/armor.test: s/occured/occurred/ * tools/gpgsplit.c: s/calcualting/calculating/ * sm/server.c: s/formated/formatted/ Signed-off-by: Daniel Kahn Gillmor <[email protected]>