Changeset c7000bb
- Timestamp:
- 2010-12-11T15:14:12Z (14 years ago)
- Branches:
- master
- Children:
- 0b77a9b
- Parents:
- 35249d6
- Location:
- skype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/README
r35249d6 rc7000bb 41 41 * PyGObject >= 2.8.0. Older versions are part of PyGTK. (And you don't want to 42 42 install GTK for nothing, right?) 43 * pyopenssl or python-gnutls.44 43 45 44 `bitlbee-skype` has been tested under Linux and Mac OS X. Skype and Skype4py is … … 90 89 ---- 91 90 92 and you have to install `bitlbee-skype` , `skype4py` and `python-gnutls` from91 and you have to install `bitlbee-skype` and `skype4py` from 93 92 source. 94 93 … … 124 123 $ cd Skype4Py-x.x.x.x 125 124 # python setup.py install 126 ----127 128 - To install http://pypi.python.org/pypi/python-gnutls[python-gnutls] from source129 (unless you want to install the plugin for a public server):130 131 ----132 $ tar -zxvf python-gnutls-x.x.x.tar.gz133 $ cd python-gnutls-x.x.x134 # python setup.py install135 ----136 137 NOTE: On OS X you will need the following hacks first:138 139 ----140 $ export LD_LIBRARY_PATH=/opt/local/lib141 $ export CFLAGS="-I/opt/local/include"142 $ export LDFLAGS="-L/opt/local/lib"143 125 ---- 144 126 … … 191 173 http://code.google.com/p/gdata-python-client/source/browse/src/gdata/oauth/rsa.py#87[here]. 192 174 193 - If both pyopenssl and python-gnutls are available, then python-gnutls194 will be used. This behaviour can be overwritten by:195 196 ----197 $ export SKYPED_NO_GNUTLS=1198 ----199 200 175 - Start `skyped` (the tcp server): 201 176 -
skype/skyped.py
r35249d6 rc7000bb 33 33 from ConfigParser import ConfigParser, NoOptionError 34 34 from traceback import print_exception 35 import ssl 35 36 36 37 __version__ = "0.1.1" … … 86 87 def server(host, port): 87 88 global options 88 try: 89 if "SKYPED_NO_GNUTLS" in os.environ.keys(): 90 dprint("Warning, using OpenSSL instead of gnutls as requested (not recommended).") 91 raise ImportError 92 from gnutls import crypto, connection 93 cert = crypto.X509Certificate(open(options.config.sslcert).read()) 94 key = crypto.X509PrivateKey(open(options.config.sslkey).read()) 95 cred = connection.X509Credentials(cert, key) 96 sock = connection.ServerSessionFactory(socket.socket(), cred) 97 except ImportError: 98 from OpenSSL import SSL 99 ctx = SSL.Context(SSL.TLSv1_METHOD) 100 ctx.use_privatekey_file(options.config.sslkey) 101 ctx.use_certificate_file(options.config.sslcert) 102 sock = SSL.Connection(ctx, socket.socket()) 89 sock = socket.socket() 103 90 sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 104 91 sock.bind((host, port)) … … 108 95 def listener(sock, *args): 109 96 global options 110 options.conn, addr = sock.accept() 97 rawsock, addr = sock.accept() 98 options.conn = ssl.wrap_socket(rawsock, 99 server_side=True, 100 certfile=options.config.sslcert, 101 keyfile=options.config.sslkey, 102 ssl_version=ssl.PROTOCOL_TLSv1) 111 103 if hasattr(options.conn, 'handshake'): 112 104 try:
Note: See TracChangeset
for help on using the changeset viewer.