I’m trying to set up my game to communicate with a REST API on a web server. The only way so far that I’ve found to use SSL is through HttpWebRequest/Response. Mono by default doesn’t trust any CAs, so I have to run mozroots.exe to import CAs to validate SSL certs. Here is the command line I’m using and the error. Does anyone know a fix for this bug, any way around this, or another way to use HTTPS in Unity.
C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.5>mozroots.exe --
import --sync
Mozilla Roots Importer - version 3.4.0.0
Download and import trusted root certificates from Mozilla's MXR.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD license
d.
Downloading from 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/
builtins/certdata.txt?raw=1'...
Importing certificates into user store...
Error: System.NullReferenceException: Object reference not set to an instance of
an object.
at Mono.Security.X509.X509Certificate.get_Hash()
at Mono.Security.X509.X509CertificateCollection.IndexOf(X509Certificate value
)
at Mono.Tools.MozRoots.Process()
at Mono.Tools.MozRoots.Main(String[] args)
C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.5>