tfHttpcUserSetSsl

Jump to: navigation, search

Table of Contents >> Application Reference >> Web Client


#include <trsocket.h>


int tfHttpcUserSetSsl (
ttHttpcUserConHandle conHandle,
int sessionId,
char * serverName
);



Function Description

After creating a new SSL session ID (with tfSslNewSession()), and adding the certificates specifying the SSL session ID (returned by tfSslNewSession()), call this function so that the HTTP client may set the SSL session id on the socket. Provide the serverName that the connection is to so Treck can verify the certificate that the server sends. This function requires TM_USE_SSL_CLIENT to be defined in <trsystem.h.>



Parameters

  • conHandle
    HTTP client connection handle
  • sessionId
    SSL session ID (as returned by tfSslNewSession())
  • serverName
    Name of the server that Treck will be connecting to



Returns

  • TM_ENOERROR
    Successful
  • TM_EINVAL
    One of the parameters is invalid
  • TM_EPERM
    The user has not yet called tfUseSsl().
  • Other
    The error code as returned from tfGetSocketError() after a failed setsockopt() call.



Table of Contents >> Application Reference >> Web Client