aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Print 'empty file' warning only with --verbose.Werner Koch2009-05-111-1/+1
|
* Switched to GPLv3.Werner Koch2007-10-231-4/+2
| | | | | Updated gettext.
* * sign.c (mk_notation_policy_etc): expect all sigs that this is calledDavid Shaw2007-06-121-43/+15
| | | | | | | | for are >=v4. (write_signature_packets, make_keysig_packet): Only call it for >=v4 sigs. This allows --force-v3-sigs and --force-v4-certs to enable or disable notations, policies, and keyserver URLs. This is bug#800.
* * main.h, keygen.c (ask_expire_interval, parse_expire_string): Pass inDavid Shaw2007-02-011-6/+6
| | | | | | the time to use to calculate the expiration offset, rather than querying it internally. Change all callers.
* * sign.c (write_plaintext_packet): Take timestamp from outside.David Shaw2007-01-311-10/+14
| | | | | | | | Change all callers. (sign_file, clearsign_file, sign_symencrypt_file): Calculate one timestamp for the whole transaction. Different timestamps for each step can leak performance information.
* Removed the use of g10defs.h.Werner Koch2006-12-111-2/+1
| | | | | | This required some code cleanups and the introduction of a few accessor ducntions in mpi.
* * keydb.h, pkclist.c (select_algo_from_prefs, algo_available): Pass aDavid Shaw2006-06-281-6/+8
| | | | | | | union for preference hints rather than doing void * games. * sign.c (sign_file): Use it here.
* * sign.c (sign_file): When signing with multiple DSA keys, one being DSA1David Shaw2006-06-281-49/+43
| | | | | | | and one being DSA2 and encrypting at the same time, if the recipient preferences give a hash that can work with the DSA2 key, then allow the DSA1 key to be promoted rather than giving up and using hash_for().
* * sign.c (do_sign): Accept a truncated hash even for DSA1 keys (be liberalDavid Shaw2006-06-221-0/+7
| | | | | in what you accept, etc).
* * parse-packet.c (dump_sig_subpkt, parse_signature), build-packet.cDavid Shaw2006-05-231-1/+1
| | | | | | | | | (build_sig_subpkt_from_sig), getkey.c (fixup_uidnode, merge_selfsigs_main, merge_selfsigs_subkey), keygen.c (keygen_add_key_expire): Fix meaning of key expiration and sig expiration subpackets - zero means "never expire" according to 2440, not "expire instantly".
* * options.h, gpg.c (main): Add --enable-dsa2 and --disable-dsa2. DefaultsDavid Shaw2006-04-201-30/+103
| | | | | | | | | | | | | | | | to disable. * pkclist.c (algo_available): If --enable-dsa2 is set, we're allowed to truncate hashes to fit DSA keys. * sign.c (match_dsa_hash): New. Return the best match hash for a given q size. (do_sign, hash_for, sign_file): When signing with a DSA key, if it has q==160, assume it is an old DSA key and don't allow truncation unless --enable-dsa2 is also set. q!=160 always allows truncation since they must be DSA2 keys. (make_keysig_packet): If the user doesn't specify a --cert-digest-algo, use match_dsa_hash to pick the best hash for key signatures.
* * gpg.c (print_mds), armor.c (armor_filter, parse_hash_header): AddDavid Shaw2006-04-201-15/+2
| | | | | | | | | | | | | | SHA-224. * sign.c (write_plaintext_packet), encode.c (encode_simple): Factor common literal packet setup code from here, to... * main.h, plaintext.c (setup_plaintext_name): Here. New. Make sure the literal packet filename field is UTF-8 encoded. * options.h, gpg.c (main): Make sure --set-filename is UTF-8 encoded and note when filenames are already UTF-8.
* 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.