/*Set isExactMatch to true to delete all certificates which "exactly" match certName. * Set isExactMatch to false to delete all certificates with prefix as certName*/ public static void DeleteCertificateFromStore(string certName, string store, StoreLocation storeLocation, bool isExactMatch) { using (var pin = new PinCollection()) { string profile; if (storeLocation == StoreLocation.CurrentUser) { profile = "U"; } else { profile = "M"; } NativeCommon.DeleteCertificateFromStore( pin.AddBlittable(certName), pin.AddBlittable(store), pin.AddBlittable(profile), NativeTypes.ToBOOLEAN(isExactMatch)); } }