Hi Pepo!

I need a certificate from the server too? In PHP all I have is a client 
certificate and a passphrase. Also if I look at the docs it says "key" is 
the private key of the client and cert is certificate key for the client 
but in your example code you say server-key.pem for both?

On Tuesday, March 6, 2012 2:53:36 AM UTC+1, pepo wrote:
>
> 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
>

 

On Tuesday, March 6, 2012 2:53:36 AM UTC+1, pepo wrote:
>
> 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.-
>

-- 
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