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

◆ Remove()

unsafe void Internal.Cryptography.Pal.StorePal.Remove ( ICertificatePal certificate)
inline

Implements Internal.Cryptography.Pal.IStorePal.

Definition at line 66 of file StorePal.cs.

67 {
68 SafeCertContextHandle certContext = ((CertificatePal)certificate).CertContext;
69 SafeCertContextHandle pCertContext = null;
70 CERT_CONTEXT* certContext2 = certContext.CertContext;
71 if (global::Interop.crypt32.CertFindCertificateInStore(_certStore, CertFindType.CERT_FIND_EXISTING, certContext2, ref pCertContext))
72 {
73 CERT_CONTEXT* pCertContext2 = pCertContext.Disconnect();
74 if (!global::Interop.crypt32.CertDeleteCertificateFromStore(pCertContext2))
75 {
76 throw Marshal.GetLastWin32Error().ToCryptographicException();
77 }
78 GC.KeepAlive(certContext);
79 }
80 }
SafeCertStoreHandle _certStore
Definition StorePal.cs:13
static void KeepAlive(object? obj)
Definition GC.cs:180
Definition GC.cs:8

References Internal.Cryptography.Pal.StorePal._certStore, Internal.Cryptography.Pal.Native.SafeCertContextHandle.CertContext, Internal.Cryptography.Pal.Native.SafeCertContextHandle.Disconnect(), System.Runtime.InteropServices.Marshal.GetLastWin32Error(), and System.GC.KeepAlive().