aboutsummaryrefslogtreecommitdiffstats
path: root/common/stringhelp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common:stringhelp.c: Replace use of jblib_malloc with xtrymalloc, etc.neal/dirmngr-ldapNeal H. Walfield2015-03-231-26/+26
| | | | | -- Signed-off-by: Neal H. Walfield <[email protected]>
* common: Add new helper function, strsplit.Neal H. Walfield2015-03-231-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]>
* gpg: Lowercase mailbox for PKA lookups.Werner Koch2015-02-261-0/+12
| | | | | | | | * common/stringhelp.c (ascii_strlwr): New. * common/mbox-util.c (mailbox_from_userid): Downcase result. -- Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix buffering problem in --list-config.Werner Koch2015-01-281-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]>
* Remove use of gnulib (part 2)Werner Koch2014-11-111-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]>
* w32: Make make_absfilename work with drive letters.Werner Koch2014-05-141-1/+3
| | | | * common/stringhelp.c (do_make_filename) [HAVE_DRIVE_LETTERS]: Fix.
* common: Add functions make_absfilename and make_absfilename_try.Werner Koch2014-04-221-2/+98
| | | | | | * common/stringhelp.c (do_make_filename): Add modes 2 and 3. (make_absfilename): New. (make_absfilename_try): New.
* gpg: Print the actual used keyserver address.Werner Koch2014-03-141-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.
* w32: Include winsock2.h to silence warnings.Werner Koch2014-03-071-0/+3
|
* common: Add func has_leading_keyword.Werner Koch2013-02-211-0/+23
| | | | * common/stringhelp.c (has_leading_keyword): New.
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-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.
* Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch2011-09-301-7/+18
| | | | This is to allow the use of this code with code under GPLv2(only).
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-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.
* More changes for CE. gpgsm does now build and run a keylisting.Werner Koch2010-03-241-8/+12
|
* Merged jnlib into common.Werner Koch2010-03-101-0/+1151