Issue 1447: Pass proper Host header and SNI when SRV is used with curl.
authorDavid Shaw <dshaw@jabberwocky.com>
Tue, 18 Dec 2012 04:52:15 +0000 (23:52 -0500)
committerDavid Shaw <dshaw@jabberwocky.com>
Tue, 18 Dec 2012 04:52:15 +0000 (23:52 -0500)
commit6b1f71055ebab36989e2089cfde319d2ba40ada7
tree482e4004a130365ddbacacea472986ab2d0a6153
parentcbe98b2cb1e40ba253300e604996681ae191e363
Issue 1447: Pass proper Host header and SNI when SRV is used with curl.

* configure.ac: Check for inet_ntop.

* m4/libcurl.m4: Provide a #define for the version of the curl
  library.

* keyserver/gpgkeys_hkp.c (main, srv_replace): Call getaddrinfo() on
  each target.  Once we find one that resolves to an address (whether
  IPv4 or IPv6), pass it into libcurl via CURLOPT_RESOLVE using the
  SRV name as the "host".  Force the HTTP Host header to be the same.
configure.ac
keyserver/gpgkeys_hkp.c
m4/libcurl.m4