- Home /
How can I add a certificate to the Mono Trust store?
What I want to do:
I am trying to add a certificate to Unity to enable SSL connection. I preferably only want to approve one root certificate (GoDaddy G2 root certificate downloaded from https://certs.godaddy.com/repository).
Background
This page on Mono Security states that I can use certmgr.exe to add certificates to the mono trust store - http://www.mono-project.com/docs/faq/security/.
There seems to be no certmgr.exe within the mono/2.0 folder packaged with Unity (Unity\Editor\Data\Mono\lib\mono\2.0). Even though the .exe has been in mono since 1.1. The .exe does exist within the MonoBleedingEdge/4.5 folder however I believe there are different Trust stores for each folder so I believe I cannot use this.
Question
Am I able to use another tool / method to add the root certificate to the trust store? Or am I missing the location of the certmgr.exe in the 2.0 mono package?
Additional Notes
In case it makes a difference, I am trying to connect to a Learning Record Store through the Tincan API (new version of SCORM).
I have also posted this question to the Unity Forums: http://forum.unity3d.com/threads/how-can-i-add-a-certificate-to-the-mono-trust-store.374330/
Answer by mostafaberg · Feb 18, 2016 at 01:58 PM
I used mozroots to import the root certs, here's how i invoked it:
mono mozroots.exe --import --sync
and that's the output of the command:
mono 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 licensed.
Downloading from 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1'...
Importing certificates into user store...
102 new root certificates were added to your trust store.
Import process completed.
Please note that you can also run this on your player by calling something like this:
System.Diagnostics.Process.Start("mozroots","--import");
I haven't tested that though..
Also i found mozroots.exe
on OS X in this directory:
/Applications/Unity/Unity.app/Contents/Frameworks/MonoBleedingEdge/lib/mono/4.5/mozroots.exe
hope that helps !
I was able to do this on Windows 10 with no problems, however my Android builds still throw errors regarding lack of CA root certificates - is there a way to package these certificates in a cross-platform build, or a way to access the certificates already on the Android device?
How were you able to use mozroots on Windows 10? When I try to launch it from cmd I always get System.$$anonymous$$issing$$anonymous$$ethodException; $$anonymous$$ethod not found: Array.Reverse
Your answer
Follow this Question
Related Questions
Facebook for Android SSL Problem 0 Answers
Is it possible to do ssl certificate pinning in Unity iOS 1 Answer
Unity use of HTTPS 0 Answers
How to validate SSL certificates when using HttpWebRequest 2 Answers