aboutsummaryrefslogtreecommitdiffstats
path: root/g10 (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* * main.h: Create S2K_DIGEST_ALGO macro so we do not need to always setDavid Shaw2004-09-2412-34/+45
| | | | | | | | | | | 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.
* * keyedit.c (keyedit_menu), gpgv.c (agent_scd_getattr (stub)), keygen.cDavid Shaw2004-09-244-34/+45
| | | | | | (copy_mpi, generate_raw_key): Fix a compile problem and a few warnings when building without card support.
* Note: I have not fully tested the new key creation due to a pc/scWerner Koch2004-09-236-314/+645
| | | | | | | | | | | | | | | | | | | 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 "addcardkey" and "keytocard".Werner Koch2004-09-2312-114/+563
| | | | | | | | | | | | | | | | | | | | * apdu.c (open_pcsc_reader): Do not print empty reader string. * keygen.c (ask_algo): Allow creation of AUTH keys. * keyid.c (usagestr_from_pk): New. * app-openpgp.c (app_openpgp_storekey): Call flush_cache. * keyedit.c (keyedit_menu): New command "keytocard" (keyedit_menu): Bad hack for the not_with_sk element. (show_key_with_all_names): Print the usage. (find_pk_from_sknode): New. * card-util.c (card_store_subkey): New. (copy_mpi): New. * cardglue.c (agent_openpgp_storekey): New.
* * mainproc.c (check_sig_and_print), keyedit.c (show_prefs,David Shaw2004-09-223-6/+15
| | | | | | menu_set_keyserver_url): Make sure that keyserver URLs with control characters inside are printed properly. In fact, handle them as UTF8.
* * keyedit.c (keyedit_menu): Don't show "addcardkey" in the menu if we doDavid Shaw2004-09-214-5/+15
| | | | | | | | not have card support. * keydb.h, keyserver.c (print_keyrec, keyserver_spawn): fpr is an array of unsigned bytes.
* * gpg.sgml: Document -K.Werner Koch2004-09-208-12/+333
| | | | | | | | | | | | | | | | | * 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.
* * cardglue.c (open_card): Use shutdown code if possible.Werner Koch2004-09-206-43/+179
| | | | | | | | | | | | (check_card_serialno): Ditto. * ccid-driver.c (do_close_reader): Factored some code out from ... (ccid_close_reader): ..here. (ccid_shutdown_reader): New. * apdu.c (apdu_shutdown_reader): New. (shutdown_ccid_reader): New.
* (apdu_open_reader): No fallback if a full CCID reader id has beenWerner Koch2004-09-173-238/+21
| | | | | Removed test code from ccid-driver.c
* * configure.ac: Don't check for usb_create_match orWerner Koch2004-09-175-296/+623
| | | | | | | | | | | | | | | | | | | | | | 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.
* * keyedit.c (show_key_with_all_names, show_prefs): Show preferredDavid Shaw2004-09-162-5/+35
| | | | | keyserver(s) in "showpref" output.
* * keygen.c (keygen_add_keyserver_url), keyedit.c (menu_set_keyserver_url):David Shaw2004-09-163-15/+34
| | | | | | Allow setting a keyserver URL of "none" to remove an existing keyserver URL.
* * keyedit.c (menu_set_keyserver_url): Confirm replacement of a keyserverDavid Shaw2004-09-162-9/+25
| | | | | URL before overwriting the old one.
* * gpgv.c (agent_scd_getattr): Stub.David Shaw2004-09-154-0/+98
| | | | | | | | | | | * misc.c (get_signature_count): New. Get the signature count from a smartcard. (pct_expando): Call it here so the %c expando becomes the number of signatures issued. This allows for notations or the like with an automatic signature count. * ccid-driver.c (usb_get_string_simple): Replacement function to work with older libusb.
* * g10.c [HAVE_LIBUSB]: New option --debug-ccid-driver.Werner Koch2004-09-154-128/+361
| | | | | | | | | | * 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.
* * getkey.c (premerge_public_with_secret): Fix subkey<->binding sigDavid Shaw2004-09-142-1/+5
| | | | | | mismatch when some secret subkeys are missing. Discovered by Michael Roth.
* * main.h, keylist.c (print_subpackets_colon): Make a public function.David Shaw2004-09-134-7/+85
| | | | | | | * keyedit.c (print_and_check_one_sig_colon): New. Print a with-colons version of the sig record. (menu_delsig): Call it here for a with-colons delsig.
* * options.h, keylist.c (print_one_subpacket, print_subpackets_colon):David Shaw2004-09-124-27/+176
| | | | | | | | | 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.
* * card-util.c (fetch_url, card_edit): Use the pubkey URL stored on theDavid Shaw2004-09-115-5/+67
| | | | | | | | | | card to fetch an updated copy. Works with either straight URLs or HKP or LDAP keyservers. * keyserver-internal.h, keyserver.c (keyserver_import_fprint), import.c (revocation_present): Use a keyserver_spec so the caller can pass in whatever keyserver they like.
* * app-openpgp.c (get_cached_data): Avoid mallocing zero since it breaks usDavid Shaw2004-09-112-8/+15
| | | | | when using --enable-m-guard.
* * ccid-driver.c (read_device_info): Fix segfault when usb device is notDavid Shaw2004-09-112-0/+15
| | | | | | accessible. (ccid_open_reader): Allow working with an even older version of libusb (usb_busses global instead of usb_get_busses()).
* * README: Doc --disable-card-support and --without-readline.Werner Koch2004-09-0910-594/+1546
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Check for readline. Make enable-card-support the default. New option --without-readline. Allow the use of either the development or the stable libusb. * cardglue.h: Add members for CA fingerprints. * cardglue.c (agent_release_card_info): Invalid them. (learn_status_cb): Store them. * app-common.h, app-openpgp.c, iso7816.c, iso7816.h * apdu.c, apdu.h, ccid-driver.c, ccid-driver.h * card-util.c: Updated from current gnupg-1.9. * ccid-driver.h (CCID_DRIVER_ERR_ABORTED): New. * ccid-driver.c (ccid_open_reader): Support the stable 0.1 version of libusb. (ccid_get_atr): Handle short messages. * apdu.c (my_rapdu_get_status): Implemented. * apdu.c: Include <signal.h>. * apdu.c (reader_table_s): Add function pointers for the backends. (apdu_close_reader, apdu_get_status, apdu_activate) (send_apdu): Make use of them. (new_reader_slot): Intialize them to NULL. (dump_ccid_reader_status, ct_dump_reader_status): New. (dump_pcsc_reader_status): New. (open_ct_reader, open_pcsc_reader, open_ccid_reader) (open_osc_reader, open_rapdu_reader): Intialize function pointers. (ct_activate_card, ct_send_apdu, pcsc_send_apdu, osc_send_apdu) (error_string): Removed. Replaced by apdu_strerror. (get_ccid_error_string): Removed. (ct_activate_card): Remove the unused loop. (reset_ct_reader): Implemented. (ct_send_apdu): Activate the card if not yet done. (pcsc_send_apdu): Ditto. * ccid-driver.h: Add error codes. * ccid-driver.c: Implement more or less proper error codes all over the place. * apdu.c (apdu_send_direct): New. (get_ccid_error_string): Add some error code mappings. (send_apdu): Pass error codes along for drivers already supporting them. (host_sw_string): New. (get_ccid_error_string): Use above. (send_apdu_ccid): Reset the reader if it has not yet been done. (open_ccid_reader): Don't care if the ATR can't be read. (apdu_activate_card): New. (apdu_strerror): New. (dump_reader_status): Only enable it with opt.VERBOSE. * iso7816.c (map_sw): Add mappings for the new error codes. * apdu.c (open_ct_reader, open_pcsc_reader, open_ccid_reader) (reset_ccid_reader, open_osc_reader): Call dump_reader_status only in verbose mode. * app-openpgp.c (do_getattr): Fix for sending CA-FPR. * app-openpgp.c (app_openpgp_readkey): Fixed check for valid exponent. * app-openpgp.c (do_setattr): Sync FORCE_CHV1. * card-util.c (change_login): Kludge to allow reading data from a file. (card_edit): Pass ARG_STRING to change_login. (card_status): Print CA fingerprints. (change_cafpr): New. (card_edit): New command CAFPR. * errors.h (G10ERR_NO_CARD, G10ERR_CANCELED): New error codes. * errors.c (g10_errstr): New error codes G10ERR_NO_CARD, G10ERR_CANCELED.
* * configure.ac: Check for readline.Werner Koch2004-09-092-15/+33
| | | | | | | | | | * signal.c (got_fatal_signal): Do readline cleanup. Print signal number if we can't print the name. Use new autoconf macro HAVE_DECL_SYS_SIGLIST. (get_signal_name): Removed. * ttyio.c (tty_get): Add readline support.
* * photoid.c: Include ttyio.h.Werner Koch2004-09-093-26/+19
| | | | | | | | | * parse-packet.c (skip_rest): Removed. Changed all callers to use the new iobuf_skip_reset. Orginal patch by Florian Weimer. * iobuf.c (iobuf_skip_rest): New. Orginal patch by Florian Weimer. Added new argument PARTIAL.
* (generate_photo_id): Use tty_printf and not justWerner Koch2004-09-072-4/+9
| | | | | printf. Put _() around one string.
* * keyserver.c (parse_keyrec): Force the 'e'xpired flag on as soon as weDavid Shaw2004-09-032-13/+22
| | | | | know the key is definitely expired. Some translatable string cleanup.
* * encode.c, exec.c, g10.c, sign.c: Some translatable string cleanup.David Shaw2004-08-275-60/+68
| | | | | Change some "this" to `this'.
* * keyserver.c (keyserver_spawn): Show log line for what keyserver actionDavid Shaw2004-08-233-24/+57
| | | | | | | | | we are taking. * keyid.c (keystr): If printing a keyid that lacks the high 4 bytes, print the low 4 alone. (keystr_from_desc): Handle short keyids and warn on v3 fingerprints.
* * keydb.h, getkey.c (get_user_id_printable): Rename to get_user_id_nativeDavid Shaw2004-08-237-30/+31
| | | | | | | 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.
* * keyserver.c (keyserver_search_prompt): Make sure the search string isDavid Shaw2004-08-232-9/+24
| | | | | converted from UTF-8 before display.
* (encode_session_key): Changed the zero random byteWerner Koch2004-08-192-2/+11
| | | | | | substituting code to actually do clever things. Thanks to Matthias Urlichs for noting the implementation problem.
* 2004-08-18 Marcus Brinkmann <[email protected]>Marcus Brinkmann2004-08-182-3/+10
| | | | | * passphrase.c (agent_get_passphrase):
* * plaintext.c (handle_plaintext): Bigger buffer for extra safety.David Shaw2004-08-086-30/+48
| | | | | | | | | | | | | | | | | * 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.
* * armor.c (radix64_read): No armor CRC is legal according to the spec (theDavid Shaw2004-08-052-1/+10
| | | | | CRC is a MAY).
* * misc.c (argsplit): Properly split quoted args from the keyword and trimDavid Shaw2004-07-282-9/+25
| | | | | whitespace afterwards.
* * misc.c (optsep): Add the ability to understand keyword="quoted arg withDavid Shaw2004-07-282-3/+20
| | | | | spaces" type options.
* * keylist.c (list_keyblock_print): Always use the new listing format whereDavid Shaw2004-07-166-42/+45
| | | | | | | | | | | | | 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".
* * keyedit.c (sign_uids): Properly handle remaking a self-sig on revoked orDavid Shaw2004-07-155-5/+54
| | | | | | | | | | | | | | 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.
* * g10.c (main): Alias --charset as --display-charset to help avoid theDavid Shaw2004-07-157-59/+100
| | | | | | | | | | | | | | 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.
* (copy_secret_key): Get last fix right.Werner Koch2004-06-162-10/+9
|
* s/1/i/Werner Koch2004-06-161-2/+2
|
* * free-packet.c (copy_secret_key): Fixed memory leak when D is notWerner Koch2004-06-163-1/+36
| | | | | | | | NULL. * passphrase.c (passphrase_to_dek): Added a few comments to the code.
* * keyserver.c (keyserver_refresh): Keep track of keys already fetched soDavid Shaw2004-05-262-3/+14
| | | | | | we don't do a regular keyserver fetch if the preferred keyserver fetch has exhausted the list.
* * verify.c (verify_signatures): Verify multiple files in the same order inDavid Shaw2004-05-233-22/+32
| | | | | | | | which we hashed them when issuing the signature. Noted by Nicholas Cole. * pkclist.c (do_edit_ownertrust): Fix a kbnode leak and do another keyid-format conversion.
* some late minor fixes.V1-3-6Werner Koch2004-05-228-15/+29
|
* * mainproc.c (check_sig_and_print): If we're honoring preferredDavid Shaw2004-05-225-41/+107
| | | | | | | | | | | | | | | | keyservers, and auto-key-retrieve is set, try and get a missing key from the preferred keyserver subpacket when we verify the sig. * gpgv.c (parse_preferred_keyserver, free_keyserver_spec): Stubs. * keyserver.c (keyidlist): Use new parse_preferred_keyserver function. (keyserver_work): Use the passed-in keyserver spec rather than the options global one. * keyserver-internal.h, keyserver.c (parse_preferred_keyserver): New function to take a sig and return a split out keyserver_spec. (keyserver_import_keyid): Now takes a keyserver_spec.
* * keyserver.c (keyidlist): Go back to the old fast keyid lister. OnlyDavid Shaw2004-05-214-99/+166
| | | | | | | | | merge selfsigs if we have to for honor-keyserver-url. (keyserver_refresh): Keyserver URL handler moved here. (calculate_keyid_fpr): Removed. * keydb.h, keyid.c (keystr_from_desc): Calculate a key string from a KEYDB_SEARCH_DESC.
* * keyserver.c (keyserver_spawn): Fix keyserver options on tempfile onlyDavid Shaw2004-05-212-1/+6
| | | | | platforms. Noted by Roger Sondermann.
* * keyserver.c (keyserver_work): Allow --refresh-keys with a preferredDavid Shaw2004-05-204-119/+57
| | | | | | | | | | | keyserver to happen even if there is no global keyserver set. * sig-check.c (do_check_messages): No need to check for Elgamal signatures any longer. (do_check_messages, do_check, check_key_signature2): --keyid-format conversion. * pkclist.c (show_paths, edit_ownertrust): Remove some unused code.
* * options.h (ctrl): New for member IN_AUTO_KEY_RETRIEVE.David Shaw2004-05-204-6/+62
| | | | | | | | | | | * mainproc.c (check_sig_and_print): track whether we are retrieving a key. * status.c (status_currently_allowed): New. (write_status_text, write_status_text_and_buffer): Use it here. * g10.c: New command --gpgconf-list. (gpgconf_list): New. From Werner on stable branch.