diff options
author | joerg <joerg@pkgsrc.org> | 2014-01-08 20:25:34 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2014-01-08 20:25:34 +0000 |
commit | 602b9deeb12e113e9d47fb409ad0bfc9c2fbf15c (patch) | |
tree | 069f03bd783872116e48d2c7306235105969fbb8 /net/libfetch | |
parent | fe7654afa81f3a3b66f32d7bae36744023368a29 (diff) | |
download | pkgsrc-602b9deeb12e113e9d47fb409ad0bfc9c2fbf15c.tar.gz |
Pass URL to fetch_ssl to fix build and add a cast for some OpenSSL
constloss.
Diffstat (limited to 'net/libfetch')
-rw-r--r-- | net/libfetch/files/common.c | 6 | ||||
-rw-r--r-- | net/libfetch/files/common.h | 4 | ||||
-rw-r--r-- | net/libfetch/files/http.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/net/libfetch/files/common.c b/net/libfetch/files/common.c index 01156f98ff6..4410a183bb5 100644 --- a/net/libfetch/files/common.c +++ b/net/libfetch/files/common.c @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.28 2014/01/07 23:30:03 joerg Exp $ */ +/* $NetBSD: common.c,v 1.29 2014/01/08 20:25:34 joerg Exp $ */ /*- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav * Copyright (c) 2008, 2010 Joerg Sonnenberger <joerg@NetBSD.org> @@ -431,7 +431,7 @@ fetch_cache_put(conn_t *conn, int (*closecb)(conn_t *)) * Enable SSL on a connection. */ int -fetch_ssl(conn_t *conn, int verbose) +fetch_ssl(conn_t *conn, const struct url *URL, int verbose) { #ifdef WITH_SSL @@ -454,7 +454,7 @@ fetch_ssl(conn_t *conn, int verbose) } SSL_set_fd(conn->ssl, conn->sd); #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) - if (!SSL_set_tlsext_host_name(conn->ssl, URL->host)) { + if (!SSL_set_tlsext_host_name(conn->ssl, (char *)(uintptr_t)URL->host)) { fprintf(stderr, "TLS server name indication extension failed for host %s\n", URL->host); diff --git a/net/libfetch/files/common.h b/net/libfetch/files/common.h index d769878b31a..63170907a01 100644 --- a/net/libfetch/files/common.h +++ b/net/libfetch/files/common.h @@ -1,4 +1,4 @@ -/* $NetBSD: common.h,v 1.22 2014/01/07 23:25:12 joerg Exp $ */ +/* $NetBSD: common.h,v 1.23 2014/01/08 20:25:34 joerg Exp $ */ /*- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav * All rights reserved. @@ -105,7 +105,7 @@ conn_t *fetch_cache_get(const struct url *, int); void fetch_cache_put(conn_t *, int (*)(conn_t *)); conn_t *fetch_connect(struct url *, int, int); conn_t *fetch_reopen(int); -int fetch_ssl(conn_t *, int); +int fetch_ssl(conn_t *, const struct url *, int); ssize_t fetch_read(conn_t *, char *, size_t); int fetch_getln(conn_t *); ssize_t fetch_write(conn_t *, const void *, size_t); diff --git a/net/libfetch/files/http.c b/net/libfetch/files/http.c index d3b0fb03ba8..18a24e680b4 100644 --- a/net/libfetch/files/http.c +++ b/net/libfetch/files/http.c @@ -1,4 +1,4 @@ -/* $NetBSD: http.c,v 1.34 2014/01/07 23:25:12 joerg Exp $ */ +/* $NetBSD: http.c,v 1.35 2014/01/08 20:25:34 joerg Exp $ */ /*- * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav * Copyright (c) 2003 Thomas Klausner <wiz@NetBSD.org> @@ -752,7 +752,7 @@ http_connect(struct url *URL, struct url *purl, const char *flags, int *cached) /* fetch_connect() has already set an error code */ return (NULL); if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 && - fetch_ssl(conn, verbose) == -1) { + fetch_ssl(conn, URL, verbose) == -1) { fetch_close(conn); /* grrr */ #ifdef EAUTH |