MySQL
8.3.0
Source Code Documentation
ssl_mode.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2020, 2023, 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 also distributed 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 included with MySQL.
14
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
*/
24
25
#ifndef MYSQL_ROUTER_ROUTING_SSL_MODE_INCLUDED
26
#define MYSQL_ROUTER_ROUTING_SSL_MODE_INCLUDED
27
28
enum class
SslMode
{
29
kDefault
= 0,
30
kDisabled
,
31
kPreferred
,
32
kRequired
,
33
kAsClient
,
34
kPassthrough
,
35
};
36
37
enum class
SslVerify
{
38
kDisabled
= 0,
39
kVerifyCa
,
40
kVerifyIdentity
,
41
};
42
43
inline
constexpr
const
char
*
ssl_mode_to_string
(
SslMode
mode
) {
44
switch
(
mode
) {
45
case
SslMode::kDisabled
:
46
return
"DISABLED"
;
47
case
SslMode::kPreferred
:
48
return
"PREFERRED"
;
49
case
SslMode::kRequired
:
50
return
"REQUIRED"
;
51
case
SslMode::kAsClient
:
52
return
"AS_CLIENT"
;
53
case
SslMode::kPassthrough
:
54
return
"PASSTHROUGH"
;
55
case
SslMode::kDefault
:
56
return
""
;
57
}
58
59
return
"unknown"
;
60
}
61
62
#endif
stdx::io::mode
mode
Definition:
file_handle.h:59
ssl_mode_to_string
constexpr const char * ssl_mode_to_string(SslMode mode)
Definition:
ssl_mode.h:43
SslMode
SslMode
Definition:
ssl_mode.h:28
SslMode::kPassthrough
@ kPassthrough
SslMode::kDefault
@ kDefault
SslMode::kDisabled
@ kDisabled
SslMode::kPreferred
@ kPreferred
SslMode::kRequired
@ kRequired
SslMode::kAsClient
@ kAsClient
SslVerify
SslVerify
Definition:
ssl_mode.h:37
SslVerify::kVerifyIdentity
@ kVerifyIdentity
SslVerify::kVerifyCa
@ kVerifyCa
router
src
routing
src
ssl_mode.h
Generated by
1.9.2