Ejemplo n.º 1
0
 /// <summary>
 /// Constructs a store iterator for the the given certificate location and store.
 /// </summary>
 public StoreCertificateIterator(Win32CertificateLocation certStoreLocation, Win32CertificateStore certStore) : this(RCFProtoPINVOKE.new_StoreCertificateIterator((int)certStoreLocation, (int)certStore), true)
 {
     if (RCFProtoPINVOKE.SWIGPendingException.Pending)
     {
         throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds the certificate to the given Windows certificate store.
 /// </summary>
 public void AddToStore(Win32CertificateLocation certStoreLocation, Win32CertificateStore certStore)
 {
     RCFProtoPINVOKE.PfxCertificate_addToStore(swigCPtr, (int)certStoreLocation, (int)certStore);
     if (RCFProtoPINVOKE.SWIGPendingException.Pending)
     {
         throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Attempts to locate a root certificate for this certificate, in the given certificate store. Returns the root certificate if found, and otherwise null.
        /// </summary>
        public Win32Certificate FindRootCertificate(Win32CertificateLocation certStoreLocation, Win32CertificateStore certStore)
        {
            IntPtr           cPtr = RCFProtoPINVOKE.Win32Certificate_findRootCertificate(swigCPtr, (int)certStoreLocation, (int)certStore);
            Win32Certificate ret  = (cPtr == IntPtr.Zero) ? null : new Win32Certificate(cPtr, true);

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }