aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/http.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* dirmngr: Do not use MAXDNAME.Werner Koch2015-10-221-7/+17
| | | | | | | | | | | | | | | | | | | * dirmngr/dns-stuff.c (getsrv): Replace MAXDNAME. * dirmngr/dns-stuff.h (MAXDNAME): Remove. (struct srventry): Use a fixed value instead of MAXDNAME. * dirmngr/http.c (connect_server): Use DIMof instead of MAXDNAME. Malloc a helper array. -- Depending on the order of included headers it might be that we allocate the array with a different size than what we test against in another module. To make it more robust we use the actual known size of checking. A better would be to use a linked list and avoid these large arrays. Signed-off-by: Werner Koch <[email protected]>
* Move SRV RR code from common/ to dirmngr/.Werner Koch2015-10-221-17/+0
| | | | | | | | | | | | * common/srv.c: Merge into dirmngr/dns-stuff.c. Delete file. * common/srv.h: Merge into dirmngr/dns-stuff.h. Delete file. * common/Makefile.am (common_sources): Remove srv.c and srv.h. * g10/keyserver.c: Do not include srv.h. The code using it is anyway disabled. * dirmngr/http.c: Remove header srv.h and stubs. * dirmngr/t-dns-stuff.c: Add option --srv. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Use the new DNS wrapper for the HTTP module.Werner Koch2015-10-211-78/+18
| | | | | | | | | * dirmngr/t-http.c (main): Init assuan sockets. * dirmngr/http.c: Include dns-stuff.h. (connect_server)[!HAVE_GETADDRINFO]: Remove all code. (connect_server): Change to use resolve_dns_name. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Allow use of http.c if USE_NPTH is not defined.Werner Koch2015-10-211-8/+14
| | | | | | | | | | | | | | | * dirmngr/http.c (send_request): Always set the gnutls pull/push functions. (my_npth_read): Rename to ... (my_gnutls_read) .. this. Use system read if !USE_NPTH. (my_npth_write): Rename to ... (my_gnutls_write) .. this. Use system write if !USE_NPTH. -- This is necessary to run t-http because we once switched to a ref counted object with the socket descriptor. Signed-off-by: Werner Koch <[email protected]>
* Change capitalization of TOR to Tor.Werner Koch2015-10-211-2/+2
| | | | --
* dirmngr: Allow building with libassuan < 2.3.Neal H. Walfield2015-10-211-0/+2
| | | | | | | | | * dirmngr/http.c (send_request): Use newer assuan function only if available. -- Signed-off-by: Neal H. Walfield <[email protected]> Regression-due-to: 4e42ad30
* w32: Allow building again.Werner Koch2015-10-201-1/+1
| | | | | | * dirmngr/http.c (connect_server): Fix called function name. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Allow building with libassuan < 2.3.Werner Koch2015-10-191-0/+2
| | | | | | | | | | * dirmngr/dirmngr.c (set_tor_mode): Use newer assuan function only if available. * dirmngr/http.c (http_raw_connect): Ditto. -- Frankly we should require that but we can also wait for 2.4.0 and switch then.
* dirmngr: Make --use-tor work - still leaks DNS.Werner Koch2015-10-191-4/+14
| | | | | | | | | | | | | * dirmngr/dirmngr.c (set_tor_mode): New. (main, reread_configuration): Call it. * dirmngr/http.c (http_raw_connect, send_request): Check whether TOR mode is enabled if the FORCE_TOR flag is given. -- The patch for http.c is a sanity check because tor mode is anyway global as long as the Assuan socket wrappers are used. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Use Assuan socket wrappers for http.cWerner Koch2015-10-191-55/+73
| | | | | | | | | | | | | | | | * dirmngr/http.c: Include assuan.h. Changed all code taking a socket descriptor from int to assuan_fd_t. (my_unprotect, my_protect): New. (my_connect): Remove. (_my_socket_new, _my_socket_unref): use assuan_sock_close. (connect_server): Use assuan_sock_connect, assuan_sock_new, and assuan_sock_close. * dirmngr/Makefile.am (t_common_ldadd): Add LIBASSUAN_LIBS. -- This change prepares for the use of SOCKS5 with http. Signed-off-by: Werner Koch <[email protected]>
* Move http module from common/ to dirmngr/.Werner Koch2015-10-181-0/+2777
| | | | | | | | | | | | | | | | | | | | | | | | | | | * common/http.c: Move to ../dirmngr/. * common/http.h: Move to ../dirmngr/. * common/t-http.c: Move to ../dirmngr/. * common/tls-ca.pem: Move to ../dirmngr/. * common/Makefile.am: Do not build libcommontls.a libcommontlsnpth.a. Remove http.c related stuff. * po/POTFILES.in: Move http.c to dirmngr/. * dirmngr/Makefile.am (EXTRA_DIST): Add tls-ca.pem. (module_maint_tests): New. (noinst_PROGRAMS): Add module_maint_tests. (dirmngr_SOURCES): Add http.c and http.h. (dirmngr_LDADD): Remove libcommontlsnpth. (t_common_ldadd): Ditto. (t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New. (t_ldap_parse_uri_SOURCES): Add http.c. (t_ldap_parse_uri_CFLAGS): Build without npth. ($(PROGRAMS)): Do not require libcommontls.a libcommontlsnpth.a. * dirmngr/dirmngr.h, dirmngr/ks-engine.h: Fix include of http.h. -- All network access is done via dirmngr and thus http.c should be there. Signed-off-by: Werner Koch <[email protected]>
* Some work on porting dirmngr (unfinished)Werner Koch2010-07-161-1863/+0
| | | | | Ported gpgtar to W32.
* Avoid using the protect-tool to import pkcs#12.Werner Koch2010-06-171-0/+2
|
* Merged Dirmngr with GnuPG.Werner Koch2010-06-091-0/+1861
A few code changes to support dirmngr.