aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyedit.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* gpg: Remove all support for v3 keys and always create v4-signatures.Werner Koch2014-10-171-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]>
* gpg: Print a warning if the subkey expiration may not be what you want.Werner Koch2014-09-171-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.
* gpg: Remove options --pgp2 and --rfc1991.Werner Koch2014-08-141-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.
* gpg: Add list-option "show-usage".Werner Koch2014-08-131-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.
* gpg: Make --quick-sign-key promote local key signatures.Werner Koch2014-07-231-3/+1
| | | | * g10/keyedit.c (sign_uids): Promote local sigs in quick mode.
* Make more use of *_NAME macros.Werner Koch2014-05-081-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.
* gpg: Change pinentry prompt to talk about "secret key".Werner Koch2014-04-151-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.
* gpg: Add commands --quick-sign-key and --quick-lsign-key.Werner Koch2014-03-271-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.
* Change some keyedit functions to allow printing to arbitrary streams.Werner Koch2014-03-271-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.
* gpg: Print a "not found" message for an unknown key in --key-edit.Werner Koch2014-03-071-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
* gpg: Allow building without any trust model support.Werner Koch2014-02-101-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.
* gpg: Change format for the key size in --list-key and --edit-key.Werner Koch2014-02-051-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]>
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-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.
* Allow creating subkeys using an existing keyWerner Koch2011-11-061-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.
* Allow NULL for free_public_key.Werner Koch2011-09-201-7/+3
|
* Fixed set but unused variable bugsWerner Koch2011-08-101-2/+0
|
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-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.
* Smartcard related updatesWerner Koch2010-11-171-48/+19
|
* Re-implemented GPG's --passwd command and improved it.Werner Koch2010-10-261-206/+76
|
* Make public key data structure easier to read.Werner Koch2010-10-201-8/+8
| | | | | Check vor v1 card while signing.
* More agent support for gpg.Werner Koch2010-10-131-1/+1
|
* Exporting secret keys via gpg-agent is now basically supported.Werner Koch2010-10-011-10/+10
| | | | | | A couple of forward ported changes. Doc updates.
* Removed more secret key related code.Werner Koch2010-09-061-55/+39
| | | | | | It builds fine and passes some of the tests but there are quite some features which don't work yet.
* Even less prompts for a new key now.Werner Koch2010-09-011-9/+12
|
* Decryption and signi via agent is now implemented.Werner Koch2010-04-231-8/+9
|
* More changes on the way to remove secring.gpg.Werner Koch2010-04-211-623/+327
|
* ReindentedWerner Koch2010-04-201-3637/+3833
|
* Generating an OpenPGP key cia gpg-agent basically works.Werner Koch2010-04-201-12/+17
|
* Use gpg_err_set_errno to assign values to ERRNO.Werner Koch2010-04-011-1/+1
|
* Finished the bulk of changes to use estream in most places instead ofWerner Koch2010-03-151-10/+13
| | | | | stdio.
* Use macros for iobuf ioctls. Werner Koch2010-03-081-1/+1
|
* Various changes to eventually support openpgp keys in pgp-agent.Werner Koch2010-02-021-24/+81
| | | | | | Comment fixes. Minor chnages in preparation of a W32CE port.
* Add dummu option --passwd for gpg.Werner Koch2010-01-081-1/+14
| | | | | Collected changes.
* More stuff for the audit-log.Werner Koch2009-12-021-8/+35
|
* Allow uid sand key election using a '*'.Werner Koch2009-09-041-75/+104
|
* Fix bug#1122.Werner Koch2009-09-031-1/+1
| | | | | | Note that msgmerge 0.17 is completely broken as it always prepends a fuzzy null entry to all po files.
* Fix debian bug#543530Werner Koch2009-08-261-0/+30
|
* Translation fixWerner Koch2009-06-301-2/+5
|
* Fixed a bunch of little bugs as reported by Fabian Keil.Werner Koch2009-06-241-2/+2
| | | | | Still one problem left; marked with a gcc #warning.
* Fix bug#998.Werner Koch2009-02-091-0/+11
|
* fixed a bug in the prompt formatter.Werner Koch2008-10-281-0/+18
|
* Marked all unused args on non-W32 platforms.Werner Koch2008-10-201-0/+2
|
* * main.h, mainproc.c (check_sig_and_print), keylist.cDavid Shaw2008-10-031-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.
* * keyedit.c (keyedit_menu): Fix bug where a modified keyring loses itsDavid Shaw2008-09-251-2/+4
| | | | | | modified status after a "clean" or "minimize" that doesn't need to do anything.
* --locate-key now returns several keys if they all match.Werner Koch2008-05-071-2/+2
|
* Enhanced --auto-key-locate.Werner Koch2008-04-081-2/+2
|
* Support DSA2.Werner Koch2007-12-121-3/+4
| | | | | | Support Camellia for testing. More audit stuff.
* Started to implement the audit log feature.Werner Koch2007-11-191-3/+3
| | | | | | | | Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
* Ported changes from 1.4.Werner Koch2007-10-251-1/+1
| | | | | Add copyright notices.
* Fixed card key generation of gpg2.Werner Koch2007-07-051-1/+7
| | | | | Reveal less information about timings while generating a key.