Package tlslite :: Module session :: Class Session |
[hide private]
[frames] | no frames]

# Class Session

source code

    object --+
             |
            Session

This class represents a TLS session.

TLS distinguishes between connections and sessions. A new handshake creates both a connection and a session. Data is transmitted over the connection.

The session contains a more permanent record of the handshake. The session can be inspected to determine handshake results. The session can also be used to create a new connection through "session resumption". If the client and server both support this, they can create a new connection based on an old session without the overhead of a full handshake.

The session for a tlslite.TLSConnection.TLSConnection can be retrieved from the connection's 'session' attribute.

Instance Methods | [hide private]
__init__(self) x.__init__(...) initializes x; see help(type(x)) for signature | source code
_clone(self) | source code
_setResumable(self, boolean) | source code
create(self, masterSecret, sessionID, cipherSuite, srpUsername, clientCertChain, serverCertChain, tackExt, tackInHelloExt, serverName, resumable=True) | source code
getBreakSigs(self) | source code
str |
getCipherName(self) Get the name of the cipher used with this connection. | source code
str |
getMacName(self) Get the name of the HMAC hash algo used with this connection. | source code
getTackId(self) | source code
bool |
valid(self) If this session can be used for session resumption. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Instance Variables | [hide private]
tlslite.x509certchain.X509CertChain | clientCertChain The client's certificate chain (or None).
tlslite.x509certchain.X509CertChain | serverCertChain The server's certificate chain (or None).
str | srpUsername The client's SRP username (or None).
`tack.structures.TackExtension.TackExtension` | tackExt The server's TackExtension (or None).
`bool` | tackInHelloExt True if a TACK was presented via TLS Extension.

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self) (Constructor) | source code
x.__init__(...) initializes x; see help(type(x)) for signature Overrides: object.__init__ (inherited documentation)

### getCipherName(self) | source code
Get the name of the cipher used with this connection. Returns: str The name of the cipher used with this connection.

### getMacName(self) | source code
Get the name of the HMAC hash algo used with this connection. Returns: str The name of the HMAC hash algo used with this connection.

### valid(self) | source code
If this session can be used for session resumption. Returns: bool If this session can be used for session resumption.