Intro
sudo apt-get install mono-complete
does in fact install mono in most cases as expected. But if you only install mono-complete without first adding Mono Project GPG signing key and the package repository (and updating the repolist) you are in a great danger to be using the old and obsolete versions of TLS/SSL algorithms among other potentially harmful pieces of code, at least for now.
If you want to use mono more safely you should follow the instructions described in mono-project.com install page or a similar one.
Example:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete
Mono JIT compiler version 4.2.1 -> 4.4.2
Example2
apt-get -y update && \
apt-get -y install \
wget \
tar \
git \
autoconf \
libtool \
automake \
build-essential \
mono-devel \
gettext
wget http://download.mono-project.com/sources/mono/mono-4.6.0.125.tar.bz2 -O mono-4.6.0.125.tar.bz2
tar xvf mono-4.6.0.125.tar.bz2
cd "mono-4.6.0/"
./configure
make
make install
Mono JIT compiler version 4.2.1 -> 4.6.0.125
You can find the other stable versions out there on the same page also.
Background information
Testing done with the mono .Net implementation using ubuntu 16.04 and 14.04 (with docker).
Install only mono-complete:
- Does not reject connections if server certificate is expired.
Do as instructed in the "Example1" or "Example2" -section
- Reject connections if server certificate is expired.
- More safe
I know this because i used trytls to test mono against badssl and other TLS/SSL testing-backends using C#-Net, F#-Net and VB-Net.