aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* About to release 1.4.3gnupg-1.4.3Werner Koch2006-04-031-1/+5
|
* * main.h, seskey.c (encode_md_value): Modify to allow a q size greaterDavid Shaw2006-03-301-5/+12
| | | | | | | | | | | | than 160 bits as per DSA2. This will allow us to verify and issue DSA2 signatures for some backwards compatibility once we start generating DSA2 keys. * sign.c (do_sign), sig-check.c (do_check): Change all callers. * sign.c (do_sign): Enforce the 160-bit check for new signatures here since encode_md_value can handle non-160-bit digests now. This will need to come out once the standard for DSA2 is firmed up.
* * options.h, sign.c (mk_notation_policy_etc), gpg.c (add_notation_data):David Shaw2006-03-081-43/+28
| | | | | | | | | | Use it here for the various notation commands. * packet.h, main.h, keygen.c (keygen_add_notations), build-packet.c (string_to_notation, sig_to_notation) (free_notation): New "one stop shopping" functions to handle notations and start removing some code duplication.
* * sign.c (make_keysig_packet): Don't use MD5 for a RSA_S key as thatDavid Shaw2006-03-071-3/+2
| | | | | is not a PGP 2.x algorithm.
* * sign.c (write_signature_packets): Lost a digest_algo line.David Shaw2006-01-011-0/+1
|
* * sign.c (hash_for): Add code to detect if the sk lives on a smartDavid Shaw2006-01-011-18/+27
| | | | | | | | | | | | card. If it does, only allow 160-bit hashes, a la DSA. This involves passing the *sk in, so change all callers. This is correct for today, given the current 160-bit q in DSA, and the current SHA-1/RIPEMD160 support in the openpgp card. It will almost certainly need changing down the road. * app-openpgp.c (do_sign): Give user error if hash algorithm is not supported by the card.
* Renamed g10.c to gpg.cWerner Koch2005-10-051-2/+4
| | | | Filelength fixes for W32.
* Converted all m_free to xfree etc.Werner Koch2005-07-271-21/+21
|
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-311-1/+2
|
* * main.h, keygen.c (parse_expire_string, ask_expire_interval), sign.cDavid Shaw2005-05-061-3/+3
| | | | | | | | (sign_file, clearsign_file, sign_symencrypt_file), g10.c (main), keyedit.c (sign_uids): Use seconds rather than days internally to calculate expiration. We no longer need the day-based code as we don't generate v3 keys.
* * sign.c (sign_file, clearsign_file, sign_symencrypt_file): Use theDavid Shaw2005-05-061-6/+6
| | | | | default sig expire value when signing in batchmode.
* * options.h, g10.c (main): Add new --default-sig-expire andDavid Shaw2005-05-051-8/+23
| | | | | | | | | | | | --default-cert-expire options. Suggested by Florian Weimer. * main.h, keygen.c (parse_expire_string, ask_expire_interval): Use defaults passed in, or "0" to control what default expiration is. * keyedit.c (sign_uids), sign.c (sign_file, clearsign_file, sign_symencrypt_file): Call them here, so that default expiration is used when --ask-xxxxx-expire is off.
* * passphrase.c (agent_get_passphrase): Add new arg CACHEID.Werner Koch2005-05-031-0/+4
| | | | | | | | | | | | | | Changed all callers. (ask_passphrase): Add new arg CACHEID and use it in agent mode. Changed all callers. (passphrase_clear_cache): New arg CACHEID. Changed all callers. * cardglue.c (format_cacheid): New. (pin_cb): Compute a cache ID. (agent_scd_pksign, agent_scd_pkdecrypt): Use it. (agent_clear_pin_cache): New. * card-util.c (change_pin): Clear the PIN cache. (check_pin_for_key_operation): Ditto.
* * keyserver.c (keyserver_spawn): Free some memory.David Shaw2005-04-171-0/+14
| | | | | * sign.c (hash_for): Comments.
* * plaintext.c (handle_plaintext): Don't try and create a zero-lengthDavid Shaw2004-11-041-7/+7
| | | | | | | | | | filename when using --use-embedded-filename with input that has no filename (clearsigned or message generated from a pipe). * encode.c (encode_simple, encode_crypt), progress.c (handle_progress), sign.c (write_plaintext_packet): Fix a few inconsistent calls (NULL filename means a pipe here, so don't bother to check it twice).
* * skclist.c (build_sk_list): Don't need to warn about PGP-generatedDavid Shaw2004-10-281-7/+9
| | | | | | | | | | | | | | | | | Elgamal signing keys since we no longer support any Elgamal signing keys. * sign.c (sign_file, clearsign_file): Use "writing to" instead of "writing to file" to match other strings. * pkclist.c (check_signatures_trust): Fix typo. Noted by Moray Allan. This is Debian bug #278708. * passphrase.c (ask_passphrase, passphrase_to_dek): "password" -> "passphrase". * keyedit.c (show_key_with_all_names): Show designated revoker as part of translatable string.
* * keyring.c: Make some strings translatable.David Shaw2004-10-281-8/+7
| | | | | | | * exec.c, sign.c: Change "can't open file" to "can't open" and "can't create file" to "can't create" to be consistent with other strings so we don't have to translate both.
* * misc.c (is_secured_filename): New.Werner Koch2004-10-141-2/+14
| | | | | | | | | | | | | | | | * keydb.c (maybe_create_keyring) * tdbio.c (tdbio_set_dbname) * plaintext.c (handle_plaintext) * openfile.c (copy_options_file, open_outfile) * exec.c (exec_write) * keygen.c (do_generate_keypair, gen_card_key_with_backup) * sign.c (sign_file, clearsign_file) * keyring.c (create_tmp_file, do_copy): Check for secured files before creating them. * keygen.c (print_status_key_created): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan.
* Added SELInux hacks and did some cleanups.Werner Koch2004-10-131-7/+34
|
* * configure.ac: Actually name the option --disable-finger and notWerner Koch2004-10-131-1/+1
| | | | | | | | | | | | | | | | | http. * openfile.c (overwrite_filep, make_outfile_name, open_outfile) (open_sigfile): Use iobuf_is_pipe_filename to check for pipes so that special filesnames are taken into account. This is bug 327. * tdbdump.c (import_ownertrust): Ditto. * sign.c (write_plaintext_packet): Ditto. * progress.c (handle_progress): Ditto. * plaintext.c (handle_plaintext): Ditto. * encode.c (encode_simple, encode_crypt): Ditto. * iobuf.c (iobuf_is_pipe_filename): New. * fileutil.c (is_file_compressed): Use it here.
* * main.h: Create S2K_DIGEST_ALGO macro so we do not need to always setDavid Shaw2004-09-241-1/+1
| | | | | | | | | | | opt.s2k_digest_algo. This helps fix a problem with PGP 2.x encrypted symmetric messages. Change all callers (encode.c, g10.c, keyedit.c, keygen.c, passphrase.c, sign.c). * armor.c, cardglue.c, getkey.c, import.c, keygen.c: Be consistent in some more quoted strings. Always use 'user ID', not 'user id', "quotes" for user IDs, etc.
* * encode.c, exec.c, g10.c, sign.c: Some translatable string cleanup.David Shaw2004-08-271-9/+11
| | | | | Change some "this" to `this'.
* * keydb.h, getkey.c (get_user_id_printable): Rename to get_user_id_nativeDavid Shaw2004-08-231-1/+1
| | | | | | | and remove the printable stuff since we're print-ifying valid utf8 characters. Change all callers in import.c, sign.c, keylist.c, and encode.c.
* * plaintext.c (handle_plaintext): Bigger buffer for extra safety.David Shaw2004-08-081-14/+2
| | | | | | | | | | | | | | | | | * g10.c (main): New alias --throw-keyid for --throw-keyids, so that it continues to work in old configuration files. Noted by Jens Adam. * pkclist.c (algo_available): --pgp8 now allows blowfish, zlib, and bzip2. * status.c (do_get_from_fd): Flush stdout if status isn't flushing it for us. This guarantees that any menus that were displayed before the prompt don't get stuck in a buffer. Noted by Peter Palfrader. This is Debian bug #254072. * sign.c (update_keysig_packet): Revert change of 2004-05-18. It is not appropriate to strip policy and notations when remaking a sig. That should only happen when specifically requested by the user.
* * keyedit.c (sign_uids): Properly handle remaking a self-sig on revoked orDavid Shaw2004-07-151-0/+7
| | | | | | | | | | | | | | expired user IDs. Also, once we've established that a given uid cannot or will not be signed, don't continue to ask about each sig. * mainproc.c (proc_symkey_enc), seckey-cert.c (do_check): Check the S2K hash algorithm before we try to generate a passphrase using it. This prevents hitting BUG() when generating a passphrase using a hash that we don't have. * sign.c (sign_symencrypt_file): Allow using --force-mdc in --sign --symmetric messages.
* * sign.c (update_keysig_packet): Policies and notations should be strippedDavid Shaw2004-05-191-0/+12
| | | | | | | out when remaking a self-signature. Noted by Atom Smasher. * keyserver.c (parse_keyserver_uri): Fix compiler warnings.
* (write_plaintext_packet): Fixed the detection of tooWerner Koch2004-05-071-8/+13
| | | | | large files in the same way as in encode.c.
* * keygen.c (gen_elg, gen_dsa, gen_rsa, do_create, do_generate_keypair,David Shaw2004-04-161-8/+12
| | | | | | | | | | | | | | | | | | | | | generate_subkeypair): New is_subkey argument to set whether a generated key is a subkey. Do not overload the ret_sk. This is some early cleanup to do backsigs for signing subkeys. * keygen.c (write_keybinding, do_generate_keypair, generate_subkeypair): Keep track of the unprotected subkey secret key so we can make a backsig with it. * keygen.c (make_backsig): New function to add a backsig to a binding sig of signing subkeys. Currently disabled. (write_keybinding): Call it here, for signing subkeys only. * sign.c (make_keysig_packet): Allow generating 0x19 signatures (same as 0x18 or 0x28, but used for backsigs). * packet.h, build-packet.c (build_sig_subpkt): Add new SIGSUBPKT_SIGNATURE type for embedded signatures.
* * sig-check.c (cmp_help, do_check), sign.c (do_sign): Remove old unusedDavid Shaw2003-12-171-3/+1
| | | | | | | code. * keyid.c (keyid_from_sk): Make sure lowbits is initialized.
* * options.h, g10.c (main), main.h, seskey.c (do_encode_md,David Shaw2003-12-041-2/+2
| | | | | | | encode_md_value), sig-check.c (do_check), sign.c (do_sign): Remove --emulate-md-encode-bug as it only applied to Elgamal signatures, which are going away.
* * options.h, g10.c (main), compress.c (init_compress), compress-bz2.cDavid Shaw2003-11-151-4/+4
| | | | | | (init_compress): Add --compress-level and --bzip2-compress-level. -z sets them both. Change various callers.
* * encode.c (encode_simple), sign.c (sign_symencrypt_file): Properly useDavid Shaw2003-11-151-1/+1
| | | | | | default_compress_algo (--compress-algo, followed by the highest --personal-compress-preference, followed by ZIP) to get the algorithm.
* * g10.c (main): Add --symmetric --sign --encrypt.David Shaw2003-11-131-0/+4
| | | | | | | | | | | | * main.h, encode.c (setup_symkey): New. Prompt for a passphrase and create a DEK for symmetric encryption. (write_symkey_enc): New. Write out symmetrically encrypted session keys. (encode_crypt, encrypt_filter): Use them here here when creating a message that can be decrypted with a passphrase or a pk. * sign.c (sign_file): Call setup_symkey if we are doing a --symmetric --sign --encrypt.
* * misc.c (compress_algo_to_string, string_to_compress_algo,David Shaw2003-10-311-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | check_compress_algo): Add bzip2. * compress.c (compress_filter): Make static to help force the use of push_compress_filter. Remove default algorithm setting since that is done in push_compress_filter now. * main.h: Use named algorithm. * filter.h, compress.c (push_compress_filter, push_compress_filter2): New. Figure out which is the appropriate compression filter to use, and push it into place. * compress.c (handle_compressed), encode.c (encode_simple, encode_crypt), sign.c (sign_file, sign_symencrypt_file), import.c (read_block), export.c (do_export): Use push_compress_filter instead of pushing the compression filter ourselves. * compress-bz2.c: New. Bzlib versions of the compression filter routines. * Makefile.am: Include compress-bz2.c if bz2lib is available.
* * ccid-driver.c (ccid_transceive): Add T=1 chaining for sending.Werner Koch2003-10-091-2/+4
| | | | | | | | | | * sign.c (do_sign) [!ENABLE_CARD_SUPPORT]: Return an error for card keys. * cardglue.c (agent_scd_pkdecrypt): Implemented. * pubkey-enc.c (get_it) [ENABLE_CARD_SUPPORT]: Divert decryption to card
* * cardglue.c (pin_cb): Detect whether an admin or regular PIN isWerner Koch2003-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | requested. (genkey_status_cb): New. (agent_scd_genkey): Implemented. * keygen.c (generate_keypair): New arg CARD_SERIALNO and prepare parameters for on card key generation. Changed all callers. (do_generate_keypair): Add new arg card and merged casrd specific changes from 1.9. (proc_parameter_file): New arg card, apss it down to do_generate_keypair and changed all callers. (gen_card_key): New. * g10.c: Include cardclue.h. (main): s/app_set_default_reader_port/card_set_reader_port/. * cardglue.c (card_set_reader_port): New to address include file issues.
* * keygen.c (do_add_key_flags, parse_parameter_usage): Add supportWerner Koch2003-09-301-9/+10
| | | | | | | | | | | | | | | | | the proposed AUTH key flag. * getkey.c (fixup_uidnode, merge_selfsigs_main) (merge_selfsigs_subkey, premerge_public_with_secret): Ditto. * keylist.c (print_capabilities): Ditto. * parse-packet.c (parse_key): Allow to parse the divert-to-card S2K mode. * build-packet.c (do_secret_key): Handle divert-to-card S2K * seckey-cert.c (is_secret_key_protected): Ditto. (check_secret_key): Ditto. * keygen.c (do_ask_passphrase): Renamed from ask_passphrase. * passphrase.c (ask_passphrase): New.
* First bits of a card support backport from 1.9. It is not enabled byWerner Koch2003-09-271-6/+33
| | | | | | | | | | | | | | | default and tehre is not yet much more than a new configure option. * configure.ac (LIBUSB_LIBS,HAVE_LIBUSB): Check for Libusb. (--enable-card-support): New. * sign.c (do_sign) [ENABLE_CARD_SUPPORT]: Divert to card. * cardglue.c, cardglue.h: New. * Makefile.am (gpg_LDADD): Added. (card_support_sources): New. * memory.h (xmalloc): Define xmalloc macros in terms of m_alloc.
* * sign.c (mk_notation_policy_etc): Capitalize "URL".David Shaw2003-09-241-1/+1
| | | | | | | | | | * trustdb.c (validate_keys): Give a little more information while rebuilding trustdb. * pkclist.c (do_edit_ownertrust): Clarify "don't know". * g10.c (main): Default to --no-mangle-dos-filenames.
* * g10.c (add_keyserver_url), keyedit.c (keyedit_menu), sign.cDavid Shaw2003-08-311-2/+2
| | | | | | | | | (mk_notation_policy_etc): Clarify a few strings. It's a "preferred keyserver URL". * g10.c (main): Use "keyserver-url" instead of "preferred-keyserver" for the sake of short and simple commands.
* * gpgv.c: Remove extra semicolon (typo).David Shaw2003-08-211-10/+13
| | | | | | | | | | | | | | | | | | * options.skel: Note that keyserver.pgp.com isn't synchronized, and explain the roundrobin a bit better. * sig-check.c (check_key_signature2), import.c (import_one, import_revoke_cert, chk_self_sigs, delete_inv_parts, collapse_uids, merge_blocks): Make much quieter during import of slightly munged, but recoverable, keys. Use log_error for unrecoverable import failures. * keyring.c (keyring_rebuild_cache): Comment. * sign.c (mk_notation_and_policy): Making a v3 signature with notations or policy urls is an error, not an info (i.e. increment the errorcount). Don't print the notation or policy url to stdout since it can be mixed into the output stream when piping and munge the stream.
* * options.h, g10.c (main, add_keyserver_url): AddDavid Shaw2003-07-241-4/+33
| | | | | | | | | --sig-preferred-keyserver to implant a "where to get my key" subpacket into a signature. * sign.c (mk_notation_and_policy): Rename to mk_notation_policy_etc and add preferred keyserver support for signatures.
* * mainproc.c (check_sig_and_print), main.h, keylist.c (show_policy,David Shaw2003-05-311-4/+4
| | | | | | | | | | | | | | | | | show_notation): Collapse the old print_notation_data into show_policy() and show_notation() so there is only one function to print notations and policy URLs. * options.h, main.h, g10.c (main), keyedit.c (print_and_check_one_sig), keylist.c (list_one, list_keyblock_print), pkclist.c (do_edit_ownertrust), sign.c (mk_notation_and_policy): New "list-options" and "verify-options" commands. These replace the existing --show-photos/--no-show-photos, --show-notation/--no-show-notation, --show-policy-url/--no-show-policy-url, and --show-keyring options. The new method is more flexible since a user can specify (for example) showing photos during sig verification, but not in key listings. The old options are emulated.
* * armor.c, g10.c, kbnode.c, misc.c, pkclist.c, sign.c, build-packet.c,David Shaw2003-05-241-4/+4
| | | | | | | | | getkey.c, keydb.c, openfile.c, plaintext.c, status.c, gpgv.c, keygen.c, options.h, sig-check.c, tdbio.h, encode.c, mainproc.c, parse-packet.c, signal.c, textfilter.c: Edit all preprocessor instructions to remove whitespace before the '#'. This is not required by C89, but there are some compilers out there that don't like it.
* * progress.c (handle_progress)Werner Koch2003-05-211-2/+3
| | | | | | | | * sign.c (write_plaintext_packet) * encode.c (encode_simple,encode_crypt): Make sure that a filename of "-" is considered to be stdin so that iobuf_get_filelength won't get called. This fixes bug 156 reported by Gregery Barton.
* * packet.h, build-packet.c (build_sig_subpkt), export.cDavid Shaw2003-05-031-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (do_export_stream), import.c (remove_bad_stuff, import), parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt): Remove vestigal code for the old sig cache subpacket. This wasn't completely harmless as it caused subpacket 101 to disappear on import and export. * options.h, armor.c, cipher.c, g10.c, keyedit.c, pkclist.c, sign.c, encode.c, getkey.c, revoke.c: The current flags for different levels of PGP-ness are massively complex. This is step one in simplifying them. No functional change yet, just use a macro to check for compliance level. * sign.c (sign_file): Fix bug that causes spurious compression preference warning. * sign.c (clearsign_file): Fix bug that prevents proper warning message from appearing when clearsigning in --pgp2 mode with a non-v3 RSA key. * main.h, misc.c (compliance_option_string, compliance_string, compliance_failure), pkclist.c (build_pk_list), sign.c (sign_file, clearsign_file), encode.c (encode_crypt, write_pubkey_enc_from_list): New functions to put the "this message may not be usable...." warning in one place. * options.h, g10.c (main): Part two of the simplification. Use a single enum to indicate what we are compliant to (1991, 2440, PGPx, etc.) * g10.c (main): Show errors for failure in export, send-keys, recv-keys, and refresh-keys. * options.h, g10.c (main): Give algorithm warnings for algorithms chosen against the --pgpX and --openpgp rules. * keydb.h, pkclist.c (algo_available): Make TIGER192 invalid in --openpgp mode. * sign.c (sign_file), pkclist.c (algo_available): Allow passing a hint of 0.
* * build-packet.c (build_sig_subpkt): Comments.David Shaw2003-04-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * exec.c (exec_write): Cast NULL to void* to properly terminate varargs list. * keyedit.c (show_key_with_all_names): Just for safety, catch an invalid pk algorithm. * sign.c (make_keysig_packet): Crucial that the call to mksubpkt comes LAST before the calls to finalize the sig as that makes it possible for the mksubpkt function to get a reliable pointer to the subpacket area. * pkclist.c (do_we_trust_pre): If an untrusted key was chosen by a particular user ID, use that ID as the one to ask about when prompting whether to use the key anyway. (build_pk_list): Similar change here when adding keys to the recipient list. * trustdb.c (update_validity): Fix bug that prevented more than one validity record per trust record. (get_validity): When retrieving validity for a (user) supplied user ID, return the validity for that user ID only, and do not fall back to the general key validity. (validate_one_keyblock): Some commentary on whether non-self-signed user IDs belong in the web of trust (arguably, they do).
* * sign.c (do_sign): Show the hash used when making a signature in verboseDavid Shaw2003-04-261-2/+4
| | | | | | | | | | | | mode. * tdbio.h, tdbio.c (tdbio_read_model): New function to return the trust model used in a given trustdb. * options.h, g10.c (main), trustdb.c (init_trustdb, check_trustdb, update_trustdb): Use tdbio_read_model to implement an "auto" trust model which is set via the trustdb.
* * Makefile.am (AM_CFLAGS): Make use of AM_CFLAGS and AM_LDFLAGS.Werner Koch2003-04-151-5/+15
| | | | | | * g10.c, options.h: New option --enable-progress-filter. * progress.c (handle_progress): Make use of it.
* * passphrase.c (read_passphrase_from_fd): Do a dummy read if theWerner Koch2003-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | agent is to be used. Noted by Ingo Kl�cker. (agent_get_passphrase): Inhibit caching when we have no fingerprint. This is required for key generation as well as for symmetric only encryption. * passphrase .c (agent_get_passphrase): New arg CANCELED. (passphrase_to_dek): Ditto. Passed to above. Changed all callers to pass NULL. * seckey-cert.c (do_check): New arg CANCELED. (check_secret_key): Terminate loop when canceled. * keyedit.c (change_passphrase): Pass ERRTEXT untranslated to passphrase_to_dek and translate where appropriate. * seckey-cert.c (check_secret_key): Ditto. * keygen.c (ask_passphrase): Ditto. * passphrase.c (agent_get_passphrase): Translate the TRYAGAIN_TEXT. Switch the codeset to utf-8.