- Home /
Question by
kkirkfield · Aug 03, 2015 at 05:23 PM ·
bugsecuritysslrest
Included mozroots.exe crashing in Unity
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>
Comment
Best Answer
Answer by kkirkfield · Aug 03, 2015 at 11:49 PM
I downloaded the latest version of Mono and replaced the mozroots.exe in Unity with version 4.0.2.0 and this fixed this problem. It now imports the certs, but now I'm having other problems, so I'll just post a new question for that.