You are here

Mono 4.8.1 with TLS 1.2 on FreeBSD

Ivan Radovanovic's picture

TLS 1.2 is not enabled in default version of Mono 4.8.1 port for FreeBSD.

To enable it several changes are needed:

Index: Makefile
===================================================================
--- Makefile (revision 445025)
+++ Makefile (working copy)
@@ -45,7 +45,8 @@
mono:ikdasm:e4deabf:8/external/ikdasm \
mono:ikvm-fork:367864e:9/external/ikvm \
mono:reference-assemblies:6c77197:10/external/binary-reference-assemblies \
- mono:rx:b29a4b0:11/external/rx
+ mono:rx:b29a4b0:11/external/rx \
+ mono:boringssl:c06ac6b:12/external/boringssl

USES= autoreconf bison compiler:c11 cpe gettext gmake iconv libtool pathfix \
perl5 python shebangfix tar:bzip2
@@ -55,7 +56,7 @@
USE_LDCONFIG= yes
SHEBANG_FILES= scripts/mono-heapviz

-CONFIGURE_ARGS= --disable-dtrace
+CONFIGURE_ARGS= --disable-dtrace --enable-btls
CONFIGURE_ENV= ac_cv_header_sys_inotify_h=no

MAKE_ENV= MONO_SHARED_DIR="${WRKDIR}" \
Index: distinfo
===================================================================
--- distinfo (revision 445025)
+++ distinfo (working copy)
@@ -33,3 +33,5 @@
SIZE (dotnet-coreclr-c7da48a_GH0.tar.gz) = 31762122
SHA256 (dotnet-roslyn-322bd5b_GH0.tar.gz) = 9740a0922f2fafa0251f462e7f27cfd6891dc078c22b008c49e11db6637edeea
SIZE (dotnet-roslyn-322bd5b_GH0.tar.gz) = 22058493
+SHA256 (mono-boringssl-c06ac6b_GH0.tar.gz) = c3b867537afa5a388c7ed43a0b358ec731093cb9c499e1af58bc4b5390287dee
+SIZE (mono-boringssl-c06ac6b_GH0.tar.gz) = 4121971
Index: files/patch-configure.ac
===================================================================
--- files/patch-configure.ac (revision 445025)
+++ files/patch-configure.ac (working copy)
@@ -17,3 +17,21 @@
PLATFORM_AOT_SUFFIX=.so
fi

+@@ -3002,6 +3003,8 @@
+ BTLS_PLATFORM=i386
+ ;;
+ openbsd*|freebsd*|kfreebsd-gnu*)
++ BTLS_SUPPORTED=yes
++ BTLS_PLATFORM=i386
+ ;;
+ esac
+ ;;
+@@ -3025,6 +3028,8 @@
+ BTLS_PLATFORM=x86_64
+ ;;
+ openbsd*|freebsd*|kfreebsd-gnu*)
++ BTLS_SUPPORTED=yes
++ BTLS_PLATFORM=x86_64
+ ;;
+ mingw*)
+ ;;

Version of port with these changes applied is attached