MySQL
8.4.2
Source Code Documentation
ssl_mode.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2020, 2024, Oracle and/or its affiliates.
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License, version 2.0,
6
as published by the Free Software Foundation.
7
8
This program is designed to work with certain software (including
9
but not limited to OpenSSL) that is licensed under separate terms,
10
as designated in a particular file or component or in included license
11
documentation. The authors of MySQL hereby grant you an additional
12
permission to link the program and your derivative works with the
13
separately licensed software that they have either included with
14
the program or referenced in the documentation.
15
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with this program; if not, write to the Free Software
23
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
*/
25
26
#ifndef MYSQL_ROUTER_ROUTING_SSL_MODE_INCLUDED
27
#define MYSQL_ROUTER_ROUTING_SSL_MODE_INCLUDED
28
29
enum class
SslMode
{
30
kDefault
= 0,
31
kDisabled
,
32
kPreferred
,
33
kRequired
,
34
kAsClient
,
35
kPassthrough
,
36
};
37
38
enum class
SslVerify
{
39
kDisabled
= 0,
40
kVerifyCa
,
41
kVerifyIdentity
,
42
};
43
44
inline
constexpr
const
char
*
ssl_mode_to_string
(
SslMode
mode
) {
45
switch
(
mode
) {
46
case
SslMode::kDisabled
:
47
return
"DISABLED"
;
48
case
SslMode::kPreferred
:
49
return
"PREFERRED"
;
50
case
SslMode::kRequired
:
51
return
"REQUIRED"
;
52
case
SslMode::kAsClient
:
53
return
"AS_CLIENT"
;
54
case
SslMode::kPassthrough
:
55
return
"PASSTHROUGH"
;
56
case
SslMode::kDefault
:
57
return
""
;
58
}
59
60
return
"unknown"
;
61
}
62
63
#endif
stdx::io::mode
mode
Definition:
file_handle.h:61
ssl_mode_to_string
constexpr const char * ssl_mode_to_string(SslMode mode)
Definition:
ssl_mode.h:44
SslMode
SslMode
Definition:
ssl_mode.h:29
SslMode::kPassthrough
@ kPassthrough
SslMode::kDefault
@ kDefault
SslMode::kDisabled
@ kDisabled
SslMode::kPreferred
@ kPreferred
SslMode::kRequired
@ kRequired
SslMode::kAsClient
@ kAsClient
SslVerify
SslVerify
Definition:
ssl_mode.h:38
SslVerify::kVerifyIdentity
@ kVerifyIdentity
SslVerify::kVerifyCa
@ kVerifyCa
router
src
routing
include
mysqlrouter
ssl_mode.h
Generated by
1.9.2