aboutsummaryrefslogtreecommitdiffstats
path: root/common/miscellaneous.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-05-02gpg: Fix "Too many open files" when using --multifile.Werner Koch1-0/+1
* common/miscellaneous.c (is_file_compressed): Don't cache the file. -- This seems to be a pretty old bug. The fix is easy and also reveals that -z0 can be used as a workaround. GnuPG-bug-id: 3951 Signed-off-by: Werner Koch <[email protected]>
2017-07-20common: New function print_utf9_string.Werner Koch1-0/+10
* common/miscellaneous.c (print_utf8_string): New. -- This is a simple convenience function. Signed-off-by: Werner Koch <[email protected]>
2017-03-24gpg: Improve check for already compressed packets.Werner Koch1-6/+57
* common/miscellaneous.c (is_openpgp_compressed_packet): New. (is_file_compressed): Rerad 2 more bytes and call new function. -- Note that this does not yet allow to detect compressed data piped to gpg. This requires a proper read-ahead in iobuf.c which is complicated due to the auto-removal of filter functions. Thus such an read-ahead needs to be done in the I/O backend of iobuf. Signed-off-by: Werner Koch <[email protected]>
2016-12-19Remove unused debug flags and add "dns" and "network".Werner Koch1-0/+2
* g10/options.h (DBG_CARD_IO_VALUE, DBG_CARD_IO): Remove. * g10/gpg.c (debug_flags): Remove "cardio". * agent/agent.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove. * agent/gpg-agent.c (debug_flags): Remove "command". * scd/scdaemon.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove. * scd/scdaemon.c (debug_flags): Remove "command". * dirmngr/dirmngr.h (DBG_DNS_VALUE, DBG_DNS): New. (DBG_NETWORK_VALUE, DNG_NETWORK): New. * dirmngr/dirmngr.c (debug_flags): Add "dns" and "network". -- Note that "dns" and "network" are not yet used but will soon be added to dirmngr. Signed-off-by: Werner Koch <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2016-08-10common: New function try_make_printable_string.Werner Koch1-2/+66
* common/stringhelp.c (sanitize_buffer): Remove. Move code to ... * common/miscellaneous.c (try_make_printable_string): new. (make_printable_string): Call try_make_printable_string. Signed-off-by: Werner Koch <[email protected]>
2016-04-25common: Use new function to print a failure of xtrymalloc.Werner Koch1-0/+11
* common/miscellaneous.c (xoutofcore): New. * common/strlist.c (append_to_strlist): Use instead of abort. (append_to_strlist_try): Use xtrymalloc instead of xmalloc. Signed-off-by: Werner Koch <[email protected]>
2015-06-23common: Improve fucntion parse_debug_flag.Werner Koch1-2/+13
* common/miscellaneous.c (parse_debug_flag): Add hack not to call exit. Add "none" and "all" flags. Signed-off-by: Werner Koch <[email protected]>
2015-06-22common: Add function parse_debug_flagWerner Koch1-0/+81
* common/miscellaneous.c (parse_debug_flag): New. * common/util.h (struct debug_flags_s): New. Signed-off-by: Werner Koch <[email protected]>
2015-06-17agent: Print a warning for obsolete options.Werner Koch1-0/+14
* g10/misc.c (obsolete_scdaemon_option): Move to * common/miscellaneous.c (obsolete_option): ... here. * agent/gpg-agent.c (main): Use obsolete_option for the 3 obsolete options. -- GnuPG-bug-id: 2016 Signed-off-by: Werner Koch <[email protected]>
2015-04-24common: Rename log and gcc attribute macros (jnlib merge).Werner Koch1-8/+8
* common/logging.h: Rename JNLIB_LOG_* to GPGRT_LOG_*. * common/mischelp.h: Rename JNLIB_GCC_* to GPGRT_GCC_*. -- JNLIB has no more meaning. Thus we switch to a GPGRT_ prefix in anticipation that some code may eventually be moved to libgpg-error. Signed-off-by: Werner Koch <[email protected]>
2015-04-24common: Remove two JNLIB_ macros (jnlib merge).Werner Koch1-1/+0
* configure.ac: Merge seperate jnlib checks. (HAVE_JNLIB_LOGGING): Remove. * common/logging.c, common/simple-pwquery.c (JNLIB_NEED_AFLOCAL): Rename to GNUPG_COMMON_NEED_AFLOCAL. Change all tests. -- Signed-off-by: Werner Koch <[email protected]>
2014-08-26Switch to the libgpg-error provided estream.Werner Koch1-2/+43
* configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14. (GPGRT_ENABLE_ES_MACROS): Define. (estream_INIT): Remove. * m4/estream.m4: Remove. * common/estream-printf.c, common/estream-printf.h: Remove. * common/estream.c, common/estream.h: Remove. * common/init.c (_init_common_subsystems): Call gpgrt initialization.
2012-04-20Change license for some files in common to LGPLv3+/GPLv2+.Werner Koch1-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+/
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-8/+7
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.
2010-12-02s/AES/AES128/ in diagnostics and --list-configWerner Koch1-0/+17
2010-10-13More agent support for gpg.Werner Koch1-0/+78
2010-03-15Finished the bulk of changes to use estream in most places instead ofWerner Koch1-10/+9
stdio.
2010-03-11Use a custom log handler for libassuan.Werner Koch1-2/+0
2008-10-17Use more warning options with modern GCCs.Werner Koch1-0/+8
Other minor changes.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-04-20Improved logging for error orginating from libgcrypt.Werner Koch1-0/+67
2007-03-19Allow export to work on systems without funopen/fopencookie.Werner Koch1-0/+16
2007-03-19Changes to let the key listing use estream to help systems withoutWerner Koch1-0/+1
funopen.
2006-09-14Take advantage of newer gpg-error features.Werner Koch1-1/+1
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2006-05-23g10/ does build again.Werner Koch1-1/+23
2006-04-21Still merging 1.4.3 code backWerner Koch1-2/+3
2005-07-27Removed directories which are only used by the 1.9 branchWerner Koch1-126/+0
2005-06-16gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch1-1/+1
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.
2004-01-302004-01-30 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-19/+0
* Makefile.am (libcommon_a_SOURCES): Add xasprintf.c. * miscellaneous.c (xasprintf): Moved to ... * xasprintf (xasprintf): ... here. New file. This allows to use xasprintf without sucking in gpg-error.
2003-12-17* gettime.c (asctimestamp): Add a note on a non-avoidable gcc warning.Werner Koch1-0/+20
* util.h [!HAVE_VASPRINTF]: Add printf format attribute to the replacement function. * miscellaneous.c (xasprintf): New.
2003-08-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+126
'GNUPG-1-9-BRANCH'.
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-0/+126
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.