aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyedit.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-01-05gpg: Remove unused args from a function.Werner Koch1-1/+1
* g10/keyserver.c (parse_keyserver_uri): Remove args configname and configlineno. Change all callers. Signed-off-by: Werner Koch <[email protected]>
2014-10-17gpg: Remove all support for v3 keys and always create v4-signatures.Werner Koch1-28/+10
* g10/build-packet.c (do_key): Remove support for building v3 keys. * g10/parse-packet.c (read_protected_v3_mpi): Remove. (parse_key): Remove support for v3-keys. Add dedicated warnings for v3-key packets. * g10/keyid.c (hash_public_key): Remove v3-key support. (keyid_from_pk): Ditto. (fingerprint_from_pk): Ditto. * g10/options.h (opt): Remove fields force_v3_sigs and force_v4_certs. * g10/gpg.c (cmd_and_opt_values): Remove oForceV3Sigs, oNoForceV3Sigs, oForceV4Certs, oNoForceV4Certs. (opts): Turn --force-v3-sigs, --no-force-v3-sigs, --force-v4-certs, --no-force-v4-certs int dummy options. (main): Remove setting of the force_v3_sigs force_v4_certs flags. * g10/revoke.c (gen_revoke, create_revocation): Always create v4 certs. * g10/sign.c (hash_uid): Remove support for v3-signatures (hash_sigversion_to_magic): Ditto. (only_old_style): Remove this v3-key function. (write_signature_packets): Remove support for creating v3-signatures. (sign_file): Ditto. (sign_symencrypt_file): Ditto. (clearsign_file): Ditto. Remove code to emit no Hash armor line if only v3-keys are used. (make_keysig_packet): Remove arg SIGVERSION and force using v4-signatures. Change all callers to not pass a value for this arg. Remove all v3-key related code. (update_keysig_packet): Remove v3-signature support. * g10/keyedit.c (sign_uids): Always create v4-signatures. * g10/textfilter.c (copy_clearsig_text): Remove arg pgp2mode and change caller. -- v3 keys are deprecated for about 15 years and due the severe weaknesses of MD5 it does not make any sense to keep code around to use these old and broken keys. Users who need to decrypt old messages should use gpg 1.4 and best re-encrypt them to modern standards. verification of old (i.e. PGP2) created signatures is thus also not anymore possible but such signatures have no values anyway - MD5 is just too broken. We have also kept support for v3 signatures until now. With the removal of support for v3 keys it is questionable whether it makes any sense to keep support for v3-signatures. What we do now is to keep support for verification of v3-signatures but we force the use of v4-signatures. The latter makes the --pgp6 and --pgp7 switch a bit obsolete because those PGP versions require v3-signatures for messages. These versions of PGP are also really old and not anymore maintained so they have not received any bug fixes and should not be used anyway. Signed-off-by: Werner Koch <[email protected]>
2014-09-17gpg: Print a warning if the subkey expiration may not be what you want.Werner Koch1-0/+63
* g10/keyedit.c (subkey_expire_warning): New. (keyedit_menu): Call it when needed. -- GnuPG-bug-id: 1715 The heuristic to detect a problem is not very advanced but it should catch the most common cases.
2014-08-14gpg: Remove options --pgp2 and --rfc1991.Werner Koch1-37/+1
* g10/gpg.c (oRFC1991, oPGP2): Remove (opts): Remove --pgp2 and --rfc1991. * g10/options.h (CO_PGP2, CO_RFC1991): Remove. Remove all users. (RFC2440, PGP2): Remove. Remove all code only enabled by these conditions. * tests/openpgp/clearsig.test: Remove --rfc1991 test. -- The use of PGP 2.c is considered insecure for quite some time now (e.g. due to the use of MD5). Thus we remove all support for _creating_ PGP 2 compatible messages.
2014-08-13gpg: Add list-option "show-usage".Werner Koch1-1/+1
* g10/gpg.c (parse_list_options): Add "show-usage". * g10/options.h (LIST_SHOW_USAGE): New. * g10/keyid.c (usagestr_from_pk): Add arg FILL. Change caller. * g10/keylist.c (list_keyblock_print): Print usage info.
2014-07-23gpg: Make --quick-sign-key promote local key signatures.Werner Koch1-3/+1
* g10/keyedit.c (sign_uids): Promote local sigs in quick mode.
2014-05-08Make more use of *_NAME macros.Werner Koch1-1/+1
* configure.ac (GPG_DISP_NAME, GPGSM_DISP_NAME): New. (GPG_AGENT_DISP_NAME, SCDAEMON_DISP_NAME): New. (DIRMNGR_DISP_NAME, G13_DISP_NAME): New. (GPGCONF_DISP_NAME): New. (SCDAEMON_SOCK_NAME): New. * common/argparse.c (show_help): Map description string.
2014-04-15gpg: Change pinentry prompt to talk about "secret key".Werner Koch1-1/+1
* g10/passphrase.c (gpg_format_keydesc): Add mode 2. Change strings. * g10/keydb.h (FORMAT_KEYDESC_NORMAL, FORMAT_KEYDESC_IMPORT) (FORMAT_KEYDESC_EXPORT): New. Use them for clarity. -- The use of the term "certificate" was more confusing than helpful.
2014-03-27gpg: Add commands --quick-sign-key and --quick-lsign-key.Werner Koch1-101/+279
* g10/gpg.c (main): Add commands --quick-sign-key and --quick-lsign-key. * g10/keyedit.c (sign_uids): Add args FP and QUICK. (keyedit_quick_sign): New. (show_key_with_all_names): Add arg NOWARN.
2014-03-27Change some keyedit functions to allow printing to arbitrary streams.Werner Koch1-115/+130
* common/ttyio.c (tty_print_string): Add optional arg FP. Change all callers. (tty_print_utf8_string2): Ditto. * g10/keyedit.c (show_prefs): Ditto. (show_key_with_all_names_colon): Ditto. (show_names): Ditto. * g10/keylist.c (print_revokers): Ditto. (print_fingerprint): Ditto.
2014-03-07gpg: Print a "not found" message for an unknown key in --key-edit.Werner Koch1-1/+4
* g10/keyedit.c (keyedit_menu): Print message. -- GnuPG-bug-id: 1420 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 0bf54e60d31389812d05c3fd29bece876204561d) Resolved conflicts: g10/keyedit.c: Fix white spaces
2014-02-10gpg: Allow building without any trust model support.Werner Koch1-1/+19
* configure.ac: Add option --disable-trust-models (NO_TRUST_MODELS): New ac_define and am_conditional. * g10/Makefile.am (trust_source): New. (gpg2_SOURCES): Factor some files out to above. Add trust.c. * g10/gpg.c [NO_TRUST_MODELS]: Disable options --export-ownertrust, --import-ownertrust, --update-trustdb, --check-trustdb, --fix-trustdb, --list-trustdb, --trustdb-name, --auto-check-trustdb, --no-auto-check-trustdb, and --force-ownertrust. (parse_trust_model) [NO_TRUST_MODELS]: Do not build. (main) [NO_TRUST_MODELS]: Set trust_model to always and exclude all trustdb related option code. * g10/keyedit.c (cmds) [NO_TRUST_MODELS]: Remove menu items "trust", "enable", and "disable". * g10/keylist.c (public_key_list) [NO_TRUST_MODELS]: Do not print "tru" record. * g10/trust.c: New. * g10/trustdb.c (struct key_item): Move to trustdb.h. (register_trusted_keyid): Rename to tdb_register_trusted_keyid. (register_trusted_key): Rename to tdb_register_trusted_key. (trust_letter, uid_trust_string_fixed, trust_value_to_string) (string_to_trust_value, get_ownertrust_with_min, get_ownertrust_info) (get_ownertrust_string, get_validity_info, get_validity_string) (clean_sigs_from_uid, clean_uid_from_key, clean_key): Move to trust.c. (mark_usable_uid_certs): Move to trust.c and make global. (is_in_klist): Move as inline to trustdb.h. (trustdb_check_or_update): Rename to tdb_check_or_update (revalidation_mark): Rename to tdb_revalidation_mark. (get_ownertrust): Rename to tdb_get_ownertrust. (get_min_ownertrust): Rename to tdb_get_min_ownertrust. (update_ownertrust): Rename to tdb_update_ownertrust. (clear_ownertrusts): Rename to tdb_clear_ownertrusts. (cache_disabled_value): Rename to tdb_cache_disabled_value. (check_trustdb_stale): Rename to tdb_check_trustdb_stale. (get_validity): Rename to tdb_get_validity_core, add arg MAIN_PK and factor some code out to ... * trust.c (get_validity): ...new. (check_or_update_trustdb): New wrapper. (revalidation_mark): New wrapper. (get_ownertrust): New wrapper. (get_ownertrust_with_min): New wrapper. (update_ownertrust): New wrapper. (clear_ownertrusts): New wrapper. (cache_disabled_value): New wrapper. (check_trustdb_stale): New wrapper. * tests/openpgp/defs.inc (opt_always): New. Use in all tests instead of --always-trust.
2014-02-05gpg: Change format for the key size in --list-key and --edit-key.Werner Koch1-14/+24
* g10/gpg.c (oLegacyListMode, opts, main): Add --legacy-list-mode. * g10/options.h (struct opt): Add field legacy_list_mode. * g10/keydb.h (PUBKEY_STRING_SIZE): New. * g10/keyid.c (pubkey_string): New. * g10/import.c (import_one, import_secret_one): Use pubkey_string. * g10/keylist.c (print_seckey_info): Ditto. (print_pubkey_info, print_card_key_info): Ditto. (list_keyblock_print): Ditto. * g10/mainproc.c (list_node): Ditto. * g10/pkclist.c (do_edit_ownertrust, build_pk_list): Ditto. * g10/keyedit.c (show_key_with_all_names): Ditto. Also change the format. (show_basic_key_info): Ditto. * common/openpgp-oid.c (openpgp_curve_to_oid): Also allow "ed25519". (openpgp_oid_to_curve): Downcase "ed25519" -- For ECC it seems to be better to show the name of the curve and not just the size of the prime field. The curve name does not anymore fit into the "<size><letter>" descriptor (e.g. "2048R") and a fixed length format does not work either. Thus the new format uses "rsa2048" - RSA with 2048 bit "elg1024" - Elgamal with 1024 bit "ed25519" - ECC using the curve Ed25519. "E_1.2.3.4" - ECC using the unsupported curve with OID "1.2.3.4". unless --legacy-list-mode is given. In does not anymore line up nicely in columns thus I expect further changes to this new format. Signed-off-by: Werner Koch <[email protected]>
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-7/+7
The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
2011-11-06Allow creating subkeys using an existing keyWerner Koch1-1/+1
This works by specifying the keygrip instead of an algorithm (section number 13) and requires that the option -expert has been used. It will be easy to extend this to the primary key.
2011-09-20Allow NULL for free_public_key.Werner Koch1-7/+3
2011-08-10Fixed set but unused variable bugsWerner Koch1-2/+0
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-26/+26
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2010-11-17Smartcard related updatesWerner Koch1-48/+19
2010-10-26Re-implemented GPG's --passwd command and improved it.Werner Koch1-206/+76
2010-10-20Make public key data structure easier to read.Werner Koch1-8/+8
Check vor v1 card while signing.
2010-10-13More agent support for gpg.Werner Koch1-1/+1
2010-10-01Exporting secret keys via gpg-agent is now basically supported.Werner Koch1-10/+10
A couple of forward ported changes. Doc updates.
2010-09-06Removed more secret key related code.Werner Koch1-55/+39
It builds fine and passes some of the tests but there are quite some features which don't work yet.
2010-09-01Even less prompts for a new key now.Werner Koch1-9/+12
2010-04-23Decryption and signi via agent is now implemented.Werner Koch1-8/+9
2010-04-21More changes on the way to remove secring.gpg.Werner Koch1-623/+327
2010-04-20ReindentedWerner Koch1-3637/+3833
2010-04-20Generating an OpenPGP key cia gpg-agent basically works.Werner Koch1-12/+17
2010-04-01Use gpg_err_set_errno to assign values to ERRNO.Werner Koch1-1/+1
2010-03-15Finished the bulk of changes to use estream in most places instead ofWerner Koch1-10/+13
stdio.
2010-03-08Use macros for iobuf ioctls. Werner Koch1-1/+1
2010-02-02Various changes to eventually support openpgp keys in pgp-agent.Werner Koch1-24/+81
Comment fixes. Minor chnages in preparation of a W32CE port.
2010-01-08Add dummu option --passwd for gpg.Werner Koch1-1/+14
Collected changes.
2009-12-02More stuff for the audit-log.Werner Koch1-8/+35
2009-09-04Allow uid sand key election using a '*'.Werner Koch1-75/+104
2009-09-03Fix bug#1122.Werner Koch1-1/+1
Note that msgmerge 0.17 is completely broken as it always prepends a fuzzy null entry to all po files.
2009-08-26Fix debian bug#543530Werner Koch1-0/+30
2009-06-30Translation fixWerner Koch1-2/+5
2009-06-24Fixed a bunch of little bugs as reported by Fabian Keil.Werner Koch1-2/+2
Still one problem left; marked with a gcc #warning.
2009-02-09Fix bug#998.Werner Koch1-0/+11
2008-10-28fixed a bug in the prompt formatter.Werner Koch1-0/+18
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-0/+2
2008-10-03* main.h, mainproc.c (check_sig_and_print), keylist.cDavid Shaw1-3/+3
(list_keyblock_print), pkclist.c (do_edit_ownertrust), keyedit.c (menu_showphoto), photoid.c (generate_photo_id, show_photos), misc.c (pct_expando): Add %v and %V expandos so that displaying photo IDs can show the attribute validity tag (%v) and string (%V). Originally by Daniel Gillmor.
2008-09-25* keyedit.c (keyedit_menu): Fix bug where a modified keyring loses itsDavid Shaw1-2/+4
modified status after a "clean" or "minimize" that doesn't need to do anything.
2008-05-07--locate-key now returns several keys if they all match.Werner Koch1-2/+2
2008-04-08Enhanced --auto-key-locate.Werner Koch1-2/+2
2007-12-12Support DSA2.Werner Koch1-3/+4
Support Camellia for testing. More audit stuff.
2007-11-19Started to implement the audit log feature.Werner Koch1-3/+3
Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
2007-10-25Ported changes from 1.4.Werner Koch1-1/+1
Add copyright notices.