aboutsummaryrefslogtreecommitdiffstats
path: root/common/iobuf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* common: Minor code cleanup for a legacy OS.Werner Koch2014-06-301-8/+7
| | | | * common/iobuf.c (direct_open) [__riscos__]: Simply cpp conditionals.
* w32: Include winsock2.h to silence warnings.Werner Koch2014-03-071-0/+3
|
* gpg: Limit the nesting level of I/O filters.Werner Koch2013-10-041-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | * common/iobuf.c (MAX_NESTING_FILTER): New. (iobuf_push_filter2): Limit the nesting level. * g10/mainproc.c (mainproc_context): New field ANY. Change HAVE_DATA and ANY_SIG_SIGN to bit fields of ANY. Add bit field UNCOMPRESS_FAILED. (proc_compressed): Avoid printing multiple Bad Data messages. (check_nesting): Return GPG_ERR_BAD_DATA instead of UNEXPECTED_DATA. -- This is a more general fix for the nested compression packet bug. In particular this helps g10/import.c:read_block to stop pushing compression filters onto an iobuf stream. This patch also reduces the number of error messages for the non-import case. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 35e40e2d514223c950c2f6d1214e02e92d87e997) Resolved conflicts: common/iobuf.c g10/mainproc.c
* gpg: Cache keybox searches.Werner Koch2013-01-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/iobuf.c (iobuf_seek): Fix for temp streams. * g10/pubkey-enc.c (get_session_key, get_it): Add some log_clock calls. * g10/keydb.c (dump_search_desc): New. (enum_keyblock_states, struct keyblock_cache): New. (keyblock_cache_clear): New. (keydb_get_keyblock, keydb_search): Implement a keyblock cache. (keydb_update_keyblock, keydb_insert_keyblock, keydb_delete_keyblock) (keydb_rebuild_caches, keydb_search_reset): Clear the cache. -- Gpg uses the key database at several places without a central coordination. This leads to several scans of the keybox for the same key. To improve that we now use a simple cache to store a retrieved keyblock in certain cases. In theory this caching could also be done for old keyrings, but it is a bit more work and questionable whether it is needed; the keybox scheme is anyway much faster than keyrings. Using a keybox with 20000 384 bit ECDSA/ECHD keypairs and a 252 byte sample text we get these values for encrypt and decrypt operations on an Core i5 4*3.33Ghz system. The option --trust-model=always is used. Times are given in milliseconds wall time. | | enc | dec | dec,q | |-----------+-----+-----+-------| | key 1 | 48 | 96 | 70 | | key 10000 | 60 | 98 | 80 | | key 20000 | 69 | 106 | 88 | | 10 keys | 540 | 290 | 70 | The 10 keys test uses a mix of keys, the first one is used for decryption but all keys are looked up so that information about are printed. The last column gives decryption results w/o information printing (--quiet). The keybox is always scanned sequentially without using any index. By adding an index to the keybox it will be possible to further reduce the time required for keys stored to the end of the file.
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-15/+15
| | | | | | | | | | | | | | | | | | | The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
* Change license for some files in common to LGPLv3+/GPLv2+.Werner Koch2012-04-201-5/+15
| | | | | | | | | | | | | | | | | | | | | | | Having the LGPL on the common GnuPG code helps to share code between GnuPG and related projects (like GPGME and Libassuan). This is good for interoperability and to reduces bugs. * common/asshelp.c, common/asshelp.h, common/asshelp2.c, common/b64dec.c * common/b64enc.c, common/convert.c, common/dns-cert.c * common/dns-cert.h common/exechelp-posix.c, common/exechelp-w32.c * common/exechelp-w32ce.c, common/exechelp.h, common/get-passphrase.c * common/get-passphrase.h, common/gettime.c, common/gpgrlhelp.c * common/helpfile.c, common/homedir.c, common/http.c, common/http.h * common/i18n.c, common/init.c, common/init.h, common/iobuf.c * common/iobuf.h, common/localename.c, common/membuf.c, common/membuf.h * common/miscellaneous.c, common/openpgp-oid.c, common/openpgpdefs.h * common/percent.c, common/pka.c, common/pka.h, common/session-env.c * common/session-env.h, common/sexp-parse.h, common/sexputil.c * common/signal.c, common/srv.c, common/srv.h, common/ssh-utils.c * common/ssh-utils.h, common/sysutils.c, common/sysutils.h * common/tlv.c, common/tlv.h, common/ttyio.c, common/ttyio.h * common/userids.c, common/userids.h, common/xasprintf.c: Change license to LGPLv3+/GPLv2+/
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-28/+28
| | | | | | | | We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
* estream support for iobuf and new memuf functions.Werner Koch2011-01-181-1/+126
|
* 2010-06-08 Marcus Brinkmann <[email protected]>Marcus Brinkmann2010-06-081-2/+4
| | | | | | | | | | * Makefile.am (AM_CFLAGS): Add $(LIBASSUAN_CFLAGS). (t_common_ldadd): Add $(LIBASSUAN_LIBS). * sysutils.c: Include <assuan.h>. (translate_sys2libc_fd_int): Cast to silence gcc warning. * iobuf.c: Include <assuan.h> (translate_file_handle): Fix syntax error.
* W32CE fix.Werner Koch2010-06-081-1/+6
| | | | | Typo fixes
* More changes for CE. gpgsm does now build and run a keylisting.Werner Koch2010-03-241-3/+8
|
* Merged jnlib into common.Werner Koch2010-03-101-2/+2
|
* Use macros for iobuf ioctls. Werner Koch2010-03-081-62/+37
|
* More cleanupsWerner Koch2010-03-081-100/+44
|
* Remove unused code.Werner Koch2010-03-081-132/+25
|
* First steps towards the W32CE portWerner Koch2010-03-021-0/+21
|
* 2009-12-08 Marcus Brinkmann <[email protected]>Marcus Brinkmann2009-12-081-1/+1
| | | | | | | | * asshelp.c (start_new_gpg_agent) [HAVE_W32_SYSTEM]: Add missing argument in assuan_socket_connect invocation. * iobuf.c (iobuf_open_fd_or_name): Fix type of FD in function declaration.
* Keep on hacking on g13. A simple --create and --mount does now work.Werner Koch2009-10-131-7/+7
| | | | | A hacked up encfs is required.
* Some changes to suport g13.Werner Koch2009-09-301-4/+42
|
* Ported changes from 1.4.Werner Koch2009-04-011-15/+91
|
* Marked all unused args on non-W32 platforms.Werner Koch2008-10-201-9/+21
|
* Avoid passing NULL to printf while debugging.Werner Koch2008-08-191-14/+22
|
* g10/Marcus Brinkmann2008-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | 2008-06-25 Marcus Brinkmann <[email protected]> * gpg.c (enum cmd_and_opt_values): Remove option oEnableW32HandleTranslation. (opts): Remove option --enable-w32-handle-translation. (main): Remove variable w32_handle_translation. common/ 2008-06-25 Marcus Brinkmann <[email protected]> Revert last three changes related to handle translation. * sysutils.c: (FD_TRANSLATE_MAX, fd_translate, fd_translate_len) (translate_table_init, translate_table_lookup): Removed. * iobuf.c (check_special_filename): Do not use translate_table_lookup. * sysutils.h (translate_table_init, translate_table_lookup): Remove prototypes.
* 2008-06-18 Marcus Brinkmann <[email protected]>Marcus Brinkmann2008-06-181-1/+1
| | | | | | | | | | | | | * sysutils.h (translate_table_init, translate_table_lookup): New prototypes. * sysutils.c: Include <ctype.h>. (FD_TRANSLATE_MAX): New macro. (fd_translate, fd_translate_len): New static variables. (translate_table_init, translate_table_lookup): New functions. (translate_sys2libc_fd_int): Translate file descriptor. * iobuf.c (check_special_filename): Translate handle values from special filenames.
* Fix a bug in the ambigious name detection.Werner Koch2008-03-201-8/+8
| | | | | Minor cleanups.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* More W32 related changesWerner Koch2007-06-261-101/+143
|
* Fixed a problem in estream-printf.c.Werner Koch2007-06-251-26/+2
| | | | | Changes for Windows (gpgsm -k does now work). Minor cleanups.
* First steps towards supporting W32.Werner Koch2007-06-061-64/+65
| | | | | | | This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
* Made some PIN pads work.Werner Koch2006-11-201-1/+1
| | | | | Some cleanups for 64 bit CPUs.
* Fix for bug 537Werner Koch2006-10-021-43/+3
|
* Add missing file and other changes.Werner Koch2006-09-271-0/+30
|
* Various updatesWerner Koch2006-09-211-1/+0
|
* Take advantage of newer gpg-error features.Werner Koch2006-09-141-8/+8
|
* Updated FSF's address.Werner Koch2006-06-201-1/+2
|
* Still merging 1.4.3 code backWerner Koch2006-04-211-128/+176
|
* gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch2005-06-161-8/+11
| | | | | | | char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
* A whole bunch of changes to allow building for W32.Werner Koch2004-12-151-2/+2
|
* Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch2003-09-231-10/+10
|
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-08-051-0/+2415
'GNUPG-1-9-BRANCH'.