Product Documentation

FairCom Direct SQL for C and C++

Previous Topic

Next Topic

ctsqlSetTLSClientAuth

Set attributes required by Direct SQL clients that want to authenticate with client certificates.

Declaration

CTSQLRET ctsqlDECL ctsqlSetTLSClientAuth(pCTSQLCONN hConn, const CTSQLCHAR * ClientCert, const CTSQLCHAR * ClientPrivateKey, const CTSQLCHAR * Password)

Description

ctsqlSetTLSClientAuth() sets attributes required for client certificate authentication. It must be called after allocating the connection handle (ctsqlNewConnection) but before connecting (ctsqlConnect).

hConn [IN] - connection handle

ClientCert [IN] - filename of certificate file

ClientPrivateKey [IN] - filename of private key file proving ownership of ClientCert. May be NULL if the private key is in the ClientCert file.

Password [IN] - password to decrypt the client private key. NULL if not encrypted.

Return

Returns CTSQLRET_OK on success.

Returns CTSQLRET_BADARG if hConn is NULL.

Returns CTSQLRET_INVENVHDL if the connection is already active.

See Also

ctsqlNewConnection, ctsqlConnect

TOCIndex