Section: cp_client (3)
Updated: MARCH 2006
Return to Main Contents
cp_client_connect - establish a tcp connection
int cp_client_connect(cp_client *client);
attempts to establish the connection described by a
or cp_client_create_ssl. By default as many as three retries may be made.
This value may be set by calling cp_client_set_retry.
For ssl sockets, once the tcp connection is established, an ssl handshake will
be attempted and the server certificate will be verified on success. On
verification failure the connection will fail or succeed depending on the
verification mode requested when creating the cp_client structure. The
certificate presented by the server in the ssl handshake process may be
retrieved and examined by calling
may be used to check whether the host name given in the server certificate
matches the host name used for the connection.
Successful calls to
should be matched with a call to
once the communication is done.
returns zero on success or -1 on failure.
returns zero on success, -1 on failure or a positive
number indicating a verification error if the ssl handshake succeeds but the
server certificate does not verify. Positive return codes match the description
for the openssl command line utility
with the added semantic of X509_V_ERR_APPLICATION_VERIFICATION possibly
indicating that no server certificate was presented.
- RETURN VALUE
- SEE ALSO
This document was created by
using the manual pages.
Time: 14:33:55 GMT, March 14, 2006