wcf.js icon indicating copy to clipboard operation
wcf.js copied to clipboard

Can we use pfx certificate with password to make a request

Open GauravKhanna58 opened this issue 9 years ago • 1 comments

I've been trying to replicate WCF calls from ASP.NET to Nodejs with some configurations like below:

Web.config < binding name="SamplePortSOAPBinding1" messageEncoding="Mtom" > < security mode="TransportWithMessageCredential" > < message clientCredentialType="Certificate" /> </ security > </ binding >

As basicHttpBinding

C# Code client.ClientCredentials.ClientCertificate.Certificate = new X509Certificate2(pfxFilePath, privateKeyPassword);

I do not find any place where i could put the password.

Can you guide me if it is possible to use password ?

Thanks,

GauravKhanna58 avatar Sep 15 '16 13:09 GauravKhanna58

wcf.js uses ws.js which uses xml-crypto. see this thread in xml-crypto, either you can use it directly or do some monkey patch where applies: https://github.com/yaronn/xml-crypto/issues/45

yaronn avatar Sep 15 '16 18:09 yaronn