mirror of
git://git.gnupg.org/gnupg.git
synced 2024-09-21 15:01:41 +02:00
dirmngr: Allow building with libassuan < 2.3.
* 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.
This commit is contained in:
parent
c37621166e
commit
4e42ad300b
@ -470,7 +470,9 @@ set_tor_mode (void)
|
|||||||
{
|
{
|
||||||
if (opt.use_tor)
|
if (opt.use_tor)
|
||||||
{
|
{
|
||||||
|
#if ASSUAN_VERSION_NUMBER >= 0x020300 /* >= 2.3.0 */
|
||||||
if (assuan_sock_set_flag (ASSUAN_INVALID_FD, "tor-mode", 1))
|
if (assuan_sock_set_flag (ASSUAN_INVALID_FD, "tor-mode", 1))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
log_error ("error enabling TOR mode: %s\n", strerror (errno));
|
log_error ("error enabling TOR mode: %s\n", strerror (errno));
|
||||||
log_info ("(is your Libassuan recent enough?)\n");
|
log_info ("(is your Libassuan recent enough?)\n");
|
||||||
|
@ -753,7 +753,9 @@ http_raw_connect (http_t *r_hd, const char *server, unsigned short port,
|
|||||||
{
|
{
|
||||||
int mode;
|
int mode;
|
||||||
|
|
||||||
|
#if ASSUAN_VERSION_NUMBER >= 0x020300 /* >= 2.3.0 */
|
||||||
if (assuan_sock_get_flag (ASSUAN_INVALID_FD, "tor-mode", &mode) || !mode)
|
if (assuan_sock_get_flag (ASSUAN_INVALID_FD, "tor-mode", &mode) || !mode)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
log_error ("TOR support is not available\n");
|
log_error ("TOR support is not available\n");
|
||||||
return gpg_err_make (default_errsource, GPG_ERR_NOT_IMPLEMENTED);
|
return gpg_err_make (default_errsource, GPG_ERR_NOT_IMPLEMENTED);
|
||||||
|
Loading…
Reference in New Issue
Block a user