GetAccessRules() public static method

public static GetAccessRules ( String filePath ) : IList
filePath String
return IList
Esempio n. 1
0
 /// <summary cref="ICertificateStore.GetAccessRules()" />
 public IList <ApplicationAccessRule> GetAccessRules()
 {
     lock (m_lock)
     {
         return(ApplicationAccessRule.GetAccessRules(m_certificateSubdir.FullName));
     }
 }
Esempio n. 2
0
        /// <summary cref="ICertificateStore.GetAccessRules(string)" />
        public IList <ApplicationAccessRule> GetAccessRules(string thumbprint)
        {
            lock (m_lock) {
                Entry entry = Find(thumbprint);

                if (entry == null)
                {
                    throw new ArgumentException("Certificate does not exist in store.");
                }

                if (entry.PrivateKeyFile == null || !entry.PrivateKeyFile.Exists)
                {
                    throw new ArgumentException("Certificate does not have a private key in the store.");
                }

                return(ApplicationAccessRule.GetAccessRules(entry.PrivateKeyFile.FullName));
            }
        }