aboutsummaryrefslogtreecommitdiffstats
path: root/g10 (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* * build-packet.c (write_fake_data, do_secret_key), seckey-cert.cDavid Shaw2003-12-174-11/+17
| | | | | | | | (do_check): Use an unsigned length for mpi_get_opaque. * options.h: It's impolite to assign -1 to an unsigned opt.force_ownertrust.
* * sig-check.c (cmp_help, do_check), sign.c (do_sign): Remove old unusedDavid Shaw2003-12-174-80/+10
| | | | | | | code. * keyid.c (keyid_from_sk): Make sure lowbits is initialized.
* * sig-check.c (do_check): Move the signing algo and hash checks fromDavid Shaw2003-12-132-12/+27
| | | | | | | | | here... (signature_check2): ... to here. (check_key_signature2): ... and here. This is a minor optimization to avoid fetching a key (which can be expensive, especially if it is not self-signed, and there are many key signatures on it which need to be checked for ultimate trust) if the signature would have failed anyway because of algorithm or hash problems.
* * packet.h, build-packet.c (hash_public_key): Remove function ...David Shaw2003-12-117-140/+105
| | | | | | | | | | | | | | | | | | | | * keydb.h, keyid.c (hash_public_key, do_fingerprint_md): ... and make a new one here that shares code with the fingerprint calculations. This removes some duplicated functionality, and is also around 14% faster. (Every bit helps). * import.c (import_one): No longer need the Elgamal import warning. * getkey.c (get_pubkey_fast): This one is sort of obscure. get_pubkey_fast returns the primary key when requesting a subkey, so if a user has a key signed by a subkey (we don't do this, but used to), AND that key is not self-signed, AND the algorithm of the subkey in question is not present in GnuPG, AND the algorithm of the primary key that owns the subkey in question is present in GnuPG, then we will try and verify the subkey signature using the primary key algorithm and hit a BUG(). The fix is to not return a hit if the keyid is not the primary. All other users of get_pubkey_fast already expect a primary only.
* * keyid.c (do_fingerprint_md): Remove the rules to hash the old v3 ElgamalDavid Shaw2003-12-102-22/+13
| | | | | keys. They are no longer needed.
* * keyid.c (keyid_from_sk, keyid_from_pk, fingerprint_from_pk,David Shaw2003-12-102-51/+86
| | | | | | fingerprint_from_sk): Enforce the v3-is-only-RSA rule. Anything that isn't RSA gets a zero keyid and fingerprint.
* * keyid.c (do_fingerprint_md): Properly handle hashing of keys that weDavid Shaw2003-12-102-28/+64
| | | | | | | | | don't know the structure of by using the opaque MPI. (do_fingerprint_md_sk): We cannot calculate the fingerprint from a secret key unless we know the structure (since we can't leave off the secret key parts), so fail early..... (keyid_from_sk, fingerprint_from_sk): .... and return all zeroes.
* * g10.c (strusage, main): Show development version warning in --versionDavid Shaw2003-12-042-7/+30
| | | | | | output. (main): Set --bzip2-compress-level to the default value at startup. Remove --emulate-checksum-bug noop.
* * options.h, g10.c (main), main.h, seskey.c (do_encode_md,David Shaw2003-12-047-35/+18
| | | | | | | 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.
* * mainproc.c (proc_symkey_enc, proc_encrypted): Add ability to useDavid Shaw2003-11-302-65/+105
| | | | | | | | --override-session-key on --symmetric messages (new-style or old-style). (proc_pubkey_enc): Move code to show session key from here to proc_encrypted() so it can work with any type of message. Suggested by Michael Young.
* * trustdb.c (validate_keys): Reset the trustdb before checking if we haveDavid Shaw2003-11-304-22/+20
| | | | | | | | | | | | | | any ultimately trusted keys. This ensures that if we lose all our ultimately trusted keys, we don't leave behind the old validity calculations. Noted by Peter Palfrader. * revoke.c (gen_desig_revoke): Specify in the comment when a designated revocation is generated. * getkey.c (merge_selfsigs_main, merge_selfsigs_subkey, get_seckey_byname2): Remove Elgamal check since we are removing type 20 keys altogether.
* * pkclist.c (build_pk_list): Do not allow an empty PK list in interactiveDavid Shaw2003-11-273-4/+12
| | | | | | | | mode. * getkey.c (get_seckey_byname2): Disallow use of sign+encrypt Elgamal keys.
* * keygen.c (ask_algo): Remove ability to generate Elgamal sign+encryptDavid Shaw2003-11-273-23/+26
| | | | | | | | keys. * getkey.c (merge_selfsigs_main, merge_selfsigs_subkey): Disallow use of sign+encrypt Elgamal keys.
* * seskey.c (do_encode_md): Comment about earlier (pre-PGP 2.3) encodings.David Shaw2003-11-213-3/+25
| | | | | | | * misc.c (compress_algo_to_string): Translate "Uncompressed". Requested by Tommi Vainikainen. (string_to_compress_algo): Include multi-string for "uncompressed|none".
* * options.h, g10.c (main), compress-bz2.c (init_uncompress): AddDavid Shaw2003-11-184-1/+11
| | | | | | --bz2-compress-lowmem to set bzlib "small" flag for low memory (but slow) decompression.
* * compress.c (init_compress): Remove compress level 10 trick, since it isDavid Shaw2003-11-154-7/+10
| | | | | | | | | | no longer needed. * g10.c: Fix typoed option name. * compress-bz2.c (init_compress): Compression level 0 is not meaningful for bzip2.
* * options.h, g10.c (main), compress.c (init_compress), compress-bz2.cDavid Shaw2003-11-159-52/+67
| | | | | | (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-153-3/+10
| | | | | | default_compress_algo (--compress-algo, followed by the highest --personal-compress-preference, followed by ZIP) to get the algorithm.
* * options.h, trustdb.c (trust_model_string, init_trustdb): Add support forDavid Shaw2003-11-154-8/+30
| | | | | | | | "external" trust model, where the user can provide a pregenerated trustdb. * keyedit.c (keyedit_menu): Do not allow editing ownertrust with an external trust model trustdb.
* * options.h, g10.c, keyedit.c, keylist.c, mainproc.c: Clarify theDavid Shaw2003-11-146-73/+81
| | | | | plurarility (or not) of various list and verify options.
* * g10.c (main): Add --symmetric --sign --encrypt.David Shaw2003-11-135-50/+128
| | | | | | | | | | | | * 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.
* * mainproc.c (proc_symkey_enc): Don't show algorithm information whenDavid Shaw2003-11-103-8/+23
| | | | | | | | --quiet is set. Suggested by Duncan Harris. Also don't fail with BUG() when processing a --symmetric message with a cipher we don't have. * g10.c: Alias --personal-xxx-prefs to --personal-xxx-preferences.
* * pkclist.c (build_pk_list): When adding recipients interactively, allowDavid Shaw2003-11-102-0/+6
| | | | | the user to stop at any point.
* * trustdb.h, trustdb.c (register_trusted_keyid): New. Adds a keyid to theDavid Shaw2003-11-017-43/+93
| | | | | | | | | | | | | | | | | | | | list of ultimately trusted keys. * keygen.c (do_generate_keypair): Use it here so that the ultimate ownertrust happens before the trustdb (might be) rebuilt. Also fix an error where the newly generated pk is thought to be a subkey by the trustdb. * g10.c (main): Fix --export-all do actually do something different than --export. * pkclist.c (build_pk_list): Show all recipients rather than showing each recipient as they are added. * mainproc.c (proc_symkey_enc, proc_encrypted): Keep a count of the number of passphrases that can decrypt a symmetric or mixed symmetric/pk message and include it in the list of keys shown to the user.
* * misc.c (compress_algo_to_string, string_to_compress_algo,David Shaw2003-10-3112-40/+366
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* (close_ct_reader, close_pcsc_reader): Implemented.Werner Koch2003-10-302-3/+17
| | | | | (get_ccid_error_string): New. Not very useful messages, though.
* * cardglue.c (open_card): Ask for card insertion.Werner Koch2003-10-294-2/+156
| | | | | | | | | | | | (check_card_serialno): New. (agent_scd_pksign, agent_scd_pkdecrypt): Use it here. * cardglue.c (open_card): Issue insertion status message. * status.h, status.c (STATUS_CARDCTRL): New. * status.c (cpr_get_answer_okay_cancel): New. * miscutil.c (answer_is_okay_cancel): New.
* * DETAILS: Add the 'a' value for field 12 and the new field 15.Werner Koch2003-10-282-6/+46
| | | | | | | | * keylist.c (list_keyblock_print): Denote secrets keys stored on a card with an '>'. Print the '#' also for subkeys. (list_keyblock_colon): Introduce new field 15 for sec/ssb to print the serial number.
* * g10.c (main): Enhance the version-specific config file code to try forDavid Shaw2003-10-262-7/+33
| | | | | more specific matches before giving up (e.g. 1.3.3-cvs, 1.3.3, 1.3, 1).
* * g10.c (main): Add --symmetric --encrypt command. This generates aDavid Shaw2003-10-265-54/+186
| | | | | | | | | | | | | | | | | | | | | 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.
* * ccid-driver.c (ccid_open_reader): Return an error if no USBWerner Koch2003-10-253-1/+9
| | | | | | | devices are found. * Makefile.am: Replaced INTLLIBS by LIBINTL.
* * g10.c (main) [ENABLE_CARD_SUPPORT]: Add a default forWerner Koch2003-10-255-7/+27
| | | | | | | --pcsc-driver. * cardglue.c (learn_status_cb): Fixed faulty use of !space.
* (apdu_open_reader): Hacks for PC/SC under Windows.Werner Koch2003-10-242-3/+33
|
* * passphrase.c (ask_passphrase): Add optional promptid arg.Werner Koch2003-10-2112-116/+246
| | | | | | | | | | | | | | | | | | | Changed all callers. * cardglue.c (pin_cb): Use it here, so the machine interface can tell whether the Admin PIN is requested. * cardglue.c (agent_scd_checkpin): New. * misc.c (openpgp_pk_algo_usage): Added AUTH usage. * app-openpgp.c (check_against_given_fingerprint): New. Factored out that code elsewhere. (do_check_pin): New. * card-util.c (card_edit): New command "passwd". Add logic to check the PIN in advance. (card_status): Add new args to return the serial number. Changed all callers.
* * import.c (import_one): Show the keyid when giving the Elgamal slowDavid Shaw2003-10-143-3/+14
| | | | | | | | import warning. * g10.c (main): Older versions used --comment "" to indicate no comment. Don't add an empty comment.
* * keyedit.c (show_key_with_all_names): Ownertrust is only meaningful forDavid Shaw2003-10-142-6/+18
| | | | | | the PGP or classic trust models. Both validity and ownertrust are not meaningful for the always trust model.
* Always enable the gen_card_key prototype.Werner Koch2003-10-112-2/+4
|
* (card_close): New.V1-3-3Werner Koch2003-10-102-1/+15
| | | | | (agent_scd_change_pin): Implemented.
* About to release 1.3.3Werner Koch2003-10-101-1/+1
|
* * cardglue.c (card_close): New.Werner Koch2003-10-108-12/+139
| | | | | | | | | * ccid-driver.c (ccid_close_reader): New. * apdu.c (close_ccid_reader, close_ct_reader, close_csc_reader) (close_osc_reader, apdu_close_reader): New. Not all are properly implemented yet. * g10.c (g10_exit): Use close_card.
* * primegen.c (gen_prime): Bail out if we try to generate a primeWerner Koch2003-10-101-1/+1
| | | | | | | with less than 16 bits. Include i18n.h. * POTFILES.in (cipher/primegen.c): Added.
* * g10.c (main): Give a deprecated option warning for --show-keyring,David Shaw2003-10-104-13/+73
| | | | | | | | | | | --show-photos, --show-policy-url, --show-notation, and their respective no- forms. * options.skel: Remove show-photos and replace with list/verify-options show-photos. Remove no-mangle-dos-filenames. * misc.c (parse_options): Allow for incomplete (but unambiguous) options.
* * ccid-driver.c (ccid_transceive): Add T=1 chaining for sending.Werner Koch2003-10-096-58/+159
| | | | | | | | | | * 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-0811-147/+552
| | | | | | | | | | | | | | | | | | | | 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.
* * cardglue.c (learn_status_cb): Release values before assignmentWerner Koch2003-10-0215-338/+542
| | | | | | | | | so that it can be used by getattr to update the structure. (agent_scd_getattr): New. * keylist.c (print_pubkey_info): Add FP arg for optional printing to a stream. Changed all callers.
* * g10.c (main): Add --no-groups to zero --group list.David Shaw2003-10-015-46/+77
| | | | | | | | | | | | | | * 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.
* * options.h, g10.c (main), mainproc.c (check_sig_and_print): AddDavid Shaw2003-09-304-15/+28
| | | | | --verify-option show-unusable-uids.
* * gpgv.c (check_trustdb_stale): Stub.David Shaw2003-09-305-40/+71
| | | | | | | | | | | | | | * trustdb.c (get_validity): Move the up-to-date check to check_trustdb_stale (new), so that it can be called before validity is checked. * keylist.c (list_keyblock_print): Disable the overall key validity display until it can be thought about more. Use check_trustdb_stale here to avoid putting the check warning in the middle of a listed key. * trustdb.c (init_trustdb): Only verify_own_keys() for those trust models that it applies to (i.e. classic and OpenPGP).
* * keygen.c (do_add_key_flags, parse_parameter_usage): Add supportWerner Koch2003-09-3011-38/+188
| | | | | | | | | | | | | | | | | 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.
* * g10.c (main): New commands --card-edit, --card-status andWerner Koch2003-09-2815-2/+5576
| | | | | | | | | | | | | --change-pin. New options --ctapi-driver, --pcsc-driver and --disable-ccid * options.h (DBG_CARD_IO): New. * cardglue.c, cardclue.h: Enhanced. * card-util.c: New. Taken from current the gnupg 1.9 branch. * app-common.h, app-openpgp.c, iso7816.c, iso7816.h, apdu.c * apdu.h, ccid-driver.c, ccid-driver.h: New. Takem from the current gnupg 1.9 branch withy minor changes to include directives. * Makefile.am: Added these files.