MySQL  8.0.16
Source Code Documentation
sslopt-case.h
Go to the documentation of this file.
1 /* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 /**
24  @file include/sslopt-case.h
25 */
26 
27 #if defined(HAVE_OPENSSL)
28 
29 #ifdef MYSQL_SERVER
30 #error This header is supposed to be used only in the client
31 #endif
32 
33 case OPT_SSL_MODE:
34  opt_ssl_mode = find_type_or_exit(argument, &ssl_mode_typelib, opt->name);
35  ssl_mode_set_explicitly = true;
36  break;
38 #ifndef HAVE_WOLFSSL
40  find_type_or_exit(argument, &ssl_fips_mode_typelib, opt->name) - 1;
41 #endif //#ifndef HAVE_WOLFSSL
42  break;
43 case OPT_SSL_CA:
44 case OPT_SSL_CAPATH:
45  /* Don't change ssl-mode if set explicitly. */
46  if (!ssl_mode_set_explicitly) opt_ssl_mode = SSL_MODE_VERIFY_CA;
47  break;
48 case OPT_SSL_KEY:
49 case OPT_SSL_CERT:
50 case OPT_SSL_CIPHER:
51 case OPT_SSL_CRL:
52 case OPT_SSL_CRLPATH:
53 case OPT_TLS_VERSION:
54 #ifdef HAVE_WOLFSSL
55  /* crl has no effect in wolfSSL */
56  opt_ssl_crl = NULL;
58 #endif /* HAVE_WOLFSSL */
59  break;
60 #endif /* HAVE_OPENSSL */
Definition: client_priv.h:159
static char * opt_ssl_crl
Definition: ssl_acceptor_context.cc:48
static char * opt_ssl_crlpath
Definition: ssl_acceptor_context.cc:48
Definition: client_priv.h:173
ulong opt_ssl_fips_mode
Definition: mysqld.cc:1596
Definition: client_priv.h:74
Sergei Dialog Client Authentication NULL
Definition: dialog.cc:352
Definition: client_priv.h:78
Definition: client_priv.h:77
Definition: client_priv.h:160
Definition: client_priv.h:75
int find_type_or_exit(const char *x, TYPELIB *typelib, const char *option)
Definition: typelib.cc:48
Definition: client_priv.h:76
Definition: client_priv.h:170
Definition: client_priv.h:171
Definition: mysql.h:270