aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2006-10-02Fix for bug 537Werner Koch1-6/+6
2006-09-14Take advantage of newer gpg-error features.Werner Koch1-6/+6
2006-07-27Preparing a new releasegnupg-1.9.22Werner Koch1-45/+56
2006-06-28* keydb.h, pkclist.c (select_algo_from_prefs, algo_available): Pass aDavid Shaw1-6/+8
union for preference hints rather than doing void * games. * sign.c (sign_file): Use it here.
2006-06-28* sign.c (sign_file): When signing with multiple DSA keys, one being DSA1David Shaw1-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().
2006-06-27Ported patches from 1.4.x Werner Koch1-1/+8
2006-06-22* sign.c (do_sign): Accept a truncated hash even for DSA1 keys (be liberalDavid Shaw1-0/+7
in what you accept, etc).
2006-05-23g10/ does build again.Werner Koch1-1/+1
2006-05-23* parse-packet.c (dump_sig_subpkt, parse_signature), build-packet.cDavid Shaw1-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".
2006-04-28Merged recent changes from 1.4Werner Koch1-37/+86
2006-04-21Still merging 1.4.3 code backWerner Koch1-2/+3
2006-04-20* options.h, gpg.c (main): Add --enable-dsa2 and --disable-dsa2. DefaultsDavid Shaw1-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.
2006-04-20* gpg.c (print_mds), armor.c (armor_filter, parse_hash_header): AddDavid Shaw1-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.
2006-04-19Continued with merging.Werner Koch1-33/+33
Still does not build.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-271/+379
The gpg part does not yet build.
2006-04-03About to release 1.4.3gnupg-1.4.3Werner Koch1-1/+5
2006-03-30* main.h, seskey.c (encode_md_value): Modify to allow a q size greaterDavid Shaw1-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.
2006-03-08* options.h, sign.c (mk_notation_policy_etc), gpg.c (add_notation_data):David Shaw1-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.
2006-03-07* sign.c (make_keysig_packet): Don't use MD5 for a RSA_S key as thatDavid Shaw1-3/+2
is not a PGP 2.x algorithm.
2006-01-01* sign.c (write_signature_packets): Lost a digest_algo line.David Shaw1-0/+1
2006-01-01* sign.c (hash_for): Add code to detect if the sk lives on a smartDavid Shaw1-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.
2005-10-05Renamed g10.c to gpg.cWerner Koch1-2/+4
Filelength fixes for W32.
2005-07-27Converted all m_free to xfree etc.Werner Koch1-21/+21
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-05-06* main.h, keygen.c (parse_expire_string, ask_expire_interval), sign.cDavid Shaw1-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.
2005-05-06* sign.c (sign_file, clearsign_file, sign_symencrypt_file): Use theDavid Shaw1-6/+6
default sig expire value when signing in batchmode.
2005-05-05* options.h, g10.c (main): Add new --default-sig-expire andDavid Shaw1-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.
2005-05-03* passphrase.c (agent_get_passphrase): Add new arg CACHEID.Werner Koch1-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.
2005-04-17* keyserver.c (keyserver_spawn): Free some memory.David Shaw1-0/+14
* sign.c (hash_for): Comments.
2004-11-04* plaintext.c (handle_plaintext): Don't try and create a zero-lengthDavid Shaw1-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).
2004-10-28* skclist.c (build_sk_list): Don't need to warn about PGP-generatedDavid Shaw1-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.
2004-10-28* keyring.c: Make some strings translatable.David Shaw1-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.
2004-10-14* misc.c (is_secured_filename): New.Werner Koch1-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.
2004-10-13Added SELInux hacks and did some cleanups.Werner Koch1-7/+34
2004-10-13* configure.ac: Actually name the option --disable-finger and notWerner Koch1-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.
2004-09-24* main.h: Create S2K_DIGEST_ALGO macro so we do not need to always setDavid Shaw1-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.
2004-08-27* encode.c, exec.c, g10.c, sign.c: Some translatable string cleanup.David Shaw1-9/+11
Change some "this" to `this'.
2004-08-23* keydb.h, getkey.c (get_user_id_printable): Rename to get_user_id_nativeDavid Shaw1-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.
2004-08-08* plaintext.c (handle_plaintext): Bigger buffer for extra safety.David Shaw1-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.
2004-07-15* keyedit.c (sign_uids): Properly handle remaking a self-sig on revoked orDavid Shaw1-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.
2004-05-19* sign.c (update_keysig_packet): Policies and notations should be strippedDavid Shaw1-0/+12
out when remaking a self-signature. Noted by Atom Smasher. * keyserver.c (parse_keyserver_uri): Fix compiler warnings.
2004-05-07(write_plaintext_packet): Fixed the detection of tooWerner Koch1-8/+13
large files in the same way as in encode.c.
2004-04-16* keygen.c (gen_elg, gen_dsa, gen_rsa, do_create, do_generate_keypair,David Shaw1-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.
2003-12-17* sig-check.c (cmp_help, do_check), sign.c (do_sign): Remove old unusedDavid Shaw1-3/+1
code. * keyid.c (keyid_from_sk): Make sure lowbits is initialized.
2003-12-04* options.h, g10.c (main), main.h, seskey.c (do_encode_md,David Shaw1-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.
2003-11-15* options.h, g10.c (main), compress.c (init_compress), compress-bz2.cDavid Shaw1-4/+4
(init_compress): Add --compress-level and --bzip2-compress-level. -z sets them both. Change various callers.
2003-11-15* encode.c (encode_simple), sign.c (sign_symencrypt_file): Properly useDavid Shaw1-1/+1
default_compress_algo (--compress-algo, followed by the highest --personal-compress-preference, followed by ZIP) to get the algorithm.
2003-11-13* g10.c (main): Add --symmetric --sign --encrypt.David Shaw1-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.
2003-10-31* misc.c (compress_algo_to_string, string_to_compress_algo,David Shaw1-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.
2003-10-09* ccid-driver.c (ccid_transceive): Add T=1 chaining for sending.Werner Koch1-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