tlslite.Session.Session

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

## Class 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.

Method Summary
| `__init__(self)`
str | ``getCipherName`(self)` Get the name of the cipher used with this connection.
bool | ``valid`(self)` If this session can be used for session resumption.
| `_calcMasterSecret(self, version, premasterSecret, clientRandom, serverRandom)`
| `_clone(self)`
| `_createSharedKey(self, sharedKeyUsername, sharedKey)`
| `_setResumable(self, boolean)`

Instance Variable Summary
`tlslite.X509CertChain.X509CertChain` or `cryptoIDlib.CertChain.CertChain` | `clientCertChain`: The client's certificate chain (or None).
`tlslite.X509CertChain.X509CertChain` or `cryptoIDlib.CertChain.CertChain` | `serverCertChain`: The server's certificate chain (or None).
str | `sharedKeyUsername`: The client's shared-key username (or None).
str | `srpUsername`: The client's SRP username (or None).

Method Details

### getCipherName(self) Get the name of the cipher used with this connection. Returns: The name of the cipher used with this connection. Either 'aes128', 'aes256', 'rc4', or '3des'. (type=str)

### valid(self) If this session can be used for session resumption. Returns: If this session can be used for session resumption. (type=bool)

Instance Variable Details

### clientCertChain The client's certificate chain (or None). Type: `tlslite.X509CertChain.X509CertChain` or `cryptoIDlib.CertChain.CertChain`

### serverCertChain The server's certificate chain (or None). Type: `tlslite.X509CertChain.X509CertChain` or `cryptoIDlib.CertChain.CertChain`

### sharedKeyUsername The client's shared-key username (or None). Type: str

### srpUsername The client's SRP username (or None). Type: str

Generated by Epydoc 2.0 on Mon Feb 21 21:56:53 2005 | http://epydoc.sf.net