예제 #1
0
        public static bool rootCertIsTrusted()
        {
            CertMaker.EnsureReady();
            bool flag;
            bool flag2;

            return(CertMaker.oCertProvider.rootCertIsTrusted(out flag, out flag2));
        }
예제 #2
0
        public static bool rootCertIsMachineTrusted()
        {
            CertMaker.EnsureReady();
            bool flag;
            bool result;

            CertMaker.oCertProvider.rootCertIsTrusted(out flag, out result);
            return(result);
        }
예제 #3
0
 public static bool removeFiddlerGeneratedCerts(bool bRemoveRoot)
 {
     CertMaker.EnsureReady();
     if (CertMaker.oCertProvider is ICertificateProvider2)
     {
         return((CertMaker.oCertProvider as ICertificateProvider2).ClearCertificateCache(bRemoveRoot));
     }
     return(CertMaker.oCertProvider.ClearCertificateCache());
 }
예제 #4
0
        public static bool StoreCert(string sHost, X509Certificate2 oCert)
        {
            CertMaker.EnsureReady();
            ICertificateProvider3 certificateProvider = CertMaker.oCertProvider as ICertificateProvider3;

            if (certificateProvider == null)
            {
                return(false);
            }
            if (!oCert.HasPrivateKey)
            {
                throw new ArgumentException("The provided certificate MUST have a private key.", "oCert");
            }
            return(certificateProvider.CacheCertificateForHost(sHost, oCert));
        }
예제 #5
0
        public static void DoDispose()
        {
            if (FiddlerApplication.isClosing && CertMaker.oCertProvider == null)
            {
                return;
            }
            CertMaker.EnsureReady();
            if (FiddlerApplication.Prefs.GetBoolPref("fiddler.CertMaker.CleanupServerCertsOnExit", false))
            {
                CertMaker.removeFiddlerGeneratedCerts(false);
            }
            IDisposable disposable = CertMaker.oCertProvider as IDisposable;

            if (disposable != null)
            {
                disposable.Dispose();
            }
            CertMaker.oCertProvider = null;
        }
예제 #6
0
 public static bool trustRootCert()
 {
     CertMaker.EnsureReady();
     return(CertMaker.oCertProvider.TrustRootCertificate());
 }
예제 #7
0
 public static bool createRootCert()
 {
     CertMaker.EnsureReady();
     return(CertMaker.oCertProvider.CreateRootCertificate());
 }
예제 #8
0
 public static X509Certificate2 FindCert(string sHostname)
 {
     CertMaker.EnsureReady();
     return(CertMaker.oCertProvider.GetCertificateForHost(sHostname));
 }
예제 #9
0
 public static X509Certificate2 GetRootCertificate()
 {
     CertMaker.EnsureReady();
     return(CertMaker.oCertProvider.GetRootCertificate());
 }