Re: [libtorrent] SSL Torrents
Brought to you by:
arvidn
|
From: arvid <ar...@cs...> - 2013-07-23 08:24:42
|
On 2013-07-22 20:15, Alexander Luetjen wrote:
> Hi there,
>
> I created a torrent with a signature like so:
>
> def test_create_torrent_with_signature(self):
> fs = lt.file_storage()
> lt.add_files(fs, "mytorrent.content")
>
> t = lt.create_torrent(fs)
> t.add_tracker("udp://tracker.publicbt.com:80/announce")
> t.set_creator("unit test")
> t.set_priv(True)
> t.set_root_cert(
> """-----BEGIN RSA PUBLIC KEY-----
> <base64 stuff>
> -----END RSA PUBLIC KEY-----""")
>
> lt.set_piece_hashes(t, ".")
>
> f = open("mytorrent.torrent", "wb")
> f.write(lt.bencode(t.generate()))
> f.close()
You may want to verify that the .torrent file was created correctly,
with your cert in it.
> I expected that a client without a valid certificate signed by that
> CA
> would not be able to download that torrent.
Are you the only one seeding the torrent?
If there is only one seed (or you control all of them) and they all run
libtorrent and use the .torrent with the key in it, they should require
any peer that connects to them that they authenticate. Peers
authenticate by providing a certificate signed by the CA in the torrent.
There is not infrastructure for delivering such certificates to peers
(yet). For a download to work you are expected to provide peers with
such certificates (to indicate that they have access to the swarm).
> However, the download succeeded without any issues.
>
> I am using the libtorrent build 0.16 for Py2.7.
>
> What am I missing? Is the SSL torrent feature disabled in that build?
> Is
> there a mistake in the way I created the torrent?
There are some instructions for how to create SSL torrents here:
http://www.rasterbar.com/products/libtorrent/manual.html#ssl-torrents
--
Arvid Norberg
|