I've been using FiddlerCore on Windows for some time now and it's been great. However some of my users have recently started to report
issues where the proxy fails to connect to anything. I've checked the logs and every time this user happens is because of BCCertMaker.
This is what's shown in the log:
Fiddler.BCCertMaker> Failed to create certificate for localhost: Key not valid for use in specified state. at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle) at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair() at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize) at BCCertMaker.BCCertMaker.ConvertBCPrivateKeyToDotNet(RsaPrivateCrtKeyParameters bcPVK, String sKeyName) at BCCertMaker.BCCertMaker.CreateCertificateFromCA(String sCN, X509Certificate caCert, AsymmetricKeyParameter caKey) at BCCertMaker.BCCertMaker.MakeNewCert(String sHostname)
I've done research on this error and it's not clear what it's cause is but I've found that it can be solved by deleting
the "Crypto" folder in %AppData%\Microsoft\. This is clearly not ideal and would appreciate if someone had an idea on how to work
around this issue in the future.