Loggly

Close

If you don't know the subdomain for your account, you can retrieve it by resetting your password. If you don't have an account, signup now.

Blog / Article

Node.js SSL Server Example

Posted 25 Sep, 2010 by Kord Campbell in Code and Log Management

A buddy of mine pinged me today because he saw my name on Silas Sewell’s howto post on doing HTTP/SSL with Node.js. I emailed Silas a few days ago to have him update his cert handling to include toString() on the end of each filesystem read, and he was kind enough to give a shout out to me.

The nut of the problem was that Node.js puts a carriage return or some such cruft on the end when it reads from the filesystem. It was causing me fits with cert validation and I only found the answer by digging through the Node.js IRC channel logs. Logs, heh.

I had already expounded a bit on Silas’s solution because our signing agent uses a key chain. My buddy was also asking me for an example of how to do SSL and listen on multiple ports, so I pastebin’d him up a solution. Figure it was worth posting here too!

I should note that your keys and certs need to be readable by the Node.js server’s user. Obviously.

  • chrelad

    chrelad 2 Dec, 2010 12:05pm

    Nice, thanks for the example :)

  • сосна мебель

    сосна мебель 22 Apr, 2012 05:48am

    Danke, dass Sie den aufrichtigen Versuch, darüber zu sprechen. Ich fühle mich sehr stark darüber und würde gerne mehr lesen. Wenn es in Ordnung ist, wie Sie zusätzliche umfangreiche Weisheit zu erreichen, können Sie etwas dagegen, einschließlich zusätzlicher Artikel ähnlich wie diese mit zusätzlichen Informationen? Es wird außerordentlich nützlich und hilfreich für mich und meine Freunde.

Share Your Thoughts

Blog Categories

Search

Loading

Archives by Month