aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2016-09-09 21:05:53 +0800
committermarino <marino@FreeBSD.org>2016-09-09 21:05:53 +0800
commit0eea415d13330c81e5ccfa87bcc32097fb1f20f3 (patch)
tree0059cb12a6c4f8c941393aaeb72ccedac9a93f80 /net
parent2af93a3ffa73824e68a0407cd5b2a2bbfc43c1d6 (diff)
downloadfreebsd-ports-gnome-0eea415d13330c81e5ccfa87bcc32097fb1f20f3.tar.gz
freebsd-ports-gnome-0eea415d13330c81e5ccfa87bcc32097fb1f20f3.tar.zst
freebsd-ports-gnome-0eea415d13330c81e5ccfa87bcc32097fb1f20f3.zip
net/Sockets: USES+=ssl, Fix SSLv3, set CFLAGS, honor LDFLAGS
Approved by: SSL blanket
Diffstat (limited to 'net')
-rw-r--r--net/Sockets/Makefile5
-rw-r--r--net/Sockets/files/Makefile.Defines.freebsd3
-rw-r--r--net/Sockets/files/patch-TcpSocket.cpp20
3 files changed, 25 insertions, 3 deletions
diff --git a/net/Sockets/Makefile b/net/Sockets/Makefile
index 244f2ae4a236..7a417acc4897 100644
--- a/net/Sockets/Makefile
+++ b/net/Sockets/Makefile
@@ -18,10 +18,11 @@ COMMENT= C++ wrapper for BSD-style sockets
#CFLAGS+= -I${LOCALBASE}/include
#LDFLAGS+= -L${LOCALBASE}/lib
-USES+= gmake
+USES+= gmake ssl
USE_GNOME= libxml2
-USE_OPENSSL= yes
USE_LDCONFIG= yes
+CFLAGS+= -I${OPENSSLINC}
+LDFLAGS+= -L${OPENSSLLIB}
ALL_TARGET= all shared
INSTALL_TARGET= install_shared
diff --git a/net/Sockets/files/Makefile.Defines.freebsd b/net/Sockets/files/Makefile.Defines.freebsd
index 9d69e80c463a..107c4777b8c9 100644
--- a/net/Sockets/files/Makefile.Defines.freebsd
+++ b/net/Sockets/files/Makefile.Defines.freebsd
@@ -9,6 +9,7 @@ CFLAGS += -fPIC
OBJS += Semaphore.o
-LDFLAGSSO = -shared \
+LDFLAGSSO = $(LDFLAGS) \
+ -shared \
-Wl,-lssl \
-Wl,-h$(SONAME)
diff --git a/net/Sockets/files/patch-TcpSocket.cpp b/net/Sockets/files/patch-TcpSocket.cpp
new file mode 100644
index 000000000000..26afc4f00c0c
--- /dev/null
+++ b/net/Sockets/files/patch-TcpSocket.cpp
@@ -0,0 +1,20 @@
+--- TcpSocket.cpp.orig 2012-09-08 06:47:13 UTC
++++ TcpSocket.cpp
+@@ -1283,7 +1283,7 @@ void TcpSocket::InitializeContext(const
+ /* Create our context*/
+ if (m_client_contexts.find(context) == m_client_contexts.end())
+ {
+- const SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method();
++ const SSL_METHOD *meth = meth_in ? meth_in : SSLv23_method();
+ m_ssl_ctx = m_client_contexts[context] = SSL_CTX_new(const_cast<SSL_METHOD *>(meth));
+ SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY|SSL_MODE_ENABLE_PARTIAL_WRITE);
+ }
+@@ -1339,7 +1339,7 @@ void TcpSocket::InitializeContext(const
+ /* Create our context*/
+ if (m_server_contexts.find(context) == m_server_contexts.end())
+ {
+- const SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method();
++ const SSL_METHOD *meth = meth_in ? meth_in : SSLv23_method();
+ m_ssl_ctx = m_server_contexts[context] = SSL_CTX_new(const_cast<SSL_METHOD *>(meth));
+ SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY|SSL_MODE_ENABLE_PARTIAL_WRITE);
+ // session id