yaronn / wcf.js

A WCF-compatible web service client stack for node.js. Written in pure javascript!
http://webservices20.blogspot.com/
108 stars 26 forks source link

Can we use pfx certificate with password to make a request #17

Open GauravKhanna58 opened 8 years ago

GauravKhanna58 commented 8 years ago

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,

yaronn commented 8 years ago

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