Issue 1447: Pass proper Host header and SNI when SRV is used with curl.
authorDavid Shaw <dshaw@jabberwocky.com>
Wed, 19 Dec 2012 18:54:27 +0000 (13:54 -0500)
committerDavid Shaw <dshaw@jabberwocky.com>
Wed, 19 Dec 2012 18:54:27 +0000 (13:54 -0500)
commit5c557a51cdf37d9f50b3d5d7e11d17e6ea6bb2b8
tree12258acf305ce1ef76f3187b358ffa6536b2300d
parent6c3a76cca064070d0a9e636fedc824415e710451
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.

Backported from 6b1f71055ebab36989e2089cfde319d2ba40ada7

* keyserver/gpgkeys_hkp.c (main): Only default try-dns-srv to on if we
  have SRV support in the first place.

Backported from 732f3d1d4786239db5f31f82cc04ec79326cc13c
configure.ac
keyserver/gpgkeys_hkp.c
m4/libcurl.m4