Tuesday, September 9, 2014

Mono Trusted Root Certificates missing

Tuesday, September 09, 2014 Posted by Andre Broers
When you receive the following exception in mono it means mono wants to make a secure SSL connection but the certificate it gets is not trusted. Most of the time this means the root certificates are not installed in the mono environment.

System.Net.WebException: Error: SendFailure (Error writing headers) ---> System.Net.WebException: Error writing headers ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server. Error code: 0xffffffff800b010a

Use the following command to import the current root certificates. (I find it useful to do this only for the current user so that is what the command imports)

 $ mozroots --import --ask-remove