Beispiel #1
0
 /// <summary>
 ///     Gets a <see cref="SafeCRLHandleContext" /> for the X509 certificate revocation list. The caller of this
 ///     method owns the returned safe handle, and should dispose of it when they no longer need it.
 ///     This handle can be used independently of the lifetime of the original X509 certificate revocation list.
 /// </summary>
 /// <returns>Handle to a <strong>CRL_CONTEXT</strong> structure.</returns>
 /// <permission cref="SecurityPermission">
 ///     The immediate caller must have SecurityPermission/UnmanagedCode to use this method
 /// </permission>
 /// <exception cref="UninitializedObjectException">An object is not initialized.</exception>
 public void GetSafeContext()
 {
     if (Handle.IsInvalid || Handle.IsClosed)
     {
         Handle = Handle = Crypt32.CertCreateCRLContext(65537, RawData, (UInt32)RawData.Length);
         GC.KeepAlive(this);
     }
 }