aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2002-06-21tidied up RISC OS specific stuffStefan Bellon1-9/+3
2002-06-20* keydb.h, pkclist.c (select_algo_from_prefs): Allow passing a suggestedDavid Shaw1-8/+7
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.
2002-06-20image file system feature and filetype for RISC OSStefan Bellon1-0/+2
2002-06-19* hkp.c (parse_hkp_index): Don't leak memory when failing out of a bad HKPDavid Shaw1-17/+5
keyserver. * g10.c (add_notation_data): Relax slightly the rules as to what can go into a notation name - 2440 allows "@", for example.
2002-06-14* pkclist.c (expand_groups): Maintain the strlist flags while expanding.David Shaw1-1/+0
Members of an expansion inherit their flags from the expansion key. * options.h, cipher.c (write_header), g10.c (main), keygen.c (keygen_set_std_prefs): remove the personal_mdc flag. It no longer serves a purpose now that the personal preference lists are split into cipher/digest/zip.
2002-06-12* keyserver.c (keyserver_spawn): Handle CRLF endings from keyserverDavid Shaw1-12/+11
helpers. Also don't leak the last line worth of memory from the keyserver response. * main.h, misc.c (deprecated_warning): New function to warn about deprecated options and commands. * g10.c (main), keyserver-internal.h, keyserver.c (parse_keyserver_uri): Use new deprecated function to warn about honor-http-proxy, auto-key-retrieve, and x-broken-hkp.
2002-06-10* options.h, keyserver.c (keyserver_opts), g10.c (main): New keyserverDavid Shaw1-0/+1
option "include-subkeys". This feature already existed, but now can be turned off. It defaults to on. * options.h, keyserver.c (parse_keyserver_options, keyserver_spawn): There are now enough options to justify making a structure for the keyserver options rather than a page of if-then-else-if-then-etc. * getkey.c (merge_keys_and_selfsig, merge_selfsigs_main): Fix bug in calculating key expiration dates.
2002-06-07* options.skel, options.h, main.h, keydb.h, pkclist.c (build_pk_list,David Shaw1-2/+31
expand_groups), g10.c (main, add_group): Add new "group" command to allow one name to expand into multiple keys. For simplicity, and to avoid potential loops, we only expand once - you can't make an alias that points to an alias. * main.h, g10.c (main), keygen.c (build_personal_digest_list): Simplify the default digest list - there is really no need for the other hashes since they will never be used after SHA-1 in the list. * options.skel, options.h, g10.c (main), hkp.c (hkp_ask_import, hkp_export, hkp_search), keyserver.c (parse_keyserver_options, parse_keyserver_uri, keyserver_work, keyserver_refresh): Make the "x-broken-hkp" keyserver scheme into keyserver-option "broken-http-proxy". Move honor_http_proxy into keyserver_options. Canonicalize the three variations of "hkp", "x-hkp", and "x-broken-hkp" into "hkp".
2002-06-07RISC OS specific changesStefan Bellon1-4/+20
2002-06-06* main.h, g10.c (main), keygen.c (build_personal_digest_list): Put in aDavid Shaw1-6/+33
default digest preference list consisting of SHA-1, followed by every other installed digest except MD5. Note this is the same as having no digest preference at all except for SHA-1 being favored. * options.h, g10.c (main), keygen.c (keygen_set_std_prefs), pkclist.c (select_algo_from_prefs): Split --personal-preference-list into three: --personal-{cipher|digest|compress}-preferences. This allows a user to set one without affecting another (i.e. setting only a digest pref doesn't imply an empty cipher pref). * exec.c (exec_read): This is a safer way of guessing the return value of system(). Noted by Stefan Bellon.
2002-06-03* main.h, g10.c (main), keylist.c (dump_attribs, set_attrib_fd,David Shaw1-0/+5
list_keyblock_print, list_keyblock_colon), status.h, status.c (get_status_string): New --attribute-fd feature to dump the contents of attribute subpackets for frontends. If --status-fd is also used, then a new status tag ATTRIBUTE is provided for each subpacket. * packet.h, getkey.c (fixup_uidnode, merge_selfsigs_main, merge_selfsigs_subkey), parse-packet.c (setup_user_id): Keep track of the expiration time of a user ID, and while we're at it, use the expired flag from the selfsig rather than reparsing the SIG_EXPIRE subpacket. * photoid.c (generate_photo_id): When adding a new photo ID, showing the photo for confirmation is not safe when noninteractive since the "user" may not be able to dismiss a viewer window. Noted by Timo Schulz.
2002-05-29* keygen.c (keygen_set_std_prefs, add_feature_mdc): Use "mdc" and "no-mdc"David Shaw1-0/+1
in the prefs string to allow switching on and off the MDC feature. This is needed to properly export a key from GnuPG for use on PGP which does not support MDC - without this, MDC-capable implementations will still try and generate MDCs which will break PGP. * keygen.c (keygen_get_std_prefs): Show "[mdc]" in prefs string if it is enabled. * options.h, g10.c (main), cipher.c (write_header), keygen.c (keygen_set_std_prefs): For consistency, allow the user to specify mdc/no-mdc in the --personal-preference-list. If disabled, it acts just like --disable-mdc.
2002-05-26* g10.c (strusage, build_list): Add compress algorithms to --version list.David Shaw1-13/+44
Show algorithm numbers when --verbose --version is done.
2002-05-22* options.h, main.h, keygen.c (keygen_set_set_prefs, keygen_get_std_prefs,David Shaw1-6/+17
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.
2002-05-22* g10.c (main): Add missing LF in a info printout and made itWerner Koch1-2/+2
translatable. Noted by Michael Tokarev.
2002-05-21* g10.c (main): Removed the undef of USE_SHM_COPROCESSING whichWerner Koch1-1/+0
was erroneously introduced on 2002-01-09.
2002-05-19* main.h, g10.c (main), revoke.c (gen_desig_revoke): Generate a designatedDavid Shaw1-0/+11
revocation via --desig-revoke * keyedit.c (keyedit_menu, menu_addrevoker): New "addrevoker" command to add a designated revoker to a key.
2002-05-17* gpgv.c: Add stub for get_ownertrust().David Shaw1-0/+4
* 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.
2002-05-10fixes for M_DEBUG, strcasecmp and RISC OSStefan Bellon1-1/+2
2002-05-10* packet.h, getkey.c (fixup_uidnode), keyedit.c (show_prefs): Show assumedDavid Shaw1-0/+12
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.
2002-05-09* getkey.c (merge_selfsigs_main): Make sure the revocation key list startsDavid Shaw1-2/+2
clean as this function may be called more than once (e.g. from functions in --edit). * g10.c, encode.c (encode_crypt), sign.c (sign_file, sign_symencrypt_file): Make --compress-algo work like the documentation says. It should be like --cipher-algo and --digest-algo in that it can override the preferences calculation and impose the setting the user wants. No --compress-algo setting allows the usual preferences calculation to take place. * main.h, compress.c (compress_filter): use new DEFAULT_COMPRESS_ALGO define, and add a sanity check for compress algo value.
2002-05-07* options.h, g10.c (main), getkey.c (finish_lookup), pkclist.cDavid Shaw1-3/+10
(algo_available): --pgp7, identical to --pgp6 except that it permits a few algorithms that PGP 7 added: AES128, AES192, AES256, and TWOFISH. Any more of these --pgpX flags, and it'll be time to start looking at a generic --emulate-pgp X option.
2002-05-07* export.c (do_export_stream): Warn the user when exporting a secret keyDavid Shaw1-6/+10
if it or any of its secret subkeys are protected with SHA1 while simple_sk_checksum is set. * parse-packet.c (parse_key): Show when the SHA1 protection is used in --list-packets. * options.h, build-packet.c (do_comment), g10.c (main): Rename --no-comment as --sk-comments/--no-sk-comments (--no-comment still works) and make the default be --no-sk-comments.
2002-05-02Allow multiple policy URLs on a given signature.David Shaw1-32/+61
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.
2002-04-25g10/Werner Koch1-0/+15
* g10.c, options.h: New options --display, --ttyname, --ttytype, --lc-ctype, --lc-messages to be used with future versions of the gpg-agent. * passphrase.c (agent_send_option,agent_send_all_options): New. (agent_open): Send options to the agent. * trustdb.c (update_ownertrust, clear_ownertrust): Do an explicit do_sync because revalidation_mark does it only if when the timestamp actually changes. / * configure.ac: Check for locale.h and setlocale
2002-04-19* keyedit.c (menu_deluid): Only cause a trust update if we delete aDavid Shaw1-4/+5
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.
2002-04-19* keyedit.c (sign_uids, keyedit_menu, menu_deluid, menu_delsig,David Shaw1-0/+3
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"
2002-04-18* getkey.c (premerge_public_with_secret): Fixed 0x12345678! syntaxWerner Koch1-0/+5
for use with secret keys. * seckey-cert.c (do_check): Always calculate the old checksum for use after unprotection. * g10.c, options.skel: New option --no-escape-from. Made --escape-from and --force-v3-sigs the default and removed them from the options skeleton.
2002-04-17* parse-packet.c (parse_key): Support a SHA1 checksum as perWerner Koch1-1/+3
draft-rfc2440-bis04. * packet.h (PKT_secret_key): Add field sha1chk. * seckey-cert.c (do_check): Check the SHA1 checksum (protect_secret_key): And create it. * build-packet.c (do_secret_key): Mark it as sha-1 protected. * g10.c, options.h: New option --simple-sk-checksum.
2002-04-10Add KEYEXPIRED, EXPSIG, and EXPKEYSIG. AddDavid Shaw1-13/+11
"deprecated-use-keyexpired-instead" to SIGEXPIRED. Start transition from SIGEXPIRED to KEYEXPIRED, since the actual event is signature verification by an expired key and not an expired signature. Rename do_signature_check as signature_check2, make public, and change all callers. Use status EXPSIG for an expired, but good, signature. Add the expiration time (or 0) to the VALIDSIG status line. Use status KEYEXPSIG for a good signature from an expired key. Remove checks for no arguments now that argparse does it.
2002-04-08Merged in my changes, after disk crash. Fortunately the CVS was notWerner Koch1-5/+5
affected - but everything else and it seems that there is no backup of the BTS data is available :-(
2002-03-24Minor tweak to importing to allow more non-signed uids (now thatDavid Shaw1-2/+4
--allow-non-selfsigned-uid allows for completey unsigned uids). Do not choose an attribute packet (i.e. photo) as primary uid. This prevents oddities like "Good signature from [image of size 2671]". This is still not perfect (one can still select an attribute packet as primary in --edit), but is closer to the way the draft is going. The algorithms list should include #110. --pgp2 implies --no-ask-sig-expire and --no-ask-cert-expire as those would cause a v4 sig/cert. Be more lenient in what constitutes a valid armor header (i.e. -----BEGIN blah blah-----) as some Windows programs seem to add spaces at the end. --openpgp makes it strict again
2002-03-19Properly handle a "no keys found" case from the internal HKP codeDavid Shaw1-0/+3
(external HKP is ok). Also, make a COUNT -1 (i.e. streamed) keyserver response a little more efficient. Add --no-allow-non-selfsigned-uid
2002-03-17--openpgp implies --allow-non-selfsigned-uidDavid Shaw1-0/+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.
2002-03-07Some minor fixes for revocation keys: print a warning if a key is importedDavid Shaw1-4/+15
that has been revoked by designated revoker, but the designated revoker is not present to verify the revocation (whew!). This applies to all ways to get a key into the system: --import --recv-keys, and --search-keys. If auto-key-retrieve is set, try and retrieve the revocation key. Also, auto-key-retrieve is now a keyserver-option.
2002-03-05Some minor bug fixes.David Shaw1-2/+17
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.
2002-02-14* pkclist.c (check_signatures_trust): Always print the warning forWerner Koch1-0/+3
unknown and undefined trust. Removed the did_add cruft. Reported by Janusz A. Urbanowicz. * g10.c: New option --no-use-agent. Hmmm, is this a a good name? --do-not-use-agent seems a bit to long.
2002-02-10For --sig-policy-url and --cert-policy-url, clarify what is a sig and whatDavid Shaw1-0/+22
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.
2002-02-03Split "--set-policy-url" into "--cert-policy-url" and "--sig-policy-url"David Shaw1-4/+14
so the user can set different policies for key and data signing. For backwards compatibility, "--set-policy-url" sets both, as before.
2002-01-30* g10.c (main): --gen-random --armor does now output a base64Werner Koch1-2/+18
encoded string.
2002-01-29--pgp6 flag. This is not nearly as involved as --pgp2. In short, itDavid Shaw1-50/+71
turns off force_mdc, turns on no_comment, escape_from, and force_v3_sigs, and sets compression to 1. It also restricts the user to IDEA (if present), 3DES, CAST5, MD5, SHA1, and RIPEMD160. See the comments above algo_available() for lots of discussion on why you would want to do this.
2002-01-26* g10.c, options.h: New option --gpg-agent-infoWerner Koch1-0/+3
* passphrase.c (agent_open): Let it override the environment info. * seckey-cert.c (check_secret_key): Always try 3 times when the agent is enabled. * options.skel: Describe --use-agent.
2002-01-22Some compatibility polish for PGP2. Add a fake IDEA preference for v3David Shaw1-3/+3
keys (this is in the RFC), so that they can be (sometimes) used along OpenPGP keys. Do not force using IDEA on an OpenPGP key, as this may violate its prefs. Also, revise the help text for the sig class explanation.
2002-01-15New command --decrypt-files.Timo Schulz1-1/+7
Some fixes.
2002-01-09Move idea_cipher_warn to misc.c so gpgv.c doesn't need a stubDavid Shaw1-73/+22
Remove get_temp_dir (it's in exec.c now) Allow --delete-key (now --delete-keys, though --delete-key still works) to delete multiple keys in one go. This applies to --delete-secret-key(s) and --delete-secret-and-public-key(s) as well
2002-01-09New code for encode_crypt_files.Timo Schulz1-3/+2
2002-01-08Better description for --encrypt-files.Timo Schulz1-1/+1
2002-01-08* g10.c (main): Must register the secring for encryption becauseWerner Koch1-2/+2
it is needed to figure out the default recipient. Reported by Roger Sondermann.
2002-01-06fix off-by-one in building attribute subpacketsDavid Shaw1-1/+13
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
2002-01-05* g10.c (main): Do not register the secret keyrings for certainWerner Koch1-10/+17
commands. * keydb.c (keydb_add_resource): Use access to test for keyring existence. This avoids cached opened files which are bad under RISC OS.