Пример #1
0
 /// <summary>
 ///     Gets a <see cref="SafeCTLHandleContext" /> 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>Safe handle to a current CTL instance.</returns>
 /// <permission cref="SecurityPermission">
 ///     The immediate caller must have SecurityPermission/UnmanagedCode to use this method
 /// </permission>
 public SafeCTLHandleContext GetSafeContext()
 {
     if (ctx == null || ctx.IsInvalid || ctx.IsClosed)
     {
         ctx = Crypt32.CertCreateCTLContext(65537, RawData, (UInt32)RawData.Length);
         GC.KeepAlive(this);
         return(ctx);
     }
     return(ctx);
 }
Пример #2
0
 internal static extern SafeCTLHandleContext CertDuplicateCTLContext(
     [In] SafeCTLHandleContext pCtlContext
     );