aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * keydb.h, pkclist.c (select_algo_from_prefs): Allow passing a suggestedDavid Shaw2002-06-201-25/+46
| | | | | | | | | | | | | | | | | | | 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.
* * sign.c (hash_for, sign_file): When encrypting and signing at the sameDavid Shaw2002-06-041-1/+29
| | | | | | | | | | | | | | | | | time, consult the various hash prefs to pick a hash algorithm to use. Pass in a 160-bit hint if any of the signing keys are DSA. * keydb.h, pkclist.c (select_algo_from_prefs, algo_available): Pass a "hints" opaque pointer in to let the caller give hints as to what algorithms would be acceptable. The only current hint is for PREFTYPE_HASH to require a 160-bit hash for DSA. Change all callers in encode.c (encode_crypt, encrypt_filter) and sign.c (sign_file). If we settle on MD5 as the best algorithm based solely on recepient keys and SHA1 is also a possibility, use SHA1 unless the user intentionally chose MD5. This is as per 2440:13. * exec.c (make_tempdir): Fix duplicated filename problem.
* * sign.c (mk_notation_and_policy): Free unneeded buffer.David Shaw2002-06-011-0/+1
| | | | | | | | | | | | * hkp.c (parse_hkp_index): Properly handle the '&' character (i.e. "&") 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.
* * sign.c (write_signature_packets, sign_file, clearsign_file,David Shaw2002-05-301-22/+13
| | | | | | | | | | | sign_symencrypt_file): Make a v4 signature if a policy URL or notation is set, unless v3 sigs are forced via rfc1991 or force-v3-sigs. Also remove some doubled code and clarify an error message (we don't sign in PGP2 mode - just detach-sign). * parse-packet.c (parse_one_sig_subpkt): Add KS_FLAGS to the "any size" section.
* * sign.c (mk_notation_and_policy): Include secret key to enable %sDavid Shaw2002-05-271-5/+19
| | | | | | | expandos, and pass notations through pct_expando as well. * main.h, misc.c (pct_expando): Add %s and %S expandos for signer's keyid.
* * main.h, keygen.c (keygen_add_revkey): Add revocation key subpackets to aDavid Shaw2002-05-161-4/+2
| | | | | | | | | | | | | | | | | | | | | | signature (callable by make_keysig_packet). (write_direct_sig): Write a 1F direct key signature. (parse_revocation_key): Parse a string in algo:fpr:sensitive format into a revocation key. (get_parameter_revkey, do_generate_keypair): Call above functions when prompted from a batch key generation file. * build-packet.c (build_sig_subpkt): Allow multiple revocation key subpackets in a single sig. * keydb.h, getkey.c (get_seckey_byfprint): Same as get_pubkey_byfprint, except for secret keys. We only know the fingerprint of a revocation key, so this is needed to retrieve the secret key needed to issue a revokation. * packet.h, parse-packet.c (parse_signature, parse_revkeys): Split revkey parsing off into a new function that can be used to reparse after manipulating the revkey list. * sign.c (make_keysig_packet): Ability to make 1F direct key signatures.
* * packet.h, getkey.c (fixup_uidnode), keyedit.c (show_prefs): Show assumedDavid Shaw2002-05-101-17/+19
| | | | | | | | | | 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-26/+39
| | | | | | | | | | | | | | | | 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.
* * photoid.h, photoid.c (parse_image_header, image_type_to_string): UsefulDavid Shaw2002-05-021-10/+9
| | | | | | | | | | | | | | | | | | | 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-51/+64
| | | | | | | 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.
* Added a copyright year for files changed this year.Werner Koch2002-04-291-1/+1
|
* * seskey.c (encode_md_value): Print an error message if a wrongWerner Koch2002-04-181-2/+8
| | | | | | digest algorithm is used with DSA. Changed all callers to cope with a NULL return. Problem noted by Imad R. Faiad.
* --openpgp implies --allow-non-selfsigned-uidDavid Shaw2002-03-171-7/+5
| | | | | | | | | | | | | | | | | | | | | | 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.
* For --sig-policy-url and --cert-policy-url, clarify what is a sig and whatDavid Shaw2002-02-101-3/+2
| | | | | | | | | | | | | | | | | | | | | | 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-6/+26
| | | | | | | | | "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-2/+17
| | | | | | so the user can set different policies for key and data signing. For backwards compatibility, "--set-policy-url" sets both, as before.
* Some compatibility polish for PGP2. Add a fake IDEA preference for v3David Shaw2002-01-221-2/+2
| | | | | | | | 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.
* * passphrase.c (passphrase_to_dek): Add tryagain_text arg to beWerner Koch2002-01-201-1/+1
| | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | 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
* Use one-pass packets even if it's a v3 key making the signatureDavid Shaw2002-01-041-2/+2
| | | | | | | Warn with pgp2 and non-detached signatures Use the actual filesize rather than partial length packets in symmetric messages (see ChangeLog or NEWS for discussion).
* Photo ID support (actually generic "attribute packet" support, but thereDavid Shaw2001-12-211-6/+20
| | | | | 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-2/+4
| | | | | but cannot be revoked. Any revocation certificates for them are ignored.
* Add a generic IDEA warning for when the IDEA plugin is not present. ThisDavid Shaw2001-12-171-5/+7
| | | | | | | | pops up when the user uses "--cipher-algo idea", when setpref is used to set a "S1" preference, and when a secret key protected with IDEA is used. Tweak the --pgp2 mode to use this generic warning.
* PGP2 patch. --pgp2 sets things up for pgp2 compatibility, and prints aDavid Shaw2001-12-071-4/+20
| | | | | | warning if the user does something that would make the message not compatible (i.e. encrypt with a non-RSA key, etc.)
* Sig expiration codeDavid Shaw2001-12-071-14/+41
| | | | | | | 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
* "sigclass" patch - adds key signature class levels, notation and policy-urlDavid Shaw2001-12-061-0/+2
| | | | | displays in key listings, and shows flags for signature features.
* * export.c (do_export_stream): Put all given names into a searchWerner Koch2001-11-091-1/+1
| | | | | | description and change the loop so that all matching names are returned.
* Tweaked v3 -c decryption, let --force-v4-certs use SHA-1 for all RSA keys.Werner Koch2001-11-081-1/+4
|
* fixes for the 1.0.6b bugs David recently posted to gnupg-devel.Werner Koch2001-11-081-3/+19
|
* more bug fixesand some warning cleanupsWerner Koch2001-09-091-8/+8
|
* Removed duplicated codeWerner Koch2001-08-241-550/+295
|
* Implemented -cs and some fixes to the rfc1991 symmetric only modeWerner Koch2001-08-201-0/+322
|
* Revamped preference handlingWerner Koch2001-08-101-1/+1
|
* Added a way to update preferencesWerner Koch2001-08-091-4/+4
|
* reworked the way hased data is stored and added a "primary" commandWerner Koch2001-08-091-12/+20
| | | | | DCVS: ----------------------------------------------------------------------
* More Windows and autoconf fixesWerner Koch2001-08-071-0/+2
|
* Changed lsign behaviour, allow future subkeys, don't list revoked keysWerner Koch2001-08-011-6/+14
|
* migration to autoconf 2.52 and bugfixesWerner Koch2001-07-261-0/+106
|
* a second snapshot thsi day (1.0.4f)Werner Koch2001-03-271-1/+1
|
* Verify created signatures.Werner Koch2001-03-241-4/+21
|
* worked on solving some bugsWerner Koch2001-03-121-1/+1
|
* Changed and added copyright noticesWerner Koch2001-03-081-1/+1
|
* Mainly changes to the pipe handling under W32Werner Koch2000-12-061-1/+4
|
* Some new features for use with gpgmeWerner Koch2000-11-151-4/+4
|
* See ChangeLog: Wed Oct 4 15:50:18 CEST 2000 Werner KochWerner Koch2000-10-041-11/+11
|
* See ChangeLog: Wed Sep 6 17:55:47 CEST 2000 Werner KochWerner Koch2000-09-061-0/+4
|
* See ChangeLog: Wed Jun 28 11:54:44 CEST 2000 Werner KochWerner Koch2000-06-281-1/+29
|
* See ChangeLog: Mon Jun 5 23:41:54 CEST 2000 Werner KochWerner Koch2000-06-051-1/+1
|
* See ChangeLog: Fri May 12 14:01:20 CEST 2000 Werner KochWerner Koch2000-05-121-1/+1
|
* See ChangeLog: Wed Feb 9 15:33:44 CET 2000 Werner KochWerner Koch2000-02-091-1/+2
|