aboutsummaryrefslogtreecommitdiffstats
path: root/common (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-0528-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.
* Add tweaks for the not anymore patented IDEA algorithm.Werner Koch2012-05-081-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.
* common: Remove generated files only during maintainer-clean.Werner Koch2012-05-081-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.
* remove doubled words in a commentJim Meyering2012-04-261-3/+3
|
* Change license for some files in common to LGPLv3+/GPLv2+.Werner Koch2012-04-2053-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+/
* Fix timegm regression test.Werner Koch2012-03-271-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.
* Print warning for arguments not considered an option.Werner Koch2012-03-272-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.
* agent: New function agent_print_status.Werner Koch2012-02-072-6/+24
| | | | | | * common/asshelp2.c (vprint_assuan_status): New. (print_assuan_status): Re-implement using above func. * agent/command.c (agent_print_status): New.
* common: Replace macro based function calls by using DEFAULT_ERRSOURCE.Werner Koch2012-02-078-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.
* common: Add function print_assuan_status.Werner Koch2012-02-063-1/+61
| | | | | | * common/asshelp2.c: New. (print_assuan_status): New function. * common/Makefile.am (common_sources): Add asshelp2.c.
* common: Add a global variable to for the default error source.Werner Koch2012-02-063-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.
* Port to npth.Marcus Brinkmann2012-01-258-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.
* estream: Fix unclean usage of realloc.Werner Koch2012-01-203-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.
* estream: Avoid printing leading zeroes by %p on 32 bit systems.Werner Koch2012-01-111-1/+1
| | | | | * common/estream-printf.c (pr_pointer): Synchronize definition of AULONG with its use.
* gpg: Make the double space in the middle of a fingerprint optional.Werner Koch2012-01-061-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.
* gpg: Allow use of a standard space separated fingerprint.Werner Koch2012-01-061-0/+40
| | | | | * common/userids.c (classify_user_id): Check for space separated GPG fingerprint.
* Revert last change, add comment about link() return values.Marcus Brinkmann2012-01-031-21/+11
| | | | | * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Do not check return value of link().
* Fix compiler warnings.Marcus Brinkmann2012-01-031-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.
* estream: New function es_fclose_snatch.Werner Koch2011-12-152-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.
* scd: New option --debug-assuan-log-cats.Werner Koch2011-12-132-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.
* Generate the ChangeLog from commit logs.Werner Koch2011-12-013-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.
* Rewrite dns-cert.c to not use the gpg-only iobuf stuff.Werner Koch2011-11-304-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.
* * common/estream.c (es_fopenmem_init): New.Werner Koch2011-11-302-3/+39
| | | | * common/estream.h (es_fopenmem_init): New.
* Add parameter checks and extend documentation of estream.Werner Koch2011-11-302-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.
* dns-cert.c: Use constants for better readability.Werner Koch2011-11-302-8/+25
|
* Actually increase buffer size of t-dns-cert.c.Werner Koch2011-11-301-1/+1
|
* Re-indented dns-cert.cWerner Koch2011-11-301-121/+122
|
* Increase the default buffer size for DNS certificates.Werner Koch2011-11-301-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.
* Use separate test module for dns-cert.c.Werner Koch2011-11-305-62/+103
| | | | | * dns-cert.c (get_dns_cert): Factor test code out to ... * t-dns-cert.c: new file.
* Allow distribution of dotlock.* also under a modified BSD licenseWerner Koch2011-10-243-0/+77
|
* Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch2011-09-3030-205/+527
| | | | This is to allow the use of this code with code under GPLv2(only).
* Add prefix macro for dotlock functions.Werner Koch2011-09-303-8/+45
| | | | Also fixed a type in the GLIB version.
* Add dotlock_get_fd and dotlock_set_fd.Werner Koch2011-09-293-2/+37
|
* Make dotlock.c thread-safe on pthread systems.Werner Koch2011-09-292-25/+81
| | | | This is achieved by passing the define DOTLOCK_USE_PTHREAD.
* Add a flag parameter to dotlock_create.Werner Koch2011-09-285-12/+24
| | | | This allows us to extend this function in the future.
* Allow arbitrary timeouts with dotlock.Werner Koch2011-09-282-37/+87
|
* Improved the dotlock module.Werner Koch2011-09-274-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.
* Renamed the lock functions.Werner Koch2011-09-234-323/+445
| | | | Also cleaned up the dotlock code for easier readability.
* Remove support for RISCOS from dotlock.cWerner Koch2011-09-221-58/+7
|
* Fixed set but unused variable bugsWerner Koch2011-08-106-24/+26
|
* Support a confirm flag for ssh.Werner Koch2011-07-201-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.
* New functions to compute an ssh style fingerprint.Werner Koch2011-07-205-1/+473
|
* Fix size_t vs int issues.Marcus Brinkmann2011-06-012-0/+5
|
* Require libgpg-error 1.10Werner Koch2011-05-202-15/+4
| | | | | This allows to remove some error code substitutes. Fixed a typo in gpg.text.
* Fix regression in gpg's mail address parsing.Werner Koch2011-04-253-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.
* Add code for explicit selection of pooled A records.Werner Koch2011-04-123-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.
* Simplify the management of the stream list in estream.cWerner Koch2011-03-032-66/+83
|
* Add new functions to convert iso time strings.Werner Koch2011-03-016-24/+253
|
* Fix ChnageLog entries.Werner Koch2011-02-151-0/+5
|
* fixed --list-keys on Linux64 bitAndrey Jivsov2011-02-121-2/+3
|