blob: bccf377458024365e6ff80739b19425ac5dc0a30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
.\" Automatically generated by Pandoc 2.5
.\"
.TH "mysql_ssl_set" "3" "" "Version 3.3.1" "MariaDB Connector/C"
.hy
.SS Name
.PP
mysql_ssl_set \- Sets TLS/SSL options
.SS Synopsis
.IP
.nf
\f[C]
#include <mysql.h>
my_bool mysql_ssl_set(MYSQL *mysql,
const char *key,
const char *cert,
const char *ca,
const char *capath,
const char *cipher)
\f[R]
.fi
.SS Description
.PP
Used for establishing a secure TLS connection.
It must be called before attempting to use
\f[B]mysql_real_connect(3)\f[R].
TLS support must be enabled in the client library in order for the
function to have any effect.
.PP
NULL can be used for an unused parameter.
Always returns zero.
.SS Parameter
.IP \[bu] 2
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
\f[B]mysql_init(3)\f[R].
.IP \[bu] 2
\f[C]key\f[R] \- path to the key file.
.IP \[bu] 2
\f[C]cert\f[R] \- path to the certificate file.
.IP \[bu] 2
\f[C]ca\f[R] \- path to the certificate authority file.
.IP \[bu] 2
\f[C]capath\f[R] \- path to the directory containing the trusted TLS CA
certificates in PEM format.
.IP \[bu] 2
\f[C]cipher\f[R] list of permitted (SSLv3, TLSv1.0 or TLSv1.2) cipher
suites to use for TLS encryption.
.SS Notes
.IP \[bu] 2
\f[B]mysql_real_connect(3)\f[R] will return an error if attempting to
connect and TLS is incorrectly set up.
.IP \[bu] 2
Even if Connector/C supports TLSv1.3 protocol, it is not possible yet to
specify TLSv1.3 cipher suites via \f[C]cipher\f[R] parameter.
.SS See also
.IP \[bu] 2
\f[B]mysql_get_ssl_cipher(3)\f[R]
|