Beispiel #1
0
        static void SetupDefaultCertificateStore(MonoBtlsX509Store store)
        {
#if MONODROID
            store.SetDefaultPaths();
            store.AddAndroidLookup();
#else
            AddUserStore(store);
            AddMachineStore(store);
#endif
        }
Beispiel #2
0
        internal static void SetupCertificateStore(MonoBtlsX509Store store)
        {
#if MONODROID
            store.SetDefaultPaths();
            store.AddAndroidLookup();
#else
            var userPath = MonoBtlsX509StoreManager.GetStorePath(MonoBtlsX509StoreType.UserTrustedRoots);
            if (Directory.Exists(userPath))
            {
                store.AddDirectoryLookup(userPath, MonoBtlsX509FileType.PEM);
            }
            var machinePath = MonoBtlsX509StoreManager.GetStorePath(MonoBtlsX509StoreType.MachineTrustedRoots);
            if (Directory.Exists(machinePath))
            {
                store.AddDirectoryLookup(machinePath, MonoBtlsX509FileType.PEM);
            }
#endif
        }
		internal static void SetupCertificateStore (MonoBtlsX509Store store)
		{
#if MONODROID
			store.SetDefaultPaths ();
			store.AddAndroidLookup ();
#else
			var userPath = MonoBtlsX509StoreManager.GetStorePath (MonoBtlsX509StoreType.UserTrustedRoots);
			if (Directory.Exists (userPath))
				store.AddDirectoryLookup (userPath, MonoBtlsX509FileType.PEM);
			var machinePath = MonoBtlsX509StoreManager.GetStorePath (MonoBtlsX509StoreType.MachineTrustedRoots);
			if (Directory.Exists (machinePath))
				store.AddDirectoryLookup (machinePath, MonoBtlsX509FileType.PEM);
#endif
		}