Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(10)  |  Derive(0)  |  Import(4)
Raised when a protocol-related problem occurs, such as the remote end does
not speak TLS, or when no shared cipher could be established.

src/k/a/kaa-base-0.99.2dev-384-2b73caca/src/net/tls/m2.py   kaa-base(Download)
# kaa imports
import kaa
from .common import TLSError, TLSProtocolError, TLSVerificationError, TLSSocketBase
 
M2Crypto.threading.init()
            return ip
        except M2Crypto.BIO.BIOError, e:
            raise TLSProtocolError(e.args[0])
 
 
    def _read(self, chunk):
        data = super(M2TLSSocket, self)._read(chunk)
        if not self._tls_started or not data:
            if self._tls_started and not self._tls_ip.finished:
                e = TLSProtocolError('Peer terminated connection before TLS handshake completed')
                decrypted += plaintext
        except M2Crypto.BIO.BIOError, e:
            e = TLSProtocolError(e.args[0])
            if not self._tls_ip.finished:
                self._tls_ip.throw(e.__class__, e, None)
            super(M2TLSSocket, self).write(self._encrypt(hello=True))
        except M2Crypto.BIO.BIOError, e:
            raise TLSProtocolError(e.args[0])
 
 

src/k/a/kaa-base-HEAD/src/net/tls/m2.py   kaa-base(Download)
# kaa imports
import kaa
from .common import TLSError, TLSProtocolError, TLSVerificationError, TLSSocketBase
 
M2Crypto.threading.init()
            return ip
        except M2Crypto.BIO.BIOError, e:
            raise TLSProtocolError(e.args[0])
 
 
    def _read(self, chunk):
        data = super(M2TLSSocket, self)._read(chunk)
        if not self._tls_started or not data:
            if self._tls_started and not self._tls_ip.finished:
                e = TLSProtocolError('Peer terminated connection before TLS handshake completed')
                decrypted += plaintext
        except M2Crypto.BIO.BIOError, e:
            e = TLSProtocolError(e.args[0])
            if not self._tls_ip.finished:
                self._tls_ip.throw(e.__class__, e, None)
            super(M2TLSSocket, self).write(self._encrypt(hello=True))
        except M2Crypto.BIO.BIOError, e:
            raise TLSProtocolError(e.args[0])
 
 

src/k/a/kaa-base-0.99.2dev-384-2b73caca/src/net/tls/tlslite.py   kaa-base(Download)
# kaa imports
import kaa
from .common import TLSError, TLSProtocolError, TLSVerificationError, TLSSocketBase
 
# get logging object

src/k/a/kaa-base-HEAD/src/net/tls/tlslite.py   kaa-base(Download)
# kaa imports
import kaa
from .common import TLSError, TLSProtocolError, TLSVerificationError, TLSSocketBase
 
# get logging object