Hi Martin,
                Take a look of this nodejitsu [1] documentation of the tls
module or the node.js [2] api docs.
The option object has to be this way

var options = {
  key: fs.readFileSync('server-key.pem'),
  cert: fs.readFileSync('server-cert.pem'),

  // This is necessary only if using the client certificate authentication.
  requestCert: true,

  // This is necessary only if the client uses the self-signed certificate.
  ca: [ fs.readFileSync('client-cert.pem') ]};


  [1]
http://docs.nodejitsu.com/articles/cryptography/how-to-use-the-tls-module
  [2] http://nodejs.org/docs/v0.6.0/api/tls.html#tls.connect

Best regards.-

2012/3/5 Martin Lundberg <[email protected]>

> I want to connect to a server which requires the clients to use client
> certificates. I've got this 
> https://gist.github.com/**1981698<https://gist.github.com/1981698> but
> ass you can see I'm getting an error. How am I supposed to do this? I've
> got it working in PHP but would like to know how to do it in node.js.
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to