Changeset 6ba00ac for protocols


Ignore:
Timestamp:
2011-12-11T23:25:40Z (13 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
b926d88
Parents:
57a6eb5f
Message:

skyped: give reasonable error message when cert is missing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/skype/skyped.py

    r57a6eb5f r6ba00ac  
    198198                if not(wait_for_lock(options.lock, 3, 10, "listener")): return False
    199199        rawsock, addr = sock.accept()
    200         options.conn = ssl.wrap_socket(rawsock,
    201                 server_side=True,
    202                 certfile=options.config.sslcert,
    203                 keyfile=options.config.sslkey,
    204                 ssl_version=ssl.PROTOCOL_TLSv1)
     200        try:
     201                options.conn = ssl.wrap_socket(rawsock,
     202                        server_side=True,
     203                        certfile=options.config.sslcert,
     204                        keyfile=options.config.sslkey,
     205                        ssl_version=ssl.PROTOCOL_TLSv1)
     206        except ssl.SSLError:
     207                dprint("Warning, SSL init failed, did you create your certificate?")
     208                return False
    205209        if hasattr(options.conn, 'handshake'):
    206210                try:
Note: See TracChangeset for help on using the changeset viewer.