GetCertificatesAndNamesFromStore() public static method

Helper method: Get array of certificate references and the according names from the passed certificate store.
public static GetCertificatesAndNamesFromStore ( ArrayList &certificateNames, X509Store store ) : ArrayList
certificateNames System.Collections.ArrayList
store System.Security.Cryptography.X509Certificates.X509Store
return System.Collections.ArrayList
Beispiel #1
0
        public static ArrayList GetCertificatesAndNames(ref ArrayList certificateNames)
        {
            ArrayList arrayList          = new ArrayList();
            X509Store store1             = new X509Store(StoreLocation.CurrentUser);
            ArrayList andNamesFromStore1 = SEBProtectionController.GetCertificatesAndNamesFromStore(ref certificateNames, store1);
            ArrayList certificateNames1  = new ArrayList();
            X509Store store2             = new X509Store(StoreLocation.LocalMachine);
            ArrayList andNamesFromStore2 = SEBProtectionController.GetCertificatesAndNamesFromStore(ref certificateNames1, store2);

            andNamesFromStore1.AddRange((ICollection)andNamesFromStore2);
            certificateNames.AddRange((ICollection)certificateNames1);
            return(andNamesFromStore1);
        }