aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2003-10-26* g10.c (main): Add --symmetric --encrypt command. This generates aDavid Shaw1-3/+31
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.
2003-10-25* g10.c (main) [ENABLE_CARD_SUPPORT]: Add a default forWerner Koch1-0/+8
--pcsc-driver. * cardglue.c (learn_status_cb): Fixed faulty use of !space.
2003-10-21* passphrase.c (ask_passphrase): Add optional promptid arg.Werner Koch1-1/+1
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.
2003-10-21* card-util.c (card_edit): New command "passwd". Add logic toWerner Koch1-1/+1
check the PIN in advance. (card_status): Add new args to return the serial number. Changed all callers. * call-agent.c (agent_scd_checkpin): New.
2003-10-14* import.c (import_one): Show the keyid when giving the Elgamal slowDavid Shaw1-1/+4
import warning. * g10.c (main): Older versions used --comment "" to indicate no comment. Don't add an empty comment.
2003-10-10* cardglue.c (card_close): New.Werner Koch1-0/+3
* 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.
2003-10-10* primegen.c (gen_prime): Bail out if we try to generate a primeWerner Koch1-1/+1
with less than 16 bits. Include i18n.h. * POTFILES.in (cipher/primegen.c): Added.
2003-10-10* g10.c (main): Give a deprecated option warning for --show-keyring,David Shaw1-2/+30
--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.
2003-10-08* cardglue.c (pin_cb): Detect whether an admin or regular PIN isWerner Koch1-3/+4
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-10-08* call-agent.c (agent_scd_getattr): Don't clear the passed infoWerner Koch1-2/+2
structure, so that it can indeed be updated. * card-util.c (fpr_is_zero): New. (generate_card_keys): New. (card_edit): New command "generate". * keygen.c (generate_keypair): New arg CARD_SERIALNO, removed call to check_smartcard. (check_smartcard,show_smartcard): Removed. (show_sha1_fpr,fpr_is_zero): Removed. * app-openpgp.c (do_getattr): Support SERIALNO and AID.
2003-10-01* g10.c (main): Add --no-groups to zero --group list.David Shaw1-6/+22
* 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.
2003-09-30* options.h, g10.c (main), mainproc.c (check_sig_and_print): AddDavid Shaw1-0/+1
--verify-option show-unusable-uids.
2003-09-28* g10.c (main): New commands --card-edit, --card-status andWerner Koch1-0/+63
--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.
2003-09-25* options.h, g10.c (main), keylist.c (list_keyblock_print): AddDavid Shaw1-2/+6
"show-unusable-uids" list-option to show revoked and/or expired user IDs.
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-117/+196
2003-09-23* g10.c (main): Deprecate --default-comment in favor of --no-comments.David Shaw1-3/+11
* options.h, g10.c (main), armor.c (armor_filter): Allow using --comment multiple times to get multiple Comment: header lines. --no-comments resets list.
2003-09-18* g10.c: New command --card-edit.Werner Koch1-0/+17
* card-util.c (card_status): Use tty_fprintf for all output. (print_sha1_fpr, print_isoname): Ditto. (get_one_name,change_name, change_url, change_login,change_lang) (change_sex): New; taken from keygen.c. * keygen.c (smartcard_get_one_name, smartcard_change_name) (smartcard_change_url, smartcard_change_login_data) (smartcard_change_lang, smartcard_change_sex): Removed. (check_smartcard): Removed most menu items.
2003-09-12* g10.c (main): Trim --help to commonly used options. Remove -f.David Shaw1-59/+51
2003-09-09* g10.c (main): Error out if --multifile is used with the commands thatDavid Shaw1-38/+72
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.
2003-09-04* armor.c (parse_hash_header, armor_filter), g10.c (print_hex, print_mds),David Shaw1-11/+0
pkclist.c (algo_available): Drop TIGER/192 support.
2003-08-31* g10.c (add_keyserver_url), keyedit.c (keyedit_menu), sign.cDavid Shaw1-5/+5
(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-29* passphrase.c (agent_send_all_options): Make use of $GPG_TTY.David Shaw1-3/+3
* g10.c (main): Disable use-agent if passphrase-fd is given later. Suggested by Kurt Garloff. * exec.c, g10.c, gpgv.c, passphrase.c, photoid.c: s/__MINGW32__/_WIN32/ to help building on native Windows compilers. Requested by Brian Gladman. From Werner on stable branch.
2003-08-26* options.h, g10.c (main): Add list-option list-preferred-keyserver.David Shaw1-1/+2
* keyedit.c (change_passphrase): When responding 'no' to the blank passphrase question, re-prompt for a new passphrase. This is bug #202.
2003-08-24* mainproc.c (check_sig_and_print): Get the uid validity before printingDavid Shaw1-1/+1
any sig results to avoid munging the output with trustdb warnings. * g10.c (main): Don't include --show-keyring in --help as it is deprecated.
2003-08-05Cleanups, fixes and PC/SC supportWerner Koch1-93/+14
2003-08-03* options.h, g10.c (main), keylist.c (list_keyblock_print), keyedit.cDavid Shaw1-0/+1
(print_and_check_one_sig): New "show-sig-expire" list-option to show signature expiration dates (if any).
2003-07-29* gpgsm.c (main): Add secmem features and set the random seed file.Werner Koch1-24/+16
(gpgsm_exit): Update the random seed file and enable debug output. * g10.c (main): Add secmem features and set the random seed file. (g10_exit): Update the random seed file. * parse-packet.c (parse_signature,read_protected_v3_mpi) (parse_key): Fixed use of mpi_set_opaque. * keygen.c (gen_card_key): Ditto.
2003-07-24* options.h, g10.c (main, add_keyserver_url): AddDavid Shaw1-2/+39
--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-24* g10.c: New command --card-status.Werner Koch1-0/+10
* card-util.c (card_status): New. * call-agent.c (learn_status_cb): Parse more information. * keylist.c (print_pubkey_info): Add FP arg for optinal printing to a stream. Changed all callers.
2003-07-23* keygen.c (generate_keypair): Create an AUTHKEYTYPE entry for cards.Werner Koch1-0/+15
(do_generate_keypair): Abd generate the authkey. (check_smartcard): Changed menu accordingly.
2003-07-20* options.h, g10.c (main), mainproc.c (check_sig_and_print): AddDavid Shaw1-1/+3
verify-options "show-validity" and "show-long-keyid" to show trustdb validity and long keyids during (file) signature verification.
2003-07-10* parse-packet.c (parse_signature): No need to reserve 8 bytes for theDavid Shaw1-3/+6
unhashed signature cache any longer. * misc.c (pct_expando): Add two new expandos - signer's fingerprint (%g), and signer's primary fingerprint (%p). * Makefile.am: Include W32LIBS where appropriate. * g10.c (main): Add --rfc2440 alias for --openpgp since in a few months, they won't be the same thing. * keyserver.c (parse_keyserver_uri): Accept "http" as an alias for "hkp", since it is occasionally written that way. (keyserver_spawn): Use ascii_isspace to avoid locale issues. * keygen.c (ask_user_id): Make --allow-freeform-uid apply to the email field as well as the name field, and allow mixing fields when it is set. * options.skel: Use subkeys.pgp.net as the default keyserver. * trustdb.c (validate_one_keyblock): Certifications on revoked or expired uids do not count in the web of trust. * signal.c (init_one_signal, pause_on_sigusr, do_block): Only use sigprocmask() if we have sigset_t, and only use sigaction() if we have struct sigaction. This is for Forte c89 on Solaris which seems to define only the function call half of the two pairs by default. (pause_on_sigusr): Typo. (do_block): If we can't use sigprocmask() and sigset_t, try to get the number of signals from NSIG as well as MAXSIG, and if we can't, fail with an explanation. * signal.c, tdbio.c: Comment out the transaction code. It was not used in this version, and was causing some build problems on quasi-posix platforms (Solaris and Forte c89). * keylist.c (list_keyblock_colon): Don't include validity values when listing secret keys since they can be incorrect and/or misleading. This is a temporary kludge, and will be handled properly in 1.9/2.0. * mainproc.c (check_sig_and_print): Only show the "key available from" preferred keyserver line if the key is not currently present. * keyedit.c (sign_uids): Do not sign expired uids without --expert (same behavior as revoked uids). Do not allow signing a user ID without a self-signature. --expert overrides. Add additional prompt to the signature level question. (menu_expire): When changing expiration dates, don't replace selfsigs on revoked uids since this would effectively unrevoke them. There is also no point in replacing expired selfsigs. This is bug #181 * g10.c (add_notation_data): Make sure that only ascii is passed to iscntrl. Noted by Christian Biere. * getkey.c (classify_user_id2): Replaced isspace by spacep * keygen.c (ask_user_id): Ditto. (get_parameter_algo): Ditto. * keyedit.c (keyedit_menu): Ditto. * tdbdump.c (import_ownertrust): Ditto. s/isxdigit/hexdigitp/. * revoke.c (ask_revocation_reason): * keyserver.c (keyserver_spawn): Dito.
2003-07-03* options.h (DBG_CIPHER): Reintroduced it.Werner Koch1-0/+4
* 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-06-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-2/+11
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-182/+259
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-05A small step for GnuPG but a huge leap for error codes.Werner Koch1-0/+3
(Sorry, it does not build currently - I need to check it in to avoid duplicate work.)
2003-06-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+3137
'GNUPG-1-9-BRANCH'.
2003-06-05* options.skel: Use new hkp://subkeys.pgp.net as sample keyserver sinceDavid Shaw1-6/+9
they at least handle subkeys correctly. * options.h, g10.c (main), main.h, keylist.c (show_keyserver_url), mainproc.c (check_sig_and_print), parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt, can_handle_critical): Add read-only support for preferred keyserver subpackets. They're basically policy URLs with a different name. Add a verify-option "show-preferred-keyserver" to turn them on and off (on by default, as per stable branch). * g10.c (main): Add "--set-notation" as alias to "--notation-data" this is to make things consistent with --set-policy-url meaning both sigs and certs.
2003-06-04Inadvertently left out of the 2003-06-01 checkinDavid Shaw1-0/+1
2003-06-03* options.h, g10.c (main), keylist.c (list_keyblock_print): AddDavid Shaw1-1/+3
"show-validity" and "show-long-keyid" list-options. * gpgv.c (get_validity, trust_value_to_string): Stubs. * g10.c (main): Use SAFE_VERSION instead of VERSION in the version-specific gpg.conf file so it can be overridden on RISCOS.
2003-06-01* g10.c (main), keylist.c (show_policy_url, show_notation), mainproc.cDavid Shaw1-1/+10
(check_sig_and_print): Emulate the old policy and notation behavior (display by default). Send to status-fd whether it is displayed on the screen or not. * g10.c (main): Since we now have some options in devel that won't work in a stable branch gpg.conf file, try for a version-specific gpg.conf-VERSION file before falling back to gpg.conf. * main.h, options.h: Move various option flags to options.h.
2003-05-31* mainproc.c (check_sig_and_print), main.h, keylist.c (show_policy,David Shaw1-10/+72
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-18/+18
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* trustdb.h, trustdb.c (is_disabled), gpgv.c (is_disabled): RenameDavid Shaw1-18/+11
is_disabled to cache_disabled_value, which now takes a pk and not just the keyid. This is for speed since there is no need to re-fetch a key when we already have that key handy. Cache the result of the check so we don't need to hit the trustdb more than once. * getkey.c (skip_disabled): New function to get a pk and call is_disabled on it. (key_byname): Use it here. * packet.h, getkey.c (skip_disabled), keylist.c (print_capabilities): New "pk_is_disabled" macro to retrieve the cached disabled value if available, and fill it in via cache_disabled_value if not available. * trustdb.c (get_validity): Cache the disabled value since we have it handy and it might be useful later. * parse-packet.c (parse_key): Clear disabled flag when parsing a new key. Just in case someone forgets to clear the whole key. * getkey.c (merge_selfsigs_main): Add an "if all else fails" path for setting a single user ID primary when there are multiple set primaries all at the same second, or no primaries set and the most recent user IDs are at the same second, or no signed user IDs at all. This is arbitrary, but deterministic. * exec.h, photoid.h: Add copyright message. * keylist.c (list_keyblock_print): Don't dump attribs for revoked/expired/etc uids for non-colon key listings. This is for consistency with --show-photos. * main.h, keylist.c (dump_attribs), mainproc.c (check_sig_and_print): Dump attribs if --attrib-fd is set when verifying signatures. * g10.c (main): New --gnupg option to disable the various --openpgp, --pgpX, etc. options. This is the same as --no-XXXX for those options. * revoke.c (ask_revocation_reason): Clear old reason if user elects to repeat question. This is bug 153. * keyedit.c (sign_uids): Show keyid of the key making the signature.
2003-05-03* packet.h, build-packet.c (build_sig_subpkt), export.cDavid Shaw1-115/+169
(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-05-01* tdbio.c (create_version_record): Only create new trustdbs withDavid Shaw1-8/+9
TM_CLASSIC or TM_PGP. * trustdb.h, trustdb.c (trust_string, get_ownertrust_string, get_validity_string, ask_ownertrust, validate_keys), pkclist.c (do_edit_ownertrust): Rename trust_string to trust_value_to_string for naming consistency. * trustdb.h, trustdb.c (string_to_trust_value): New function to translate a string to a trust value. * g10.c (main): Use string_to_trust_value here for --force-ownertrust. * options.h, g10.c (main), trustdb.c (trust_model_string, init_trustdb, check_trustdb, update_trustdb, get_validity, validate_one_keyblock): An "OpenPGP" trust model is misleading since there is no official OpenPGP trust model. Use "PGP" instead.
2003-04-27* g10.c (main): Add --no-textmode.David Shaw1-0/+3
* export.c (do_export_stream), keyedit.c (show_key_with_all_names, menu_addrevoker), mainproc.c (check_sig_and_print), photoid.c (show_photos), sign.c (mk_notation_and_policy), trustdb.c (get_validity, reset_trust_records, validate_keys): Make some strings translatable. * mainproc.c (check_sig_and_print): Show digest algorithm and sig class when verifying a sig with --verbose on, and add version, pk and hash algorithms and sig class to VALIDSIG. * parse-packet.c (enum_sig_subpkt): Make a warning message a --verbose warning message since we don't need to warn every time we see an unknown critical (we only need to invalidate the signature). * trustdb.c (init_trustdb): Check the trustdb options even with TM_AUTO since the auto may become TM_CLASSIC or TM_OPENPGP.
2003-04-26* sign.c (do_sign): Show the hash used when making a signature in verboseDavid Shaw1-1/+3
mode. * tdbio.h, tdbio.c (tdbio_read_model): New function to return the trust model used in a given trustdb. * options.h, g10.c (main), trustdb.c (init_trustdb, check_trustdb, update_trustdb): Use tdbio_read_model to implement an "auto" trust model which is set via the trustdb.
2003-04-15* Makefile.am (AM_CFLAGS): Make use of AM_CFLAGS and AM_LDFLAGS.Werner Koch1-1/+5
* g10.c, options.h: New option --enable-progress-filter. * progress.c (handle_progress): Make use of it.