aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyedit.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * keydb.h, pkclist.c (select_algo_from_prefs): Allow passing a suggestedDavid Shaw2002-06-201-18/+6
| | | | | | | | | | | | | | | | | | | algorithm which will be used if available. * encode.c (encode_crypt, encrypt_filter), sign.c (sign_file): Use new select_algo_from_prefs feature to check if forcing an algorithm would violate the recipient preferences. * photoid.c (get_default_photo_command, show_photos): Use different default viewers on different platforms. Currently we have Win 9x, Win NT (2k, xp), Mac OSX, RISC OS, and "everybody else". These are #ifdefs as much as possible to avoid clutter. * g10.c (strusage, build_list), keyedit.c (show_prefs), main.h, misc.c (compress_algo_to_string, check_compress_algo), pkclist.c (algo_available), keygen.c (keygen_set_std_prefs): New algo_to_string and check functions for compress algorithms.
* * keyedit.c (show_key_with_all_names), keylist.c (list_keyblock_print):David Shaw2002-06-151-4/+15
| | | | | | | | | | Show "[expired]" before expired uids. * keyedit.c (show_key_with_all_names_colon), mainproc.c (list_node), keylist.c (list_keyblock_colon): Use "uat" for user attribute packets instead of "uid". Also use '<count> <length>' rather than the fake user id string.
* * keyedit.c (show_key_with_all_names): Display warning if a user tries toDavid Shaw2002-06-141-2/+8
| | | | | | | | | | | | show prefs on a v3 key with a v3 selfsig. * kbnode.c (dump_kbnode): Show if a uid is expired. * import.c (merge_blocks, import_revoke_cert): Show user ID receiving a revocation certificate. * free-packet.c (cmp_user_ids): Properly compare attribute ids.
* * options.skel: Sample photo viewers for Win32.David Shaw2002-06-031-1/+1
| | | | | | | | | | | * misc.c (pct_expando): Use the seckey for %k/%K if the pubkey is not available. * photoid.h, photoid.c (show_photos): Include the seckey in case a user tries to view a photo on a secret key, and change all callers in keyedit.c (menu_showphoto), keylist.c (list_keyblock_print), and photoid.c (generate_photo_id).
* * sign.c (mk_notation_and_policy): Free unneeded buffer.David Shaw2002-06-011-1/+8
| | | | | | | | | | | | * hkp.c (parse_hkp_index): Properly handle the '&' character (i.e. "&amp;") in HKP responses. * getkey.c (merge_selfsigs_main): Fix reversed expiration time check with self-sigs. * keyedit.c (sign_uids): When making a new self-sig on a v3 key, make a v3 self-sig unless it is currently a v3 self-sig being promoted to v4.
* * keyedit.c (show_key_with_all_names_colon): Renamed the recordWerner Koch2002-05-291-1/+1
| | | | | for revocation keys to "rvk".
* * keyedit.c (show_key_with_all_names_colon): New.Werner Koch2002-05-281-9/+142
| | | | | | (show_key_with_all_names): Divert to new function when required. Sanitize printing of revoker name.
* * build-packet.c (build_sig_subpkt): Handle setting sig flags for certainDavid Shaw2002-05-281-2/+0
| | | | | | | | | | subpacket types (notation, policy url, exportable, revocable). keyedit.c (sign_mk_attrib): Flags no longer need to be set here. * packet.h, parse-packet.c (parse_one_sig_subpkt), build-packet.c (build_sig_subpkt): Call parse_one_sig_subpkt to sanity check buffer lengths before building a sig subpacket.
* * options.h, main.h, keygen.c (keygen_set_set_prefs, keygen_get_std_prefs,David Shaw2002-05-221-1/+1
| | | | | | | | | | | | | | | | keygen_upd_std_prefs), keyedit.c (keyedit_menu), g10.c (main), pkclist.c (select_algo_from_prefs): Add --personal-preference-list which allows the user to factor in their own preferred algorithms when the preference lists are consulted. Obviously, this does not let the user violate a recepient's preferences (and the RFC) - this only influences the ranking of the agreed-on (and available) algorithms from the recepients. Suggested by David Hollenberg. * options.h, keygen.c (keygen_set_std_prefs), g10.c (main): Rename --preference-list to --default-preference-list (as that is what it really is), and make it a true default in that if the user selects "default" they get this list and not the compiled-in list.
* * main.h, g10.c (main), revoke.c (gen_desig_revoke): Generate a designatedDavid Shaw2002-05-191-4/+148
| | | | | | | | revocation via --desig-revoke * keyedit.c (keyedit_menu, menu_addrevoker): New "addrevoker" command to add a designated revoker to a key.
* * gpgv.c: Add stub for get_ownertrust().David Shaw2002-05-171-15/+24
| | | | | | | | | | | | | * g10.c (main): --allow-freeform-uid should be implied by OpenPGP. Add --no-allow-freeform-uid. * keyedit.c (sign_uids): Issue a warning when signing a non-selfsigned uid. * getkey.c (merge_selfsigs_main): If a key has no selfsigs, and allow-non-selfsigned-uid is not set, still try and make the key valid by checking all uids for a signature from an ultimately trusted key.
* * photoid.c (show_photos): Use the long keyid as the filename for theDavid Shaw2002-05-131-3/+6
| | | | | | | | | | | | | | | photo. Use the short keyid as the filename on 8.3 systems. * exec.h, exec.c (make_tempdir, exec_write, exec_finish): Allow caller to specify filename. This should make things easier on windows and macs where the file extension is required, but a whole filename is even better. * keyedit.c (show_key_with_all_names, show_prefs): Show proper prefs for a v4 key uid with no selfsig at all. * misc.c (check_permissions): Don't check permissions on non-normal files (pipes, character devices, etc.)
* fixes for M_DEBUG, strcasecmp and RISC OSStefan Bellon2002-05-101-4/+4
|
* * packet.h, getkey.c (fixup_uidnode), keyedit.c (show_prefs): Show assumedDavid Shaw2002-05-101-9/+35
| | | | | | | | | | prefs for hash and compression as well as the cipher pref. Show assumed prefs if there are no prefs at all on a v4 self-signed key. * options.h, g10.c (main), sign.c (make_keysig_packet): New --cert-digest-algo function to override the default key signing hash algorithm.
* * keyedit.c (sign_uids): If --expert it set, allow re-signing a uid toDavid Shaw2002-05-071-19/+58
| | | | | | promote a v3 self-sig to a v4 one. This essentially deletes the old v3 self-sig and replaces it with a v4 one.
* * keyedit.c (sign_uids): When making a self-signature via "sign" don't askDavid Shaw2002-05-061-18/+43
| | | | | | | about sig level or expiration, and include the usual preferences and such for v4 self-sigs. (menu_set_preferences): Convert uids from UTF8 to native before printing.
* * keyedit.c (sign_uids): Convert uids from UTF8 to native before printing.David Shaw2002-05-061-10/+26
| | | | | | (menu_set_primary_uid): Show error if the user tries to make a uid with a v3 self-sig primary.
* fixed m_alloc(0) bug and added checks to revkey and numrevkeysStefan Bellon2002-05-041-18/+21
|
* * keyedit.c (sign_uids): Nonrevocable key signatures cause an automaticDavid Shaw2002-05-031-2/+5
| | | | | promotion to v4.
* * photoid.h, photoid.c (parse_image_header, image_type_to_string): UsefulDavid Shaw2002-05-021-25/+31
| | | | | | | | | | | | | | | | | | | functions to return data about an image. * packet.h, parse-packet.c (make_attribute_uidname, parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c (show_photos): Handle multiple images in a single attribute packet. * main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c (show_photos): Simpler expando code that does not require using compile-time string sizes. Call image_type_to_string to get image strings (i.e. "jpg", "image/jpeg"). Change all callers. * keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow viewing multiple images within a single attribute packet. * gpgv.c: Various stubs for link happiness.
* Allow multiple policy URLs on a given signature.David Shaw2002-05-021-1/+1
| | | | | | | Split "--notation-data" into "--cert-notation" and "--sig-notation" so the user can set different policies for key and data signing. For backwards compatibility, "--notation-data" sets both, as before.
* * keyedit.c (menu_adduid): 2440bis04 says that multiple attribute packetsDavid Shaw2002-05-011-34/+10
| | | | | | | | on a given key are legal. * keyserver.c (keyserver_refresh): the fake v3 keyid hack applies to "mailto" URLs as well since they are also served by pksd.
* Added a copyright year for files changed this year.Werner Koch2002-04-291-1/+1
|
* After generating a new key, show the key information (name, keyid,David Shaw2002-04-231-4/+10
| | | | | | | | | | | | fingerprint, etc.) Do not print uncheckable signatures (missing key..) in --check-sigs. Print statistics (N missing keys, etc.) after --check-sigs. When signing a key with an expiration date on it, the "Do you want your signature to expire at the same time?" question should default to YES
* * keyedit.c (menu_deluid): Only cause a trust update if we delete aDavid Shaw2002-04-191-7/+10
| | | | | | | | | | | | | | | | | non-revoked user id. * hkp.c (hkp_ask_import), keyserver.c (parse_keyserver_options, keyserver_spawn), options.h: Remove fast-import keyserver option (no longer meaningful). * g10.c (main), keyedit.c (sign_uids), options.h: Change --default-check-level to --default-cert-check-level as it makes clear what it operates on. * g10.c (main): --pgp6 also implies --no-ask-sig-expire. * delkey.c (do_delete_key): Comment.
* * keyedit.c (sign_uids, keyedit_menu, menu_deluid, menu_delsig,David Shaw2002-04-191-18/+29
| | | | | | | | | menu_expire, menu_revsig, menu_revkey): Only force a trustdb check if we did something that changes it. * g10.c: add "--auto-check-trustdb" to override a "--no-auto-check-trustdb"
* * tdbio.c (tdbio_write_nextcheck): Return a status whether theWerner Koch2002-04-191-5/+22
| | | | | | | | | | | | | | | | | | stamp was actually changed. * trustdb.c (revalidation_mark): Sync the changes. Removed the sync operation done by its callers. (get_validity): Add logic for maintaining a pending_check flag. (clear_ownertrust): New. * keyedit.c (sign_uids): Don't call revalidation_mark depending on primary_pk. (keyedit_menu): Call revalidation_mark after "trust". (show_key_with_all_names): Print a warning on the wrong listed key validity. * delkey.c (do_delete_key): Clear the owenertrust information when deleting a public key.
* * parse-packet.c (parse_signature): Minor fix - signatures should expireDavid Shaw2002-04-141-1/+1
| | | | | | | | | | | | | | at their expiration time and not one second later. * keygen.c (proc_parameter_file): Allow specifying preferences string (i.e. "s5 s2 z1 z2", etc) in a batchmode key generation file. * keyedit.c (keyedit_menu): Print standard error message when signing a revoked key (no new translation). * getkey.c (merge_selfsigs): Get the default set of key prefs from the real (not attribute) primary uid.
* * pkclist.c (build_pk_list): Fix bug that allowed a key to be selectedDavid Shaw2002-04-131-3/+20
| | | | | | | | | | | | | twice in batch mode if one instance was the default recipient and the other was an encrypt-to. Noted by Stefan Bellon. * parse-packet.c (dump_sig_subpkt): Show data in trust and regexp sig subpackets. * keyedit.c (keyedit_menu): Use new function real_uids_left to prevent deleting the last real (i.e. non-attribute) uid. Again, according to the attribute draft. (menu_showphoto): Make another string translatable.
* * build-packet.c (build_sig_subpkt): Delete subpackets from both hashedDavid Shaw2002-04-121-24/+61
| | | | | | | | | | | | | and unhashed area on update. (find_subpkt): No longer needed. * keyedit.c (sign_uids): With --pgp2 on, refuse to sign a v3 key with a v4 signature. As usual, --expert overrides. Try to tweak some strings to a closer match so they can all be translated in one place. Use different helptext keys to allow different help text for different questions. * keygen.c (keygen_upd_std_prefs): Remove preferences from both hashed and unhashed areas if they are not going to be used.
* * misc.c (pct_expando), options.skel: Use %t to indicate type of a photoDavid Shaw2002-04-111-9/+20
| | | | | | | | | | | | | | | | | | | ID (in this version, it's always "jpeg"). Also tweak string expansion loop to minimize reallocs. * mainproc.c (do_check_sig): Variable type fix. * keyedit.c (menu_set_primary_uid): Differentiate between true user IDs and attribute user IDs when making one of them primary. That is, if we are making a user ID primary, we alter user IDs. If we are making an attribute packet primary, we alter attribute packets. This matches the language in the latest attribute packet draft. * keyedit.c (sign_uids): No need for the empty string hack. * getkey.c (fixup_uidnode): Only accept preferences from the hashed segment of the self-sig.
* Merged in my changes, after disk crash. Fortunately the CVS was notWerner Koch2002-04-081-4/+13
| | | | | | affected - but everything else and it seems that there is no backup of the BTS data is available :-(
* Fix ownertrust display with --with-colons.David Shaw2002-03-311-8/+21
| | | | | | | | | | | | | | | | | | | Properly initialize the user ID refcount for user and photo IDs. Tweak a few prompts to change "y/n" to "y/N", which is how most other prompts are written. Warn the user if they are about to revoke an expired sig (not a problem, but they should know). Control-d escapes the keyserver search prompt. If a subkey is considered revoked solely because the parent key is revoked, print the revocation reason from the parent key. Allow revocation/expiration to apply to a uid/key with no entry in the trustdb.
* --openpgp implies --allow-non-selfsigned-uidDavid Shaw2002-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | If none of the uids are primary (because none are valid) then pick the first to be primary (but still invalid). This is for cosmetics in case some display needs to print a user ID from a non-selfsigned key. Also use --allow-non-selfsigned-uid to make such a key valid and not --always-trust. The key is *not* automatically trusted via --allow-non-selfsigned-uid. Make sure non-selfsigned uids print [uncertain] on verification even though one is primary now. If the main key is not valid, then neither are the subkeys. Allow --allow-non-selfsigned-uid to work on completely unsigned keys. Print the uids in UTF8. Remove mark_non_selfsigned_uids_valid() Show revocation key as UTF8. Allow --not-dash-escaped to work with v3 keys.
* Some minor bug fixes.David Shaw2002-03-051-7/+15
| | | | | | | | | | | | | | | do not prompt for revocation reason for v3 revocations (unless force-v4-certs is on) since they wouldn't be used anyway. show the status of the sigs (exportable? revocable?) to the user before prompting for which sig to revoke. Also, make sure that local signatures get local revocations. Add "exec-path" variable to override PATH for execing programs. properly check return code from classify_user_id to catch unclassifiable keys.
* This is the first half of revocation key / designated revokerDavid Shaw2002-02-281-8/+27
| | | | | | | | | | | | | | | | | | | | | support. That is, it handles all the data to mark a key as revoked if it has been revoked by a designated revoker. The second half (coming later) will contain the code to make someones key your designated revoker and to issue revocations for someone else. Note that this is written so that a revoked revoker can still issue revocations: i.e. If A revokes B, but A is revoked, B is still revoked. I'm not completely convinced this is the proper behavior, but it matches how PGP does it. It does at least have the advantage of much simpler code - my first version of this had lots of loop maintaining code so you could chain revokers many levels deep and if D was revoked, C was not, which meant that B was, and so on. It was sort of scary, actually. This also changes importing to allow bringing in more revocation keys, and exporting to not export revocation keys marked "sensitive". The --edit menu information will show if a revocation key is present.
* For --sig-policy-url and --cert-policy-url, clarify what is a sig and whatDavid Shaw2002-02-101-8/+12
| | | | | | | | | | | | | | | | | | | | | | is a cert. A sig has sigclass 0x00, 0x01, 0x02, or 0x40, and everything else is a cert. Add a "nrlsign" for nonrevocable and local key signatures. Add a --no-force-mdc to undo --force-mdc. Add a knob to force --disable-mdc/--no-disable-mdc. Off by default, of course, but is used in --pgp2 and --pgp6 modes. Allow specifying multiple users in the "Enter the user ID" loop. Enter a blank line to stop. Show each key+id as it is added. It is not illegal (though possibly silly) to have multiple policy URLs in a given signature, so print all that are present. More efficient implementation of URL-ifying code for --search on an HKP keyserver.
* Allow policy URLs with %-expandos in them. This allows policy URLs likeDavid Shaw2002-02-051-2/+2
| | | | | | | | | "http://notary.jabberwocky.com/keysign/%K" to create a per-signature policy URL. Use the new generic %-handler for the photo ID stuff as well. Display policy URLs and notations during signature generation if --show-policy-url/--show-notation is set.
* Split "--set-policy-url" into "--cert-policy-url" and "--sig-policy-url"David Shaw2002-02-031-1/+1
| | | | | | so the user can set different policies for key and data signing. For backwards compatibility, "--set-policy-url" sets both, as before.
* More comments about when to use IDEA in keygen.cDavid Shaw2002-01-271-1/+1
| | | | | | | | | | When key signing with multiple keys at the same time, make sure each key gets the sigclass prompt Close the iobuf and FILE before trying to reap the child process to encourage the child to exit Disable cache-on-close of the fd iobuf (shouldn't all fd iobufs not be cached?)
* * passphrase.c (passphrase_to_dek): Add tryagain_text arg to beWerner Koch2002-01-201-2/+5
| | | | | | | | | | | | | | used with the agent. Changed all callers. (agent_get_passphrase): Likewise and send it to the agent * seckey-cert.c (do_check): New arg tryagain_text. (check_secret_key): Pass the string to do_check. * keygen.c (ask_passphrase): Set the error text is required. * keyedit.c (change_passphrase): Ditto. * passphrase.c (agent_open): Disable opt.use_agent in case of a problem with the agent. (agent_get_passphrase): Ditto. (passphrase_clear_cache): Ditto.
* fix off-by-one in building attribute subpacketsDavid Shaw2002-01-061-11/+56
| | | | | | | | | | change default compression to 1 add ask-sig-expire and ask-cert-expire (--expert was getting absurdly overloaded) permit v3 subkeys use --expert to protect adding multiple photo ids and adding photos to a v3 key
* * keyserver.c (keyserver_spawn): Removed some variablesWerner Koch2001-12-221-0/+6
| | | | | | | | | | | | declaration due to shadowing warnings. * build-packet.c (build_attribute_subpkt): s/index/idx/ to avoid compiler warnig due to index(3). * getkey.c (get_ctx_handle): Use KEYDB_HANDLE as return value. * keylist.c (list_one): Made resname const. * keyedit.c (keyedit_menu): Allow "addphoto" only when --openpgp is not used. * options.skel: Changed one example photo viewer to qiv.
* Photo ID support (actually generic "attribute packet" support, but thereDavid Shaw2001-12-211-16/+90
| | | | | is only one attribute packet defined thus far, and it's a picture)
* Nonrevocable key signature support via "nrsign". These sigs can expire,David Shaw2001-12-211-35/+36
| | | | | but cannot be revoked. Any revocation certificates for them are ignored.
* Sig expiration codeDavid Shaw2001-12-071-7/+74
| | | | | | | Offer to expire a key signature when the key the user is signing expires Expired sigs cause an error return If --expert is set, prompt for sig duration
* Allow a regular key signature to promote a local signature to fullDavid Shaw2001-12-071-3/+34
| | | | | exportable status
* New option --expertDavid Shaw2001-12-071-4/+41
| | | | | | Do not allow signing a revoked UID unless --expert is set, and ask even then. Do not allow signing a revoked key unless --expert is set, and ask even then.
* Bug fix in "showpref"David Shaw2001-12-071-0/+29
| | | | | Allow setting a no-compression preference
* "sigclass" patch - adds key signature class levels, notation and policy-urlDavid Shaw2001-12-061-16/+92
| | | | | displays in key listings, and shows flags for signature features.