cp_client *cp_client_create(char *host, int port);
cp_client *cp_client_create_ssl(char *host, int port,
char *CA_file, char *CA_directory,
int verification_mode);
cp_client_create_ssl
does the same, but in addition attempts to initialize an SSL_CTX object based
on the given
CA_file
or CA_directory - one of which must be specified. Certificates may be
read from a directory containing trusted certificate authority certificates in
PEM format using the CA_directory, or from a file specified by
CA_file.
See SSL_CTX_load_verify_locations (3) for more on certificate files.
verification_mode
should be either
SSL_VERIFY_NONE
if a connection should be established even if the server certificate cannot be
verified, or
SSL_VERIFY_PEER
to fail the connection on verification failure.
Once a cp_client structure has been successfully created, cp_client_connect may be called to establish a connection.
cp_client object created with cp_client_create or cp_client_create_ssl should be finalized by calling cp_client_destroy.
This document was created by
man2html,
using the manual pages. Time: 14:33:55 GMT, March 14, 2006 |