aboutsummaryrefslogtreecommitdiffstats
path: root/common/stringhelp.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-03-23common:stringhelp.c: Replace use of jblib_malloc with xtrymalloc, etc.neal/dirmngr-ldapNeal H. Walfield1-26/+26
-- Signed-off-by: Neal H. Walfield <[email protected]>
2015-03-23common: Add new helper function, strsplit.Neal H. Walfield1-0/+38
* common/stringhelp.h (strsplit): New declaration. * common/stringhelp.c (strsplit): New function. * common/t-stringhelp.c (test_strsplit): New function. (main): Call it here. -- Signed-off-by: Neal H. Walfield <[email protected]>
2015-02-26gpg: Lowercase mailbox for PKA lookups.Werner Koch1-0/+12
* common/stringhelp.c (ascii_strlwr): New. * common/mbox-util.c (mailbox_from_userid): Downcase result. -- Signed-off-by: Werner Koch <[email protected]>
2015-01-28gpg: Fix buffering problem in --list-config.Werner Koch1-123/+0
* g10/gpg.c (list_config): Replace print_sanitized_string2 by es_write_sanitized. * common/stringhelp.c (print_sanitized_buffer2): Remove. (print_sanitized_buffer, print_sanitized_utf8_buffer): Remove. (print_sanitized_utf8_buffer, print_sanitized_utf8_string): Remove. (print_sanitized_string): Remove. * sm/certdump.c (print_dn_part, print_dn_parts): Remove arg FP. (pretty_print_sexp, gpgsm_print_name2, gpgsm_print_name): Remove. -- Mixing stdio and estream is never a good idea. This fix also allows us to remove a lot of garbage. Reported-by: Jason A. Donenfeld <[email protected]> GnuPG-bug-id: 1822 Signed-off-by: Werner Koch <[email protected]>
2014-11-11Remove use of gnulib (part 2)Werner Koch1-0/+20
* configure.ac (strpbrk): Add to AC_CHECK_FUNCS. (gl_EARLY): Remove. * common/stringhelp.c (strpbrk) [!HAVE_STRPBRK]: New. * common/sysutils.c (gnupg_mkdtemp): New. Based on code from glibc-2.6. (gnupg_setenv): Rewrite. (gnupg_unsetenv): Rewrite. * g10/exec.c: Include sysutils.h and replace mkdtemp by gnupg_mkdtemp. * g13/be-encfs.c: Ditto. * g13/mount.c: Ditto. * tools/symcryptrun.c (confucius_mktmpdir): Ditto. Signed-off-by: Werner Koch <[email protected]>
2014-05-14w32: Make make_absfilename work with drive letters.Werner Koch1-1/+3
* common/stringhelp.c (do_make_filename) [HAVE_DRIVE_LETTERS]: Fix.
2014-04-22common: Add functions make_absfilename and make_absfilename_try.Werner Koch1-2/+98
* common/stringhelp.c (do_make_filename): Add modes 2 and 3. (make_absfilename): New. (make_absfilename_try): New.
2014-03-14gpg: Print the actual used keyserver address.Werner Koch1-1/+1
* dirmngr/ks-engine-hkp.c (ks_hkp_search, ks_hkp_get): Print SOURCE status lines. * g10/call-dirmngr.c (ks_status_parm_s): New. (ks_search_parm_s): Add field stparm. (ks_status_cb): New. (ks_search_data_cb): Send source to the data callback. (gpg_dirmngr_ks_search): Change callback prototope to include the SPECIAL arg. Adjust all users. Use ks_status_cb. (gpg_dirmngr_ks_get): Add arg r_source and use ks_status_cb. * g10/keyserver.c (search_line_handler): Adjust callback and print "data source" disgnostic. (keyserver_get): Print data source diagnostic. -- It has often been requested that the actually used IP of a keyservers is shown in with gpg --recv-key and --search-key. This is helpful if the keyserver is actually a pool of keyservers. This patch does this.
2014-03-07w32: Include winsock2.h to silence warnings.Werner Koch1-0/+3
2013-02-22common: Add func has_leading_keyword.Werner Koch1-0/+23
* common/stringhelp.c (has_leading_keyword): New.
2013-02-21common: Add func has_leading_keyword.Werner Koch1-0/+23
* common/stringhelp.c (has_leading_keyword): New.
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-2/+2
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.
2011-09-30Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch1-7/+18
This is to allow the use of this code with code under GPLv2(only).
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-37/+36
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-03-24More changes for CE. gpgsm does now build and run a keylisting.Werner Koch1-8/+12
2010-03-10Merged jnlib into common.Werner Koch1-0/+0
2010-02-26First batch of changes to support W32CE.Werner Koch1-2/+12
Note that jnlib/w32-reg.c is not yet ready.
2009-08-26Refactor new code.Werner Koch1-38/+36
2009-08-26Implement tilde expansion in the same was as 1.4.Werner Koch1-43/+145
2009-08-25New fucntions strconcat and xstrconcat.Werner Koch1-1/+84
2009-07-07Minor bug fixes.Werner Koch1-13/+15
Enhanced function docs.
2009-01-20Print more directories with gpgconf --list-dirs.Werner Koch1-2/+2
2008-11-11Minor cleanups.Werner Koch1-1/+1
2008-10-29Check that the socket is well and served by us.Werner Koch1-44/+75
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-3/+5
2008-06-26Start support of TCOS 3 cards.Werner Koch1-2/+1
Support restriction attribute. Fix utf-8 printing problems. Use AES by default.
2007-11-19Started to implement the audit log feature.Werner Koch1-4/+27
Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
2007-08-27Implemented more gpg-agen options to support certain passphrase policies.Werner Koch1-1/+1
New tool gpg-check-pattern.
2007-08-24tryu harder to ignore duplicate specified keyrings and -boxes.Werner Koch1-2/+5
Documentation updates.
2007-08-02Factored common gpgconf constants outWerner Koch1-30/+55
Fixed W32 compare_filenames
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-06-19Made percent_escape more general.Werner Koch1-6/+20
Added regression tests support to jnlib. W32 changes.
2007-06-18jnlib/Marcus Brinkmann1-1/+35
2007-06-18 Marcus Brinkmann <[email protected]> * stringhelp.h (percent_escape): New prototype. * stringhelp.c (percent_escape): New function. agent/ 2007-06-18 Marcus Brinkmann <[email protected]> * gpg-agent.c (main): Percent escape pathname in --gpgconf-list output. g10/ 2007-06-18 Marcus Brinkmann <[email protected]> * gpg.c (gpgconf_list): Percent escape output of --gpgconf-list. scdaemon/ 2007-06-18 Marcus Brinkmann <[email protected]> * scdaemon.c (main): Percent escape output of --gpgconf-list. sm/ 2007-06-18 Marcus Brinkmann <[email protected]> * gpgsm.c (main): Percent escape output of --gpgconf-list.
2007-06-06First steps towards supporting W32.Werner Koch1-1/+1
This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
2007-01-25jnlib/Werner Koch1-0/+17
* stringhelp.c (utf8_charcount): New. agent/ * genkey.c (check_passphrase_constraints): Use UTF-8 aware strlen.
2006-10-19FixesWerner Koch1-0/+12
2006-10-02Fix for bug 537Werner Koch1-13/+62
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2006-05-23g10/ does build again.Werner Koch1-14/+85
2006-04-28Fix for sanitize string. Added SHA224Werner Koch1-7/+7
2006-04-21Still merging 1.4.3 code backWerner Koch1-3/+7
2005-06-16gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch1-40/+57
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-12-13VArious hacks to make it at least build under W32.Werner Koch1-9/+37
* stringhelp.c (w32_strerror) [W32]: New. * w32-pth.c, w32-pth.h: Added real code written by Timo Schulz. Not finished, though. * gpgconf-comp.c <ignore-ocsp-service-url>: Fixed typo.
2004-08-18(print_sanitized_utf8_string): Actually implementWerner Koch1-2/+3
it.
2004-02-18(print_sanitized_buffer): Don't care aboutWerner Koch1-5/+3
non-ASCII characaters. (sanitize_buffer): Ditto.
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-9/+164
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.
2003-01-09Updated from NewPGWerner Koch1-0/+474
2002-06-29Removed files for CVS reorganizationDavid Shaw1-219/+0
2000-01-24Add files to new directory.Werner Koch1-0/+219
This is mainly stuff moved from ../util to here.