aboutsummaryrefslogtreecommitdiffstats
path: root/g10/encode.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-311-1/+2
|
* * keygen.c (start_tree): New function to "prime" a KBNODE list.David Shaw2005-05-051-18/+4
| | | | | | | | | | | | (do_generate_keypair): Use it here rather than creating and deleting a comment packet. * keygen.c (gen_elg, gen_dsa): Do not put public factors in secret key as a comment. * options.h, encode.c (encode_simple, encode_crypt), keygen.c (do_create): Remove disabled comment packet code.
* * plaintext.c (handle_plaintext): Don't try and create a zero-lengthDavid Shaw2004-11-041-8/+8
| | | | | | | | | | 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).
* Added SELInux hacks and did some cleanups.Werner Koch2004-10-131-9/+23
|
* * configure.ac: Actually name the option --disable-finger and notWerner Koch2004-10-131-3/+3
| | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | 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-4/+4
| | | | | 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.
* * delkey.c (do_delete_key): Allow deleting a public key with a secretDavid Shaw2004-02-261-1/+1
| | | | | | | | | | | | | present if --expert is set. * plaintext.c (handle_plaintext): Make bytecount static so it works with multiple literal packets inside a message. * encode.c, helptext.c (keygen.algo, keygen.algo.elg_se), keygen.c (ask_algo), sig-check.c (do_check_messages), skclist.c (build_sk_list): Rename "ElGamal" to "Elgamal" as that is the proper spelling nowadays. Suggested by Jon Callas.
* * plaintext.c: Copyright.David Shaw2004-02-241-2/+6
| | | | | | | | | | | | | | * encode.c (encode_simple): Show cipher with --verbose. * options.h, g10.c (main), keyedit.c (sign_keys): Add --ask-cert-level option to enable cert level prompts during sigs. Defaults to on. Simplify --default-cert-check-level to --default-cert-level. If ask-cert-level is off, or batch is on, use the default-cert-level as the cert level. * options.h, g10.c (main), trustdb.c (mark_usable_uid_certs): Simplify --min-cert-check-level to --min-cert-level.
* * options.h, g10.c (main), compress.c (init_compress), compress-bz2.cDavid Shaw2003-11-151-6/+5
| | | | | | (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-2/+2
| | | | | | 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-44/+66
| | | | | | | | | | | | * 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-4/+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.
* * g10.c (main): Add --symmetric --encrypt command. This generates aDavid Shaw2003-10-261-25/+74
| | | | | | | | | | | | | | | | | | | | | message that can be decrypted via a passphrase or public key system. * main.h, encode.c (encode_seskey): Allow passing in an already-created session key dek. (encode_simple): Use the actual symmetric cipher when encrypting a session key for a symmetric message. (encode_crypt): Add a flag to trigger a hybrid mode that can be decrypted via a passphrase or a pk. Change all callers. * mainproc.c (symkey_decrypt_sesskey): There is no way to tell the difference here between a bad passphrase and a cipher algorithm that we don't have, so use a error message that makes that clear. Use the actual list of ciphers when checking whether a cipher is invalid. Return error if the decrypted cipher algorithm is invalid. (proc_symkey_enc): In a mixed passphrase/pk message, if a valid dek already exists from decrypting via pk, do not try to process the passphrase. (proc_symkey_enc): Indicate when we're decrypting a session key as opposed to decrypting data. If a passphrase is invalid, discard the dek so we'll keep trying.
* * g10.c (main): Add --no-groups to zero --group list.David Shaw2003-10-011-22/+16
| | | | | | | | | | | | | | * encode.c (encode_simple): Allow for 32 bytes (256 bits) of symmetrically encrypted session key. Use --s2k-cipher-algo to choose cipher, rather than the default cipher. * parse-packet.c (parse_subkeyenc): Give a warning if an symmetrically encrypted session key is seen without salt. Show in --list-packets if a symetrically encrypted session key is present. * pubkey-enc.c (get_it): Always show cipher-not-in-prefs warning unless --quiet is set. Use text name of cipher in warning.
* * g10.c (main): Error out if --multifile is used with the commands thatDavid Shaw2003-09-091-0/+4
| | | | | | | | | | | | | don't support it yet (--sign, --clearsign, --detach-sign, --symmetric, and --store). * g10.c (main): Add --multifile as an alias to turn --encrypt into --encrypt-files (plus --verify-files, --decrypt-files). * encode.c (use_mdc), g10.c (main): Use RFC1991 and RFC2440 directly to check for MDC usability. Do not set the force_mdc or disable_mdc flags since there is no point any longer.
* * 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-3/+6
| | | | | | | | * 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-21/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* * Makefile.am (AM_CFLAGS): Make use of AM_CFLAGS and AM_LDFLAGS.Werner Koch2003-04-151-0/+6
| | | | | | * 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/+2
| | | | | | | | | | | | | | | | | | | | | 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.
* * options.h, g10.c (main), encode.c (write_pubkey_enc_from_list),David Shaw2002-12-031-4/+4
| | | | | | | | | | | | | | | pkclist.c (algo_available), revoke.c (gen_revoke): Add --pgp8 mode. This is basically identical to --pgp7 in all ways except that signing subkeys, v4 data sigs (including expiration), and SK comments are allowed. * getkey.c (finish_lookup): Comment. * main.h, keylist.c (reorder_keyblock), keyedit.c (keyedit_menu): Reorder user ID display in the --edit-key menu to match that of the --list-keys display. * g10.c (add_notation_data): Fix initialization.
* * main.h, misc.c (default_cipher_algo, default_compress_algo): New.David Shaw2002-11-251-8/+5
| | | | | | | | | | | | Return the default algorithm by trying --cipher-algo/--compress-algo, then the first item in the pref list, then s2k-cipher-algo or ZIP. * sign.c (sign_file, sign_symencrypt_file), encode.c (encode_simple, encode_crypt): Call default_cipher_algo and default_compress_algo to get algorithms. * g10.c (main): Allow pref selection for compress algo with --openpgp.
* * encode.c (encode_simple), passphrase.c (passphrase_to_dek), sign.cDavid Shaw2002-11-241-2/+1
| | | | | | (sign_symencrypt_file): Use --s2k-digest-algo for passphrase mangling rather than --digest-algo.
* * encode.c (encode_simple): Make sure that files larger than about 4G useDavid Shaw2002-11-131-13/+24
| | | | | | | | | | | | | | | | | | | partial length encoding. This is required because OpenPGP allows only for 32 bit length fields. From Werner on stable branch. * getkey.c (get_pubkey_direct): Renamed to... (get_pubkey_fast): this and made extern. (get_pubkey_byfprint_fast): New. From Werner on stable branch. * keydb.h, import.c (import_one): Use get_pubkey_fast instead of get_pubkey. We don't need a merged key and actually this might lead to recursions. (revocation_present): Likewise for search by fingerprint. From Werner on stable branch. * g10.c (main): Try to create the trustdb even for non-colon-mode list-key operations. This is required because getkey needs to know whether a a key is ultimately trusted. From Werner on stable branch.
* * g10.c (main): Add --no-throw-keyid.David Shaw2002-11-011-1/+1
| | | | | | | | | | * keydb.h, encode.c (write_pubkey_enc_from_list), g10.c (main), pkclist.c (build_pk_list): Add --hidden-recipient (-R) and --hidden-encrypt-to, which do a single-user variation on --throw-keyid. The "hide this key" flag is carried in bit 0 of the pk_list flags field. * keyserver.c (parse_keyrec): Fix shadowing warning.
* * build-packet.c (do_plaintext), encode.c (encode_sesskey, encode_simple,David Shaw2002-10-311-3/+3
| | | | | | | encode_crypt), sign.c (write_plaintext_packet): Use wipememory() instead of memset() to wipe sensitive memory as the memset() might be optimized away.
* tidied RISC OS filetype supportStefan Bellon2002-10-291-2/+5
|
* Cleanups and minor fixes.Werner Koch2002-09-101-0/+6
|
* * pkclist.c (do_we_trust_pre): Changed the wording of a warning.Werner Koch2002-08-301-2/+8
| | | | | | | | | | | | | | | | * encode.c (encode_simple,encode_crypt): Use new style CTB for compressssed packets when using MDC. We need to do this so that concatenated messages are properly decrypted. Old style compression assumes that it is the last packet; given that we can't determine the length in advance, the uncompressor does not know where to start. Actually we should use the new CTB always but this would break PGP 2 compatibility. * parse-packet.c (parse): Special treatment for new style CTB compressed packets. * build-packet.c (do_mdc): Removed. Was not used. (do_encrypted_mdc): Count the version number and the MDC packet.
* * getkey.c (get_user_id_native): Renamed to ..Werner Koch2002-08-191-2/+2
| | | | | | | | | | | | (get_user_id_printable): this. Filter out all dangerous characters. Checked all usages. (get_user_id_string_native): Renamed to.. (get_user_id_string_printable): this. Filter out all dangerous characters. Checked all usages. * keyedit.c (show_basic_key_info): New. * keylist.c (print_fingerprint): New mode 3. * import.c (import_one): Use new function to display the user ID.
* * encode.c (encode_simple): Fix problem with using compression algo 2 andDavid Shaw2002-08-131-24/+83
| | | | | | | | | | | | | | | | | | symmetric compressed files. * encode.c (encode_simple, encode_crypt): If we are not using a MDC, compress even if a file is already compressed. This is to help against the chosen ciphertext attack. * pkclist.c (select_algo_from_prefs): Fix requested algorithm bug so the request succeeds even if the requested algorithm is not the first found. * cipher.c (write_header), encode.c (use_mdc, encode_simple, encode_crypt, encrypt_filter), g10.c (main): Be more eager to use a MDC. We use a MDC if the keys directly support it, if the keys list AES (any) or TWOFISH anywhere in the prefs, or if the cipher chosen does not have a 64 bit blocksize.
* * options.h, g10.c (main), mainproc.c (proc_encrypted): --ignore-mdc-errorDavid Shaw2002-08-061-1/+1
| | | | | option to turn a MDC check error into a warning.
* * encode.c (encode_crypt), g10.c (main), sign.c (sign_file,David Shaw2002-08-061-2/+14
| | | | | | | | | clearsign_file): Use the same --pgpX warning string everywhere to ease translations. * encode.c (write_pubkey_enc_from_list): Warn when using --throw-keyid with --pgpX. Noted by Vedaal Nistar.
* * encode.c (encode_symmetric): Do not use the new encryption code.Werner Koch2002-07-011-1/+7
|
* Update head to match stable 1.0David Shaw2002-06-291-178/+341
|
* See ChangeLog: Wed Oct 4 13:16:18 CEST 2000 Werner KochWerner Koch2000-10-041-75/+60
|
* See ChangeLog: Mon Sep 18 16:35:45 CEST 2000 Werner KochWerner Koch2000-09-181-0/+8
|
* See ChangeLog: Mon Jul 31 10:04:47 CEST 2000 Werner KochWerner Koch2000-07-311-2/+2
|
* See ChangeLog: Tue Jul 25 17:44:15 CEST 2000 Werner KochWerner Koch2000-07-251-7/+11
|
* See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch2000-07-141-4/+5
|
* See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch2000-01-271-14/+14
|
* See ChangeLog: Mon Jan 24 22:24:38 CET 2000 Werner KochWerner Koch2000-01-241-2/+48
|
* See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner KochWerner Koch2000-01-241-21/+21
|
* See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner KochWerner Koch1999-12-081-1/+1
|
* See ChangeLog: Sat Nov 13 17:44:23 CET 1999 Werner KochWerner Koch1999-11-131-1/+1
|
* See ChangeLog: Tue Oct 26 14:10:21 CEST 1999 Werner KochWerner Koch1999-10-261-2/+3
|
* See ChangeLog: Wed Aug 4 10:34:46 CEST 1999 Werner KochV0-9-10Werner Koch1999-08-041-1/+2
|
* See ChangeLog: Mon Jul 26 09:34:46 CEST 1999 Werner KochWerner Koch1999-07-261-47/+97
|