rTorrent and selfsigned SSL certs

Here is a little tutorial for using rTorrent on sites using self signed SSL certs that I wrote today.

I have taken bits a pieces from various sites around the place.

Broadly speaking the process to get rTorrent working using a self signed cert are these:-

1. Get the cert and convert to a format rTorrent can use
2. Put the cert somewhere you will be able to find
3. Change rTorrents config to ensure it knows where to find the SSL certs

So, here we go.

1. ==Get the cert==
Log into your linux box as the user that will be running rTorrent and change to you home
directory.

Pass the following command……

sudo openssl s_client -connect thesitenamehere.com:443 | tee out_cert

You will see the SSL certificate on your screen, now hit CTRL-C, magically in the directory
you are now in will be a file called out_cert. Now you need to convert the cert to x509
format. To do this pass the following command

sudo openssl x509 -inform PEM -in out_cert -text -out out.pem

You can view the files we created with a text editor if you so wish.

2. ==Put the cert in a know directory==
Now you need to find out where your QNAP/NAS/PC has all the SSL certificates, they could be
in /etc/ssl/certs, take a look. If not you need to find out where they are. Once you
have found where they are copy the out.pem file to the directory where the SSL certs are
lets pretend they are in /etc/ssl/certs. Pass the following command…

sudo cp out.pem /etc/ssl/certs

Then once it is in that directory change to the /etc/ssl/certs directory. Once you are in
there pass the following command….

sudo c_rehash

3. ==The ~rtorrent.rc==
Now you need to find the example ~rtorrent.rc file that comes with rTorrent (note
that it is a hidden file as it starts with ‘~’).
Once found copy it to the home directory of the user that will be running rTorrent. the name of the
file should be ~rtorrent.rc

Now go into the ~rtorrent.rc file and take a look at the options it gives you, this is the
power of rTorrent. Use your favourite text editor, I use vi, there are plenty others.

Anyway, now you need to put the following line at the bottom of the ~rtorrent.rc file

# directory for ssl certificates on self signed trackers
http_capath=/etc/ssl/certs

That should be it. You should be able to connect to your site now and torrent away.

You will need to change the rtorrent.rc file to ensure it works well with your QNAP/NAS/PC. In particular you should alter it to include a watch directory for new .torrent files so its starts automatically downloading, and also perhaps a default save directory etc.

Check out rtorrents site and also read some of the tutorials out there……

Howto: Use rtorrent like a pro
http://libtorrent.rakshasa.no/

Enjoy rTorrent, its the shitzen.

showRSS and bashpodder = no play nice

As happy as I was pissing about with showRSS it doesn’t work well with bashpodder. Strangley, if you have more than one TV show in your personal feed provided by showRSS it will grab the first enclousure but will not grab the subsequent ones. I tested it today by running bashpodder and noticing that all through showRSS said I had an ep of Burn notice and Fifth gear the bashpodder script would not get the Fifth gear enclosure. It was not until I deleted my subscription to Burn Notice that bashpodder grabbed Fifth Gear. 🙁

I’m not 100% sure why the heck this doesn’t work, perhaps its something in bashpodder that will not parse the other feeds if the first on the list is in the bashpodder history log. I notice when I subscribed to the showRSS feed in newsgator the most recent feed is at the bottom of the list as opposed to the top. Not sure if this is the problem, I’m no bash guru but perhaps someone can check out the bashpodder code and advise.

Anyhow, to get around this I have subscribed to showRSS feeds for each of the individual shows separately (ie, I’m not using my personal feed anymore). As long as it works I couldn’t give a rats.