RSP_serverUseSSL
Name
RSP_serverUseSSL -- Specifies that this connection should use secure SSL communication.
Synopsis
int RSP_serverUseSSL
(RSP_server *server, char* keyfile);
Description
Sets up internal data structures to use SSL when communicating
with the RSPD. This function is meant to be called after
the server structure is created (with RSP_newServer) but
before an actual connection is established with the
RSP_serverConnect function. Should this function be called
while a connection is active that connection will be closed.
The keyfile parameter is the path to the keyfile used
by SSL. This file does not have to exist; if it does not,
RSP_serverUseSSL will create it.
Returns
This function returns 0 if no error occurred, and -1 otherwise.
Error Conditions
If an error occurs with this function, -1 is returned and
rsp_error is set appropriately. Possible error values are:
RSP_NO_SSL
RSP_SSL_CTX
RSP_SSL_KEYGEN
RSP_SSL_KEYFILE_OPEN
RSP_SSL_KEYFILE_WRITE
RSP_SSL_KEYPAIR
RSP_SSL_CERT
RSP_SSL_CERT_SIGN
RSP_SSL_PRIVATE_KEY