Public Member Functions | Data Fields
wolfssl.SSLSocket Class Reference
Inheritance diagram for wolfssl.SSLSocket:

Public Member Functions

def __init__ (self, sock=None, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version=PROTOCOL_TLS, ca_certs=None, do_handshake_on_connect=True, family=AF_INET, sock_type=SOCK_STREAM, proto=0, fileno=None, suppress_ragged_eofs=True, ciphers=None, _context=None)
 
def __del__ (self)
 
def context (self)
 
def dup (self)
 
def write (self, data)
 
def send (self, data, flags=0)
 
def sendall (self, data, flags=0)
 
def sendto (self, data, flags_or_addr, addr=None)
 
def sendmsg (self, args, kwargs)
 
def sendfile (self, file, offset=0, count=None)
 
def read (self, length=1024, buffer=None)
 
def recv (self, length=1024, flags=0)
 
def recv_into (self, buffer, nbytes=None, flags=0)
 
def recvfrom (self, length=1024, flags=0)
 
def recvfrom_into (self, buffer, nbytes=None, flags=0)
 
def recvmsg (self, args, kwargs)
 
def recvmsg_into (self, args, kwargs)
 
def shutdown (self, how)
 
def unwrap (self)
 
def do_handshake (self, block=False)
 
def connect (self, addr)
 
def connect_ex (self, addr)
 
def accept (self)
 

Data Fields

 do_handshake_on_connect
 
 suppress_ragged_eofs
 
 server_side
 
 keyfile
 
 certfile
 
 cert_reqs
 
 ssl_version
 
 ca_certs
 
 ciphers
 
 native_object
 

Detailed Description

This class implements a subtype of socket.socket that wraps the
underlying OS socket in an SSL/TLS connection, providing secure
read and write methods over that channel.

Member Function Documentation

◆ accept()

def wolfssl.SSLSocket.accept (   self)
Accepts a new connection from a remote client, and returns a tuple
containing that new connection wrapped with a server-side secure
channel, and the address of the remote client.

◆ connect()

def wolfssl.SSLSocket.connect (   self,
  addr 
)
Connects to remote ADDR, and then wraps the connection in a secure
channel.

◆ connect_ex()

def wolfssl.SSLSocket.connect_ex (   self,
  addr 
)
Connects to remote ADDR, and then wraps the connection in a secure
channel.

◆ context()

def wolfssl.SSLSocket.context (   self)
Returns the context used by this object.

◆ do_handshake()

def wolfssl.SSLSocket.do_handshake (   self,
  block = False 
)
Perform a TLS/SSL handshake.

◆ read()

def wolfssl.SSLSocket.read (   self,
  length = 1024,
  buffer = None 
)
Read up to LENGTH bytes and return them.
Return zero-length string on EOF.

◆ unwrap()

def wolfssl.SSLSocket.unwrap (   self)
Unwraps the underlying OS socket from the SSL/TLS connection.
Returns the wrapped OS socket.

◆ write()

def wolfssl.SSLSocket.write (   self,
  data 
)
Write DATA to the underlying secure channel.
Returns number of bytes of DATA actually transmitted.