Click or drag to resize

SafeCRLHandleContext Class

SafeCRLHandleContext provides a SafeHandle class for an X509CRL2 certificate revocation list context as stored in its Handle property. 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 extension method.

Inheritance Hierarchy
SystemObject
  System.Runtime.ConstrainedExecutionCriticalFinalizerObject
    System.Runtime.InteropServicesSafeHandle
      Microsoft.Win32.SafeHandlesSafeHandleZeroOrMinusOneIsInvalid
        System.Security.Cryptography.X509CertificatesSafeCRLHandleContext

Namespace:  System.Security.Cryptography.X509Certificates
Assembly:  SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.0.0)
Syntax
[HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
public sealed class SafeCRLHandleContext : SafeHandleZeroOrMinusOneIsInvalid

The SafeCRLHandleContext type exposes the following members.

Constructors
  NameDescription
Public methodSafeCRLHandleContext
Initializes a new instance of the CriticalFinalizerObject class.
Top
Properties
  NameDescription
Public propertyIsClosed
Gets a value indicating whether the handle is closed.
(Inherited from SafeHandle.)
Public propertyIsInvalid
Gets a value that indicates whether the handle is invalid.
(Inherited from SafeHandleZeroOrMinusOneIsInvalid.)
Top
Methods
  NameDescription
Public methodClose
Marks the handle for releasing and freeing resources.
(Inherited from SafeHandle.)
Public methodDangerousAddRef
Manually increments the reference counter on SafeHandle instances.
(Inherited from SafeHandle.)
Public methodDangerousGetHandle
Returns the value of the handle field.
(Inherited from SafeHandle.)
Public methodDangerousRelease
Manually decrements the reference counter on a SafeHandle instance.
(Inherited from SafeHandle.)
Public methodDispose
Releases all resources used by the SafeHandle class.
(Inherited from SafeHandle.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetHandleAsInvalid
Marks a handle as no longer used.
(Inherited from SafeHandle.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
.NET Framework Security
PermissionDescription
System.Security.PermissionsSecurityPermission The immediate caller must have SecurityPermission/UnmanagedCode to use this type.
See Also