<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
>
    <channel>
        <title>Silas Sewell - June 2010</title>
        <atom:link href="http://www.silassewell.com/blog/2010/06/rss2.xml" rel="self" type="application/rss+xml" />
        <link>http://www.silassewell.com/blog/2010/06</link>
        <description>Infrastructure Development</description>
        <lastBuildDate>Sat, 08 Jan 2011 00:00:00 GMT</lastBuildDate>
        <generator>http://www.silassewell.com/</generator>
        <language>en</language>
        <sy:updatePeriod>hourly</sy:updatePeriod>
        <sy:updateFrequency>1</sy:updateFrequency>

        <item>
            <title>txmpp: A BSD Licensed C++ XMPP Library</title>
            <link>http://www.silassewell.com/blog/2010/06/16/txmpp-a-bsd-licensed-cpp-xmpp-library/</link>
            <pubDate>Wed, 16 Jun 2010 00:00:00 GMT</pubDate>
            <dc:creator>silas</dc:creator>
            <category><![CDATA[C++]]></category><category><![CDATA[Fedora]]></category><category><![CDATA[libjingle]]></category><category><![CDATA[txmpp]]></category><category><![CDATA[XMPP]]></category>
            <guid isPermaLink="true">http://www.silassewell.com/blog/2010/06/16/txmpp-a-bsd-licensed-cpp-xmpp-library/</guid>
            <description><![CDATA[<p><a href="http://github.com/tidg/txmpp">txmpp</a> is a permissively licensed (BSD) C++ XMPP library based on
<a href="http://code.google.com/p/libjingle/">libjingle</a>.</p>

<p>The goals for txmpp and why it's a separate project from libjingle are as
follows:</p>

<ul>
<li>All code is under a single, unified namespace</li>
<li>All code is permissively licensed</li>
<li>Good build and install support for POSIX operating systems</li>
<li>Focus on core XMPP components (the <a href="http://xmpp.org/extensions/xep-0166.html">XEP-0166</a> related code has been removed)</li>
</ul>

<p>I've currently got the library building on Fedora 13, CentOS 5 and OS X. In the
near future I'm going to focus on removing the Windows code and reducing the
amount of code not directly tied to core XMPP functionality.</p>

<p>With all that said I want to keep the core as close to libjingle as possible. I
think it's important that txmpp can track and integrate changes from libjingle
in a relatively simple way.</p>

<p>If you're interested in messing around with the library I'd recommend checking
out the sample code in the <a href="http://github.com/tidg/txmpp/tree/master/src/examples/">examples</a> directory.</p>]]></description>
        </item>

        <item>
            <title>node.js HTTPS (SSL) Server Example</title>
            <link>http://www.silassewell.com/blog/2010/06/03/node-js-https-ssl-server-example/</link>
            <pubDate>Thu, 03 Jun 2010 00:00:00 GMT</pubDate>
            <dc:creator>silas</dc:creator>
            <category><![CDATA[HTTPS]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[node.js]]></category><category><![CDATA[SSL]]></category>
            <guid isPermaLink="true">http://www.silassewell.com/blog/2010/06/03/node-js-https-ssl-server-example/</guid>
            <description><![CDATA[<p>A simple HTTPS server using node.js:</p>

<pre><code class="prettyprint">const crypto = require('crypto'),
      fs = require("fs"),
      http = require("http");

var privateKey = fs.readFileSync('privatekey.pem').toString();
var certificate = fs.readFileSync('certificate.pem').toString();

var credentials = crypto.createCredentials({key: privateKey, cert: certificate});

var handler = function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
};

var server = http.createServer();
server.setSecure(credentials);
server.addListener("request", handler);
server.listen(8000);
</code></pre>

<p>You can generate the <code class="prettyprint">privatekey.pem</code> and <code class="prettyprint">certificate.pem</code> files using the
following commands:</p>

<pre><code class="prettyprint">openssl genrsa -out privatekey.pem 1024 
openssl req -new -key privatekey.pem -out certrequest.csr 
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem
</code></pre>

<p>Update: Thanks to <a href="http://www.geekceo.com/" title="Kord Campbell">Kord Campbell</a> for spotting an issue and sending a fix!</p>]]></description>
        </item>

    </channel>
</rss>
