SafeCRLHandleContext provides a SafeHandle class for an X509CRL2 certificate revocation list context as stored in its handle. This can be used instead of the raw IntPtr to avoid races with the garbage collector, ensuring that the X509Certificate object is not cleaned up from underneath you while you are still using the handle pointer.
This safe handle type represents a native CRL_CONTEXT.
A SafeCRLHandleContext for an X509CRL2 can be obtained by calling the GetSafeContext(X509CRL2) extension method.
[HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
public sealed class SafeCRLHandleContext : SafeHandleZeroOrMinusOneIsInvalid
<HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort := true)>
Public NotInheritable Class SafeCRLHandleContext
Inherits SafeHandleZeroOrMinusOneIsInvalid
[HostProtectionAttribute(SecurityAction::LinkDemand, MayLeakOnAbort = true)]
public ref class SafeCRLHandleContext sealed : public SafeHandleZeroOrMinusOneIsInvalid
[<SealedAttribute>]
[<HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)>]
type SafeCRLHandleContext =
class
inherit SafeHandleZeroOrMinusOneIsInvalid
end
SafeCRLHandleContext | Initializes a new instance of the SafeCRLHandleContext class |
IsClosed | (Inherited from SafeHandle) |
IsInvalid | (Inherited from SafeHandleZeroOrMinusOneIsInvalid) |
Close | (Inherited from SafeHandle) |
DangerousAddRef | (Inherited from SafeHandle) |
DangerousGetHandle | (Inherited from SafeHandle) |
DangerousRelease | (Inherited from SafeHandle) |
Dispose | (Inherited from SafeHandle) |
Equals | (Inherited from Object) |
GetHashCode | (Inherited from Object) |
GetType | (Inherited from Object) |
SetHandleAsInvalid | (Inherited from SafeHandle) |
ToString | (Inherited from Object) |
SecurityPermission | The immediate caller must have SecurityPermission/UnmanagedCode to use this type. |