aboutsummaryrefslogtreecommitdiffstats
path: root/util (follow)
Commit message (Collapse)AuthorAgeFilesLines
* (mem2str): Translated comment to English.Werner Koch2004-10-262-70/+283
| | | | | | | | (handle_iconv_error) [USE_GNUPG_ICONV]: New. (set_native_charset) [USE_GNUPG_ICONV]: Added iconv based conversion checks. (native_to_utf8, utf8_to_native): Added iconv based conversion.
* * configure.ac: Remove the check for asprintfWerner Koch2004-10-212-169/+5
| | | | | | | | | | | | | | | | * app-common.h (app_openpgp_storekey: Add prototype. * app-openpgp.c (do_sign): Replace asprintf by direct allocation. This avoids problems with missing vasprintf implementations. * card-util.c (generate_card_keys): Add a #warning for gnupg 1.9 and use the same string there. * util.h [!HAVE_VASPRINTF]: Removed prototype. * vasprintf.c: Removed. It was used only at one place and I don't want to get into build problems in 1.4.
* * http.c (connect_server, send_request): Use the URI scheme as the SRV tagDavid Shaw2004-10-182-16/+27
| | | | | rather than hard-coding _hkp.
* * http.c (connect_server): [_WIN32] actually fill in the sin_addr so weDavid Shaw2004-10-162-1/+19
| | | | | | aren't always talking to localhost. Add some general sanity checking of parameters learned from gethostbyname().
* New. Taken from gnupg 1.9.Werner Koch2004-10-152-0/+173
|
* (iobuf_get_fd): Removed double check on directfp andWerner Koch2004-10-142-1/+7
| | | | | | cats it to FILEP becuase directfp is actually a void *. Notes by Stefan.
* * configure.ac: Actually name the option --disable-finger and notWerner Koch2004-10-133-70/+27
| | | | | | | | | | | http. Add option --enable-selinux-support. * logger.c (g10_log_error_f, g10_log_fatal_f, g10_log_info_f) (g10_log_debug_f, print_prefix_f): Removed. * iobuf.c (iobuf_is_pipe_filename): New. (iobuf_get_fd): New.
* * configure.ac: Actually name the option --disable-finger and notWerner Koch2004-10-133-1/+16
| | | | | | | | | | | | | | | | | 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.
* * iobuf.c (pop_filter): Make static.David Shaw2004-09-303-12/+59
| | | | | | | * dotlock.c (destroy_dotlock): New. Remove the handle from the list of locks. (release_dotlock): Don't act if we don't have any locks at all. From Werner on stable branch.
* * http.c (make_radix64_string, do_parse_uri, send_request): Add basic authDavid Shaw2004-09-102-16/+82
| | | | | for proxies and direct requests. Suggested by Florent Thoumie.
* * http.c (main): Fix test code for http-test.David Shaw2004-09-102-2/+6
|
* * README: Doc --disable-card-support and --without-readline.Werner Koch2004-09-092-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+47
| | | | | | | | | | * 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-092-0/+42
| | | | | | | | | * 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.
* * http.c (insert_escapes): Fix encoding problem for non-URI-safeDavid Shaw2004-08-192-2/+7
| | | | | characters. Noted by Vladimir Novak.
* * timegm.c: New replacement function. Removes the need for setenv.c andDavid Shaw2004-05-214-109/+76
| | | | | | | | | unsetenv.c. * setenv.c: Removed. * unsetenv.c: Removed.
* * iobuf.c (block_filter): Remove the old gpg indeterminate length mode.David Shaw2004-03-042-84/+13
| | | | | (iobuf_set_block_mode, iobuf_in_block_mode): Removed as superfluous.
* * iobuf.c (block_filter): Properly handle a partial body stream that endsDavid Shaw2004-03-012-1/+13
| | | | | with a 5-byte length that happens to be zero.
* * unsetenv.c: Fixed debugging typo.David Shaw2004-02-282-1/+5
|
* (lock_pool) [_AIX]: Also set errno.Werner Koch2004-02-242-1/+6
|
* * miscutil.c (hextobyte): Moved here from g10/misc.c so I can use it inDavid Shaw2004-02-212-0/+30
| | | | | the keyserver helpers.
* * mkdtemp.c: New (moved from g10/), setenv.c: New, unsetenv.c: New.David Shaw2004-02-205-2/+217
| | | | | * Makefile.am: Include @LIBOBJS@ for replacement functions.
* * argparse.c (default_strusage): Update copyright date. (initialize):David Shaw2004-01-163-24/+48
| | | | | | | | | Avoid a number of -Wformat-nonliteral warnings. These aren't actual problems, but the warnings bothered me. * miscutil.c (print_string2): New variation on print_string that allows two delimiters. (print_string): Call print_string2 to do work.
* * g10u.c: Dead code. Remove.David Shaw2003-12-304-41/+11
| | | | | | | | * Makefile.am: Don't compile g10u.c. * iobuf.c (block_filter): Properly handle a partial body stream that ends with a 5-byte length.
* * http.c (send_request, http_open_document, http_open): Pass the httpDavid Shaw2003-12-282-29/+22
| | | | | proxy from outside rather than pulling it from the evironment.
* cleaned up RISC OS code and removed lots of unnecessary stuffStefan Bellon2003-12-283-15/+33
|
* * http.c (send_request): Add a Host: header for virtual hosts.David Shaw2003-12-062-5/+7
|
* * miscutil.c (answer_is_yes_no_default, answer_is_yes_no_quit): Don't useDavid Shaw2003-12-052-5/+12
| | | | | | alternate strings when not needed so we don't have to re-translate them. Hopefully the comment will be enough to indicate multiple match strings.
* * miscutil.c (match_multistr): New. Match against each segment in aDavid Shaw2003-11-212-16/+50
| | | | | | | string with tokens separated by |. (answer_is_yes_no_default, answer_is_yes_no_quit, answer_is_okay_cancel): Use it here to enable alternate translations.
* * http.c (connect_server): Differentiate between generic "can't connect"David Shaw2003-11-012-4/+18
| | | | | | errors and the more specific "host not found". Suggested by Samuel Tardieu.
* * cardglue.c (open_card): Ask for card insertion.Werner Koch2003-10-292-0/+39
| | | | | | | | | | | | (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.
* Replaced INTLLIBS by LIBINTL.Werner Koch2003-10-252-2/+6
|
* (lock_pool) [_AIX]: Don't use plock.Werner Koch2003-10-232-0/+15
|
* * srv.c: OSX 10.2.8/Darwin 6.8 seems to have some #include orderingDavid Shaw2003-10-132-1/+6
| | | | | issues? Move sys/types.h up higher to work around.
* (tty_print_string, tty_print_utf8_string2)Werner Koch2003-10-082-3/+8
| | | | | (tty_print_utf8_string): Made string arg const.
* 2003-09-28 Timo Schulz <[email protected]>Timo Schulz2003-09-282-1/+17
| | | | | * strgutil.c [WIN32] (asprintf): New.
* (tty_fprintf): New.Werner Koch2003-09-282-0/+51
|
* 2003-09-21 Timo Schulz <[email protected]>Timo Schulz2003-09-213-2/+10
| | | | | | * http.c [WIN32]: Define MB_CUR_MAX. (connect_server): use unsigned long since W32 does not have in_addr_t.
* * dotlock.c, http.c, iobuf.c, simple-gettext.c, srv.c, srv.h, strgutil.c,David Shaw2003-08-2810-35/+48
| | | | | | | | | ttyio.c, w32reg.c: s/__MINGW32__/_WIN32/ to help building on native Windows compilers. Requested by Brian Gladman. From Werner on stable branch. * http.c (connect_server): Oops - forgot to freeaddrinfo().
* * http.c (connect_server): Try and use getaddrinfo if it is available.David Shaw2003-08-252-51/+81
| | | | | | Try for IPv6 via getaddrinfo() or a IPv6-ized gethostbyname(). Suggested by Jun-ichiro itojun Hagino.
* * iobuf.c (check_special_filename): Replaced is isdigit by digitpDavid Shaw2003-07-104-9/+21
| | | | | | | | | to avoid passing negative values and potential locale problems. Problem noted by Christian Biere. * strgutil.c (strlwr,strcasecmp,strncasecmp): Make sure we don't pass a negative value. * miscutil.c (scan_isodatestr): Ditto.
* * srv.h, srv.c: Include windows.h with MINGW32.David Shaw2003-05-313-1/+13
|
* * argparse.c, dotlock.c, fileutil.c, iobuf.c, miscutil.c,David Shaw2003-05-2412-278/+277
| | | | | | | | simple-gettext.c, errors.c, http.c, memory.c, secmem.c, ttyio.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.
* * fileutil.c (is_file_compressed): Fixed checking for "-" filename.Werner Koch2003-05-212-2/+6
|
* * srv.c (main): Test against wwwkeys.pgp.net.David Shaw2003-04-133-2/+10
| | | | | | * srv.h: Grr. The RH7.3 Linux man page defines the fourth arg of dn_expand as unsigned char*, but it is really char* according to resolv.h.
* * argparse.c (default_strusage): Change copyright date.David Shaw2003-03-232-2/+11
|
* * srv.h, srv.c (getsrv): Use unsigned char rather than char. Noted byDavid Shaw2003-03-152-6/+8
| | | | | Stefan Bellon.
* * http.c (connect_server): Use DNS SRV to get a server list. Fail over toDavid Shaw2003-03-115-55/+387
| | | | | | | A records if necessary. * Makefile.am, srv.h, srv.c: New DNS SRV handling code.
* * ttyio.c (tty_print_utf8_string, tty_print_utf8_string2): Use 0 toDavid Shaw2003-02-222-3/+10
| | | | | | indicate a string with no maximum size. This prevents early truncation of strings that contain control chars which are expanded into \xXX form.
* * iobuf.c (iobuf_flush): Only print debug info if debugging is on.David Shaw2002-12-262-1/+6
|