public byte[] Export(X509ContentType contentType, String password) { using (IStorePal storePal = StorePal.LinkFromCertificateCollection(this)) { return(storePal.Export(contentType, password)); } }
public void Close() { IStorePal storePal = _storePal; _storePal = null; if (storePal != null) { storePal.Dispose(); } }
public void Import(byte[] rawData, String password, X509KeyStorageFlags keyStorageFlags) { if (rawData == null) { throw new ArgumentNullException("rawData"); } using (IStorePal storePal = StorePal.FromBlob(rawData, password, keyStorageFlags)) { storePal.CopyTo(this); } }
public void Import(String fileName, String password, X509KeyStorageFlags keyStorageFlags) { if (fileName == null) { throw new ArgumentNullException("fileName"); } using (IStorePal storePal = StorePal.FromFile(fileName, password, keyStorageFlags)) { storePal.CopyTo(this); } }
public X509Certificate2Collection Find(X509FindType findType, Object findValue, bool validOnly) { if (findValue == null) { throw new ArgumentNullException("findValue"); } X509Certificate2Collection collection = new X509Certificate2Collection(); using (IStorePal storePal = StorePal.LinkFromCertificateCollection(this)) { storePal.FindAndCopyTo(findType, findValue, validOnly, collection); } return(collection); }
public void Import(String fileName, String password, X509KeyStorageFlags keyStorageFlags) { if (fileName == null) { throw new ArgumentNullException("fileName"); } using (IStorePal storePal = StorePal.FromFile(fileName, password, keyStorageFlags)) { foreach (X509Certificate2 cert in storePal.Certificates) { Add(cert); } } return; }
public void Import(byte[] rawData, String password, X509KeyStorageFlags keyStorageFlags) { if (rawData == null) { throw new ArgumentNullException("rawData"); } using (IStorePal storePal = StorePal.FromBlob(rawData, password, keyStorageFlags)) { foreach (X509Certificate2 cert in storePal.Certificates) { Add(cert); } } return; }
public virtual byte[] Export(X509ContentType contentType, String password) { if (!(contentType == X509ContentType.Cert || contentType == X509ContentType.SerializedCert || contentType == X509ContentType.Pkcs12)) { throw new CryptographicException(SR.Cryptography_X509_InvalidContentType); } if (Pal == null) { throw new CryptographicException(ErrorCode.E_POINTER); // Not the greatest error, but needed for backward compat. } using (IStorePal storePal = StorePal.FromCertificate(Pal)) { return(storePal.Export(contentType, password)); } }
public void Open(OpenFlags flags) { Close(); _storePal = StorePal.FromSystemStore(Name, Location, flags); }
public X509Store(IntPtr storeHandle) { _storePal = StorePal.FromHandle(storeHandle); Debug.Assert(_storePal != null); }