Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOW-TO rTorrent + SSL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1000
Location: online

PostPosted: Sat Oct 11, 2008 5:33 pm    Post subject: HOW-TO rTorrent + SSL Reply with quote

For Gentoo Linux and similar distributions

Script:


Create the script:
Code:
# nano script.sh


Code:
#!/bin/sh
TRACKER=www.your-tracker.com

openssl s_client -connect $TRACKER:443 </dev/null 2>/dev/null | sed -n '/BEGIN CERTIFICATE/,/END CERTIFICATE/p' >>
/etc/ssl/certs/$TRACKER.crt
openssl x509 -in /etc/ssl/certs/$TRACKER.crt -out /etc/ssl/certs/$TRACKER.der -outform DER
openssl x509 -in /etc/ssl/certs/$TRACKER.der -inform DER -out /etc/ssl/certs/$TRACKER.pem -outform PEM
c_rehash
unset TRACKER


Make it executable:
Code:
# chmod +x script.sh


Run the script :
Code:
# ./script.sh


To check cert:

Code:
$ curl -I --capath /etc/ssl/certs www.your-tracker.com


And you will similar output:

Code:
HTTP/1.1 302 Found
Date: Mon, 18 Aug 2008 05:45:45 GMT
Server: Apache
Location: /
Connection: close
Content-Type: text/html; charset=iso-8859-1


You can run it like this:
Code:

$ rtorrent -o http_capath=/etc/ssl/certs/www.your-tracker.com.pem


You can also add http_capath=/etc/ssl/certs/www.your-tracker.com.pem to your .rtorrent.rc conf

Add to rtorrent.rc the following:
Code:
encryption = require,allow_incoming,try_outgoing,enable_retry,prefer_plaintext


The latest (if existent) will always be here @ Full rTorrent client Configuration
_________________
443640, Questioning, Unsolved, BinHost
Back to top
View user's profile Send private message
vokiel
n00b
n00b


Joined: 01 Oct 2004
Posts: 37

PostPosted: Fri Aug 20, 2010 1:58 am    Post subject: Reply with quote

For the record using http_capath=/etc/ssl/certs/www.your-tracker.com.pem doesn't seem to yield the desired result with 0.8.6-r1. The cert isn't found and you get a connection error. I think the proper option is http_cacert=/etc/ssl/certs/www.your-tracker.com.pem
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum