SOC_EnableSsl

C Specification

#include <nitroWiFi/soc.h>
int SOC_EnableSsl ( int s, SOCSslConnection* con );

Arguments

s Descriptor for SSL-target socket.
con A pointer to the SOCSslConnection structure that maintains the settings and state of the SSL connection.

Return Values

0 or higher Successful.
SOC_EINVAL Invalid processing. (Socket is not TCP-enabled, etc.)
SOC_EMFILE Cannot create any more socket descriptors.
SOC_ENETRESET Socket library is not initialized.
SOC_ENOBUFS Insufficient resources.

Note: Additional errors may be generated and returned in future library releases. Treat all negative return values as general errors.

Description

Encrypts communication for the target socket with SSL. Can only be used with a TCP-enable socket prior to binding. In addition, be aware that functional limitations prevent asynchronous reading and writing for SSL-enabled socket descriptors.

For more information on the SSL communication settings, see the description of the SOCSslConnection structure.

In addition, to ensure secure SSL communications, it is necessary to call the SOC_AddRandomSeed function on a regular basis.

See Also

SOC_AddRandomSeed

Revision History

12/21/2005 Initial version.