SafeCTLHandleContext provides a SafeHandle class for an X509CertificateTrustList context. 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 CTL_CONTEXT.
A SafeCTLHandleContext for an X509CTL can be obtained by calling the GetSafeContext(X509CertificateTrustList) extension method.
public sealed class SafeCTLHandleContext : SafeHandleZeroOrMinusOneIsInvalid
Public NotInheritable Class SafeCTLHandleContext
Inherits SafeHandleZeroOrMinusOneIsInvalid
public ref class SafeCTLHandleContext sealed : public SafeHandleZeroOrMinusOneIsInvalid
[<SealedAttribute>]
type SafeCTLHandleContext =
class
inherit SafeHandleZeroOrMinusOneIsInvalid
end
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. |