I use Postman to simulate accessing an API which requires a p12 certificate (with a password) for access.
After setting it up in Postman, I am able to access the API normally.
Now, I have opened Fiddler Classic, and when I try to access this API again, I encounter the following prompt.
The server [***.***.***] requests a client certificate.
Please save a client certificate using the filename:
C:\Users\***\Documents\Fiddler2\ClientCertificate.cer
I followed GPT's advice and added specific code in Fiddler's OnBeforeRequest,
if (oSession.HostnameIs("YOUR_API_HOSTNAME")) {
oSession["https-Client-Certificate"] = "C:\\path\\to\\your\\certificate.pfx:PASSWORD";
}
but I still encountered an error when sending requests in Postman.
Error: read ECONNRESET
How can I resolve this issue?
Seems like GPT had again some hallucination as the Fiddle Classic documentation never mentions that a password protected P12/PFX file can be directly used. The only way seems to be to import the certificate + key into your personal Windows certificate store and then point Fiddler to a .cer file that identifies the certificate to be used:
https://docs.telerik.com/fiddler/configure-fiddler/tasks/respondwithclientcert