pony_express v0.2.0 PonyExpress.Tls View Source

default module for dropping in TLS over the erlang sockets library.

the TLS protocol has a very convienient way of upgrading to an SSL connection. This enables the use of the common :gen_tcp library except:

  • on the server side, a handshake directive allows the client to negotiate an upgrade to a secure tls connection. Although tls does support one-way encryption, since PonyExpress requires two-way encryption, the handshake enforces peer verfication.

  • on the client side, an upgrade directive which negotiates an unencrypted :tcp socket's connection to an encrypted tls connection.

Link to this section Summary

Functions

Callback implementation for c:PonyExpress.ConnectionAPI.handshake/2.

Callback implementation for c:PonyExpress.ConnectionAPI.recv/3.

Callback implementation for c:PonyExpress.ConnectionAPI.send/2.

Callback implementation for c:PonyExpress.ConnectionAPI.upgrade/2.

Link to this section Functions

Link to this function

handshake(sock, ssl_opts)

View Source
handshake(:inet.socket(), keyword()) :: :ssl.sslsocket()

Callback implementation for c:PonyExpress.ConnectionAPI.handshake/2.

Link to this function

recv(sock, size, timeout)

View Source

Callback implementation for c:PonyExpress.ConnectionAPI.recv/3.

Callback implementation for c:PonyExpress.ConnectionAPI.send/2.

Callback implementation for c:PonyExpress.ConnectionAPI.upgrade/2.