summaryrefslogtreecommitdiffstats
path: root/g10/g10.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Renamed g10.c to gpg.cWerner Koch2005-10-051-4035/+0
| | | | Filelength fixes for W32.
* * main.h, misc.c (parse_options): Add the ability to have helpDavid Shaw2005-09-151-24/+46
| | | | | | | | | strings in xxx-options commands. * keyserver.c (keyserver_opts), import.c (parse_import_options), export.c (parse_export_options), g10.c (parse_list_options, main): Add help strings to xxx-options.
* * g10.c (main): Add aliases sign-with->local-user and user->recipientDavid Shaw2005-08-201-4/+9
| | | | | to make switching from PGP command line to GPG easier.
* * g10.c (main), passphrase.c (set_passphrase_from_string): NewDavid Shaw2005-08-051-0/+5
| | | | | | --passphrase command line option. Only useful in very special circumstances.
* Converted all m_free to xfree etc.Werner Koch2005-07-271-59/+59
|
* * gpg.sgml (http):Werner Koch2005-07-221-0/+7
| | | | | | * g10.c, options.h: New option --exit-on-status-write-error. * status.c (write_status_text): Make use of this option.
* * options.h, g10.c (main), keyedit.c (keyedit_menu): Use --interactiveDavid Shaw2005-07-221-6/+0
| | | | | | | | | to enable the uid walking when signing a key with no uids specified to sign. * keylist.c (list_keyblock_print): Fix silly typo. Noted by Greg Sabino Mullane.
* * g10.c, options.h: New option --limit-card-insert-tries.Werner Koch2005-07-191-1/+8
| | | | | * cardglue.c (open_card): Use it.
* * gpg.sgml: Document smartcard related options.Werner Koch2005-06-201-2/+7
| | | | | | * g10.c, options.h: New option --no-interactive-selection. * keyedit.c (keyedit_menu): Use it.
* * options.h, g10.c (main), export.c (parse_export_options,David Shaw2005-06-081-2/+2
| | | | | | | | do_export_stream): Add export-options export-clean-sigs, export-clean-uids, export-clean-subkeys, and export-clean which is all of the above. Export-minimal is the same except it also removes all non-selfsigs. export-unusable-sigs is now a noop.
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-311-1/+2
|
* * g10.c (main): Default {export|import}-unusable-sigs to off until theDavid Shaw2005-05-271-2/+2
| | | | | "clean" UI can be finished.
* (add_notation_data): Check number of at-signs.Werner Koch2005-05-241-1/+1
|
* (add_notation_data): Check number of at-signs.Werner Koch2005-05-241-1/+7
|
* * cardglue.c (open_card): Check USE_AGENT.Werner Koch2005-05-231-1/+1
| | | | | | | | | | | | | | | | | | | * g10.c (main): Option --debug-ccid-driver may now be given several times increase the debug level. * ccid-driver.c (parse_ccid_descriptor): Mark SCR335 FW version 5.14 as good. (do_close_reader): Never do a reset. The caller should instead make sure that the reader has been closed properly. The new retry code in ccid_slot_status will make sure that the readersatrts up fine even if the last process didn't closed the USB connection properly. (ccid_get_atr): For certain readers try switching to ISO mode. Thanks to Ludovic Rousseau for this hint and the magic numbers. (print_command_failed): New. (bulk_in): Use it here. Add new arg NO_DEBUG. (ccid_slot_status): Disabled debugging.
* * build-packet.c (do_comment): Removed. (build_packet): IgnoreDavid Shaw2005-05-141-9/+4
| | | | | | | | | | | comment packets. * export.c (do_export_stream): Don't export comment packets any longer. * options.h, g10.c (main): Remove --sk-comments and --no-sk-comments options, and replace with no-op.
* * main.h, keygen.c (parse_expire_string, ask_expire_interval), sign.cDavid Shaw2005-05-061-2/+2
| | | | | | | | (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.
* * options.h, g10.c (main): Add new --default-sig-expire andDavid Shaw2005-05-051-8/+34
| | | | | | | | | | | | --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.
* * g10.c (main, add_notation_data, add_policy_url)Werner Koch2005-04-111-6/+10
| | | | | | | | | | | (add_keyserver_url): Use isascii() to protect the isfoo macros and to replace direct tests. Possible problems noted by Christian Biere. * keyserver.c (parse_keyserver_uri): Ditto. * g10.c (main): Declare --pipemode deprecated. * misc.c (deprecated_command): New.
* Changes to make use of code taken from libassuan. This replaces theWerner Koch2005-04-051-0/+8
| | | | | | | old ad-hoc connection code to gpg-agent. We do need this for the forthcoming diversion of card code to an already running gpg-agent with card-support.
* * exec.h, exec.c (set_exec_path): Remove some dead code and change allDavid Shaw2005-03-311-1/+1
| | | | | callers. We no longer need to append to $PATH.
* * keydb.c (keydb_add_resource): Clarify meaning of flags. Add newWerner Koch2005-03-311-3/+3
| | | | | | flag 4. Use log_info for errors registering the default secret key. * g10.c (main): Flag the default keyrings.
* * g10.c (i18n_init) [W32]: Pass registry key to gettextWerner Koch2005-01-201-10/+3
| | | | | | | | | initialization. * gpgv.c (i18n_init) [W32]: Ditto. * simple-gettext.c (set_gettext_file): Use MO files depending on the installation directory. Add new arg REGKEY.
* * g10.c (main): Typo.David Shaw2005-01-061-2/+2
| | | | | | | * armor.c (is_armor_header): Allow CR and LF (not just actual spaces) in an armor header line (-----BEGIN etc). This is needed due to CRLF issues on win32. As before, --openpgp makes it strict.
* * keyedit.c (keyedit_menu): Invisible alias "passwd" as "password".David Shaw2004-12-201-4/+12
| | | | | | | | | | | * passphrase.c: Don't check for __CYGWIN__, so it is treated as a unix-like system. * options.h, g10.c (main), textfilter.c (standard): Use new option --rfc2440-text to determine whether to filter "<space>\t\r\n" or just "\r\n" before canonicalizing text line endings. Default to "<space>\t\r\n".
* * g10.c (main): Add --require-secmem/--no-require-secmem to cause gpg toDavid Shaw2004-12-161-18/+15
| | | | | | | | | | | exit if it cannot lock memory. Also remove --nrsign-key and --nrlsign-key since this can better be done via --edit-key. * secmem.c (secmem_init): Return a flag to indicate whether we got the lock. * memory.h: Return a flag to indicate whether we got the lock.
* * apdu.c (apdu_send_le, apdu_send_direct), keylist.cDavid Shaw2004-12-151-1/+1
| | | | | | | | | | (status_one_subpacket, print_one_subpacket): Fix some compiler warnings. * g10.c (main): Fix --compression-algo to take a string argument like --compress-algo. * trustdb.c (uid_trust_string_fixed): For safety, check for a pk.
* * options.h, g10.c (main), textfilter.c (standard): Use --rfc2440 orDavid Shaw2004-12-111-2/+0
| | | | | | | | --openpgp directly to determine the end of line hashing rule. * trustdb.c (uid_trust_string_fixed): Show uids as expired if the key is expired.
* * options.h, g10.c (main), textfilter.c (len_without_trailing_ws): RemovedDavid Shaw2004-12-101-0/+2
| | | | | | | | | | (not used). (standard): 2440 says that textmode hashes should canonicalize line endings to CRLF and remove spaces and tabs. 2440bis-12 says to just canonicalize to CRLF. So, we default to the 2440bis-12 behavior, but revert to the strict 2440 behavior if the user specifies --rfc2440. In practical terms this makes no difference to any signatures in the real world except for a textmode detached signature.
* * options.h, export.c (parse_export_options, do_export_stream), import.cDavid Shaw2004-11-261-3/+3
| | | | | | | (parse_import_options, import_keys_internal): Make the import-options and export-options distinct since they can be mixed together as part of keyserver-options.
* (S_IRGRP) [HAVE_DOSISH_SYSTEM]: Define to 0.Werner Koch2004-11-181-1/+4
|
* (open_info_file): New.Werner Koch2004-11-171-41/+69
| | | | | | | | (main): Unconditionally implement --status-file, --logger-file, --attribute-file, --passphrase-file, --command-file. This is not generally useful but easy to support and might make scripting under Windows easier.
* * options.h, g10.c (main), mainproc.c (check_sig_and_print): RenameDavid Shaw2004-10-211-3/+4
| | | | | | | | verify-option show-validity to show-uid-validity to match the similar list-option. * app-openpgp.c (verify_chv3): Fix typo.
* * g10.c (parse_list_options): Fix non-constant initializer so we can buildDavid Shaw2004-10-211-1/+6
| | | | | with C89.
* Added SELInux hacks and did some cleanups.Werner Koch2004-10-131-10/+45
|
* * pkclist.c (do_edit_ownertrust): Different prompt when we're using directDavid Shaw2004-10-131-10/+17
| | | | | | | | | | | | | | trust since the meaning is different. * keyedit.c (trustsig_prompt): Change the strings to match the ones in pkclist.c:do_edit_ownertrust to make translation easier. * trustdb.c (trust_model_string, get_validity): Add direct trust model which applies to the key as a whole and not per-uid. * options.h, g10.c (parse_trust_model): New. (main): Call it from here to do string-to-trust-model.
* * pkclist.c (do_edit_ownertrust): Use the same translated string forDavid Shaw2004-10-111-4/+4
| | | | | | | | | | | | | | showing the user ID as mainproc.c:print_pkenc_list. * mainproc.c (print_pkenc_list): Allow translating the quotes around the user ID. * card-util.c, g10.c, photoid.c, trustdb.c: The last of the \"%s\" -> `%s' quoting for things that aren't user IDs. * keyserver.c (keyserver_spawn): If there is no keyserver host, print the whole URI since it is self-contained.
* * gpgv.c, keydb.c (keydb_add_resource): Factored keyring creation out toDavid Shaw2004-09-301-0/+7
| | | | | | | | | | | .. (maybe_create_keyring): .. new. Make sure that we do the checks in a locked state. Problem reported by Stefan Haller. Try to create the home directory before acquiring a lock for the keyring. From Werner on stable branch. * g10.c (main): Blow up if we didn't lose setuid. From Werner on stable branch.
* * main.h, g10.c (main), card-util.c (change_pin): If "admin" has not beenDavid Shaw2004-09-251-10/+2
| | | | | | | | | | | | | | issued, skip right to the CHV1/CHV2 PIN change. No need to show the unblock or admin PIN change option. (card_edit): Add "admin" command to add admin commands to the menu. Do not allow admin commands until "admin" is given. * app-openpgp.c (verify_chv3): Show a countdown of how many wrong admin PINs can be entered before the card is locked. * options.h, g10.c (main), app-openpgp.c (verify_chv3): Remove --allow-admin.
* * main.h: Create S2K_DIGEST_ALGO macro so we do not need to always setDavid Shaw2004-09-241-6/+3
| | | | | | | | | | | 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.
* Note: I have not fully tested the new key creation due to a pc/scWerner Koch2004-09-231-2/+2
| | | | | | | | | | | | | | | | | | | error. However the backupfile has been created successfully. * rsa.c (rsa_generate): Return the dummy list of factors only if the caller asked for it. * card_util.c (generate_card_keys): ask whether backup should be created. (card_store_subkey): Factored some code out to .. * keygen.c (save_unprotected_key_to_card): .. new function. (gen_card_key_with_backup): New. (generate_raw_key): New. (generate_keypair): New arg BACKUP_ENCRYPTION_DIR. Changed all callers. (do_generate_keypair): Divert to gen_card_key_with_backup when desired.
* * gpg.sgml: Document -K.Werner Koch2004-09-201-1/+1
| | | | | | | | | | | | | | | | | * g10.c: Make -K an alias for --list-secret-keys. * keylist.c (print_card_serialno): New. Taken from gnupg 1.9.11. (list_keyblock_print): Make use of it. * keyedit.c (show_key_with_all_names): Print the card S/N. * keyedit.c (keyedit_menu): New command ADDCARDKEY. * card-util.c (card_generate_subkey): New. * keygen.c (generate_card_subkeypair): New. (gen_card_key): New arg IS_PRIMARY; changed all callers. * cardglue.c (open_card): Use shutdown code if possible. (check_card_serialno): Ditto.
* * configure.ac: Don't check for usb_create_match orWerner Koch2004-09-171-0/+16
| | | | | | | | | | | | | | | | | | | | | | use_get_string_simple anymore. * g10.c (list_config): New config option ccid-reader-id. (gpgconf_list): Add "reader-port". * apdu.c (open_ccid_reader): New arg PORTSTR. Pass it to ccid_open_reader. (apdu_open_reader): Pass portstr to open_ccid_reader. * ccid-driver.c (ccid_get_reader_list): New. (ccid_open_reader): Changed API to take a string for the reader. Removed al the cruft for the libusb development vesion which seems not to be maintained anymore and there are no packages anyway. The stable library works just fine. (struct ccid_reader_id_s): Deleted and replaced everywhere by a simple string. (usb_get_string_simple): Removed. (bulk_in): Do valgrind hack here and not just everywhere.
* * g10.c [HAVE_LIBUSB]: New option --debug-ccid-driver.Werner Koch2004-09-151-0/+14
| | | | | | | | | | * ccid-driver.c (read_device_info): Removed. (make_reader_id, scan_or_find_devices): New. (ccid_open_reader): Simplified by make use of the new functions. (ccid_set_debug_level): New. Changed the macros to make use of it. It has turned out that it is often useful to enable debugging at runtime so I added this option.
* * options.h, keylist.c (print_one_subpacket, print_subpackets_colon):David Shaw2004-09-121-27/+115
| | | | | | | | | Print a spk record for each request subpacket. (list_keyblock_colon): Call them here. * g10.c (parse_subpacket_list, parse_list_options): New. Make the list of subpackets we are going to print. (main): Call them here.
* * encode.c, exec.c, g10.c, sign.c: Some translatable string cleanup.David Shaw2004-08-271-40/+39
| | | | | Change some "this" to `this'.
* * plaintext.c (handle_plaintext): Bigger buffer for extra safety.David Shaw2004-08-081-6/+8
| | | | | | | | | | | | | | | | | * 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.
* * keylist.c (list_keyblock_print): Always use the new listing format whereDavid Shaw2004-07-161-1/+1
| | | | | | | | | | | | | uids are always on a line for themselves. Mark expired secret keys as expired. * options.h, g10.c (main): Rename list show-validity to show-uid-validity as it only shows for uids. * armor.c (armor_filter): Do not use padding to get us to 8 bytes of header. Rather, use 2+4 as two different chunks. This avoids a fake filename of "is".
* * g10.c (main): Alias --charset as --display-charset to help avoid theDavid Shaw2004-07-151-3/+4
| | | | | | | | | | | | | | continuing confusion and make room for possible changes in devel. * parse-packet.c (parse_plaintext): Show the hex value for the literal packet mode since it may not be printable. * keygen.c (make_backsig): Make sure that the backsig was built successfully before we try and use it. * status.h, status.c (get_status_string), plaintext.c (handle_plaintext): New status tags PLAINTEXT and PLAINTEXT_LENGTH.
* * g10.c: New command --gpgconf-list. (gpgconf_list): New. From Werner onDavid Shaw2004-05-201-11/+54
| | | | | stable branch.