aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dirmngr.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-02-12dirmngr: Initialize cache from sysconfig dirAndre Heinecke1-3/+0
* dirmngr/certcache.c (cert_cache_init): Load certificates from sysconfig dir instead of the homeidr. * dirmngr/dirmngr.c (main): Removed parsing of obsolete homedir_data option. * dirmngr/dirmngr.h (opt): Removed homedir_data. * doc/dirmngr.texi: Update and clarify certs directory doc. -- Using the homedir for extra-certs and trusted-certs makes little sense when dirmngr is used with a caller that manages it's own store of certificates and can provide those through the SENDCERT command. You can use trusted-certs and extra-certs to provide users with a base of locally available certificates that are not already in store of the applications.
2015-02-11dirmngr: Avoid warning about unused function.Werner Koch1-1/+2
* dirmngr/dirmngr.c (my_gnutls_log): Build only if gnutls is used.
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-12-01dirmngr: Implement socket redirection.Werner Koch1-12/+48
* dirmngr/dirmngr.c (ENAMETOOLONG): new. (redir_socket_name): New. (main): Add Assuan socket redirection. (cleanup): Adjust cleanup for redirection. -- Signed-off-by: Werner Koch <[email protected]>
2014-10-17dirmngr: Allow building without LDAP support.Werner Koch1-4/+35
* configure.ac: Add option --disable-ldap. (USE_LDAP): New ac_define and am_conditional. * dirmngr/Makefile.am: Take care of USE_LDAP. * dirmngr/dirmngr.c (!USE_LDAP): Make all ldap options dummy options and do not call any ldap function. * dirmngr/server.c (!USE_LDAP): Do not call any ldap function. * dirmngr/crlfetch.c (!USE_LDAP): Ditto. Signed-off-by: Werner Koch <[email protected]>
2014-10-17dirmngr: Minor usage output fix.Werner Koch1-2/+2
--
2014-10-10Use a unique capitalization for "Note:".Werner Koch1-2/+2
--
2014-10-02First changes for future use of NTBTLS.Werner Koch1-5/+20
* configure.ac (NEED_NTBTLS_ABI, NEED_NTBTLS_VERSION): New. (HTTP_USE_NTBTLS): New. Prefer over GNUTLS. * m4/ntbtls.m4: New. * m4/Makefile.am (EXTRA_DIST): Add new file. * common/http.c: Add conditionals to eventually use NTBTLS. -- This is only the configure stuff. If you have NTBTLS installed GNUTLS will not be used but there won't be any https support either :-(. This patch is used to have a real world test bench for the forthcoming library.
2014-06-27Fix typos in messagesYuri Chornoivan1-1/+1
2014-05-05dirmngr: Add support for hkps keyservers.Werner Koch1-0/+47
* dirmngr/dirmngr.c: Include gnutls.h. (opts): Add --gnutls-debug and --hkp-cacert. (opt_gnutls_debug, my_gnutls_log): New. (set_debug): Set gnutls log level. (parse_rereadable_options): Register a CA file. (main): Init GNUTLS. * dirmngr/ks-engine-hkp.c (ks_hkp_help): Support hkps. (send_request): Ditto.
2014-04-08dirmngr: Fix compiler warning.Werner Koch1-11/+25
* common/mischelp.h (JNLIB_GCC_HAVE_PUSH_PRAGMA): New. * dirmngr/dirmngr.c (handle_tick): Factor time check out to ... (time_for_housekeeping_p): new. -- I am not sure whether that y2038 hack is really useful but it might make me smile in my retirement.
2014-03-18dirmngr: Resurrect hosts in the HKP hosttable.Werner Koch1-15/+74
* dirmngr/dirmngr.c (HOUSEKEEPING_INTERVAL): New. (housekeeping_thread): New. (handle_tick): Call new function. * dirmngr/ks-engine-hkp.c (RESURRECT_INTERVAL): New. (struct hostinfo_s): Add field died_at and set it along with the dead flag. (ks_hkp_print_hosttable): Print that info. (ks_hkp_housekeeping): New. -- The resurrection gives the host a chance to get back to life the next time a new host is selected.
2014-03-14dirmngr: Default to a user socket name and enable autostart.Werner Koch1-1/+5
* common/homedir.c (dirmngr_socket_name): Rename to dirmngr_sys_socket_name. (dirmngr_user_socket_name): New. * common/asshelp.c (start_new_dirmngr): Handle sys and user dirmngr socket. * dirmngr/dirmngr.c (main): Ditto. * dirmngr/server.c (cmd_getinfo): Ditto. * sm/server.c (gpgsm_server): Ditto. * dirmngr/dirmngr-client.c (start_dirmngr): Likewise. * tools/gpgconf.c (main): Print "dirmngr-sys-socket" with --list-dirs. * configure.ac (USE_DIRMNGR_AUTO_START): Set by default.
2014-03-12gpg: Add option --dirmngr-program.Werner Koch1-19/+3
* g10/gpg.c: Add option --dirmngr-program. * g10/options.h (struct opt): Add field dirmngr_program. * g10/call-dirmngr.c (create_context): Use new var. * dirmngr/dirmngr.c: Include gc-opt-flags.h. (main): Remove GC_OPT_FLAG_*. * tools/gpgconf-comp.c (GC_OPT_FLAG_NO_CHANGE): Move macro to ... * common/gc-opt-flags.h: here.
2014-03-07Silence more warnings about unused vars and args.Werner Koch1-4/+19
* dirmngr/cdblib.c (cdb_init) [W32]: Remove unused var. * dirmngr/dirmngr-client.c (start_dirmngr): s/int/assuan_fd_t/. * dirmngr/dirmngr.c (w32_service_control): Mark unused args. (call_real_main): New. (main) [W32]: Use new function to match prototype. (real_main) [W32]: Mark unused vars. (handle_signal) [W32]: Do not build the function at all. (handle_connections) [W32]: Do not define signo. * dirmngr/ldap-wrapper-ce.c (outstream_reader_cb): Remove used vars. * g10/tdbio.c (ftruncate) [DOSISH]: Define only if not yet defined.
2013-11-18Make use of the *_NAME etc macros.Werner Koch1-14/+15
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-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-14/+14
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-03-27Print warning for arguments not considered an option.Werner Koch1-0/+10
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-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 Windows code to NPTH.Marcus Brinkmann1-4/+4
* agent/gpg-agent.c (get_agent_ssh_socket_name): Use INVALID_HANDLE_VALUE instead of 0. (handle_signal) [!HAVE_W32_SYSTEM]: Don't define. (handle_connections): Port Windows code to NPTH. * dirmngr/dirmngr.c (handle_connections): Port Windows code to NPTH. * g13/g13.c (handle_connections): Port Windows code to NPTH. * scd/scdaemon.c (handle_connections): Port Windows code to NPTH.
2012-01-25Port to npth.Marcus Brinkmann1-146/+67
* 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-03Fix last change: Only set gcrypt thread callback for older versions.Marcus Brinkmann1-2/+2
* dirmngr/dirmngr.c, g13/g13.c: Rename FIX_GCRY_PTH_INIT to USE_GCRY_THREAD_CBS.
2012-01-03Terminate csh commands with a semicolon also for dirmngr.Werner Koch1-1/+1
* dirmngr/dirmngr.c (main): Terminate csh style output with a semicolon.
2012-01-02Only set gcrypt thread callback for older version of gcrypt.Marcus Brinkmann1-0/+8
* agent/gpg-agent.c, dirmngr/dirmngr.c, g13/g13.c, scd/scdaemon.c (USE_GCRY_THREAD_CBS): New macro, defined if GCRY_THREAD_OPTION_VERSION is 0. (fixed_gcry_pth_init) [!USE_GCRY_THREAD_CBS]: Don't define. (main) [!USE_GCRY_THREAD_CBS]: Do not install thread callbacks.
2011-01-25Fix setting of default homedir for WinceWerner Koch1-1/+1
Accidentally used == for assignment. Not a problem in our test environment because we use /gnupg as home directory anyway.
2011-01-25Make dirmngr more battery friendly.Werner Koch1-112/+181
Similar to gpg-agent, dirmngr's wait timeouts are now synced to the full second. Increased ldap helper thread timeout to 2 seconds. Nuked some white spaces.
2011-01-19Use estream for dirmngr's --gpgconf-list.Werner Koch1-29/+29
Change insalled name of gpg2 for Wince.
2010-12-14Change --dameon home directory to /gnupg under WinceWerner Koch1-0/+4
2010-12-09Change dirmngr timer under W32CE.Werner Koch1-4/+8
Fix trustdb open problem under W32CE.
2010-10-21Fix last commitWerner Koch1-0/+2
2010-10-21Translate dirmngr stringsWerner Koch1-5/+6
2010-08-16Auto-start dirmngr.Werner Koch1-2/+6
2010-08-12Fix dirmngr problems on CE.Werner Koch1-7/+16
Add new dirmngr commands. Minor other fixes.
2010-08-06More work on the dirmngr. It now builds for W32 and W32CE and quickWerner Koch1-3/+9
tests show that it works on W32.
2010-07-23Some work on the dirmngrWerner Koch1-31/+6
2010-07-16Some work on porting dirmngr (unfinished)Werner Koch1-38/+57
Ported gpgtar to W32.
2010-06-09Merged Dirmngr with GnuPG.Werner Koch1-0/+1829
A few code changes to support dirmngr.