aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyedit.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Spelling fixes in docs and comments.NIIBE Yutaka2017-04-281-4/+4
| | | | | | | | | | -- In addition, fix trailing spaces in tests/inittests. GnuPG-bug-id: 3121 Reported-by: ka7 (klemens) Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Pass CTRL to many more functions.Werner Koch2017-03-311-132/+146
| | | | | | | | | | -- For proper operations as a server we need to avoid global variables. Thus we need to pass the session state CTRL to most functions. Quite a lot of changes but fortunately straightforward to do. Signed-off-by: Werner Koch <[email protected]>
* gpg: Extend free_packet to handle a packet parser context.Werner Koch2017-03-291-9/+10
| | | | | | | | | | | | | | | * g10/packet.h (struct parse_packet_ctx_s): Add fields LAST_PKT and FREE_LAST_PKT. (init_parse_packet): Clear them. (deinit_parse_packet): New macro. Change all users if init_parse_packet to also call this macro. * g10/free-packet.c (free_packet): Add arg PARSECTX and handle shallow packet copies in the context. Change all callers. * g10/parse-packet.c (parse): Store certain packets in the parse context. -- Signed-off-by: Werner Koch <[email protected]>
* gpg: Change parse_packet to take a context.Werner Koch2017-03-291-1/+3
| | | | | | | | | | | | | | | | | | * g10/packet.h (struct parse_packet_ctx_s): New. (parse_packet_ctx_t): New type. (init_parse_packet): New macro. * g10/parse-packet.c (parse_packet, dbg_parse_packet): Change to take a parse context. Change all callers to provide a context instead of directly supplying the input stream. (search_packet, dbg_search_packet): Ditto. (copy_all_packets, dbg_copy_all_packets): Init an use a parse context. (copy_some_packets, dbg_copy_some_packets): Ditto. (skip_some_packets, dbg_skip_some_packets): Ditto. -- We will need this change to handle ring packets inside the parser. Signed-off-by: Werner Koch <[email protected]>
* gpg: New command --quick-set-primary-uid.Werner Koch2017-03-211-86/+139
| | | | | | | | | | | | * g10/gpg.c (aQuickSetPrimaryUid): New const. (opts): New command --quick-set-primary-uid. (main): Implement it. * g10/keyedit.c (keyedit_quick_adduid): Factor some code out to ... (quick_find_keyblock): new func. (keyedit_quick_revuid): Use quick_find_keyblock. (keyedit_quick_set_primary): New. Signed-off-by: Werner Koch <[email protected]>
* g10: Move more flags into the flag bitfield.Justus Winter2017-03-081-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/packet.h (PKT_user_id): Move 'is_primary', 'is_revoked', and 'is_expired' into the flags bitfield, and drop the prefix. * g10/call-dirmngr.c: Adapt accordingly. * g10/export.c: Likewise. * g10/getkey.c: Likewise. * g10/import.c: Likewise. * g10/kbnode.c: Likewise. * g10/keyedit.c: Likewise. * g10/keylist.c: Likewise. * g10/keyserver.c: Likewise. * g10/mainproc.c: Likewise. * g10/pkclist.c: Likewise. * g10/pubkey-enc.c: Likewise. * g10/tofu.c: Likewise. * g10/trust.c: Likewise. * g10/trustdb.c: Likewise. -- This patch has been created by applying the following semantic patch: @@ expression E; @@ -E->is_expired +E->flags.expired @@ expression E; @@ -E->is_primary +E->flags.primary @@ expression E; @@ -E->is_revoked +E->flags.revoked Signed-off-by: Justus Winter <[email protected]>
* gpg: Do not allow the user to revoke the last valid UID.Justus Winter2017-03-071-1/+40
| | | | | | | | | | | * g10/keyedit.c (keyedit_quick_revuid): Merge self signatures, then make sure that we do not revoke the last valid UID. (menu_revuid): Make sure that we do not revoke the last valid UID. * tests/openpgp/quick-key-manipulation.scm: Demonstrate that '--quick-revoke-uid' can not be used to revoke the last valid UID. GnuPG-bug-id: 2960 Signed-off-by: Justus Winter <[email protected]>
* Remove -I option to common.NIIBE Yutaka2017-03-071-7/+7
| | | | | | | | | | | | | * dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Signal an error when trying to revoke non-existant UID.Justus Winter2017-03-021-0/+2
| | | | | | | | | * g10/keyedit.c (keyedit_quick_revuid): Signal an error when trying to revoke non-existant UID. * tests/openpgp/quick-key-manipulation.scm: Test that. GnuPG-bug-id: 2962 Signed-off-by: Justus Winter <[email protected]>
* gpg: Do not require a trustdb for decryption.Werner Koch2017-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/trustdb.c (init_trustdb): Add and implement arg NO_CREATE. Change to return an error code. Change all callers to to pass False for NO_CREATE. (tdb_get_ownertrust): New arg NO_CREATE. Call init_trustdb to test for a non-existing trustdb. Change all callers to to pass False for NO_CREATE. (tdb_get_min_ownertrust): Ditto. * g10/trust.c (get_ownertrust_with_min): Add arg NO_CREATE. Call init_trustdb for a quick check. (get_ownertrust_info): Add arg NO_CREATE. (get_ownertrust_string): Ditto. * g10/gpgv.c (get_ownertrust_info): Adjust stub. * g10/test-stubs.c (get_ownertrust_info): Ditto. * g10/mainproc.c (list_node): Call get_ownertrust_info with NO_CREATE set. * g10/pubkey-enc.c (get_it): Ditto. -- Fixes-commit: effa80e0b5fd8cf9e31a984afe391c2406edee8b For details see mails on Feb 27 and 28 by dkg, gniibe, and Justus to gnupg-devel 'test failure on git master with decrypt-session-key.scm (and: continuous integration?)' Signed-off-by: Werner Koch <[email protected]>
* Clean up word replication.Yuri Chornoivan2017-02-211-2/+2
| | | | | | | | | -- This fixes extra word repetitions (like "the the" or "is is") in the code and docs. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpg: Sync print of additional sig data in --edit-key.Werner Koch2017-01-171-3/+3
| | | | | | | | | | | | | | | * g10/keylist.c (show_policy_url): Implement MODE -1. (show_keyserver_url): Ditto. (show_notation): Ditto. * g10/keyedit.c (print_one_sig): Print policy URL, keyserver URL and notation data to the tty. -- With this change the listing of signatures in the key edit menu does now include policy URLs et al in order and not possible after leaving the menu (it used to go to stdout and not the tty). Signed-off-by: Werner Koch <[email protected]>
* gpg: New option --quick-set-expire.Werner Koch2016-12-051-23/+121
| | | | | | | | | | | | | * g10/gpg.c (aQuickSetExpire): New. (opts): New option --quick-set-expire. (main): Implement option. * g10/keyedit.c (menu_expire): Add args FORCE_MAINKEY and NEWEXPIRATION. Change semantics of the return value. Change caller. (keyedit_quick_set_expire): New. -- This patch partly solves GnuPG-bug-id: 2701
* g10: Avoid gratuitously loading a keyblock when it is already availableNeal H. Walfield2016-11-231-4/+5
| | | | | | | | | | | * g10/trust.c (get_validity): Add new, optional parameter KB. Only load the keyblock if KB is NULL. Update callers. (get_validity): Likewise. * g10/trustdb.c (tdb_get_validity_core): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 2812
* g10: Cache the effective policy. Recompute it when required.Neal H. Walfield2016-11-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/tofu.c (initdb): Add column effective_policy to the bindings table. (record_binding): New parameters effective_policy and set_conflict. Save the effective policy. If SET_CONFLICT is set, then set conflict according to CONFLICT. Otherwise, preserve the current value of conflict. Update callers. (get_trust): Don't compute the effective policy here... (get_policy): ... do it here, if it was not cached. Take new parameters, PK, the public key, and NOW, the time that the operation started. Update callers. (show_statistics): New parameter PK. Pass it to get_policy. Update callers. (tofu_notice_key_changed): New function. * g10/gpgv.c (tofu_notice_key_changed): New stub. * g10/import.c (import_revoke_cert): Take additional argument CTRL. Pass it to keydb_update_keyblock. * g10/keydb.c (keydb_update_keyblock): Take additional argument CTRL. Update callers. [USE_TOFU]: Call tofu_notice_key_changed. * g10/test-stubs.c (tofu_notice_key_changed): New stub. * tests/openpgp/tofu.scm: Assume that manually setting a binding's policy to auto does not cause the tofu engine to forget about any conflict. -- Signed-off-by: Neal H. Walfield <[email protected]> We now store the computed policy in the tofu DB (in the effective_policy column of the bindings table) to avoid computing it every time, which is expensive. Further, policy is never overridden in case of a conflict. Instead, we detect a conflict if CONFLICT is not empty. This change is backwards compatible to existing DBs. The only minor incompatibility is that unresolved conflicts won't be automatically resolved in case we import a direct signature, or cross signatures.
* doc: Typo fixes.Werner Koch2016-11-171-1/+1
| | | | | | -- Reported-by: Nathan Musoke <[email protected]>
* g10: Fix memory leak.NIIBE Yutaka2016-11-151-2/+1
| | | | | | | | | * g10/keyedit.c (menu_adduid): Don't copy 'sig'. -- Fixes-commit: 809d67e74014cb563efd965744fd11f87bbae743 Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Fix memory leak.Justus Winter2016-11-151-0/+1
| | | | | | * g10/keyedit.c (menu_adduid): Deallocate 'sig'. Signed-off-by: Justus Winter <[email protected]>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* g10: When adding a user id, make sure the keyblock has been prepared.Neal H. Walfield2016-09-221-0/+2
| | | | | | | | | | | | * g10/keyedit.c (keyedit_quick_adduid): Call merge_keys_and_selfsig on KEYBLOCK before adding the user id. * tests/openpgp/quick-key-manipulation.scm: Make sure that the key capabilities don't change when adding a user id. (key-data): New function. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 2697
* gpg: Avoid malloc failure due to no key signaturesWerner Koch2016-09-191-8/+19
| | | | | | | | | * g10/keyedit.c (check_all_keysigs): Check early for no key signatures. Use xtrycalloc. -- GnuPG-bug-id: 2690 Signed-off-by: Werner Koch <[email protected]>
* Fix more spellingDaniel Kahn Gillmor2016-09-171-1/+1
| | | | | | | | | | | | | | | | | | | * NEWS, acinclude.m4, agent/command-ssh.c, agent/command.c, agent/gpg-agent.c, agent/keyformat.txt, agent/protect-tool.c, common/asshelp.c, common/b64enc.c, common/recsel.c, doc/DETAILS, doc/HACKING, doc/Notes, doc/TRANSLATE, doc/dirmngr.texi, doc/faq.org, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi, doc/instguide.texi, g10/armor.c, g10/gpg.c, g10/keyedit.c, g10/mainproc.c, g10/pkclist.c, g10/tofu.c, g13/sh-cmd.c, g13/sh-dmcrypt.c, kbx/keybox-init.c, m4/pkg.m4, sm/call-dirmngr.c, sm/gpgsm.c, tests/Makefile.am, tests/gpgscm/Manual.txt, tests/gpgscm/scheme.c, tests/openpgp/gpgv-forged-keyring.scm, tests/openpgp/multisig.test, tests/openpgp/verify.scm, tests/pkits/README, tools/applygnupgdefaults, tools/gpg-connect-agent.c, tools/mime-maker.c, tools/mime-parser.c: minor spelling cleanup. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpg: Emit a new error status line in --quick-adduid.Werner Koch2016-09-141-1/+4
| | | | | | | * g10/keyedit.c (menu_adduid): Emit an ERROR status for an existsing user id. Signed-off-by: Werner Koch <[email protected]>
* gpg: Improve usability of --quick-gen-key.Werner Koch2016-09-131-1/+1
| | | | | | | | | | | | | | | * g10/keygen.c (FUTURE_STD_): New constants. (parse_expire_string): Handle special keywords. (parse_algo_usage_expire): Allow "future-default". Simplify call to parse_expire_string. (quick_generate_keypair): Always allow an expiration date. Replace former "test-default" by "future-default". -- Using an expiration date is pretty common, thus we now allow the creation of a standard key with expiration date. Signed-off-by: Werner Koch <[email protected]>
* More cleanup of "allow to".Daniel Kahn Gillmor2016-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* w32: Fix build.Justus Winter2016-06-301-1/+1
| | | | | | | | * g10/keyedit.c (keyedit_quick_revuid): Fix call to 'check_trustdb_stale'. Fixes-commit: 55d112ee Signed-off-by: Justus Winter <[email protected]>
* g10: Implement gpg --quick-revuidDaniel Kahn Gillmor2016-06-301-65/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/revoke.c (get_default_uid_revocation_reason): New. * g10/keyedit.c (menu_revuid): Break out creation of uid revocation into new function core_revuid. * g10/keyedit.c (keyedit_quick_revuid): New. Selects key and uid, invokes core_revuid. * g10/gpg.c (main): Handle --quick-revuid argument. * doc/gpg.texi: Document --quick-revuid. -- This functionality is a counterpart to --quick-adduid, and will be useful for projects that depend programmatically on gpg to revoke user IDs (one such example is "monkeysphere-host revoke-servicename"). Signed-off-by: Daniel Kahn Gillmor <[email protected]> - Minor re-indentation work. - Changed a "0 == memcmp" to "!memcmp" - Removed tests/openpgp/quick-key-manipulation.test from the Makefile. This test needs to be converted to gpgscm. - Removed example from whats-new-in-2.1.txt because that is generated. Signed-off-by: Werner Koch <[email protected]>
* g10: report whether key in agent is passphrase-protected or notDaniel Kahn Gillmor2016-06-111-2/+2
| | | | | | | | | | | | | | | * g10/call-agent.c, g10/call-agent.h (agent_get_keyinfo): add r_cleartext parameter to report whether a key is stored without passphrase protection. * g10/gpgv.c, g10/test-stubs.c: augment dummy agent_get_keyinfo to match new API. * g10/export.c, g10/keyedit.c, g10/keygen.c, g10/keylist.c, g10/sign.c: pass NULL to agent_get_keyinfo since we do not yet need to know whether agent is passphrase-protected. -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Replace use of opt.homedir by accessor functions.Werner Koch2016-06-071-1/+1
| | | | | | | | | | | | | | | | | | | * common/homedir.c (the_gnupg_homedir): New var. (gnupg_set_homedir): New. (gnupg_homedir): New. * g10/options.h (struct opt): Remove 'homedir' and replace all users by the new accessor functions. * g13/g13-common.h (struct opt): Ditto. * scd/scdaemon.h (struct opt): Ditto. * sm/gpgsm.h (struct opt): Ditto. * dirmngr/dirmngr.h (struct opt): Ditto. * agent/preset-passphrase.c (opt_homedir): Ditto. * agent/protect-tool.c (opt_homedir): Ditto. -- This will make detection of a non-default homedir easier. Signed-off-by: Werner Koch <[email protected]>
* indent: Wrap strings in debug messages.Werner Koch2016-06-061-3/+5
| | | | --
* gpg: Try to use the passphrase from the primary for --quick-addkey.Werner Koch2016-06-021-1/+2
| | | | | | | | | | | | | | | * agent/command.c (cmd_genkey): Add option --passwd-nonce. (cmd_passwd): Return a PASSWD_NONCE in verify mode. * g10/call-agent.c (agent_genkey): Add arg 'passwd_nonce_addr' and do not send a RESET if given. (agent_passwd): Add arg 'verify'. * g10/keygen.c (common_gen): Add optional arg 'passwd_nonce_addr'. (gen_elg, gen_dsa, gen_ecc, gen_rsa, do_create): Ditto. (generate_subkeypair): Use sepeare hexgrip var for the to be created for hexgrip feature. Verify primary key first. Make use of the passwd nonce. Allow for a static passphrase. Signed-off-by: Werner Koch <[email protected]>
* gpg: New command --quick-addkey.Werner Koch2016-06-021-44/+134
| | | | | | | | | | | | | | | | | | | * g10/keygen.c (DEFAULT_STD_SUBKEYUSE): New. (ask_keysize): Factor code out to ... (get_keysize_range, fixup_keysize): new. (parse_parameter_usage): Factor parsing out to ... (parse_usagestr): new. Allow use of "encr" as alias for "encrypt". (parse_subkey_algostr_usagestr): New. (generate_subkeypair): Add new args. Implement unattended mode. * g10/keyedit.c (keyedit_quick_sign): Factor some code out to ... (find_by_primary_fpr): new. (keyedit_quick_addkey): New. * g10/gpg.c (aQuickAddKey): New. (opts): Add --quick-addkey. (main): Implement. Signed-off-by: Werner Koch <[email protected]>
* gpg: Store the Tofu meta handle for databases in CTRL.Werner Koch2016-05-211-1/+1
| | | | | | | | | | | | | | | | | | * g10/gpg.h (struct tofu_dbs_s, tofu_dbs_t): New declarations. (struct server_control_s): Add field tofu.dbs. * g10/tofu.c (struct dbs): Rename to tofu_dbs_s. Replace all users by by tofu_dbs_t. (opendbs): Add arg CTRL. Cache the DBS in CTRL. (closedbs): Rename to tofu_closedbs and make global. Add arg CTRL. (tofu_register): Add arg CTRL. Change all callers. Do not call closedbs. (tofu_get_validity): Ditto. (tofu_set_policy): Ditto. (tofu_get_policy): Ditto. (tofu_set_policy_by_keyid): Add arg CTRL. * g10/gpg.c (gpg_deinit_default_ctrl): Call tofu_closedbs. Signed-off-by: Werner Koch <[email protected]>
* gpg: Pass CTRL object down to the trust functionsWerner Koch2016-05-211-30/+31
| | | | Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix buglet in the check_all_keysigs function.Werner Koch2016-05-091-2/+3
| | | | | | | | | | | | | | | * g10/keyedit.c (sig_comparison): Actually compare the pubkey algorithms. -- This fixes two bugs: The first was a typo which led to us comparing A with A. The second problem was the use of an assert at a place where this can't be asserted: Two signature may have different algorithms; they won't verify but after all it is about corrupted signatures. Reported-by: Guilhem Moulin <[email protected]> GnuPG-bug-id: 2236 Signed-off-by: Werner Koch <[email protected]>
* gpg: Request a "save" after cmd "check" fixed something.Werner Koch2016-05-091-2/+3
| | | | | | | | | * g10/keyedit.c (keyedit_menu) <cmdCHECK>: Set modified. -- Reported-by: Guilhem Moulin <[email protected]> GnuPG-bug-id: 2236 Signed-off-by: Werner Koch <[email protected]>
* Some minor string changes and fixed a printf format.Werner Koch2016-05-041-7/+14
| | | | | | | * g10/build-packet.c (notation_value_to_human_readable_string): Use %zu for size_t. Signed-off-by: Werner Koch <[email protected]>
* gpg: Remove all assert.h and s/assert/log_assert/.Werner Koch2016-04-291-24/+23
| | | | Signed-off-by: Werner Koch <[email protected]>
* gpg: Improve UID selction of --quick-sign-key.Werner Koch2016-04-191-10/+54
| | | | | | | | * g10/keyedit.c (keyedit_quick_sign): Improve UID selection and print error for non-found userids. -- GnuPG-bug-id: 2315
* gpg: Avoid debug like output at start of --edit-key.Werner Koch2016-04-191-6/+12
| | | | | | | | * g10/keyedit.c (check_all_keysigs): Print info only after something has been modified. -- Signed-off-by: Werner Koch <[email protected]>
* gpg: Do not rely on a certain evaluation order.Werner Koch2016-03-151-1/+5
| | | | | | | | | * g10/keyedit.c (print_and_check_one_sig): Call check_key_signature before derefing IS_SELFSIG. -- Fixes-commit: 5fbd80579aea0f75ca1d2700515c5b8747a75c7d Signed-off-by: Werner Koch <[email protected]>
* gpg: Systematically detect and fix signatures that are out of order.Neal H. Walfield2016-02-191-125/+564
| | | | | | | | | | | | | | * g10/keyedit.c (sig_comparison): New function. (fix_key_signature_order): Merge functionality into... (check_all_keysigs): ... this function. Rewrite to eliminate duplicates and use a systematic approach to detecting and moving signatures that are out of order instead of a heuristic. (fix_keyblock): Don't call fix_key_signature_order. Call check_all_keysigs instead after collapsing the uids. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 2236
* gpg: Split print_and_check_one_sig.Neal H. Walfield2016-02-191-11/+20
| | | | | | | | | * g10/keyedit.c (print_and_check_one_sig): Split the print functionality into... (print_one_sig): ... this new function. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Use format_keyid rather than manually formatting the keyid.Neal H. Walfield2016-02-191-2/+1
| | | | | | | | | * g10/keyedit.c (menu_addrevoker): Use format_keyid rather than manually formatting the keyid. * g10/keygen.c (card_write_key_to_backup_file): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Add hidden key-edit subcommand "change-usage".Werner Koch2016-02-141-1/+118
| | | | | | | | | | | | * g10/keyedit.c (cmdCHANGEUSAGE): New. (cmds): Add command "change-usage". (keyedit_menu): Handle that command. (menu_changeusage): New. * g10/keygen.c (keygen_add_key_flags): New. (ask_key_flags): Add optional arg current. -- Signed-off-by: Werner Koch <[email protected]>
* Use ngettext for some strings.Werner Koch2016-01-181-24/+24
| | | | | | | | | | | | | | | | | * scd/app-openpgp.c (build_enter_admin_pin_prompt): Use ngettext for some diagnostics. (do_genkey): Ditto. * g10/keyedit.c (check_all_keysigs, menu_delsig, menu_clean): Ditto. * g10/keylist.c (print_signature_stats): Ditto. * g10/keyserver.c (keyserver_refresh): Ditto. * g10/sig-check.c (check_signature_metadata_validity): Ditto. * g10/sign.c (do_sign): Ditto. * g10/trustdb.c (reset_trust_records): Ditto. (validate_keys): Use a table like diagnostic output. -- Suggested-by: Ineiev <[email protected]> Signed-off-by: Werner Koch <[email protected]>
* gpg: Silence warnings found by static analyzer.Werner Koch2016-01-061-2/+2
| | | | | | | | | | * g10/keyedit.c (change_passphrase): Remove useless init of ANY. (keyedit_quick_adduid): Remove useless setting of ERR. * g10/parse-packet.c (parse_key): Remove PKTLEN from condition because it has been checked before the loop. (parse_plaintext): Remove useless init of PKTLEN. Signed-off-by: Werner Koch <[email protected]>
* gpg: Comment on false positives by static analyzers.Werner Koch2016-01-061-1/+15
| | | | --
* g10: Use --force when importing key for bkuptocard.NIIBE Yutaka2015-12-241-1/+1
| | | | | | | * g10/call-agent.c (agent_import_key): Add an argument FORCE. * g10/import.c (transfer_secret_keys): Likewise. (import_secret_one): Call transfer_secret_keys with FORCE=0. * g10/keyedit.c (keyedit_menu): Call with FORCE=1.
* g10: Remove subcommand checkbkupkey for --key-edit.NIIBE Yutaka2015-12-241-40/+12
| | | | | | | | | | | | | * g10/keyedit.c (keyedit_menu): Remove cmdCHECKBKUPKEY support. -- GnuPG-bug-id: 2169 It was introduced by the commit 9e834047 in 2009. Then, we moved private key handling to gpg-agent which broke this subcommand. Note: This subcommand was not supported in 1.4 and 2.0.