1 /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16 #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
19 #error This header is supposed to be used only in the client
23 opt_ssl_mode= find_type_or_exit(argument, &ssl_mode_typelib,
25 ssl_mode_set_explicitly= TRUE;
28 CLIENT_WARN_DEPRECATED("--ssl", "--ssl-mode");
30 opt_ssl_mode= SSL_MODE_DISABLED;
31 else if (opt_ssl_mode < SSL_MODE_REQUIRED)
32 opt_ssl_mode= SSL_MODE_REQUIRED;
34 case OPT_SSL_VERIFY_SERVER_CERT:
35 CLIENT_WARN_DEPRECATED("--ssl-verify-server-cert",
36 "--ssl-mode=VERIFY_IDENTITY");
37 if (!opt_ssl_verify_server_cert_arg)
39 if (opt_ssl_mode >= SSL_MODE_VERIFY_IDENTITY)
40 opt_ssl_mode= SSL_MODE_VERIFY_CA;
43 opt_ssl_mode= SSL_MODE_VERIFY_IDENTITY;
47 /* Don't change ssl-mode if set explicitly. */
48 if (!ssl_mode_set_explicitly)
49 opt_ssl_mode= SSL_MODE_VERIFY_CA;
58 /* crl has no effect in yaSSL. */
60 opt_ssl_crlpath= NULL;
61 #endif /* HAVE_YASSL */
63 #endif /* HAVE_OPENSSL */