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.
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
apt-get -y update && \
apt-get -y install \
wget http://download.mono-project.com/sources/mono/mono-184.108.40.206.tar.bz2 -O mono-220.127.116.11.tar.bz2
tar xvf mono-18.104.22.168.tar.bz2
Mono JIT compiler version 4.2.1 -> 22.214.171.124
You can find the other stable versions out there on the same page also.
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.