Pike v8.1 release 6

Class SSL.Connection

Inheritance graph
Description

SSL.Connection keeps the state relevant for a single SSL connection. This includes the Context object (which doesn't change), various buffers, the Session object (reused or created as appropriate), and pending read and write states being negotiated.

Each connection will have two sets of read and write States: The current read and write states used for encryption, and pending read and write states to be taken into use when the current keyexchange handshake is finished.

This object is also responsible for managing incoming and outgoing packets. Outgoing packets are stored in queue objects and sent in priority order.

Note

This class should never be created directly, instead one of the classes that inherits it should be used (ie either ClientConnection or ServerConnection) depending on whether this is to be a client-side or server-side connection. These in turn are typically created by File()->create().

See also

ClientConnection, ServerConnection, Context, Session, File, State


Variable application_protocol

string(8bit) SSL.Connection.application_protocol

Description

Selected ALPN (RFC 7301) protocol (if any).

Note

Note that this is a connection property, and needs to be renegotiated on session resumption.


Variable client_random
Variable server_random

string(8bit) SSL.Connection.client_random
string(8bit) SSL.Connection.server_random

Description

Random cookies, sent and received with the hello-messages.


Variable ke

.Cipher.KeyExchange SSL.Connection.ke

Description

The active Cipher.KeyExchange (if any).


Variable sent

int SSL.Connection.sent

Description

Number of application data bytes sent by us.


Variable state

ConnectionState SSL.Connection.state

Description

Bitfield with the current connection state.


Method create

SSL.Connection SSL.Connection(Context ctx)

Description

Initialize the connection state.

Parameter ctx

The context for the connection.