aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tidied up RISC OS specific stuffStefan Bellon2002-06-211-9/+3
|
* * keydb.h, pkclist.c (select_algo_from_prefs): Allow passing a suggestedDavid Shaw2002-06-201-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.
* image file system feature and filetype for RISC OSStefan Bellon2002-06-201-0/+2
|
* * hkp.c (parse_hkp_index): Don't leak memory when failing out of a bad HKPDavid Shaw2002-06-191-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.
* * pkclist.c (expand_groups): Maintain the strlist flags while expanding.David Shaw2002-06-141-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.
* * keyserver.c (keyserver_spawn): Handle CRLF endings from keyserverDavid Shaw2002-06-121-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.
* * options.h, keyserver.c (keyserver_opts), g10.c (main): New keyserverDavid Shaw2002-06-101-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.
* * options.skel, options.h, main.h, keydb.h, pkclist.c (build_pk_list,David Shaw2002-06-071-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".
* RISC OS specific changesStefan Bellon2002-06-071-4/+20
|
* * main.h, g10.c (main), keygen.c (build_personal_digest_list): Put in aDavid Shaw2002-06-061-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.
* * main.h, g10.c (main), keylist.c (dump_attribs, set_attrib_fd,David Shaw2002-06-031-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.
* * keygen.c (keygen_set_std_prefs, add_feature_mdc): Use "mdc" and "no-mdc"David Shaw2002-05-291-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.
* * g10.c (strusage, build_list): Add compress algorithms to --version list.David Shaw2002-05-261-13/+44
| | | | | Show algorithm numbers when --verbose --version is done.
* * options.h, main.h, keygen.c (keygen_set_set_prefs, keygen_get_std_prefs,David Shaw2002-05-221-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.
* * g10.c (main): Add missing LF in a info printout and made itWerner Koch2002-05-221-2/+2
| | | | | translatable. Noted by Michael Tokarev.
* * g10.c (main): Removed the undef of USE_SHM_COPROCESSING whichWerner Koch2002-05-211-1/+0
| | | | | was erroneously introduced on 2002-01-09.
* * main.h, g10.c (main), revoke.c (gen_desig_revoke): Generate a designatedDavid Shaw2002-05-191-0/+11
| | | | | | | | 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-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.
* fixes for M_DEBUG, strcasecmp and RISC OSStefan Bellon2002-05-101-1/+2
|
* * packet.h, getkey.c (fixup_uidnode), keyedit.c (show_prefs): Show assumedDavid Shaw2002-05-101-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.
* * getkey.c (merge_selfsigs_main): Make sure the revocation key list startsDavid Shaw2002-05-091-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.
* * options.h, g10.c (main), getkey.c (finish_lookup), pkclist.cDavid Shaw2002-05-071-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.
* * export.c (do_export_stream): Warn the user when exporting a secret keyDavid Shaw2002-05-071-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.
* Allow multiple policy URLs on a given signature.David Shaw2002-05-021-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.
* g10/Werner Koch2002-04-251-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
* * keyedit.c (menu_deluid): Only cause a trust update if we delete aDavid Shaw2002-04-191-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.
* * keyedit.c (sign_uids, keyedit_menu, menu_deluid, menu_delsig,David Shaw2002-04-191-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"
* * getkey.c (premerge_public_with_secret): Fixed 0x12345678! syntaxWerner Koch2002-04-181-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.
* * parse-packet.c (parse_key): Support a SHA1 checksum as perWerner Koch2002-04-171-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.
* Add KEYEXPIRED, EXPSIG, and EXPKEYSIG. AddDavid Shaw2002-04-101-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.
* Merged in my changes, after disk crash. Fortunately the CVS was notWerner Koch2002-04-081-5/+5
| | | | | | affected - but everything else and it seems that there is no backup of the BTS data is available :-(
* Minor tweak to importing to allow more non-signed uids (now thatDavid Shaw2002-03-241-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
* Properly handle a "no keys found" case from the internal HKP codeDavid Shaw2002-03-191-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
* --openpgp implies --allow-non-selfsigned-uidDavid Shaw2002-03-171-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.
* Some minor fixes for revocation keys: print a warning if a key is importedDavid Shaw2002-03-071-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.
* Some minor bug fixes.David Shaw2002-03-051-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.
* * pkclist.c (check_signatures_trust): Always print the warning forWerner Koch2002-02-141-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.
* For --sig-policy-url and --cert-policy-url, clarify what is a sig and whatDavid Shaw2002-02-101-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.
* Split "--set-policy-url" into "--cert-policy-url" and "--sig-policy-url"David Shaw2002-02-031-4/+14
| | | | | | so the user can set different policies for key and data signing. For backwards compatibility, "--set-policy-url" sets both, as before.
* * g10.c (main): --gen-random --armor does now output a base64Werner Koch2002-01-301-2/+18
| | | | | encoded string.
* --pgp6 flag. This is not nearly as involved as --pgp2. In short, itDavid Shaw2002-01-291-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.
* * g10.c, options.h: New option --gpg-agent-infoWerner Koch2002-01-261-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.
* Some compatibility polish for PGP2. Add a fake IDEA preference for v3David Shaw2002-01-221-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.
* New command --decrypt-files.Timo Schulz2002-01-151-1/+7
| | | | | Some fixes.
* Move idea_cipher_warn to misc.c so gpgv.c doesn't need a stubDavid Shaw2002-01-091-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
* New code for encode_crypt_files.Timo Schulz2002-01-091-3/+2
|
* Better description for --encrypt-files.Timo Schulz2002-01-081-1/+1
|
* * g10.c (main): Must register the secring for encryption becauseWerner Koch2002-01-081-2/+2
| | | | | | it is needed to figure out the default recipient. Reported by Roger Sondermann.
* fix off-by-one in building attribute subpacketsDavid Shaw2002-01-061-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
* * g10.c (main): Do not register the secret keyrings for certainWerner Koch2002-01-051-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.