tfSslServerAddClientAuthCa

Jump to: navigation, search

Table of Contents >> SSL Programmer's Reference


#include <trsocket.h>


int tfSslServerAddClientAuthCa (
int sessionId,
char TM_FAR * caIdPtr
);


Function Description

This function is valid only if both TM_USE_SSL_SERVER and TM_SSL_USE_MUTUAL_AUTH are defined, and must be called against an SSL server session. Later, when SSL server requests client authentication, the SSL server will list all the CAs added by this function call in an SSL message called CertificateRequest. As long as the client has a certificate signed by any of these CAs, client authentication can be accepted and further processed. If this function is not called at all, SSL server will only list the CA who signs its own certificate to the client, and the client should provide a certificate signed by that CA in order to guarantee acceptance. This function can be called multiple times to add multiple potential CAs for client certificate.


Parameters

  • sessionId
    The session Id
  • caIdPtr
    The certificate name of CA to be added


Returns

  • TM_ENOERROR
    Callback function is successfully registered
  • TM_EINVAL
    Invalid session Ids or invalid certificate name (we couldn’t find that certificate according to the name).


Table of Contents >> SSL Programmer's Reference