Secure Socket Layer

This module provides access to an almost complete Secure Socket Layer interface. However, some behaviour may be dependent on the underlying network driver.

The sslsocket class

class sslsocket(family=AF_INET, type=SOCK_STREAM, proto=IPPROTO_TCP, fileno=None)

This class represents a secure socket based on SSL/TLS protocol. It inherits from socket.socket

Raise __builtins__.IOError exceptions if socket creation goes wrong.

Sockets can be used like this:

# import the ssl module
import ssl
# import a module to access a net driver (wifi, eth,...)
from wireless import wifi
# import the actual net driver
from driver.wifi.your_preferred_net_driver import your_preferred_net_driver

# init the driver

# link the wifi to an AP"Your Wifi SSID",WIFI_WPA2,"Your Wifi Password")

# create a tcp socket
sock = ssl.sslsocket(type=SOCK_STREAM)

# connect the socket to net address on port 443

# send something on the socket!
sock.sendall("Hello World!")