1 /* Copyright (c) 2020, 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 #ifndef SSL_ACCEPTOR_CONTEXT_STATUS
24 #define SSL_ACCEPTOR_CONTEXT_STATUS
25 
26 /* Functions to show mysql_main interface's TLS properties */
27 class Ssl_mysql_main_status {
28  public:
29   static int show_ssl_ctx_sess_accept(THD *, SHOW_VAR *var, char *buff);
30   static int show_ssl_ctx_sess_accept_good(THD *, SHOW_VAR *var, char *buff);
31   static int show_ssl_ctx_sess_connect_good(THD *, SHOW_VAR *var, char *buff);
32   static int show_ssl_ctx_sess_accept_renegotiate(THD *, SHOW_VAR *var,
33                                                   char *buff);
34   static int show_ssl_ctx_sess_connect_renegotiate(THD *, SHOW_VAR *var,
35                                                    char *buff);
36   static int show_ssl_ctx_sess_cb_hits(THD *, SHOW_VAR *var, char *buff);
37   static int show_ssl_ctx_sess_hits(THD *, SHOW_VAR *var, char *buff);
38   static int show_ssl_ctx_sess_cache_full(THD *, SHOW_VAR *var, char *buff);
39   static int show_ssl_ctx_sess_misses(THD *, SHOW_VAR *var, char *buff);
40   static int show_ssl_ctx_sess_timeouts(THD *, SHOW_VAR *var, char *buff);
41   static int show_ssl_ctx_sess_number(THD *, SHOW_VAR *var, char *buff);
42   static int show_ssl_ctx_sess_connect(THD *, SHOW_VAR *var, char *buff);
43   static int show_ssl_ctx_sess_get_cache_size(THD *, SHOW_VAR *var, char *buff);
44   static int show_ssl_ctx_get_verify_mode(THD *, SHOW_VAR *var, char *buff);
45   static int show_ssl_ctx_get_verify_depth(THD *, SHOW_VAR *var, char *buff);
46   static int show_ssl_ctx_get_session_cache_mode(THD *, SHOW_VAR *var,
47                                                  char *buff);
48   static int show_ssl_get_server_not_before(THD *, SHOW_VAR *var, char *buff);
49   static int show_ssl_get_server_not_after(THD *, SHOW_VAR *var, char *buff);
50   static int show_ssl_get_ssl_ca(THD *, SHOW_VAR *var, char *buff);
51   static int show_ssl_get_ssl_capath(THD *, SHOW_VAR *var, char *buff);
52   static int show_ssl_get_ssl_cert(THD *, SHOW_VAR *var, char *buff);
53   static int show_ssl_get_ssl_key(THD *, SHOW_VAR *var, char *buff);
54   static int show_ssl_get_ssl_cipher(THD *, SHOW_VAR *var, char *buff);
55   static int show_ssl_get_tls_ciphersuites(THD *, SHOW_VAR *var, char *buff);
56   static int show_ssl_get_tls_version(THD *, SHOW_VAR *var, char *buff);
57   static int show_ssl_get_ssl_crl(THD *, SHOW_VAR *var, char *buff);
58   static int show_ssl_get_ssl_crlpath(THD *, SHOW_VAR *var, char *buff);
59 };
60 #endif  // !SSL_ACCEPTOR_CONTEXT_STATUS
61