chaijs / chai-http

HTTP Response assertions for the Chai Assertion Library.
http://chaijs.com/plugins/chai-http
633 stars 113 forks source link

Using chai-http for mutual ssl #266

Open calimero921 opened 4 years ago

calimero921 commented 4 years ago

Could you manage ca, cert and key "field" from superagent to enable the mutual ssl authentication.

In the actual version (4.3.0) these fields are available, but seems not to be realayed to superagent.

eg: superagent .get(url) .ca(cacertbuffer) .cert(clientcertbuffer) .key(clientkeybuffer) .end((error, response) => { ... }) sends the request with certificate to the server

but : chai.request(serverUrl) .get(urlPath) .ca(cacertbuffer) .cert(clientcertbuffer) .key(clientkeybuffer) .end((error, response) => { ... }) only sends the request without any certificate (but is steel valid for Node).

Thanks

Regards.