是否可以使用自定义的FiddlerCore根CA来拦截HTTPS流量。
我需要的是分配一个证书,用来签署所有主机证书。
另一种解决方案可以是在创建根证书之前向FiddlerCore提供证书信息。
发布于 2010-09-27 05:14:31
FiddlerCore目前不提供自定义其自签名根目录中包含的信息的功能。它将生成链接到名为DO_NOT_TRUST_FiddlerRoot的根的所有终端实体证书。
你能详细解释一下你为什么要寻求这种能力吗?
发布于 2011-04-05 05:40:22
FiddlerApplication.Startup(9999, FiddlerCoreStartupFlags.DecryptSSL);
var path = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location) + @"\sslcertificate.pfx";
var secureEndpoint = FiddlerApplication.CreateProxyEndpoint(443, true, new X509Certificate2(path, "password"));您可以使用Visual Studio工具创建您自己的证书,但是,我使用这个免费程序创建了一个测试证书,因为我懒惰:http://www.xenossoftware.com/freetools/certificategenerator/
如果证书安装在机器上,我相信您也可以使用X509Store类来做同样的事情。
下面是执行此操作的一些代码(未经过测试):
FiddlerApplication.Startup(9999, FiddlerCoreStartupFlags.DecryptSSL);
var store = new X509Store(StoreName.Root, StoreLocation.LocalMachine);
try
{
store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);
var x509Certificate2 = store.Certificates.Find(X509FindType.FindBySubjectName, "YourSSLCertificateName", true)[0];
secureEndpoint = FiddlerApplication.CreateProxyEndpoint(443, true, x509Certificate2);
}
finally
{
store.Close();
}发布于 2012-05-23 08:21:27
您可以使用FiddlerApplication的oDefaultClientCertificate属性指定现有证书。我使用FiddlerCoreAPI在我的窗口服务应用程序上使用它来捕获HTTPS流量。
var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
path = path.Replace("file:\\", "");
if (!path.EndsWith(@"\")) path += @"\";
path += "FiddlerRoot.cer";
FiddlerApplication.AfterSessionComplete += FiddlerApplication_AfterSessionComplete;
FiddlerApplication.oDefaultClientCertificate = new X509Certificate(path);
FiddlerApplication.Startup(8888, FiddlerCoreStartupFlags.DecryptSSL);https://stackoverflow.com/questions/3759883
复制相似问题