mysql_ssl_set() - mysql/mysql.h
mysql_ssl_set() is used for
establishing secure connections using SSL. It must be called
before mysql_real_connect().mysql_ssl_set()mysql_ssl_set()mysql_real_connect()mysql_real_connect()mysql_ssl_set() does nothing
unless SSL support is enabled in the client library.mysql_ssl_set()mysql_ssl_set()mysql is the connection handler returned from
mysql_init(). The other
parameters are specified as follows:mysqlmysql_init()mysql_init()key is the path name to the key file.
cert is the path name to the certificate
file.
ca is the path name to the certificate
authority file.
capath is the path name to a directory
that contains trusted SSL CA certificates in PEM format.
cipher is a list of permissible ciphers
to use for SSL encryption.key is the path name to the key file.
cert is the path name to the certificate
file.
ca is the path name to the certificate
authority file.
capath is the path name to a directory
that contains trusted SSL CA certificates in PEM format.
cipher is a list of permissible ciphers
to use for SSL encryption.key is the path name to the key file.key is the path name to the key file.keycert is the path name to the certificate
file.cert is the path name to the certificate
file.certca is the path name to the certificate
authority file.ca is the path name to the certificate
authority file.cacapath is the path name to a directory
that contains trusted SSL CA certificates in PEM format.capath is the path name to a directory
that contains trusted SSL CA certificates in PEM format.capathcipher is a list of permissible ciphers
to use for SSL encryption.cipher is a list of permissible ciphers
to use for SSL encryption.cipherAny unused SSL parameters may be given as
NULL.NULL
Syntax
my_bool mysql_ssl_set(MYSQL *mysql, const char *key,
const char *cert, const char *ca, const char *capath, const char
*cipher)
Example
Output / Return Value
This function always returns 0. If SSL setup
is incorrect,
mysql_real_connect() returns an
error when you attempt to connect.0mysql_real_connect()mysql_real_connect()
Limitations
Alternatives / See Also
Reference