aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dirmngr_ldap.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-05-02dirmngr: Implement timeout for dirmngr_ldap under Windows.Werner Koch1-4/+44
* dirmngr/dirmngr_ldap.c (alarm_thread) [W32]: New. (set_timeout): Implement for W32. -- GnuPG-bug-id: 3937 Signed-off-by: Werner Koch <[email protected]>
2018-04-27dirmngr: Silence log output from dirmngr_ldap.Werner Koch1-2/+1
* dirmngr/dirmngr_ldap.c: Remove assert.h. (main): Replace assert by log_assert. * dirmngr/ldap.c (run_ldap_wrapper): Use debug options to pass verbose options to dirmngr_ldap. (start_cert_fetch_ldap): Ditto. -- verbose is a pretty common option in dirmngr.conf and it would clutter the logs with output from dirmngr_ldap. Now we require DBG_EXTPROG or DBG_LOOKUP to make dirmngr_ldap more verbose. Signed-off-by: Werner Koch <[email protected]>
2017-11-07dirmngr: Reduce default LDAP timeout to 15 seconds.Werner Koch1-1/+1
* dirmngr/dirmngr.c (DEFAULT_LDAP_TIMEOUT): Change to 15. * dirmngr/dirmngr_ldap.c (DEFAULT_LDAP_TIMEOUT): Ditto. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit ab7ac827041b5cd97bbca7a75b0930072dd6611f) GnuPG-bug-id: 3487
2017-07-19Fix usage of ARGPARSE_OPTS.NIIBE Yutaka1-1/+1
* agent/gpg-agent.c, agent/preset-passphrase.c, dirmngr/dirmngr-client.c, dirmngr/dirmngr_ldap.c, kbx/kbxutil.c, tools/gpg-check-pattern.c, tools/gpgconf.c, tools/gpgsplit.c, tools/symcryptrun.c: Use ARGPARSE_end. Signed-off-by: NIIBE Yutaka <[email protected]>
2017-03-07Remove -I option to common.NIIBE Yutaka1-2/+2
* dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2016-06-14ldap: Improve info output for v3 fallbackWerner Koch1-2/+3
* dirmngr/dirmngr_ldap.c (fetch_ldap): Do not use log_debug in an unprotected section. Replace log_debug by log_info in verbose mode. -- GnuPG-bug-id: 2376
2016-06-14dirmngr: Try ldap protocol V3 as fallbackAndre Heinecke1-0/+12
* dirmngr/dirmngr_ldap.c (fetch_ldap): Try V3 Protocol in case default Protocol gives error. -- Servers may have blocked V2 Protocol, in which case the bind will result in a Protocol Error. In that case we try again with v3 Protocol if the ldap libarary used to compile dirmngr supports V3. Signed-off-by: Andre Heinecke <[email protected]>
2016-06-14dirmngr: Print ldap error if bind failsAndre Heinecke1-1/+1
* dirmngr/dirmngr_ldap.c (fetch_ldap): Use ldap_err2string on bind return. -- ldap_simple_bind_s does not set errno. Signed-off-by: Andre Heinecke <[email protected]>
2015-11-17Fix typos found using codespell.Justus Winter1-1/+1
* agent/cache.c: Fix typos. * agent/call-pinentry.c: Likewise. * agent/call-scd.c: Likewise. * agent/command-ssh.c: Likewise. * agent/command.c: Likewise. * agent/divert-scd.c: Likewise. * agent/findkey.c: Likewise. * agent/gpg-agent.c: Likewise. * agent/w32main.c: Likewise. * common/argparse.c: Likewise. * common/audit.c: Likewise. * common/audit.h: Likewise. * common/convert.c: Likewise. * common/dotlock.c: Likewise. * common/exechelp-posix.c: Likewise. * common/exechelp-w32.c: Likewise. * common/exechelp-w32ce.c: Likewise. * common/exechelp.h: Likewise. * common/helpfile.c: Likewise. * common/i18n.h: Likewise. * common/iobuf.c: Likewise. * common/iobuf.h: Likewise. * common/localename.c: Likewise. * common/logging.c: Likewise. * common/openpgp-oid.c: Likewise. * common/session-env.c: Likewise. * common/sexputil.c: Likewise. * common/sysutils.c: Likewise. * common/t-sexputil.c: Likewise. * common/ttyio.c: Likewise. * common/util.h: Likewise. * dirmngr/cdblib.c: Likewise. * dirmngr/certcache.c: Likewise. * dirmngr/crlcache.c: Likewise. * dirmngr/dirmngr-client.c: Likewise. * dirmngr/dirmngr.c: Likewise. * dirmngr/dirmngr_ldap.c: Likewise. * dirmngr/dns-stuff.c: Likewise. * dirmngr/http.c: Likewise. * dirmngr/ks-engine-hkp.c: Likewise. * dirmngr/ks-engine-ldap.c: Likewise. * dirmngr/ldap-wrapper.c: Likewise. * dirmngr/ldap.c: Likewise. * dirmngr/misc.c: Likewise. * dirmngr/ocsp.c: Likewise. * dirmngr/validate.c: Likewise. * g10/encrypt.c: Likewise. * g10/getkey.c: Likewise. * g10/gpg.c: Likewise. * g10/gpgv.c: Likewise. * g10/import.c: Likewise. * g10/keydb.c: Likewise. * g10/keydb.h: Likewise. * g10/keygen.c: Likewise. * g10/keyid.c: Likewise. * g10/keylist.c: Likewise. * g10/keyring.c: Likewise. * g10/mainproc.c: Likewise. * g10/misc.c: Likewise. * g10/options.h: Likewise. * g10/packet.h: Likewise. * g10/parse-packet.c: Likewise. * g10/pkclist.c: Likewise. * g10/pkglue.c: Likewise. * g10/plaintext.c: Likewise. * g10/server.c: Likewise. * g10/sig-check.c: Likewise. * g10/sqlite.c: Likewise. * g10/tdbio.c: Likewise. * g10/test-stubs.c: Likewise. * g10/tofu.c: Likewise. * g10/trust.c: Likewise. * g10/trustdb.c: Likewise. * g13/create.c: Likewise. * g13/mountinfo.c: Likewise. * kbx/keybox-blob.c: Likewise. * kbx/keybox-file.c: Likewise. * kbx/keybox-init.c: Likewise. * kbx/keybox-search-desc.h: Likewise. * kbx/keybox-search.c: Likewise. * kbx/keybox-update.c: Likewise. * scd/apdu.c: Likewise. * scd/app-openpgp.c: Likewise. * scd/app-p15.c: Likewise. * scd/app.c: Likewise. * scd/ccid-driver.c: Likewise. * scd/command.c: Likewise. * scd/iso7816.c: Likewise. * sm/base64.c: Likewise. * sm/call-agent.c: Likewise. * sm/call-dirmngr.c: Likewise. * sm/certchain.c: Likewise. * sm/gpgsm.c: Likewise. * sm/import.c: Likewise. * sm/keydb.c: Likewise. * sm/minip12.c: Likewise. * sm/qualified.c: Likewise. * sm/server.c: Likewise. * tools/gpg-check-pattern.c: Likewise. * tools/gpgconf-comp.c: Likewise. * tools/gpgkey2ssh.c: Likewise. * tools/gpgparsemail.c: Likewise. * tools/gpgtar.c: Likewise. * tools/rfc822parse.c: Likewise. * tools/symcryptrun.c: Likewise. Signed-off-by: Justus Winter <[email protected]>
2015-04-24common: Rename log and gcc attribute macros (jnlib merge).Werner Koch1-2/+2
* 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]>
2015-01-28Add a hook to be called right after main.Werner Koch1-0/+2
* common/init.c (early_system_init): New stub function. Signed-off-by: Werner Koch <[email protected]>
2014-08-26Switch to the libgpg-error provided estream.Werner Koch1-0/+1
* 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.
2014-03-07dirmmgr: Use a portability wrapper for struct timeval.Werner Koch1-8/+15
* dirmngr/dirmngr_ldap.c [W32]: Include winber.h. (my_ldap_timeval_t): New.
2013-11-18Make use of the *_NAME etc macros.Werner Koch1-1/+1
Replace hardwired strings at many places with new macros from config.h and use the new strusage macro replacement feature. * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn sentinels. * agent/command.c (cmd_import_key): Use asprintf to create the prompt.
2012-08-24Fix typos spotted during translationsDavid Prévot1-2/+2
* agent/genkey.c: s/to to/to/ * sm/*.c: s/failed to allocated/failed to allocate/ * sm/certlist.c, ./dirmngr/validate.c: s/should have not/should not have/ * g10/seskey.c: missing closing parenthesis * dirmngr/crlcache.c: s/may has/may have/ Consistency fix: * g10/gpg.c, kbx/kbxutil.c, sm/gpgsm.c: uppercase after Syntax * dirmngr/dirmngr_ldap: no period in Syntax * dirmngr/dirmngr-client.c: infinitive for option description: s/certificates are expected/expect certificates/
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-20/+20
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-02-06common: Add a global variable to for the default error source.Werner Koch1-0/+1
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 LDAP wrapper to NPTH.Marcus Brinkmann1-17/+17
* agent/gpg-agent.c (handle_connections): Handle error. * dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c: Port to NPTH.
2012-01-25Port to npth.Marcus Brinkmann1-1/+1
* 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.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-19/+18
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-08-13Fixed LDAP access on CEWerner Koch1-30/+70
2010-08-03Fix regressions on POSIXWerner Koch1-3/+3
-This line, and those below, will be ignored-- M dirmngr/dirmngr_ldap.c M dirmngr/ChangeLog
2010-08-02Add code for a threaded LDAP access to replace the wrapper process.Werner Koch1-43/+39
Currently used for W32 and W32CE.
2010-07-26Fixed couple of build problems. However the W32 version is currentlyWerner Koch1-8/+8
under work.
2010-07-26Some work on the dirmngrWerner Koch1-85/+126
2010-07-24Add new set_binary feature to estreamWerner Koch1-7/+6
2010-07-16Some work on porting dirmngr (unfinished)Werner Koch1-10/+14
Ported gpgtar to W32.
2010-06-28Make it build on W32 again.Werner Koch1-17/+1
2010-06-09Merged Dirmngr with GnuPG.Werner Koch1-0/+646
A few code changes to support dirmngr.