#include <nitroWiFi/soc.h>
int SOC_EnableSsl ( int s, SOCSslConnection* con );
s |
Descriptor for SSL-target socket. |
con |
A pointer to the SOCSslConnection structure that maintains the settings and state of the SSL connection. |
| 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.
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.
Memory must be allocated for the SOCSslConnection structure passed by the argument until the socket indicated by the argument s closes completely. Specifically, memory should not be used for any other purpose until the function SOC_Close has returned zero for the second time.
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.
2007/01/19 Added a description of the interval during which the SOCSslConnection structure should be maintained.
2005/12/21 Initial version.
CONFIDENTIAL