public void Close() { store = null; if (list != null) { list.Clear(); } }
public void Close() { if (store != null) { store.Close(); store = null; } if (list != null) { list.Clear(); } }
static MX.X509Crl CheckCrls(string subject, string ski, MX.X509Store store) { if (store == null) { return(null); } var crls = store.Crls; foreach (MX.X509Crl crl in crls) { if (crl.IssuerName == subject && (ski.Length == 0 || ski == GetAuthorityKeyIdentifier(crl))) { return(crl); } } return(null); // No CRL found }
public void Open(OpenFlags flags) { if (String.IsNullOrEmpty(_name)) { throw new CryptographicException(Locale.GetText("Invalid store name (null or empty).")); } /* keep existing Mono installations (pre 2.0) compatible with new stuff */ string name; switch (_name) { case "Root": name = "Trust"; break; default: name = _name; break; } bool create = ((flags & OpenFlags.OpenExistingOnly) != OpenFlags.OpenExistingOnly); store = Factory.Open(name, create); if (store == null) { throw new CryptographicException(Locale.GetText("Store {0} doesn't exists.", _name)); } _flags = flags; foreach (MX.X509Certificate x in store.Certificates) { var cert2 = new X509Certificate2(x.RawData); cert2.PrivateKey = x.RSA; Certificates.Add(cert2); } }
public void Open (OpenFlags flags) { if (String.IsNullOrEmpty (_name)) throw new CryptographicException (Locale.GetText ("Invalid store name (null or empty).")); /* keep existing Mono installations (pre 2.0) compatible with new stuff */ string name; switch (_name) { case "Root": name = "Trust"; break; default: name = _name; break; } bool create = ((flags & OpenFlags.OpenExistingOnly) != OpenFlags.OpenExistingOnly); store = Factory.Open (name, create); if (store == null) throw new CryptographicException (Locale.GetText ("Store {0} doesn't exists.", _name)); _flags = flags; foreach (MX.X509Certificate x in store.Certificates) { var cert2 = new X509Certificate2 (x.RawData); cert2.PrivateKey = x.RSA; Certificates.Add (cert2); } }
public void Close () { store = null; if (list != null) list.Clear (); }