aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c (unfollow)
Commit message (Collapse)AuthorFilesLines
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
2003-10-08* cardglue.c (pin_cb): Detect whether an admin or regular PIN isWerner Koch1-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.
2003-09-30Minor fixesWerner Koch1-37/+1
2003-09-30* keygen.c (do_add_key_flags, parse_parameter_usage): Add supportWerner Koch1-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.
2003-09-27First bits of a card support backport from 1.9. It is not enabled byWerner Koch1-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.
2003-09-24* sign.c (mk_notation_policy_etc): Capitalize "URL".David Shaw1-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.
2003-09-23Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch1-16/+49
2003-08-31* g10.c (add_keyserver_url), keyedit.c (keyedit_menu), sign.cDavid Shaw1-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.
2003-08-21* gpgv.c: Remove extra semicolon (typo).David Shaw1-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.
2003-07-28Adjusted for use with current libgcrypt (1.1.42).Werner Koch1-4/+4
2003-07-24* options.h, g10.c (main, add_keyserver_url): AddDavid Shaw1-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.
2003-07-23* keygen.c (generate_keypair): Create an AUTHKEYTYPE entry for cards.Werner Koch1-1/+37
(do_generate_keypair): Abd generate the authkey. (check_smartcard): Changed menu accordingly.
2003-07-03* options.h (DBG_CIPHER): Reintroduced it.Werner Koch1-0/+2
* seskey.c (encode_session_key): Debug output of the session key. * pubkey-enc.c (get_it): Handle card case. * call-agent.c (agent_scd_pkdecrypt): New. * pkglue.c (pk_encrypt): Add RSA support. * g10.c (main): Default to --use-agent. * keygen.c (show_smartcard): Print info about the public key. (check_smartcard): Check for existing key here. (gen_card_key): And not anymore here. (fpr_is_zero): New. (generate_keypair): Generate both keys for a card. (smartcard_change_url): Nw.
2003-07-01* app-openpgp.c (store_fpr): Fixed fingerprint calculation.Werner Koch1-3/+4
* keygen.c (gen_card_key): Obviously we should use the creation date received from SCDAEMON, so that the fingerprints will match. * sign.c (do_sign): Pass the serialno to the sign code. * keyid.c (serialno_and_fpr_from_sk): New.
2003-06-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-64/+84
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-101/+99
to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works.
2003-06-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+1358
'GNUPG-1-9-BRANCH'.
2003-05-31* mainproc.c (check_sig_and_print), main.h, keylist.c (show_policy,David Shaw1-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.
2003-05-24* armor.c, g10.c, kbnode.c, misc.c, pkclist.c, sign.c, build-packet.c,David Shaw1-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.
2003-05-21* progress.c (handle_progress)Werner Koch1-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.
2003-05-03* packet.h, build-packet.c (build_sig_subpkt), export.cDavid Shaw1-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.
2003-04-30* build-packet.c (build_sig_subpkt): Comments.David Shaw1-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).