Mono + TLS 1.2 + FreeBSD

Ivan Radovanovic radovanovic at gmail.com
Thu Aug 24 17:29:32 UTC 2017


On 24/08/2017 14:07, Ivan Radovanovic wrote:
> Hi guys,
> 
> Did maybe somebody use it successfully (and if yes, how)?
> 
> I can see that support is added in 4.8.0 but when I tried simple test 
> described at https://stackoverflow.com/a/42757963 all I am getting is 
> exception (I suspect I might be missing some library but not sure which 
> one (security/boringssl doesn't make any difference)).
> 
> Kind regards,
> Ivan

So, in case somebody else needs this - everything works as expected for 
FreeBSD, the reason for not being there is that it wasn't enabled in 
port's Makefile and it wasn't enabled for FreeBSD by mono guys.

Here is list of changes (svn diff) to have port build TLS 1.2 support 
for mono (port version 4.8.1.0):

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*)
+ 			;;


More information about the freebsd-mono mailing list