|
||
Secure sockets implement the MSecureSocket
interface, which contains general methods to make and close a secure
connection, specify and query certificates used in a connection, and send and
receive data. The interface supports implementations that act in both client
mode, i.e. connecting to a remote secure server, and acting as a server for
remote clients.
Secure socket implementations are used to secure an already open and
connected socket. The CSecureSocket
class is instantiated
by applications with a reference to an already connected
RSocket
, and a protocol name that they wish to use. The
CSecureSocket
finds, loads, and creates a secure socket of the
correct implementation. The CSecureSocket
then owns the
instantiated implementation object and acts as a proxy, relaying any method
calls through to the actual implementation object.
Protocol implementations are never directly exposed to applications. The
CSecureSocket
class hides the MSecureSocket
class and
the underlying plugin nature of implementations from applications. New secure
sockets can be created through the static
CSecureSocket::NewL()
method.
A secure socket plugin is provided for TLS1.0/SSL3.0.
Protocol implementations may use methods provided by the
CSecureSocket
to carry out specific actions such as: setting a
secure socket, setting/getting the current server certificate, setting/getting
a specific protocol/version to use if implementations supports more than one,
setting/getting supported cipher suites (cipher suites are methods of
encrypting text).