diff options
author | John Marino <marino@FreeBSD.org> | 2016-09-30 17:29:08 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2016-09-30 17:29:08 +0000 |
commit | 7d365488544c604c6906755804fa63e78b5ede71 (patch) | |
tree | 86c1e1e725439f6b4da003c7cd9eb3bd9f551025 /net/hostapd | |
parent | ac46fd376597546a3f19403f53eacb9fa5352f7d (diff) |
Notes
Diffstat (limited to 'net/hostapd')
-rw-r--r-- | net/hostapd/Makefile | 3 | ||||
-rw-r--r-- | net/hostapd/files/patch-src_crypto_tls__openssl.c | 65 | ||||
-rw-r--r-- | net/hostapd/files/patch-src_drivers_driver__bsd.c | 14 | ||||
-rw-r--r-- | net/hostapd/files/patch-src_utils_os__unix.c | 2 |
4 files changed, 82 insertions, 2 deletions
diff --git a/net/hostapd/Makefile b/net/hostapd/Makefile index bc447d190187..d7dbf01e2b3e 100644 --- a/net/hostapd/Makefile +++ b/net/hostapd/Makefile @@ -14,7 +14,8 @@ LICENSE= BSD3CLAUSE USES= cpe gmake ssl CPE_VENDOR= w1.f1 BUILD_WRKSRC= ${WRKSRC}/hostapd -CONFIGURE_ARGS= --with-ssl-dir=${OPENSSLBASE} +CFLAGS+= -I${OPENSSLINC} +LDFLAGS+= -L${OPENSSLLIB} PLIST_FILES= sbin/hostapd sbin/hostapd_cli man/man1/hostapd_cli.1.gz \ man/man8/hostapd.8.gz diff --git a/net/hostapd/files/patch-src_crypto_tls__openssl.c b/net/hostapd/files/patch-src_crypto_tls__openssl.c new file mode 100644 index 000000000000..2a6d79f402b2 --- /dev/null +++ b/net/hostapd/files/patch-src_crypto_tls__openssl.c @@ -0,0 +1,65 @@ +--- src/crypto/tls_openssl.c.orig 2015-09-27 19:02:05 UTC ++++ src/crypto/tls_openssl.c +@@ -2229,7 +2229,7 @@ static int tls_parse_pkcs12(struct tls_d + } + + if (certs) { +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) + SSL_clear_chain_certs(ssl); + while ((cert = sk_X509_pop(certs)) != NULL) { + X509_NAME_oneline(X509_get_subject_name(cert), buf, +@@ -2247,7 +2247,7 @@ static int tls_parse_pkcs12(struct tls_d + /* Try to continue anyway */ + } + sk_X509_free(certs); +-#ifndef OPENSSL_IS_BORINGSSL ++#if !defined(OPENSSL_IS_BORINGSSL) && !defined(LIBRESSL_VERSION_NUMBER) + res = SSL_build_cert_chain(ssl, + SSL_BUILD_CHAIN_FLAG_CHECK | + SSL_BUILD_CHAIN_FLAG_IGNORE_ERROR); +@@ -2812,7 +2812,7 @@ int tls_connection_get_random(void *ssl_ + if (conn == NULL || keys == NULL) + return -1; + ssl = conn->ssl; +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + if (ssl == NULL || ssl->s3 == NULL || ssl->session == NULL) + return -1; + +@@ -2841,7 +2841,7 @@ int tls_connection_get_random(void *ssl_ + #ifndef CONFIG_FIPS + static int openssl_get_keyblock_size(SSL *ssl) + { +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + const EVP_CIPHER *c; + const EVP_MD *h; + int md_size; +@@ -2911,7 +2911,7 @@ static int openssl_tls_prf(struct tls_co + "mode"); + return -1; + #else /* CONFIG_FIPS */ +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + SSL *ssl; + u8 *rnd; + int ret = -1; +@@ -3394,7 +3394,7 @@ int tls_connection_set_cipher_list(void + + wpa_printf(MSG_DEBUG, "OpenSSL: cipher suites: %s", buf + 1); + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + #if defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) || defined(EAP_SERVER_FAST) + if (os_strstr(buf, ":ADH-")) { + /* +@@ -3977,7 +3977,7 @@ static int tls_sess_sec_cb(SSL *s, void + struct tls_connection *conn = arg; + int ret; + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + if (conn == NULL || conn->session_ticket_cb == NULL) + return 0; + diff --git a/net/hostapd/files/patch-src_drivers_driver__bsd.c b/net/hostapd/files/patch-src_drivers_driver__bsd.c new file mode 100644 index 000000000000..052fb6748296 --- /dev/null +++ b/net/hostapd/files/patch-src_drivers_driver__bsd.c @@ -0,0 +1,14 @@ +--- src/drivers/driver_bsd.c.orig 2015-09-27 19:02:05 UTC ++++ src/drivers/driver_bsd.c +@@ -623,7 +623,11 @@ rtbuf_len(void) + static int bsd_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr, + int reason_code); + ++#ifdef __DragonFly__ ++const char * ++#else + static const char * ++#endif + ether_sprintf(const u8 *addr) + { + static char buf[sizeof(MACSTR)]; diff --git a/net/hostapd/files/patch-src_utils_os__unix.c b/net/hostapd/files/patch-src_utils_os__unix.c index 3d6fb5f543dc..c56eee136a44 100644 --- a/net/hostapd/files/patch-src_utils_os__unix.c +++ b/net/hostapd/files/patch-src_utils_os__unix.c @@ -4,7 +4,7 @@ } -+#ifndef __FreeBSD__ ++#if !defined __FreeBSD__ && !defined __DragonFly__ int os_fdatasync(FILE *stream) { if (!fflush(stream)) { |