コード例 #1
0
        public static string GetStorePath(MonoBtlsX509StoreType type)
        {
#if MONODROID
            throw new NotSupportedException();
#else
            Initialize();
            switch (type)
            {
            case MonoBtlsX509StoreType.MachineTrustedRoots:
                return(machineTrustedRootPath);

            case MonoBtlsX509StoreType.MachineIntermediateCA:
                return(machineIntermediateCAPath);

            case MonoBtlsX509StoreType.MachineUntrusted:
                return(machineUntrustedPath);

            case MonoBtlsX509StoreType.UserTrustedRoots:
                return(userTrustedRootPath);

            case MonoBtlsX509StoreType.UserIntermediateCA:
                return(userIntermediateCAPath);

            case MonoBtlsX509StoreType.UserUntrusted:
                return(userUntrustedPath);

            default:
                throw new NotSupportedException();
            }
#endif
        }
コード例 #2
0
        public static bool HasStore(MonoBtlsX509StoreType type)
        {
#if MONODROID
            return(false);
#else
            var path = GetStorePath(type);
            return(path != null && Directory.Exists(path));
#endif
        }
コード例 #3
0
		public static bool HasStore (MonoBtlsX509StoreType type)
		{
#if ANDROID
			return false;
#else
			var path = GetStorePath (type);
			return path != null && Directory.Exists (path);
#endif
		}
コード例 #4
0
		public static string GetStorePath (MonoBtlsX509StoreType type)
		{
#if ANDROID
			throw new NotSupportedException ();
#else
			Initialize ();
			switch (type) {
			case MonoBtlsX509StoreType.MachineTrustedRoots:
				return machineTrustedRootPath;
			case MonoBtlsX509StoreType.MachineIntermediateCA:
				return machineIntermediateCAPath;
			case MonoBtlsX509StoreType.MachineUntrusted:
				return machineUntrustedPath;
			case MonoBtlsX509StoreType.UserTrustedRoots:
				return userTrustedRootPath;
			case MonoBtlsX509StoreType.UserIntermediateCA:
				return userIntermediateCAPath;
			case MonoBtlsX509StoreType.UserUntrusted:
				return userUntrustedPath;
			default:
				throw new NotSupportedException ();
			}
#endif
		}