~aj00200/anonplus/api

« back to all changes in this revision

Viewing changes to src/libs/friends/friend.py

  • Committer: Aj00200
  • Date: 2012-05-26 15:31:50 UTC
  • Revision ID: aj00200@aj00200.org-20120526153150-h0oulwbzgfd6sphi
Fixed another reference to the crypto code and updated the tunnel loading code to only check for Tor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
import libs
9
9
import tunnels
10
10
from libs.events import broadcast
11
 
import libs.encryption.rsa
 
11
import libs.crypto.ciphers.rsa
12
12
from libs.packets import parse_packets, packets_by_id, make_packet
13
13
from libs.morado.functions import register_with_api
14
14
 
30
30
        self.data = ''
31
31
        
32
32
        # Setup Tunnel
33
 
        if self.tunnel_type == 'directudp':
34
 
            self.wconnection = tunnels.registered['directudp'].Tunnel(self)
35
 
        elif self.tunnel_type == 'directudpv6':
36
 
            self.wconnection = tunnels.registered['directudpv6'].Tunnel(self)
37
 
        elif self.tunnel_type == 'tor':
 
33
        # if self.tunnel_type == 'directudp':
 
34
        #     self.wconnection = tunnels.registered['directudp'].Tunnel(self)
 
35
        # elif self.tunnel_type == 'directudpv6':
 
36
        #     self.wconnection = tunnels.registered['directudpv6'].Tunnel(self)
 
37
        if self.tunnel_type == 'tor':
38
38
            self.wconnection = tunnels.registered['tor'].Tunnel(self)
39
39
 
40
40
        # Setup encryption.
41
41
        broadcast('logthis', 'Setting up encryption. %s:%s' % (
42
42
                libs.config['nodekey'], self.keyid))
43
 
        self.encryption = libs.encryption.rsa.Encryption(
 
43
        self.encryption = libs.crypto.ciphers.rsa.Encryption(
44
44
                libs.config['nodekey'], self.keyid)
45
45
 
46
46
    def parse_packets(self):