aboutsummaryrefslogtreecommitdiffstats
path: root/common (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch28-102/+102
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.
2012-05-08Add tweaks for the not anymore patented IDEA algorithm.Werner Koch1-2/+0
* g10/keygen.c (keygen_set_std_prefs): Include IDEA only in PGP2 compatibility mode. * g10/misc.c (idea_cipher_warn): Remove. Also remove all callers. * common/status.h (STATUS_RSA_OR_IDEA): Remove. Do not emit this status anymore. -- To keep the number of actually used algorithms low, we want to support IDEA only in a basically read-only way (unless --pgp2 is used during key generation). It does not make sense to suggest the use of this old 64 bit blocksize algorithm. However, there is old data available where it might be helpful to have IDEA available.
2012-05-08common: Remove generated files only during maintainer-clean.Werner Koch1-1/+1
* common/Makefile.am (CLEANFILES): Rename to MAINTAINERCLEANFILES. -- In general this is not required because automake does this for files in BUILT_SOURCES anyway. However, having them in CLEANFILES is wrong. This is bug#1398.
2012-04-26remove doubled words in a commentJim Meyering1-3/+3
2012-04-20Change license for some files in common to LGPLv3+/GPLv2+.Werner Koch53-288/+809
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+/
2012-03-27Fix timegm regression test.Werner Koch1-16/+14
* common/t-timestuff.c (test_timegm): Change test to use January and not February or December+1. Bug spotted by Daniel Kahn Gillmor.
2012-03-27Print warning for arguments not considered an option.Werner Koch2-1/+4
GnuPG requires that options are given before other arguments. This can sometimes be confusing. We now print a warning if we found an argument looking alike a long option without being preceded by the stop option. This is bug#1343. * common/argparse.h (ARGPARSE_FLAG_STOP_SEEN): New. * common/argparse.c (arg_parse): Set new flag. * g10/gpg.c (main): Print the warning. * agent/gpg-agent.c (main): Ditto. * dirmngr/dirmngr.c (main): Ditto. * g13/g13.c (main): Ditto. * scd/scdaemon.c (main): Ditto. * sm/gpgsm.c (main): Ditto. * tools/gpg-connect-agent.c (main): Ditto. * tools/gpgconf.c (main): Ditto.
2012-02-07agent: New function agent_print_status.Werner Koch2-6/+24
* common/asshelp2.c (vprint_assuan_status): New. (print_assuan_status): Re-implement using above func. * agent/command.c (agent_print_status): New.
2012-02-07common: Replace macro based function calls by using DEFAULT_ERRSOURCE.Werner Koch8-172/+136
* common/dns-cert.h (get_dns_cert): Remove macro. * common/dns-cert.c (_get_dns_cert): Rename to get_dns_cert. Replace arg ERRSOURCE by global DEFAULT_ERRSOURCE. * common/http.h (http_parse_uri, http_raw_connect, http_open) (http_open_document, http_wait_response): Remove macros. * common/http.c (_http_parse_uri, _http_raw_connect, _http_open) (_http_open_document, _http_wait_response): Remove underscore from symbols. Replace args ERRSOURCE by global DEFAULT_ERRSOURCE. * common/ssh-utils.h (ssh_get_fingerprint) (ssh_get_fingerprint_string): Remove macros. * common/ssh-utils.h (_ssh_get_fingerprint) (_ssh_get_fingerprint_string): Remove underscore from symbols. Replace args ERRSOURCE by global DEFAULT_ERRSOURCE. * common/tlv.h (parse_ber_header, parse_sexp): Remove macros. * common/tlv.c: Include util.h. (_parse_ber_header, _parse_sexp): Remove underscore from symbols. Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
2012-02-06common: Add function print_assuan_status.Werner Koch3-1/+61
* common/asshelp2.c: New. (print_assuan_status): New function. * common/Makefile.am (common_sources): Add asshelp2.c.
2012-02-06common: Add a global variable to for the default error source.Werner Koch3-4/+29
For the shared code parts it is cumbersome to pass an error sourse variable to each function. Its value is always a constant for a given binary and thus a global variable makes things a lot easier than the former macro stuff. * common/init.c (default_errsource): New global var. (init_common_subsystems): Rename to _init_common_subsystems. Set DEFAULT_ERRSOURCE. * common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT. (init_common_subsystems): New macro. * common/util.h (default_errsource): Add declaration. * kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.
2012-01-25Port to npth.Marcus Brinkmann8-87/+66
* configure.ac: Don't check for PTH but for NPTH. (AH_BOTTOM): Remove PTH_SYSCALL_SOFT. (have_pth): Rename to ... (have_npth): ... this. (USE_GNU_NPTH): Rename to ... (USE_GNU_PTH): ... this. * m4/npth.m4: New file. * agent/Makefile.am, agent/cache.c, agent/call-pinentry.c, agent/call-scd.c, agent/findkey.c, agent/gpg-agent.c, agent/trustlist.c, common/Makefile.am, common/estream.c, common/exechelp-posix.c, common/exechelp-w32.c, common/exechelp-w32ce.c, common/http.c, common/init.c, common/sysutils.c, dirmngr/Makefile.am, dirmngr/crlfetch.c, dirmngr/dirmngr.c, dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c, dirmngr/ldap-wrapper.c, dirmngr/ldap.c, g13/Makefile.am, g13/call-gpg.c, g13/g13.c, g13/runner.c, scd/Makefile.am, scd/apdu.c, scd/app.c, scd/ccid-driver.c, scd/command.c, scd/scdaemon.c, tools/Makefile.am: Port to npth.
2012-01-20estream: Fix unclean usage of realloc.Werner Koch3-21/+38
* common/estream-printf.c (_ESTREAM_PRINTF_MALLOC): Remove. (_ESTREAM_PRINTF_FREE): Remove. (_ESTREAM_PRINTF_REALLOC): New. (fixed_realloc) [!_ESTREAM_PRINTF_REALLOC]): New. (estream_vasprintf): Use my_printf_realloc instead of my_printf_malloc and my_printf_free. (dynamic_buffer_out): Use my_printf_realloc instead of realloc. -- This bug will never happen in current GnuPG/Libgcrypt because we use the standard memory allocation functions via Libgcrypt. However, when used in other environments it would mess up the heap for an asprintf with an output length larger than ~512 bytes.
2012-01-11estream: Avoid printing leading zeroes by %p on 32 bit systems.Werner Koch1-1/+1
* common/estream-printf.c (pr_pointer): Synchronize definition of AULONG with its use.
2012-01-06gpg: Make the double space in the middle of a fingerprint optional.Werner Koch1-7/+10
This change might help to c+p a fingerprint from an HTML page without being enclosed in a "pre" tag. * common/userids.c (classify_user_id): Skip a second blank in the middle of a fingerprint.
2012-01-06gpg: Allow use of a standard space separated fingerprint.Werner Koch1-0/+40
* common/userids.c (classify_user_id): Check for space separated GPG fingerprint.
2012-01-03Revert last change, add comment about link() return values.Marcus Brinkmann1-21/+11
* common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Do not check return value of link().
2012-01-03Fix compiler warnings.Marcus Brinkmann1-9/+21
* common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Check return value of link(). * g13/g13.c: Make sure err is initialized. * scd/scdaemon.c (main) [!USE_GCRY_THREAD_CBS]: Do not define ERR.
2011-12-15estream: New function es_fclose_snatch.Werner Koch2-1/+109
* common/estream.c (cookie_ioctl_function_t): New type. (es_fclose_snatch): New function. (COOKIE_IOCTL_SNATCH_BUFFER): New constant. (struct estream_internal): Add field FUNC_IOCTL. (es_initialize): Clear FUNC_IOCTL. (es_func_mem_ioctl): New function. (es_fopenmem, es_fopenmem_init): Init FUNC_IOCTL.
2011-12-13scd: New option --debug-assuan-log-cats.Werner Koch2-0/+14
* scd/scdaemon.c (oDebugAssuanLogCats): New. (opts): Add option --debug-assuan-log-cats. (main): Implement option. * common/asshelp.c (set_libassuan_log_cats): New. -- The old way of setting the logging categories with an environment variable is awkward if sdaemon is spawned from a running gpg-agent.
2011-12-01Generate the ChangeLog from commit logs.Werner Koch3-1/+23
* scripts/gitlog-to-changelog: New script. Taken from gnulib. * scripts/git-log-fix: New file. * scripts/git-log-footer: New file. * doc/HACKING: Describe the ChangeLog policy * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. Rename all ChangeLog files to ChangeLog-2011.
2011-11-30Rewrite dns-cert.c to not use the gpg-only iobuf stuff.Werner Koch4-89/+162
* common/dns-cert.c: Remove iobuf.h. (get_dns_cert): Rename to _get_dns_cert. Remove MAX_SIZE arg. Change iobuf arg to a estream-t. Rewrite function to make use of estream instead of iobuf. Require all parameters. Return an gpg_error_t error instead of the type. Add arg ERRSOURCE. * common/dns-cert.h (get_dns_cert): New macro to pass the error source to _gpg_dns_cert. * common/t-dns-cert.c (main): Adjust for changes in get_dns_cert. * g10/keyserver.c (keyserver_import_cert): Ditto. * doc/gpg.texi (GPG Configuration Options): Remove max-cert-size.
2011-11-30* common/estream.c (es_fopenmem_init): New.Werner Koch2-3/+39
* common/estream.h (es_fopenmem_init): New.
2011-11-30Add parameter checks and extend documentation of estream.Werner Koch2-10/+35
* estream.c (func_mem_create): Don't set FUNC_REALLOC if GROW is not set. Require FUNC_REALLOC if DATA is NULL and FUNC_FREE is given.
2011-11-30dns-cert.c: Use constants for better readability.Werner Koch2-8/+25
2011-11-30Actually increase buffer size of t-dns-cert.c.Werner Koch1-1/+1
2011-11-30Re-indented dns-cert.cWerner Koch1-121/+122
2011-11-30Increase the default buffer size for DNS certificates.Werner Koch1-0/+2
* common/t-dns-cert.c (main): Increase MAX_SIZE to 64k. * g10/keyserver.c (DEFAULT_MAX_CERT_SIZE): Increase from 16k to 64k.
2011-11-30Use separate test module for dns-cert.c.Werner Koch5-62/+103
* dns-cert.c (get_dns_cert): Factor test code out to ... * t-dns-cert.c: new file.
2011-10-24Allow distribution of dotlock.* also under a modified BSD licenseWerner Koch3-0/+77
2011-09-30Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch30-205/+527
This is to allow the use of this code with code under GPLv2(only).
2011-09-30Add prefix macro for dotlock functions.Werner Koch3-8/+45
Also fixed a type in the GLIB version.
2011-09-29Add dotlock_get_fd and dotlock_set_fd.Werner Koch3-2/+37
2011-09-29Make dotlock.c thread-safe on pthread systems.Werner Koch2-25/+81
This is achieved by passing the define DOTLOCK_USE_PTHREAD.
2011-09-28Add a flag parameter to dotlock_create.Werner Koch5-12/+24
This allows us to extend this function in the future.
2011-09-28Allow arbitrary timeouts with dotlock.Werner Koch2-37/+87
2011-09-27Improved the dotlock module.Werner Koch4-43/+529
- It is now more portable and may be used outside of GnuPG - vfat file systems are now supported. - The use of link(2) is more robust. - Wrote extensive documentation.
2011-09-23Renamed the lock functions.Werner Koch4-323/+445
Also cleaned up the dotlock code for easier readability.
2011-09-22Remove support for RISCOS from dotlock.cWerner Koch1-58/+7
2011-08-10Fixed set but unused variable bugsWerner Koch6-24/+26
2011-07-20Support a confirm flag for ssh.Werner Koch1-7/+0
This implements the suggestion from bug#1349. With this change the fingerprint of the ssh key is also displayed in the pinentry prompts.
2011-07-20New functions to compute an ssh style fingerprint.Werner Koch5-1/+473
2011-06-01Fix size_t vs int issues.Marcus Brinkmann2-0/+5
2011-05-20Require libgpg-error 1.10Werner Koch2-15/+4
This allows to remove some error code substitutes. Fixed a typo in gpg.text.
2011-04-25Fix regression in gpg's mail address parsing.Werner Koch3-3/+14
Since 2009-12-08 gpg was not able to find email addresses indicated by a leading '<'. This happened when I merged the user id classification code of gpgsm and gpg.
2011-04-12Add code for explicit selection of pooled A records.Werner Koch3-0/+16
To better cope with round robin pooled A records like keys.gnupg.net we need to keep some information on unresponsive hosts etc. What we do now is to resolve the hostnames, remember them and select a random one. If a host is dead it will be marked and a different one selected. This is intended to solve the problem of long timeouts due to unresponsive hosts. The code is not yet finished but selection works.
2011-03-03Simplify the management of the stream list in estream.cWerner Koch2-66/+83
2011-03-01Add new functions to convert iso time strings.Werner Koch6-24/+253
2011-02-15Fix ChnageLog entries.Werner Koch1-0/+5
2011-02-12fixed --list-keys on Linux64 bitAndrey Jivsov1-2/+3