Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

How do I properly initialize X509Store on iOS and Android?

$
0
0
I am using SslStream in Unity to communicate with our backend network services. I have been trying to properly validate the X509 certificates, and have found that it is necessary to add the CA's public certificate as well as intermediate certificates to the X509Store in order for validation to succeed. This works on the editor, however when I try the same method on iOS or Android, I get an error creating a path when calling X509Store.Add(). Here is the exception I get on Android: > 11-17 04:54:37.922 9510 9537 I Unity> : UnauthorizedAccessException: Access> to the path "/.config" is denied.> 11-17 04:54:37.922 9510 9537 I Unity> : at> System.IO.Directory.CreateDirectoriesInternal> (System.String path) [0x00000] in> :0 11-17> 04:54:37.922 9510 9537 I Unity :> at> System.IO.Directory.CreateDirectoriesInternal> (System.String path) [0x00000] in> :0 11-17> 04:54:37.922 9510 9537 I Unity :> at> System.IO.Directory.CreateDirectoriesInternal> (System.String path) [0x00000] in> :0 11-17> 04:54:37.922 9510 9537 I Unity :> at> System.IO.Directory.CreateDirectoriesInternal> (System.String path) [0x00000] in> :0 11-17> 04:54:37.922 9510 9537 I Unity :> at> Mono.Security.X509.X509Store.CheckStore> (System.String path, Boolean> throwException) [0x00000] in unknown>:0 11-17 04:54:37.922 9510> 9537 I Unity : at> Mono.Security.X509.X509Store.Import> (Mono.Security.X509.X509Certificate> certificate) [0x00000] in unknown>:0 11-17 04:54:37.922 9510> 9537 I Unity : at> System.Security.Cryptography.X509Certificates.X509Store.Add> (System.Security.Cryptography.X509Certificates.X509Certificate2> certificate) [0x00000] in unknown>:0 11-17 04:54:37.922 9510> 9537 I Unity : at> ServiceClient.InitializeTLS ()> [0x00000] in :0> 11-17 04:54:37.922 9510 9537 I Unity> : at Game.OnBundleInfoAvail The iOS error is similiar, but is trying a different path. Is there some initialization I need to do on iOS/Android in order for the X509Store to function properly?

Viewing all articles
Browse latest Browse all 4709

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>