Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FromSystemStore()

static IStorePal Internal.Cryptography.Pal.StorePal.FromSystemStore ( string storeName,
StoreLocation storeLocation,
OpenFlags openFlags )
inlinestatic

Definition at line 287 of file StorePal.cs.

288 {
289 CertStoreFlags dwFlags = MapX509StoreFlags(storeLocation, openFlags);
290 SafeCertStoreHandle safeCertStoreHandle = global::Interop.crypt32.CertOpenStore(CertStoreProvider.CERT_STORE_PROV_SYSTEM_W, CertEncodingType.All, IntPtr.Zero, dwFlags, storeName);
291 if (safeCertStoreHandle.IsInvalid)
292 {
293 throw Marshal.GetLastWin32Error().ToCryptographicException();
294 }
295 global::Interop.crypt32.CertControlStore(safeCertStoreHandle, CertControlStoreFlags.None, CertControlStoreType.CERT_STORE_CTRL_AUTO_RESYNC, IntPtr.Zero);
296 return new StorePal(safeCertStoreHandle);
297 }
StorePal(SafeCertStoreHandle certStore)
Definition StorePal.cs:89
static CertStoreFlags MapX509StoreFlags(StoreLocation storeLocation, OpenFlags flags)
Definition StorePal.cs:325
static readonly IntPtr Zero
Definition IntPtr.cs:18

References Internal.Cryptography.Pal.StorePal.StorePal(), System.Runtime.InteropServices.Marshal.GetLastWin32Error(), Internal.Cryptography.Pal.Native.SafePointerHandle< T >.IsInvalid, Internal.Cryptography.Pal.StorePal.MapX509StoreFlags(), and System.IntPtr.Zero.

Referenced by System.Security.Cryptography.X509Certificates.X509Store.Open().